Lightweight FBX Importer
Search Results for

    Show / Hide Table of Contents

    Struct ufbx.ufbx_load_opts

    Options for ufbx_load_file/memory/stream/stdio() NOTE: Initialize to zero with { 0 } (C) or { } (C++)

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: ufbxWrapper
    Assembly: ufbxWrapper.dll
    Syntax
    public struct ufbx.ufbx_load_opts

    Fields

    _begin_zero

    Declaration
    public uint _begin_zero
    Field Value
    Type Description
    uint

    _end_zero

    Declaration
    public uint _end_zero
    Field Value
    Type Description
    uint

    allow_empty_faces

    Allow faces with zero indices.

    Declaration
    public bool allow_empty_faces
    Field Value
    Type Description
    bool

    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
    Type Description
    bool

    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
    Type Description
    bool

    allow_unsafe

    UNSAFE: If enabled allows using unsafe options that may fundamentally break the API guarantees.

    Declaration
    public bool allow_unsafe
    Field Value
    Type Description
    bool

    clean_skin_weights

    Clean-up skin weights by removing negative, zero and NAN weights.

    Declaration
    public bool clean_skin_weights
    Field Value
    Type Description
    bool

    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
    Type Description
    bool

    disable_quirks

    Don't adjust reading the FBX file depending on the detected exporter

    Declaration
    public bool disable_quirks
    Field Value
    Type Description
    bool

    evaluate_caches

    Evaluate vertex caches (see ufbx_mesh.skinned_vertices)

    Declaration
    public bool evaluate_caches
    Field Value
    Type Description
    bool

    evaluate_skinning

    Evaluate skinning (see ufbx_mesh.skinned_vertices)

    Declaration
    public bool evaluate_skinning
    Field Value
    Type Description
    bool

    file_format

    Force a specific file format instead of detecting it.

    Declaration
    public ufbx.ufbx_file_format file_format
    Field Value
    Type Description
    ufbx.ufbx_file_format

    file_format_lookahead

    How far to read into the file to determine the file format. Default: 16kB

    Declaration
    public ulong file_format_lookahead
    Field Value
    Type Description
    ulong

    file_size_estimate

    Estimated file size for progress reporting

    Declaration
    public ulong file_size_estimate
    Field Value
    Type Description
    ulong

    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
    Type Description
    ufbx.ufbx_string

    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
    Type Description
    bool

    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
    Type Description
    bool

    geometry_transform_handling

    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
    Type Description
    ufbx.ufbx_geometry_transform_handling

    geometry_transform_helper_name

    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
    Type Description
    ufbx.ufbx_string

    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
    Type Description
    ufbx.ufbx_mirror_axis

    handedness_conversion_retain_winding

    Do not change winding of faces when converting handedness.

    Declaration
    public bool handedness_conversion_retain_winding
    Field Value
    Type Description
    bool

    ignore_all_content

    Do not load any content (geometry, animation, embedded)

    Declaration
    public bool ignore_all_content
    Field Value
    Type Description
    bool

    ignore_animation

    Do not load animation curves

    Declaration
    public bool ignore_animation
    Field Value
    Type Description
    bool

    ignore_embedded

    Do not load embedded content

    Declaration
    public bool ignore_embedded
    Field Value
    Type Description
    bool

    ignore_geometry

    Do not load geometry datsa (vertices, indices, etc)

    Declaration
    public bool ignore_geometry
    Field Value
    Type Description
    bool

    ignore_missing_external_files

    Don't fail loading if external files are not found.

    Declaration
    public bool ignore_missing_external_files
    Field Value
    Type Description
    bool

    index_error_handling

    Specify how to handle broken indices.

    Declaration
    public ufbx.ufbx_index_error_handling index_error_handling
    Field Value
    Type Description
    ufbx.ufbx_index_error_handling

    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
    Type Description
    ufbx.ufbx_inherit_mode_handling

    key_clamp_threshold

    Animation keyframe clamp threshold, only applies to specific interpolation modes.

    Declaration
    public double key_clamp_threshold
    Field Value
    Type Description
    double

    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
    Type Description
    bool

    no_format_from_content

    Do not attempt to detect file format from file content.

    Declaration
    public bool no_format_from_content
    Field Value
    Type Description
    bool

    no_format_from_extension

    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
    Type Description
    bool

    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
    Type Description
    uint

    normalize_normals

    Normalize vertex normals.

    Declaration
    public bool normalize_normals
    Field Value
    Type Description
    bool

    normalize_tangents

    Normalize tangents and bitangents.

    Declaration
    public bool normalize_tangents
    Field Value
    Type Description
    bool

    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
    Type Description
    ufbx.ufbx_coordinate_axes

    obj_merge_groups

    (.obj) Don't split geometry into meshes by groups.

    Declaration
    public bool obj_merge_groups
    Field Value
    Type Description
    bool

    obj_merge_objects

    (.obj) Don't split geometry into meshes by object.

    Declaration
    public bool obj_merge_objects
    Field Value
    Type Description
    bool

    obj_mtl_data

    (.obj) Data for the .mtl file.

    Declaration
    public ufbx.ufbx_blob obj_mtl_data
    Field Value
    Type Description
    ufbx.ufbx_blob

    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
    Type Description
    ufbx.ufbx_string

    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
    Type Description
    bool

    obj_split_groups

    (.obj) Force splitting groups even on object boundaries.

    Declaration
    public bool obj_split_groups
    Field Value
    Type Description
    bool

    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
    Type Description
    float

    open_file_cb

    External file callbacks (defaults to stdio.h)

    Declaration
    public ufbx.ufbx_open_file_cb open_file_cb
    Field Value
    Type Description
    ufbx.ufbx_open_file_cb

    open_main_file_with_default

    Ignore open_file_cb when loading the main file.

    Declaration
    public bool open_main_file_with_default
    Field Value
    Type Description
    bool

    path_separator

    Path separator character, defaults to '
    ' on Windows and '/' otherwise.

    Declaration
    public byte path_separator
    Field Value
    Type Description
    byte

    pivot_handling

    How to handle pivots. See ufbx_pivot_handling for an explanation.

    Declaration
    public ufbx.ufbx_pivot_handling pivot_handling
    Field Value
    Type Description
    ufbx.ufbx_pivot_handling

    progress_cb

    Progress reporting

    Declaration
    public ufbx.ufbx_progress_cb progress_cb
    Field Value
    Type Description
    ufbx.ufbx_progress_cb

    progress_interval_hint

    Bytes between progress report calls

    Declaration
    public ulong progress_interval_hint
    Field Value
    Type Description
    ulong

    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
    Type Description
    ufbx.ufbx_blob

    read_buffer_size

    Buffer size in bytes to use for reading from files or IO callbacks

    Declaration
    public ulong read_buffer_size
    Field Value
    Type Description
    ulong

    result_allocator

    Allocator used for the final scene

    Declaration
    public ufbx.ufbx_allocator_opts result_allocator
    Field Value
    Type Description
    ufbx.ufbx_allocator_opts

    retain_dom

    Retain the raw document structure using ufbx_dom_node.

    Declaration
    public bool retain_dom
    Field Value
    Type Description
    bool

    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
    Type Description
    bool

    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
    Type Description
    bool

    root_transform

    Declaration
    public ufbx.ufbx_transform root_transform
    Field Value
    Type Description
    ufbx.ufbx_transform

    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
    Type Description
    ufbx.ufbx_string

    skip_mesh_parts

    Skip computing ufbx_mesh.material_parts[] and ufbx_mesh.face_group_parts[].

    Declaration
    public bool skip_mesh_parts
    Field Value
    Type Description
    bool

    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
    Type Description
    bool

    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
    Type Description
    ufbx.ufbx_space_conversion

    strict

    Don't allow partially broken FBX files to load

    Declaration
    public bool strict
    Field Value
    Type Description
    bool

    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
    Type Description
    ufbx.ufbx_coordinate_axes

    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
    Type Description
    ufbx.ufbx_coordinate_axes

    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
    Type Description
    ufbx.ufbx_coordinate_axes

    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
    Type Description
    float

    temp_allocator

    Allocator used during loading

    Declaration
    public ufbx.ufbx_allocator_opts temp_allocator
    Field Value
    Type Description
    ufbx.ufbx_allocator_opts

    thread_opts

    Threading options

    Declaration
    public ufbx.ufbx_thread_opts thread_opts
    Field Value
    Type Description
    ufbx.ufbx_thread_opts

    unicode_error_handling

    Specify how to handle Unicode errors in strings.

    Declaration
    public ufbx.ufbx_unicode_error_handling unicode_error_handling
    Field Value
    Type Description
    ufbx.ufbx_unicode_error_handling

    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
    Type Description
    bool

    use_root_transform

    Override for the root transform

    Declaration
    public bool use_root_transform
    Field Value
    Type Description
    bool

    Extension Methods

    ufbx_load_opts_safe.set_open_file_cb(ref ufbx.ufbx_load_opts, ufbx_load_opts_safe.ufbx_open_file_fn_safe, object)
    ufbx_load_opts_safe.set_progress_cb(ref ufbx.ufbx_load_opts, ufbx_load_opts_safe.ufbx_progress_fn_safe, object)
    In this article
    Back to top Generated by DocFX