Showing posts with label intersection. Show all posts
Showing posts with label intersection. Show all posts

Monday 25 September 2023

resolving intersections between multiple closed objects (like cushions)

to summarise - convert to vdb, do a volume point sample. multiply the normal of the geo by the volume sample and then add back to the original position. It should push in -or out- for a packed cushiony effect.

nicely demo'd here by Emīls Geršinskis - Ješinskis
https://www.youtube.com/watch?v=2yGxLHSYf8I

Tuesday 27 September 2016

Snap surface points to another mesh, based on distance

Eg. When you have a simmed fluid not quite sitting on it's collision surface/ intersecting & you want it to be fixed/better.

Using a Point Vop. Plug in the surface and it's "collider".
Drop down a xyzdist plug that into a primitive normal. Hook up the appropriate inputs, don't for the the "file" input in the primitive normal. Set the max search distance to something sensible (probably a small value)

Plug the resultant "dist" from the xyzdist into a fit range node and promote the max value to the object level. In the destination value, set the min to 1 and the max to 0. Multiply this by the distance to avoid affecting the entire object (the max value will clamp a lot of values to 0 and nullify it)

Plug things into a displace along normal node. Promote the scale value. Finally connect the final P value.

It's worth having a group node with bounding points to check how well it's all worked.