Skinned mesh file format (.bsm2)
Simple binary file for animated skinned meshes. Contains vertex buffer, index buffer (triangle indices), geometry subsets (ranges in index buffer), material names, animations, and optional bone hierarchy info for physics meshes.
#
File structureThere string
stored as:
For regular animated meshes (without hierarchy info in file) all bone transformation matrices include inverse base pose transform and all parent bones transforms. For physics meshes (with hierarchy info) bone transformation matrices are local and don't include parent and inverse base pos transforms.
#
Tooling.bsm2 files are created from .fbx files by fbx_bsm2 tool: fbx_bsm2 [-hierarchy] [-last_bones] path/to/file.fbx
will output path/to/file.bsm2
.
Options:
-hierarchy
- include hierarchy info for physics.-last_bones
- output full bone chains. Without this conversion will include only bones, which influence mesh vertices. Sometimes bones at the ends of hierarchy chains doesn't influence mesh, but they may be useful for physics simulation.