How to visualise VDB files properly
9826 28 2-
- guesdon.vincent
- Member
- 18 posts
- Joined: July 2022
- Offline
Hi,
I am a programmer and I need to validate some VDB file I created (I am not an artist and not really familiar with houdini)
I imported the VDB file and then used the VDB Visualize Tree node to see my voxels, but I would like to also be able to read the metadata of the grids and display each group into a different color. Is there a way to do this ?
Thanks
Vincent
I am a programmer and I need to validate some VDB file I created (I am not an artist and not really familiar with houdini)
I imported the VDB file and then used the VDB Visualize Tree node to see my voxels, but I would like to also be able to read the metadata of the grids and display each group into a different color. Is there a way to do this ?
Thanks
Vincent
Edited by guesdon.vincent - July 22, 2022 10:07:08
-
- guesdon.vincent
- Member
- 18 posts
- Joined: July 2022
- Offline
-
- animatrix_
- Member
- 4808 posts
- Joined: Feb. 2012
- Offline
Hi,
If you open the geo spreadsheet (RMB on node -> Spreadsheet), you can view the intrinsic attributes that are available. Make sure to be in primitive mode and toggle the intrinsics that you want.
If you open the geo spreadsheet (RMB on node -> Spreadsheet), you can view the intrinsic attributes that are available. Make sure to be in primitive mode and toggle the intrinsics that you want.

Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com] https://lnk.bio/animatrix [lnk.bio]
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com] https://lnk.bio/animatrix [lnk.bio]

-
- guesdon.vincent
- Member
- 18 posts
- Joined: July 2022
- Offline
that's great, thanks, now I can read my metadata at least
and to display my colors as voxels boxes ? I'd like to see each voxels boxes as the proper color (imagine a minecraft world exported into a VDB file and you want to display properly the color of each voxel, they are already grouped properly per material)
see here an example in the game and the VDB created from it (Frustrum extraction)
at the moment my prototype just put a random color in the Cd attribute, but after that I can't display it in Houdini
Image Not Found
and to display my colors as voxels boxes ? I'd like to see each voxels boxes as the proper color (imagine a minecraft world exported into a VDB file and you want to display properly the color of each voxel, they are already grouped properly per material)
see here an example in the game and the VDB created from it (Frustrum extraction)
Image Not Found
at the moment my prototype just put a random color in the Cd attribute, but after that I can't display it in Houdini
Edited by guesdon.vincent - July 25, 2022 14:25:58
-
- guesdon.vincent
- Member
- 18 posts
- Joined: July 2022
- Offline
-
- guesdon.vincent
- Member
- 18 posts
- Joined: July 2022
- Offline
-
- guesdon.vincent
- Member
- 18 posts
- Joined: July 2022
- Offline
-
- guesdon.vincent
- Member
- 18 posts
- Joined: July 2022
- Offline
-
- guesdon.vincent
- Member
- 18 posts
- Joined: July 2022
- Offline
Hi,
I had a little time today to come back to this.
So if I understand correctly my main issue is that the node PointFromVolume is loosing all the Cd attributes from my VDB primitives. So I have my colors fine when rendering the VDB node but after that everything become grey.
I tried to use the AttributeWrangle node to reapply my Cd attribute from my primitive to my points and the result is better (I can see my voxels having different colors) but not that great (clearly not the proper colors from the original VDB.
here the VEX expression I used in the Attribute Wrangle node
and here my graph

Any idea if there is a better way of doing it ?
I had a little time today to come back to this.
So if I understand correctly my main issue is that the node PointFromVolume is loosing all the Cd attributes from my VDB primitives. So I have my colors fine when rendering the VDB node but after that everything become grey.
I tried to use the AttributeWrangle node to reapply my Cd attribute from my primitive to my points and the result is better (I can see my voxels having different colors) but not that great (clearly not the proper colors from the original VDB.
here the VEX expression I used in the Attribute Wrangle node
int prims[] = primfind(1, @P, @P);
v@Cd = set(0,0,0);
foreach ( int prim; prims )
{
vector ocd = prim(1, "Cd", prim);
v@Cd = ocd;
break;
}
and here my graph
Any idea if there is a better way of doing it ?
Edited by guesdon.vincent - Aug. 4, 2022 15:04:25
-
- npetit
- Staff
- 420 posts
- Joined: Feb. 2008
- Offline
-
- mestela
- Member
- 1828 posts
- Joined: May 2006
- Online
-
- guesdon.vincent
- Member
- 18 posts
- Joined: July 2022
- Offline
Hi,
unfortunately it doesn't work, as soon as I try to render it the color is removed and everything become grey.
on my data I have 16 primitive each of it containing voxels, each primitive represents a specific color with the attribute Cd in the primitive attributes. (I don't have any texture for the moment)
when displaying the VDB only, I can see the color of the primitives are used for the color, but has soon as I try to get a voxel effect (displaying a 0.1 meter box on each point) all the colors are removed (I tried my own graph and VDB vizualize tree both do the same things, when you display the boxes the color are removed
the closest I got from a result was with the VEX expression trying to recover the Cd attribute of the primitive for each point using the attribute Wrangle node (but even this doesn't work very well)
unfortunately it doesn't work, as soon as I try to render it the color is removed and everything become grey.
on my data I have 16 primitive each of it containing voxels, each primitive represents a specific color with the attribute Cd in the primitive attributes. (I don't have any texture for the moment)
when displaying the VDB only, I can see the color of the primitives are used for the color, but has soon as I try to get a voxel effect (displaying a 0.1 meter box on each point) all the colors are removed (I tried my own graph and VDB vizualize tree both do the same things, when you display the boxes the color are removed
the closest I got from a result was with the VEX expression trying to recover the Cd attribute of the primitive for each point using the attribute Wrangle node (but even this doesn't work very well)
Edited by guesdon.vincent - Aug. 5, 2022 09:50:53
-
- mestela
- Member
- 1828 posts
- Joined: May 2006
- Online
-
- guesdon.vincent
- Member
- 18 posts
- Joined: July 2022
- Offline
mestela
In my setup I found the colours went strange when I added extra volumes. To get around this I cast whatever attributes I needed using a wrangle to @Cd, and then on the vis tree node, forced it to only read the @Cd volume.
Sorry I don't understand how to do that, as I mentionned on the first message I am not an artist, I am only a programmer trying to vizualize that the things my code serialized with openvdb is correctly built
I opened houdini for the first time around two weeks ago and used it maybe 4-5 days in my life so I know almost nothing about it
and unfortunately , even so I would love to, I don't have the time to read / watch tutorial or do formation on it (I have my own work to do

here three different view of my VDB, one is the original file (you can see the colors) second is VDB vizualize tree as points, third is by copying the box on each point
Image Not Found
Image Not Found
Image Not Found
Edited by guesdon.vincent - Aug. 9, 2022 10:30:12
-
- mestela
- Member
- 1828 posts
- Joined: May 2006
- Online
-
- guesdon.vincent
- Member
- 18 posts
- Joined: July 2022
- Offline
-
- guesdon.vincent
- Member
- 18 posts
- Joined: July 2022
- Offline
sorry but I tried again and still the same issue impossible to get the Cd attribute from my primitive to my points
maybe I am not describing it correctly, but I am not sure how to explain it, I have Cd color in my primitives attributes and these color are lost when using VDB vizualize Tree
maybe I am not describing it correctly, but I am not sure how to explain it, I have Cd color in my primitives attributes and these color are lost when using VDB vizualize Tree
Edited by guesdon.vincent - Aug. 8, 2022 09:58:07
-
- antc
- Member
- 349 posts
- Joined: Nov. 2013
- Offline
-
- guesdon.vincent
- Member
- 18 posts
- Joined: July 2022
- Offline
antc
Can you post a simple hip file with a reduced dataset? You'd probably get a fix from someone pretty quickly with an example file.
I am thinking about it, I have to check what exactly I can share on a public forum. I might have to generate a fake VDB without specific data
Edited by guesdon.vincent - Aug. 8, 2022 12:19:40
-
- antc
- Member
- 349 posts
- Joined: Nov. 2013
- Offline
In the meantime the only thing I can suggest is perhaps post what the info window looks like for your vdb geometry. You can get that by middle clicking on the node itself. It'll detail the available grids which might give a clue. If there's a vec3 grid present called Cd I'd expect matts example file to work but who knows.
-
- Quick Links