spz_rs 0.1.0

Rust code for reading in Gaussian Splats stored in the Niantic .spz file format.
Documentation
  • Coverage
  • 0%
    0 out of 48 items documented0 out of 13 items with examples
  • Size
  • Source code size: 14.2 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.23 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 15s Average build duration of successful builds.
  • all releases: 15s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • abroun/spz_rs
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • abroun

spz_rs

This crate contains Rust code for reading in Gaussian Splats stored in the Niantic .spz file format.

Currently this crate only supports reading .spz files. Support for writing .spz files is planned and hopefully coming soon.

This crate was created by translating the code from the reference Niantic C++ implementation which can be found at https://github.com/nianticlabs/spz. The implementation of this crate is in pure Rust and makes no use of the C++ code at runtime, but we still reference the C++ repo as a submodule so that we can access the sample files in our example code and to provide a baseline for our planned benchmark code.

Usage

use spz_rs;

let packed_gaussians = spz_rs::load_packed_gaussians_from_file(filename)?;
println!("File contains {} gaussians", packed_gaussians.num_points);

if packed_gaussians.num_points > 0 {
    let unpacked_gaussian = packed_gaussians.unpack(0);
    println!("Splat 0 is at {}, {}, {}", 
        unpacked_gaussian.position[0],
        unpacked_gaussian.position[1],
        unpacked_gaussian.position[2]);
}

Credits

This crate was started thanks to a bit of work sponsored by Waldek Technologies, makers of AI-Powered 3D Gaussian Splatting tools.