3 releases
0.1.2 | Oct 15, 2024 |
---|---|
0.1.1 | Oct 13, 2024 |
0.1.0 | Oct 12, 2024 |
#742 in Data structures
506 downloads per month
28KB
651 lines
vss-rs
A rust library for reading and writing voxel data and Sparse Voxel Octrees (SVO) ported from the C++ library vss. It also supports converting voxel data to svo but only cpu-sided.
Bvox
Header pattern
u8 version @ 0x00;
u32 chunk_res @ 0x04;child_mask
u32 chunk_size @ 0x08;
bool run_length_encoded @ 0x0C;
bool morton_encoded @ 0x0D;
u8 data[<data_length>] @ 0x10;
Palette
Coming soon.
Data Format
Each Voxel is an u8
, which is a color index into the palette. Currently only 0
or 1
which indicates the voxel is either empty or filled.
Bsvo
Header pattern
u8 version @ 0x00;
u8 max_depth @ 0x04;
u32 root_res @ 0x08;
bool run_length_encoded @ 0x0C;
Palette
Coming soon.
SvoNode Format
first_child_index @ 0x00;
child_mask @ 0x03;
first_child_index: bits 0 -> 23
child_mask: bits 24 -> 31
Todo
- octree creation on gpu?
- palette support
- more compression algorithms
- other file formats
- voxelization with conservative rasterization
Dependencies
~3.5MB
~108K SLoC