NVIDIA / gvdb-voxels

Sparse volume compute and rendering on NVIDIA GPUs
Other
672 stars 144 forks source link

Writing atlas data for a specific voxel #98

Closed digbeta closed 4 years ago

digbeta commented 4 years ago

I have a question about creating atlas entries/channel data for dynamic topologies. I have some experience with point cloud activation, but the examples mostly deal with position and color, whereas I'm looking to create voxels and save data to arbitrary channels.

For example, let's say I want to create a chess board of voxels in the XY plane, and instead of color I wanted to save a specific float value to each voxel that represented a specific piece from a chess board.

I have a general idea of how I activate points, but I don't see an example of how I can create a channel/atlas entry for a specific voxel. I'm also unclear of how I could activate specific voxels, not points, if that makes sense. I know voxelsize was deprecated, but is it possible to activate a specific voxel and corresponding atlas entry?

Thanks in advance!

digbeta commented 4 years ago

Not sure if this is optimal, but sharing in case anyone else is wondering the same thing. I ended up grabbing activated node details when activating space on the host, then passed the calculated atlas offsets via an array along with the surface texture to write the atlas data. It turned out to be pretty simple, it's just not always obvious and there wasn't a built-in kernel (that I saw, at least) to accomplish what I wanted.