Hi guys,
I'm looking to do a lot of masking on some SDFs. I was curious about whether I could get the mask to be visualized in a nice obvious red colour similar to a mask on a heightfield.
I've attached a hip file where I make a mask field using the dot product of a 'surface_gradient' field and an arbitrary target vector.
I merge it with the original 'surface' sdf and later use it for displacement.
Just before this, I try to visualize it in red in a way that mimics the Volume Visualization Node in the Heightfield SOP. But it doesn't seem to work...
What am I doing wrong here? Surely this isn't a functionality limited exclusively to heightfields?
Many thanks,
A
VDB SDF Volume Visualise Mask
1075 4 2-
- adamwlou
- Member
- 7 posts
- Joined: Jan. 2019
- Offline
-
- vikus
- Member
- 247 posts
- Joined: May 2017
- Offline
Hi, if you intend only to colorize the volume mask, you could try set density and diffuse field both to mask. Or use a detail geo wrangle after the merge set this detail attribute for volume color. You can check all detail attributes for volume shading in the geo spreadsheet of the volume visualization node.
If you like to have it same as the heightfield, then you have to convert the final sdf to the surface geometry and then transfer the volume mask (some attribute) to the surface - so the sdf itself cant show color, at least I dont know how. And the heightfield representation is actually geometry, not sdf. But I dont know how it is handled.
v@volvis_ambientexposed = set(1, 0, 0);
If you like to have it same as the heightfield, then you have to convert the final sdf to the surface geometry and then transfer the volume mask (some attribute) to the surface - so the sdf itself cant show color, at least I dont know how. And the heightfield representation is actually geometry, not sdf. But I dont know how it is handled.
-
- vikus
- Member
- 247 posts
- Joined: May 2017
- Offline
-
- adamwlou
- Member
- 7 posts
- Joined: Jan. 2019
- Offline
-
- vikus
- Member
- 247 posts
- Joined: May 2017
- Offline
adamwlouYes and it seems to be packed geometry, but if you try to set the display attribute for wireframe (@gl_wireframe = 1) it disapears this not true for packed geo. So I think it is handled internally somehow.
I hadn't even noticed that the HeightField was being displayed as geometry. I suppose that's how I got so confused.
-
- Quick Links

