Ah so your colors are constant per grid, I see now. I was assuming you actually had a vec3 grid with per voxel colors. So yeah, it looks like there's no way to have visualize tree bind per-grid colors however it's easy enough to reapply the colors to the points following the visualize tree node. Example hip attached.
Sorry minor error on my part I added points to active tiles by mistake. I've corrected that to active voxels and so the voxel size is correct now.
I'm not sure why the color isn't coming through. I'm guessing the Cd reattachment in attribwrangle1 isn't working. What version of houdini are you using?
I'd also point out that I've never seen vdb's used in this way. Not that I'm hugely experienced in the world of vdb apart from the few places I've worked, but that might explain why vdb vis tree isn't working as you expect. AFAIK its rare to set attributes at the prim level for vdb's.
I organized my VDB this way cause I thought that would be more efficient in terme of data size to do that instead of duplicating my metadata per point since all my points share the same metadata on each primitive.
I still cannot see the colors, my cubes are red I might have to rethink the way my colors are setup, should I set the color attribute on each point instead of by primitive ? in C++ with openvdb I found how to setup metadata on grids but I didn't see how to setup metadata on each points
Edited by guesdon.vincent - Aug. 10, 2022 10:32:49
I manage to get my colors by actually putting the index of the primitive in the value of my voxel (not ideal but it worked) then with the attribute wrangle node I just did
v@Cd = prim(1, "Cd", i@vdb_int - 1);
that prevent me from putting another information in the value of the voxels but that will be enough for my needs for the moment