Open Voxel File Format Specification
This is intended as a simple format for exchanging voxel scenes, models and animations etc. There will be a binary voxel data representation with some compression, but extremely highly compressed voxel data is not a primary goal.
The format is currently in the requirements definition and early design stage.
Note that these are currently fairly high level to permit some flexibility in the implementation.
- As simple as possible - implementations should be able to be lightweight
- Open and extensible
- Arbitrary transforms
- Animation:
- Transform animations
- Bone animations (per voxel weights can be included in voxel data)
- Frame-animations (stretch goal)
- Multiple animation tracks
- Materials
- PBR material properties including those needed for transmissive volumes
- Multiple material palettes
- Voxel Data (see below)
- Voxels with arbitrary data/attributes including indexed materials (similar to how vertex data can be specified, see below)
- No arbitrary limitation on size of voxel volume
- Ability to efficiently handle sparsity
- Relatively efficient but simple storage and serialization performance
Simplified example Voxel attributes, can potentially be interleaved or separate streams:
Usage, Number, Type
RGBA_COLOR, 4, UNSIGNED_BYTE
MATERIAL_INDEX, 1, UNSIGNED_BYTE
MATERIAL_INDEX, 1, UNSIGNED_SHORT
DENSITY, 1, FLOAT32
WEIGHTS_n 4, UNSIGNED_NORMALIZED_BYTE
See the Voxel data format issue
The glTF file format with an extension for voxel data and material palettes meets these goals. The .glb binary format is limited to a uint32 length and single uint32 length binary buffer, which is likely too short for large voxel scenes. Thus either external data (which is part of the spec) may need to be used or an alternative binary format might be required. A compressed zip like format may be a good way to handle bundling a gltf file and its associated binary data files.
A voxel data extension has been propossed for glTF, PR #2496 however this does not look like it would meet our Voxel Data goals, but it might be worth experimenting with to check.
See the issue Implementation decision: modify existing format or custom