InternalGeometry AABBs (six floats each: minX, minY, minZ, maxX, maxY, maxZ).
Vertex RGBA colours (Uint8 × 4 per vertex).
Per-geometry base into aabbs (six floats).
Per-geometry base into normals. 0xffffffff (UINT32_MAX)
indicates the geometry has no normals.
Per-geometry primitive type: 0 — TrianglesPrimitive 1 — SolidPrimitive 2 — SurfacePrimitive 3 — LinesPrimitive 4 — PointsPrimitive
Per-geometry base into uvs. 0xffffffff indicates the
geometry has no UVs.
Per-material string ID.
Per-material PBR + alpha attributes, eight bytes each (in order): color R, color G, color B, opacity, roughness, metallic, alphaMode (0=OPAQUE, 1=MASK, 2=BLEND), alphaCutoff
All values quantised to [0, 255] from [0, 1].
Per-material texture references, five Int32 entries each (in order): colorTextureIndex, metallicRoughnessTextureIndex, normalsTextureIndex, occlusionTextureIndex, emissiveTextureIndex
Each entry is a 0-based index into the texture array, or -1 to
indicate "no texture".
Per-mesh material reference: index into the material array, or
-1 to fall back to eachMeshMaterialAttributes.
Per-mesh inline RGBA colour fallback (4 bytes/mesh: R, G, B,
opacity). Used when eachMeshMaterial for that mesh is -1
— i.e. the mesh has no material reference and renders as a flat
colour.
Per-texture base into textureData.
Per-texture pixel height.
Per-texture string ID.
Per-texture media type, matching PNGMediaType etc. Stored as a small integer: 0 — PNG 1 — JPEG 2 — GIF 255 — opaque transcoded buffer (treat as raw bytes; not decoded at load time)
Per-texture sampler params, five bytes each (in order): minFilter, magFilter, wrapS, wrapT, wrapR
Each is the small-integer code from constants: 1 — RepeatWrapping 2 — ClampToEdgeWrapping 3 — MirroredRepeatWrapping 4 — NearestFilter 5 — LinearFilter 6 — NearestMipMapNearestFilter 7 — LinearMipMapNearestFilter 8 — NearestMipMapLinearFilter 9 — LinearMipMapLinearFilter
Per-texture pixel width.
32-bit edge-line indices.
32-bit triangle / line indices.
Octahedral RG16UI vertex normals — one (x, y) pair per vertex. Geometries that don't carry normals occupy zero range.
Quantised vertex positions (RGB16UI per vertex × 3).
Concatenated encoded image bytes for every texture in the model (typically PNG / JPEG / GIF). The eachTextureMediaType and eachTextureDataBase arrays describe how to slice and decode.
RG32F vertex UVs — one (u, v) pair per vertex. Floats (not
quantised) so tiling values outside [0, 1] round-trip through
the file intact, mirroring the runtime VertexUVTexture format.
XGF v2 file-format payload — extends v1 with PBR materials, textures, per-geometry normals and per-geometry UVs.
Pack order in the binary form is the field-declaration order below;
packXGFandunpackXGFread/write it positionally.