Struct ufbx.ufbx_load_opts
Options for ufbx_load_file/memory/stream/stdio()
NOTE: Initialize to zero with { 0 }
(C) or { }
(C++)
Assembly: ufbxWrapper.dll
Syntax
public struct ufbx.ufbx_load_opts
Fields
_begin_zero
Declaration
Field Value
_end_zero
Declaration
Field Value
allow_empty_faces
Allow faces with zero indices.
Declaration
public bool allow_empty_faces
Field Value
allow_missing_vertex_position
Allow meshes with no vertex position attribute.
NOTE: If this is set ufbx_mesh.vertex_position.exists
may be false
.
Declaration
public bool allow_missing_vertex_position
Field Value
allow_nodes_out_of_root
Allow nodes that are not connected in any way to the root. Conversely if
disabled, all lone nodes will be parented under ufbx_scene.root_node
.
Declaration
public bool allow_nodes_out_of_root
Field Value
allow_unsafe
UNSAFE: If enabled allows using unsafe options that may fundamentally
break the API guarantees.
Declaration
Field Value
clean_skin_weights
Clean-up skin weights by removing negative, zero and NAN weights.
Declaration
public bool clean_skin_weights
Field Value
connect_broken_elements
Connect related elements even if they are broken. If false
(default)
ufbx_skin_cluster
with a missing bone
field are not included in
the ufbx_skin_deformer.clusters[]
array for example.
Declaration
public bool connect_broken_elements
Field Value
disable_quirks
Don't adjust reading the FBX file depending on the detected exporter
Declaration
public bool disable_quirks
Field Value
evaluate_caches
Evaluate vertex caches (see ufbx_mesh.skinned_vertices)
Declaration
public bool evaluate_caches
Field Value
evaluate_skinning
Evaluate skinning (see ufbx_mesh.skinned_vertices)
Declaration
public bool evaluate_skinning
Field Value
Force a specific file format instead of detecting it.
Declaration
public ufbx.ufbx_file_format file_format
Field Value
How far to read into the file to determine the file format.
Default: 16kB
Declaration
public ulong file_format_lookahead
Field Value
file_size_estimate
Estimated file size for progress reporting
Declaration
public ulong file_size_estimate
Field Value
filename
Filename to use as a base for relative file paths if not specified using
ufbx_load_file()
. Use length = SIZE_MAX
for NULL-terminated strings.
raw_filename
will be derived from this if empty.
Declaration
public ufbx.ufbx_string filename
Field Value
force_single_thread_ascii_parsing
Force ASCII parsing to use a single thread.
The multi-threaded ASCII parsing is slightly more lenient as it ignores
the self-reported size of ASCII arrays, that threaded parsing depends on.
Declaration
public bool force_single_thread_ascii_parsing
Field Value
generate_missing_normals
Generate vertex normals for a meshes that are missing normals.
You can see if the normals have been generated from ufbx_mesh.generated_normals
.
Declaration
public bool generate_missing_normals
Field Value
How to handle geometry transforms in the nodes.
See ufbx_geometry_transform_handling
for an explanation.
Declaration
public ufbx.ufbx_geometry_transform_handling geometry_transform_handling
Field Value
Name for dummy geometry transform helper nodes.
See UFBX_GEOMETRY_TRANSFORM_HANDLING_HELPER_NODES
.
Declaration
public ufbx.ufbx_string geometry_transform_helper_name
Field Value
handedness_conversion_axis
Axis used to mirror for conversion between left-handed and right-handed coordinates.
Declaration
public ufbx.ufbx_mirror_axis handedness_conversion_axis
Field Value
handedness_conversion_retain_winding
Do not change winding of faces when converting handedness.
Declaration
public bool handedness_conversion_retain_winding
Field Value
ignore_all_content
Do not load any content (geometry, animation, embedded)
Declaration
public bool ignore_all_content
Field Value
ignore_animation
Do not load animation curves
Declaration
public bool ignore_animation
Field Value
ignore_embedded
Do not load embedded content
Declaration
public bool ignore_embedded
Field Value
ignore_geometry
Do not load geometry datsa (vertices, indices, etc)
Declaration
public bool ignore_geometry
Field Value
ignore_missing_external_files
Don't fail loading if external files are not found.
Declaration
public bool ignore_missing_external_files
Field Value
index_error_handling
Specify how to handle broken indices.
Declaration
public ufbx.ufbx_index_error_handling index_error_handling
Field Value
inherit_mode_handling
How to handle unconventional transform inherit modes.
See ufbx_inherit_mode_handling
for an explanation.
Declaration
public ufbx.ufbx_inherit_mode_handling inherit_mode_handling
Field Value
key_clamp_threshold
Animation keyframe clamp threshold, only applies to specific interpolation modes.
Declaration
public double key_clamp_threshold
Field Value
load_external_files
Try to open external files referenced by the main file automatically.
Applies to geometry caches and .mtl files for OBJ.
NOTE: This may be risky for untrusted data as the input files may contain
references to arbitrary paths in the filesystem.
NOTE: This only applies to files implicitly referenced by the scene, if
you request additional files via eg. ufbx_load_opts.obj_mtl_path
they
are still loaded.
NOTE: Will fail loading if any external files are not found by default, use
ufbx_load_opts.ignore_missing_external_files
to suppress this, in this case
you can find the errors at ufbx_metadata.warnings[]
as UFBX_WARNING_MISSING_EXTERNAL_FILE
.
Declaration
public bool load_external_files
Field Value
no_format_from_content
Do not attempt to detect file format from file content.
Declaration
public bool no_format_from_content
Field Value
Do not attempt to detect file format from filename extension.
ufbx primarily detects file format from the file header,
this is just used as a fallback.
Declaration
public bool no_format_from_extension
Field Value
node_depth_limit
Maximum depth of the node hirerachy.
Will fail with UFBX_ERROR_NODE_DEPTH_LIMIT
if a node is deeper than this limit.
NOTE: The default of 0 allows arbitrarily deep hierarchies. Be careful if using
recursive algorithms without setting this limit.
Declaration
public uint node_depth_limit
Field Value
normalize_normals
Normalize vertex normals.
Declaration
public bool normalize_normals
Field Value
normalize_tangents
Normalize tangents and bitangents.
Declaration
public bool normalize_tangents
Field Value
obj_axes
Coordinate space .obj files are assumed to be in.
.obj files do not define the coordinate space they use. By default no
coordinate space is assumed and no conversion is performed.
Declaration
public ufbx.ufbx_coordinate_axes obj_axes
Field Value
obj_merge_groups
(.obj) Don't split geometry into meshes by groups.
Declaration
public bool obj_merge_groups
Field Value
obj_merge_objects
(.obj) Don't split geometry into meshes by object.
Declaration
public bool obj_merge_objects
Field Value
obj_mtl_data
(.obj) Data for the .mtl file.
Declaration
public ufbx.ufbx_blob obj_mtl_data
Field Value
obj_mtl_path
(.obj) Path to the .mtl file.
Use length = SIZE_MAX
for NULL-terminated strings.
NOTE: This is used instead of the one in the file even if not found
and sidesteps load_external_files
as it's explicitly requested.
Declaration
public ufbx.ufbx_string obj_mtl_path
Field Value
obj_search_mtl_by_filename
(.obj) Try to find .mtl file with matching filename as the .obj file.
Used if the file specified mtllib
line is not found, eg. for a file called
model.obj
that contains the line usemtl materials.mtl
, ufbx would first
try to open materials.mtl
and if that fails it tries to open model.mtl
.
Declaration
public bool obj_search_mtl_by_filename
Field Value
obj_split_groups
(.obj) Force splitting groups even on object boundaries.
Declaration
public bool obj_split_groups
Field Value
obj_unit_meters
The world unit in meters that .obj files are assumed to be in.
.obj files do not define the working units. By default the unit scale
is read as zero, and no unit conversion is performed.
Declaration
public float obj_unit_meters
Field Value
open_file_cb
External file callbacks (defaults to stdio.h)
Declaration
public ufbx.ufbx_open_file_cb open_file_cb
Field Value
open_main_file_with_default
Ignore open_file_cb
when loading the main file.
Declaration
public bool open_main_file_with_default
Field Value
path_separator
Path separator character, defaults to '
' on Windows and '/' otherwise.
Declaration
public byte path_separator
Field Value
pivot_handling
How to handle pivots.
See ufbx_pivot_handling
for an explanation.
Declaration
public ufbx.ufbx_pivot_handling pivot_handling
Field Value
progress_cb
Declaration
public ufbx.ufbx_progress_cb progress_cb
Field Value
progress_interval_hint
Bytes between progress report calls
Declaration
public ulong progress_interval_hint
Field Value
raw_filename
Raw non-UTF8 filename. Does not support NULL termination.
filename
will be derived from this if empty.
Declaration
public ufbx.ufbx_blob raw_filename
Field Value
read_buffer_size
Buffer size in bytes to use for reading from files or IO callbacks
Declaration
public ulong read_buffer_size
Field Value
result_allocator
Allocator used for the final scene
Declaration
public ufbx.ufbx_allocator_opts result_allocator
Field Value
retain_dom
Retain the raw document structure using ufbx_dom_node
.
Declaration
Field Value
retain_vertex_attrib_w
Retain the 'W' component of mesh normal/tangent/bitangent.
See ufbx_vertex_attrib.values_w
.
Declaration
public bool retain_vertex_attrib_w
Field Value
reverse_winding
Reverse winding of all faces.
If handedness_conversion_retain_winding
is not specified, mirrored meshes
will retain their original winding.
Declaration
public bool reverse_winding
Field Value
Declaration
public ufbx.ufbx_transform root_transform
Field Value
scale_helper_name
Name for dummy scale helper nodes.
See UFBX_INHERIT_MODE_HANDLING_HELPER_NODES
.
Declaration
public ufbx.ufbx_string scale_helper_name
Field Value
skip_mesh_parts
Skip computing ufbx_mesh.material_parts[]
and ufbx_mesh.face_group_parts[]
.
Declaration
public bool skip_mesh_parts
Field Value
skip_skin_vertices
Don't compute ufbx_skin_deformer
vertices
and weights
arrays saving
a bit of memory and time if not needed
Declaration
public bool skip_skin_vertices
Field Value
space_conversion
How to perform space conversion by target_axes
and target_unit_meters
.
See ufbx_space_conversion
for an explanation.
Declaration
public ufbx.ufbx_space_conversion space_conversion
Field Value
strict
Don't allow partially broken FBX files to load
Declaration
Field Value
target_axes
Apply an implicit root transformation to match axes.
Used if ufbx_coordinate_axes_valid(target_axes)
.
Declaration
public ufbx.ufbx_coordinate_axes target_axes
Field Value
target_camera_axes
Target space for camera.
By default FBX cameras point towards the positive X axis.
Used if ufbx_coordinate_axes_valid(target_camera_axes)
.
Declaration
public ufbx.ufbx_coordinate_axes target_camera_axes
Field Value
target_light_axes
Target space for directed lights.
By default FBX lights point towards the negative Y axis.
Used if ufbx_coordinate_axes_valid(target_light_axes)
.
Declaration
public ufbx.ufbx_coordinate_axes target_light_axes
Field Value
target_unit_meters
Scale the scene so that one world-space unit is target_unit_meters
meters.
By default units are not scaled.
Declaration
public float target_unit_meters
Field Value
temp_allocator
Allocator used during loading
Declaration
public ufbx.ufbx_allocator_opts temp_allocator
Field Value
thread_opts
Declaration
public ufbx.ufbx_thread_opts thread_opts
Field Value
unicode_error_handling
Specify how to handle Unicode errors in strings.
Declaration
public ufbx.ufbx_unicode_error_handling unicode_error_handling
Field Value
use_blender_pbr_material
Read Blender materials as PBR values.
Blender converts PBR materials to legacy FBX Phong materials in a deterministic way.
If this setting is enabled, such materials will be read as UFBX_SHADER_BLENDER_PHONG
,
which means ufbx will be able to parse roughness and metallic textures.
Declaration
public bool use_blender_pbr_material
Field Value
Override for the root transform
Declaration
public bool use_root_transform
Field Value
Extension Methods