Struct ufbx.ufbx_mesh
Polygonal mesh geometry.
Example mesh with two triangles (x, z) and a quad (y).
The faces have a constant UV coordinate x/y/z.
The vertices have per vertex normals that point up/down.
^ ^ ^
A---B-----C
|x / /|
| / y / |
|/ / z|
D-----E---F
v v v
Attributes may have multiple values within a single vertex, for example a
UV seam vertex has two UV coordinates. Thus polygons are defined using
an index that counts each corner of each face polygon. If an attribute is
defined (even per-vertex) it will always have a valid indices
array.
{0,3} {3,4} {7,3} faces ({ index_begin, num_indices })
0 1 2 3 4 5 6 7 8 9 index
0 1 3 1 2 4 3 2 4 5 vertex_indices[index]
A B D B C E D C E F vertices[vertex_indices[index]]
0 0 1 0 0 1 1 0 1 1 vertex_normal.indices[index]
^ ^ v ^ ^ v v ^ v v vertex_normal.data[vertex_normal.indices[index]]
0 0 0 1 1 1 1 2 2 2 vertex_uv.indices[index]
x x x y y y y z z z vertex_uv.data[vertex_uv.indices[index]]
Vertex position can also be accessed uniformly through an accessor:
0 1 3 1 2 4 3 2 4 5 vertex_position.indices[index]
A B D B C E D C E F vertex_position.data[vertex_position.indices[index]]
Some geometry data is specified per logical vertex. Vertex positions are
the only attribute that is guaranteed to be defined uniquely per vertex.
Vertex attributes may be defined per vertex if unique_per_vertex == true
.
You can access the per-vertex values by first finding the first index that
refers to the given vertex.
0 1 2 3 4 5 vertex
A B C D E F vertices[vertex]
0 1 4 2 5 9 vertex_first_index[vertex]
0 0 0 1 1 1 vertex_normal.indices[vertex_first_index[vertex]]
^ ^ ^ v v v vertex_normal.data[vertex_normal.indices[vertex_first_index[vertex]]]
Assembly: ufbxWrapper.dll
Syntax
public struct ufbx.ufbx_mesh
Fields
_anonymous_1
Polygonal mesh geometry.
Example mesh with two triangles (x, z) and a quad (y).
The faces have a constant UV coordinate x/y/z.
The vertices have per vertex normals that point up/down.
^ ^ ^
A---B-----C
|x / /|
| / y / |
|/ / z|
D-----E---F
v v v
Attributes may have multiple values within a single vertex, for example a
UV seam vertex has two UV coordinates. Thus polygons are defined using
an index that counts each corner of each face polygon. If an attribute is
defined (even per-vertex) it will always have a valid indices
array.
{0,3} {3,4} {7,3} faces ({ index_begin, num_indices })
0 1 2 3 4 5 6 7 8 9 index
0 1 3 1 2 4 3 2 4 5 vertex_indices[index]
A B D B C E D C E F vertices[vertex_indices[index]]
0 0 1 0 0 1 1 0 1 1 vertex_normal.indices[index]
^ ^ v ^ ^ v v ^ v v vertex_normal.data[vertex_normal.indices[index]]
0 0 0 1 1 1 1 2 2 2 vertex_uv.indices[index]
x x x y y y y z z z vertex_uv.data[vertex_uv.indices[index]]
Vertex position can also be accessed uniformly through an accessor:
0 1 3 1 2 4 3 2 4 5 vertex_position.indices[index]
A B D B C E D C E F vertex_position.data[vertex_position.indices[index]]
Some geometry data is specified per logical vertex. Vertex positions are
the only attribute that is guaranteed to be defined uniquely per vertex.
Vertex attributes may be defined per vertex if unique_per_vertex == true
.
You can access the per-vertex values by first finding the first index that
refers to the given vertex.
0 1 2 3 4 5 vertex
A B C D E F vertices[vertex]
0 1 4 2 5 9 vertex_first_index[vertex]
0 0 0 1 1 1 vertex_normal.indices[vertex_first_index[vertex]]
^ ^ ^ v v v vertex_normal.data[vertex_normal.indices[vertex_first_index[vertex]]]
Declaration
public ufbx.ufbx_mesh._anonymous_1_struct _anonymous_1
Field Value
Declaration
public ufbx.ufbx_element_list all_deformers
Field Value
Declaration
public ufbx.ufbx_blend_deformer_list blend_deformers
Field Value
Declaration
public ufbx.ufbx_cache_deformer_list cache_deformers
Field Value
color_sets
Declaration
public ufbx.ufbx_color_set_list color_sets
Field Value
edge_crease
Crease value for subdivision surfaces
Declaration
public ufbx.ufbx_real_list edge_crease
Field Value
edge_smoothing
Should the edge have soft normals
Declaration
public ufbx.ufbx_bool_list edge_smoothing
Field Value
edge_visibility
Should the edge be visible
Declaration
public ufbx.ufbx_bool_list edge_visibility
Field Value
edges
Declaration
public ufbx.ufbx_edge_list edges
Field Value
face_group
Face polygon group index, indices to ufbx_mesh.face_groups[]
Declaration
public ufbx.ufbx_uint32_list face_group
Field Value
face_group_parts
Segments for each face group.
Declaration
public ufbx.ufbx_mesh_part_list face_group_parts
Field Value
face_groups
Face groups for this mesh.
Declaration
public ufbx.ufbx_face_group_list face_groups
Field Value
face_hole
Should the face be hidden as a "hole"
Declaration
public ufbx.ufbx_bool_list face_hole
Field Value
face_material
Indices to ufbx_mesh.materials[]
and ufbx_node.materials[]
Declaration
public ufbx.ufbx_uint32_list face_material
Field Value
face_smoothing
Should the face have soft normals
Declaration
public ufbx.ufbx_bool_list face_smoothing
Field Value
faces
Declaration
public ufbx.ufbx_face_list faces
Field Value
from_tessellated_nurbs
Declaration
public bool from_tessellated_nurbs
Field Value
generated_normals
Normals have been generated instead of evaluated.
Either from missing normals (via ufbx_load_opts.generate_missing_normals
), skinning,
tessellation, or subdivision.
Declaration
public bool generated_normals
Field Value
material_part_usage_order
Order of material_parts
by first face that refers to it.
Useful for compatibility with FBX SDK and various importers using it,
as they use this material order by default.
Declaration
public ufbx.ufbx_uint32_list material_part_usage_order
Field Value
material_parts
Segments that use a given material.
Defined even if the mesh doesn't have any materials.
Declaration
public ufbx.ufbx_mesh_part_list material_parts
Field Value
materials
Materials used by the mesh.
NOTE: These can be wrong if you want to support per-instance materials!
Use ufbx_node.materials[]
to get the per-instance materials at the same indices.
Declaration
public ufbx.ufbx_material_list materials
Field Value
max_face_triangles
Maximum number of triangles in a face in this mesh
Declaration
public ulong max_face_triangles
Field Value
num_edges
Number of edges in the mesh.
NOTE: May be zero in valid meshes if the file doesn't contain edge adjacency data!
Declaration
Field Value
num_empty_faces
Number of faces with zero vertices
Declaration
public ulong num_empty_faces
Field Value
num_faces
Number of faces (polygons) in the mesh
Declaration
Field Value
num_indices
Number of combiend vertex/attribute tuples
Declaration
Field Value
num_line_faces
Number of faces with two vertices
Declaration
public ulong num_line_faces
Field Value
num_point_faces
Number of faces with a single vertex
Declaration
public ulong num_point_faces
Field Value
num_triangles
Number of triangles if triangulated
Declaration
public ulong num_triangles
Field Value
num_vertices
Number of logical "vertex" points
Declaration
public ulong num_vertices
Field Value
reversed_winding
The winding of the faces has been reversed.
Declaration
public bool reversed_winding
Field Value
Declaration
public ufbx.ufbx_skin_deformer_list skin_deformers
Field Value
skinned_is_local
Declaration
public bool skinned_is_local
Field Value
skinned_normal
Declaration
public ufbx.ufbx_vertex_vec3 skinned_normal
Field Value
skinned_position
Declaration
public ufbx.ufbx_vertex_vec3 skinned_position
Field Value
subdivision_boundary
Declaration
public ufbx.ufbx_subdivision_boundary subdivision_boundary
Field Value
subdivision_display_mode
Declaration
public ufbx.ufbx_subdivision_display_mode subdivision_display_mode
Field Value
subdivision_evaluated
Declaration
public bool subdivision_evaluated
Field Value
subdivision_preview_levels
Declaration
public uint subdivision_preview_levels
Field Value
subdivision_render_levels
Declaration
public uint subdivision_render_levels
Field Value
subdivision_result
Declaration
public ufbx.ufbx_subdivision_result* subdivision_result
Field Value
subdivision_uv_boundary
Declaration
public ufbx.ufbx_subdivision_boundary subdivision_uv_boundary
Field Value
uv_sets
Multiple named UV/color sets
NOTE: The first set contains the same data as vertex_uv/color
!
Declaration
public ufbx.ufbx_uv_set_list uv_sets
Field Value
vertex_bitangent
(optional) Tangent vector in UV.y direction
Declaration
public ufbx.ufbx_vertex_vec3 vertex_bitangent
Field Value
vertex_color
(optional) Per-vertex RGBA color
Declaration
public ufbx.ufbx_vertex_vec4 vertex_color
Field Value
vertex_crease
(optional) Crease value for subdivision surfaces
Declaration
public ufbx.ufbx_vertex_real vertex_crease
Field Value
vertex_first_index
First index referring to a given vertex, UFBX_NO_INDEX
if the vertex is unused.
Declaration
public ufbx.ufbx_uint32_list vertex_first_index
Field Value
vertex_indices
Logical vertices and positions, alternatively you can use
vertex_position
for consistent interface with other attributes.
Declaration
public ufbx.ufbx_uint32_list vertex_indices
Field Value
vertex_normal
(optional) Normal vectors, always defined if ufbx_load_opts.generate_missing_normals
Declaration
public ufbx.ufbx_vertex_vec3 vertex_normal
Field Value
vertex_position
Declaration
public ufbx.ufbx_vertex_vec3 vertex_position
Field Value
vertex_tangent
(optional) Tangent vector in UV.x direction
Declaration
public ufbx.ufbx_vertex_vec3 vertex_tangent
Field Value
vertex_uv
(optional) UV / texture coordinates
Declaration
public ufbx.ufbx_vertex_vec2 vertex_uv
Field Value
vertices
Declaration
public ufbx.ufbx_vec3_list vertices
Field Value
Properties
element
Declaration
public ufbx.ufbx_element element { get; }
Property Value
element_id
Declaration
public uint element_id { get; }
Property Value
instances
Declaration
public ufbx.ufbx_node_list instances { get; }
Property Value
name
Declaration
public ufbx.ufbx_string name { get; }
Property Value
props
Declaration
public ufbx.ufbx_props props { get; }
Property Value
typed_id
Declaration
public uint typed_id { get; }
Property Value