# Scene Binary Format (SCN1) Binary format for 3D scenes exported from Blender. ## File Layout - **Extension:** `.bin` or `.scene` - **Endianness:** Little Endian - **Structure:** Header + Object Blocks ## Format Specification ```cpp // Header (16 bytes) struct Header { char magic[4]; // "SCN1" uint32_t num_objects; uint32_t num_cameras; // Reserved uint32_t num_lights; // Reserved }; // Object Block (repeated num_objects times) struct ObjectBlock { char name[64]; // UTF-8, null-padded uint32_t type; // ObjectType enum vec3 position; // 12 bytes quat rotation; // 16 bytes (x, y, z, w) vec3 scale; // 12 bytes vec4 color; // 16 bytes (r, g, b, a) uint32_t mesh_len; // Mesh name length (N) char mesh_name[N]; // If N > 0 float mass; float restitution; uint32_t is_static; // 0=Dynamic, 1=Static }; ``` ### Object Types ```cpp enum class ObjectType { CUBE = 0, SPHERE = 1, PLANE = 2, TORUS = 3, BOX = 4, SKYBOX = 5, MESH = 6 }; ``` ## Asset Resolution Mesh names (e.g., "MESH_CUBE") resolve to runtime `AssetId` via `GetAssetIdByName`.