VDB combine intersection/difference not working cleanly

   1950   2   1
User Avatar
Member
100 posts
Joined: April 2014
Online
I'm sure the answer to this will be something so easy, obvious, and profoundly stupid that my family and friends will all disavow having ever known me, but I'm stymied.

I am using an animated noise to create a lumpy VDB fog field, which I convert to SDF and then use VDB Combine to cut out part of a hero model. I'm cutting it into two interlocking parts, using SDF Union Subtract for one side and SDF Union Intersection for the other, and I will subsequently assign a different material to each part.

Originally I got it set up, no problem, with a standard AAnoise. I'm trying to get it set up with a periodic noise so I can loop it. The problem is that at the VDB combine stage, it doesn't subtract or intersect cleanly. You can tell something is happening, as there are little dotted lines on the resulting surface, and the occasional hole, but it's not cutting it out like I would like. I've tried different resolutions with the VDB from Polygons and that doesn't seem to make a difference. (I've actually run into this before, but I'll either rebuild the Volume VOP or fudge some numbers and it goes away. No such luck here.)

What obvious, stupid thing am I doing wrong so that the VDB combine isn't working like I'm hoping?

Thanks for help and forebearance!

Attachments:
sdf_union_problems.hiplc (267.3 KB)
vdb_combine_problems.jpg (590.8 KB)

User Avatar
Member
73 posts
Joined: March 2020
Offline
I don't know about obvious or stupid but if you take your NOISE_FIELD sdf and put it through a Convert VDB to polygons, the resulting geometry isn't watertight. When you take that geometry and convert it back to an sdf, the resulting VDB is all messed up.

However if you do NOISE_FIELD -> Convert VDB to polygons -> polyfill to remove holes -> VDB from polygons -> each of your VDB Combines, the problem goes away. I'm curious to know if there are better ways of resolving this problem though.
User Avatar
Member
100 posts
Joined: April 2014
Online
Thanks! Actually, though, I never converted the noise VDB to polygons–I just converted the fog to SDF so I could combine it with the VDB version of the model-to-be-mangled (in the example a sphere, an actual model in my project). The model was converted to polygons after the VDB Combine.

Someone replied to my post on od/force with the fix–the exterior bandwidths needed to be 3 (versus the 1 I had cranked them down to). Also I had to be careful with my VDB resampling options on the combine. Those did the trick!
  • Quick Links