write_mesh_header¶
-
subsurface.writer.to_rex.mesh_encoder.
write_mesh_header
(n_vtx_coord, n_triangles, start_vtx_coord, start_nor_coord, start_tex_coord, start_vtx_colors, start_triangles, name, material_id=1, n_nor_coord=0, n_tex_coord=0, n_vtx_colors=0, lod=1, max_lod=1)[source]¶ Function to write MESH DATA BLOCK header. The header size is fixed at 128 bytes.
- Parameters
n_vtx_coord – number of vertex coordinates
n_triangles – number of triangles
start_vtx_coord – start vertex coordinate block (relative to mesh block start)
start_nor_coord – start vertex normals block (relative to mesh block start)
start_tex_coord – start of texture coordinate block (relative to mesh block start)
start_vtx_colors – start of colors block (relative to mesh block start)
start_triangles – start triangle block for vertices (relative to mesh block start)
name (str) – Name of the mesh
material_id (int) – id which refers to the corresponding material block in this file
n_nor_coord – number of normal coordinates (can be zero)
n_tex_coord – number of texture coordinates (can be zero)
n_vtx_colors – number of vertex colors (can be zero)
lod (int) – level of detail for the given geometry
max_lod (int) – maximal level of detail for given geometry
- Returns
array of bytes
- Return type
bytes