Principle:Google deepmind Mujoco Model Binary Export
| Knowledge Sources | |
|---|---|
| Domains | Model_IO, Serialization |
| Last Updated | 2026-02-15 06:00 GMT |
Overview
Process of serializing a compiled physics model into a compact binary format for fast subsequent loading.
Description
Model Binary Export writes a compiled mjModel to the MJB (MuJoCo Binary) format. The binary contains a version header, all model size fields, configuration options, visual settings, statistics, and the full set of data arrays. This format enables fast model loading by skipping XML parsing and compilation. The binary can be written to a file or a memory buffer.
Usage
Use after compiling a model from XML when you want to save the compiled result for faster future loading, or for distribution without exposing the source XML.
Theoretical Basis
The serialization format is:
- Header: 5 integers (magic ID, sizeof(mjtNum), number of sizes, MuJoCo version, number of pointers)
- Sizes: All dimension fields from mjModel
- Options/Visual/Statistics: Configuration structs
- Arrays: All pointer arrays in X-macro order, each with its full data