In commercial work every artist had the case to place/ distribute/ scatter water droplets on to other objects. During the last days an artist came to me who had placed may spheres by hand and was annoyed of the shaping process after the placement.
So I made an easy usable setup in houdini, that enables the artist to do some basic contact shaping.
Here is my graph. First we need a Droplet Sphere and a Target object. The first needed step is a “Point in Volume” Point VOP. I do it in this way because a Group SOP is much much sower. So let’s dive in and this is what we’ll get.
As you see above, with the pcopen I do a closest location query and extract the closest P and N variable. Cool, with some math we get just 0 and 1 values. We’ll use this information later in the tree. With this done we can use an attribute promote to calculate the sum of point that are inside the target volume.
Then we use an attribute create to get the point percentage that is inside the volume. (This retuns values between 0-1)
In this VOP happens all the geometry manipulation. Stating at the right, we find a two way switch where we use the PointInVolume attribute to do either a shrink wrap or to do a simple push along the normals. As you go through the graph you will notice the detail import detail (percInVolume) that is a multiply for the push. With this method we make sure, that the normal push after a single point is in the target volume. I’m sure that it is possible to combine the two point vops, but I’ve still not found a way to do the attribute promotion on vop level. The rest is just an smoothing and subdiv sop. Nothing fancy.