Sparse-Voxel-64Tree

Crates.ioSparse-Voxel-64Tree
lib.rsSparse-Voxel-64Tree
version0.1.0
created_at2025-03-14 18:25:41.999916+00
updated_at2025-03-14 18:25:41.999916+00
descriptionA lib for handling Sparse Voxel Contrees
homepage
repository
max_upload_size
id1592590
size68,229
MountainLabs (MountainLabz)

documentation

README

Sparse Voxel 64Tree

This is a library for handling Sparse Voxel 64Trees (or contrees). Its fairly easy to use,


Init a 64Tree

let 64tree = Sparse64Tree::new();

From there you can insert nodes:

let color = [25, 32, 4];
let depth = 4;
let x = 6;
let y = 3;
let z = 2;
tree.insert(x, y, z, depth, color);

Or you could import a voxel model:

add_vox_to_tree(file_path, depth, offsetx, offsety, offsetz, &mut tree);

If you want to upload to the gpu:

pub struct GpuNode64 {
    pub child_mask_low: u32,
    pub child_mask_high: u32,
    pub child_ptr_and_leaf: u32,
    pub _padding: u32,
    pub color: [f32; 3],
    pub _padding2: u32, // For 16-byte alignment.
}

and:

let gputree = Tree64GpuManager::new(&device, &contree);

Features

  • Modifying a 64tree with good speeds.

  • support for .vox model loading

  • GPU tracing support

Roadmap

  • Faster speeds.

Screenshots

App Screenshot

Documentation

None Yet

License

MIT

Demo

Its currently used in my Lepton Engine

Commit count: 0

cargo fmt