Tips & Tricks — Simulating RBD Rocks on the Ground with Houdini
I keep seeing super complicated, strange setups for scattering rocks/pebbles on a surface geometry and simulating those rocks with RBD solver in Houdini. There were some setups I came across that had crazy amounts of VEX or VOPS, others had 100–150 nodes just for this. Those setups are great and they work very good but using them is very hard. Also preparing those kind of setups take too much time. It also consumes a lot of time for the artist that is supposed to understand and use it. Therefore I made a simple 5 minute setup for this kind of an effect and wanted to share it with you.
Step 1: Prepare the ground plane and rocks
Put down a grid with a lot of rows and columns. And bring in your rock geometries. In case you don’t have any rock models, get them online, sculpt them or just put down a sphere (polygon), give it some frequency and attach it to a “Mountain” SOP to get a rock. Maybe do this for a few spheres so you now have a rock library. (To get a good rock shape I recommend selecting Worley Cellular F1 in the “Mountain” SOP’s Noise Type). You might say “Hey, it is easy to scatter rocks on a flat surface” so after the grid, put down a “Mountain” SOP again and make it a bumpy ground so it is a little more challenging.
Step 2: Scatter and Instance
To scatter and instance there are many ways but for this one I’ll tell you about the newest and I think the simplest scatter/instance method which I keep hearing many people don’t know about. Put down a “Scatter Align” node, plug your ground geo (grid) to it’s left input. Feel free to play with the values in the “Scatter Align” like Point Cloud method, Rotation and Relax Iterations. Then plug it to an “Attribute Randomize” and give the rocks a random pscale. Then put down an “Attribute from Pieces” SOP and plug the Attribute Randomize to it’s left input. Now merge your rock geometries and then link the merge with a “Connectivity” SOP, then plug the connectivity to “Attribute from Pieces” node’s right input and make sure the Piece Attribute in the “Attribute from Pieces” is class. Lastly append a “Copy to Points” and the “Connectivity” should go into the first, “Attribute from Pieces” to the right input. Make sure again the Piece Attribute inside “Copy to Points” is class.
Step 3: Simulation
Append a DOP Network and do you regular packed geo RBD Network. Nothing different here. I just want to mention this; in the Rigid Body Solver inside the DOP Net, setting the Constraint Solver to Parallel-Gauss-Seidel (Islands) made my small rock sims a lot more stable.
For ground collisions, either go with the VDB method or if you are lazy like me just use an “Extrude Volume” to give depth to your ground plane and use that as the collision geo with the static object’s collision mode set to Ray Intersect in the DOP Net.
Step 4: Little Tweaks
Now play the simulation and see that most rocks just fall down through the ground. To avoid it you can either do crazy VEX and VOPS and other kind of mad stuff. Or instead you can just put down a “Peak” SOP, start a new chain by plugging your ground plane geo to it. Increase the Distance in “Peak” just a little and then bring in a “Ray” SOP. “Attribute from Pieces” should go in to the left and Peak to the right of the Ray SOP. Choose Minimum Distance for method and instead of “Attribute from Pieces” plug the “Ray” to the right input of the “Copy to Points”.
Now play the sim and check if any rocks fall through the ground, if there are any just maybe delete them or move them a bit higher manually.
The End
And that’s it. Simple, fast, easy to use, what more could an artist as for? I used this in multiple different movies/shows and personal projects and it almost always worked. One last tip; if your rocks keep jumping around and jittering inside the DOP Net’s “RBD Packed Object” node go to Bullet Data tab and for Geometry Representation choose “Box”. It will be a lot more stable and don’t worry no one will notice.
Here is the final screenshot of the node network to make it more clear.
I hope you found it useful and if you have any recommendations or something to add please write it in the comments.