Roblox Mesh Parser
rbx_mesh is a collection of deserializers for the different mesh versions in Roblox, and a function to detect the version and invoke the correct deserializer. The meshes are decoded into a structure that reflects the on-disk format of the particular mesh version, rather than being translated into a catch-all structure.
Mesh Example
Print the mesh vertices for any mesh version / vertex size
use read_mesh_versioned;
use ;
let file=read?;
let versioned_mesh=read_mesh_versioned?;
match versioned_mesh
# Ok
Union Graphics Example
use read_union_graphics_versioned;
use UnionGraphics;
// this data is extracted from the "MeshData" property of UnionOperation
// the data is not usually contained in the roblox file itself
// but is sourced from the associated "AssetId" of the UnionOperation
let mesh_file=read?;
let mesh=read_union_graphics_versioned?;
// print mesh vertices or vertex positions
match mesh
# Ok
Union Physics Example
use read_union_physics_versioned;
use UnionPhysics;
// this data is extracted from the "PhysicsData" property of UnionOperation
let phys_file=read?;
let mesh=read_union_physics_versioned?;
// Meshes contain multiple convex hulls.
// print vertex positions of the first mesh
match mesh
# Ok