AWS Thinkbox Discussion Forums

VDB questions

We’re trying to figure out a workflow for turning 2-photon microscopy scans into meshes and thought we’d try Stoke and Frost. But we’ve never used VDB files before, so I have some questions, and I will probably add more as I do more testing…

The sample files from openvdb.org/download/, specifically the torus and sphere come in inverted. The “Is_sphere” and “Is_torus” channels seem to be read inverted compared to how they look in the standard openvdb_viewer.exe.

Can we specify the datatype that gets used for the field in 3ds max’s memory space? Assuming we use FogVolume instead of Levelset, OpenVDB lets us write that data as binary if we wanted to. Would we still be allocating binary or would it be float32? I’d check this myself, we tried making binary VDB files, but they aren’t loading into Stoke, but that might be something we’re doing wrong in making the file.

  • Chad

Stoke only supports Float and Vector fields.
LevelSets come with negative values on the inside of the surface, and positive on the outside.
Create a Stoke Field Magma grid and feed an InputField node with VDB into a Less logical operator and output as Density channel. This will be binary 1 inside and 0 outside. Then create a Stoke PRT Field from the Stoke Field Magma and you should get a point cloud inside the levelset. Pass this to Frost and you should get a mesh surface…

Once again (as mentioned in my email), you can watch the end of this
youtube.com/watch?v=9nO60JknFvM

Haha… ls_sphere, not Is_sphere… Yeah, big difference there!

I wish they used CamelCase, so the “L” were more obvious :slight_smile:

Managed to figure out how to write VBD files that could be read by Stoke. Didn’t realize having a named channel was so important. So now we have a bunch of Eyewire.org’s neurons ready to render or mesh. Looks nice in the viewport and having variable sampling and adjustable caching should be very helpful. Next step is getting the meshing. We might end up just doing the meshing from the OpenVDB library, but I thought if we can do it live to the Stoke field, it would be more flexible.

Privacy | Site terms | Cookie preferences