Search - User list
Full Version: Extracting outer 'surface' resulting from VDB subtraction?
Root » Technical Discussion » Extracting outer 'surface' resulting from VDB subtraction?
proceduralist
The outer surface resulting due to subtraction of geometry can be extracted using boolean SOP very efficiently and easily. Is there a way to extract it when doing VDB operations? The yellow colour was done in snipping tool.




Doing a boolean subtraction with polygons, extracting surfaces separately, then converting it to vdb will be computationally expensive.

I am trying to learn to develop animations like these.
https://www.instagram.com/p/CdOQmk1Kher/ [www.instagram.com]
https://www.instagram.com/p/CYg_igzvnct/ [www.instagram.com]
animatrix_
Hi,

You can volume sample the sphere SDF to color the inner points:



float tol = ch("tolerance");

float s = volumesample ( 1, 0, @P );
if ( s <= tol )
    @Cd = { 1, 1, 0 };
proceduralist
Thanks for the quick reply! I am not getting 'attribute to match' option.


Sorry. My bad. It's working now. I made a mistake earlier by connecting wrong nodes.


I don't understand fully what exactly is happening in the VEX code. Can you please explain or provide a method using Point VOP?

What I can figure out so far.

float tol = ch("tolerance"); Here we defined a float called tolerance with channel slider.

float s = volumesample ( 1, 0, @P ); No idea what is happening here.
if ( s <= tol )
@Cd = { 1, 1, 0 }; If 's' is less than or equal to tolerance, then apply a yellow colour.
animatrix_
With volumesample we sample the SDF volume for signed distances so inside will be negative, outside positive and SDF boundary will have 0. That's why we are using some tolerance to "inflate" the SDF boundary for coloring.
proceduralist
Alright. Thanks!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB