traverse-research / vdb-rs Goto Github PK
View Code? Open in Web Editor NEW๐ฆ Rust crate for manipulating OpenVDB files
License: MIT License
๐ฆ Rust crate for manipulating OpenVDB files
License: MIT License
Hi,
I tried to run the bevy example in the library. I'm using macOS 13.3 and ran the following command:
cargo run --example bevy ~/Downloads/TornadoLoopingVDB/TornadoLooping/TornadoVDB/tornado_0000.vdb
This produces the following error:
thread 'Compute Task Pool (5)' panicked at /Users/yorickdejong/vdb-rs/src/reader.rs:240:17:
assertion `left == right` failed
left: 0
right: 30
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Encountered a panic in system `bevy::setup`!
Encountered a panic in system `bevy_app::main_schedule::Main::run_main`!
It seems that the compressed count is 0, instead of 30:
fn read_compressed_data<T: Pod>(
reader: &mut R,
_archive: &ArchiveHeader,
gd: &GridDescriptor,
count: usize,
) -> Result<Vec<T>, ParseError> {
Ok(if gd.compression.contains(Compression::BLOSC) {
let num_compressed_bytes = reader.read_i64::<LittleEndian>()?;
let compressed_count = num_compressed_bytes / std::mem::size_of::<T>() as i64;
trace!("Reading blosc data, {} bytes", num_compressed_bytes);
if num_compressed_bytes <= 0 {
let mut data = vec![T::zeroed(); (-compressed_count) as usize];
reader.read_exact(cast_slice_mut(&mut data))?;
assert_eq!(-compressed_count as usize, count);
data
The vdb file can be downloaded from this link (it's the tornado): https://jangafx.com/software/embergen/download/free-vdb-animations/
The uncompressed
and zip
code paths are correctly loading, the BLOSC code path results in what looks like wrong data loading / interpretation.
let num_compressed_bytes = reader.read_i64::<LittleEndian>()?;
[src\reader.rs:141] num_compressed_bytes = -1143914305352105984
Example assets:
Uncompressed: fire
from https://www.openvdb.org/download/ โ
Zip: bunny_cloud
from https://www.openvdb.org/download/ โ
BLOSC: Tornado Looping
from https://jangafx.com/software/embergen/download/free-vdb-animations/ โ
Swap blosc-src crate back to the one which resides in crates.io. We need the following patch to remove the cmake dependency.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.