RBD Workflows in Houdini
Happy Holidays. I did a poll on my Youtube channel to see what people were interested in. You all chose RBD Workflows. So here you go.
Intro:
What is RBD, and How Do I Use It?
RBD, more commonly known as Rigid Body Dynamics, is a system inside Houdini.
This system allows for the motion, fracturing, and collision of objects to be handled within solvers. As well as a combination with SOP tools. It handles objects as if they were hard objects, such as buildings, bricks, or other structures.
RBD can handle objects in two states. Active or Passive. Active objects can interact with collisions and forces. While passive objects can collide with active objects, they don’t move.
RBD also has several different material fracturing options. This allows you to generate accurate fractures for different types of objects. These fracturing methods can be found in the RBD Material Fracture SOP, and in the Voronoi Fracture SOP. The RBD Material Fracture SOP allows for you to create wood, concrete and glass fractures. Then it will pre fractures the geometry. It is an ideal node when working with multiple constraints, glues, and meshes.
The Voronoi Fracture SOP is great for small scale RBD sims. As well as generating fractures in concrete. The node is also on it’s 2.0 version(As of 2021) so there have been several improvements to it.
There are also other tools that go along with the Voronoi fracture SOP to improve its use. As well as your RBD simulation as a whole. It has two inputs. The first is for the mesh you would like to fracture, and the second input is for the points it needs to fracture the mesh. You can create these points with scatter SOPS, or points from volume SOPS. Or even the Add SOP.
In combination with the node above, you can also use the Voronoi Fracture Points SOP to generate points for it to use. This node calculates data from the incoming mesh and a set of points to generate impact points for the fractures.
Internally, the node generates volumes from the chosen impact points from metaballs that are copied to each point. However, you can customize this metaball generation by adding metaballs into its second input. These metaballs will be merged into the metaballs the node generates, and then together they will form the impact volume. The volume is then used to divide the geometry into three regions.
These regions are: The Surface Region, The Interior Region, and the Exterior Region. The Surface Region is the area where the object intersects with the impact volume. The Interior Region is the intersection of the volume of the object, and the impact volume. Finally, The Exterior Region is the area of the volume that is outside the area of impact.
You can also use the Voronoi Spilt SOP to selectively cut up your geometry. It does this by separating and breaking the geometry by a set of polylines. Each line cuts along its midpoint. In order to create these lines, to get the node to work, you can use the Tetrahedralize SOP.
The RBD Interior Detail SOP, is also one of these nodes. It can be used to create high resolution pieces on your mesh on both their inside and outside.
The RBD Cluster SOP can be used to create large clusters of fractured pieces.
Probably the best preview tool in your RBD arsenal is the RBD Exploded View SOP. This tool will explode and separate your fractured pieces so you can see how they will fracture. It’s also great for matching high res and low res geometry together to see how the different resolutions can have an impact on the simulation.
This node also has different visualization options. A few of them are:
Geometry Outside Proxy: Colors areas red to show where your geometry is poking out beyond your proxy geometry.
Volume: Shows the volume distribution amongst the pieces.
Pieces: Displays the fracture pieces in different colors.
Strength and Stiffness Constraints: This let's you visualize the strength values, glue constraints, and spring constraints if they are applied to your model.
How Do I Start To Build a Project Using RBD?
There are several different ways to set up a RBD simulation. But let’s try and simplify it from start to finish.
#1 Prepare your objects. Fracture your models.Create any groups you might need to control the fractures and constraints.
#2 You can also do this before step one, depending on your model.You’ll need to clean your objects. So basically, make sure the geometry is closed, check for holes, wrong normals, and any unused points.
#3 Check your UVs. After simulating, your model’s UVs might be incorrect. This can be caused by incorrect UVs at the start of your simulation.
#4 Fracture your model.Choose your preferred way.
#5 Create the UVs for the inside of your now fractured model. If you don;t do this, and the inside pieces of your debris faces the camera, the materials will appear warped and inaccurate.
#6 Cache the object.
#7 Create your constraints if needed.
#8 Slap down a RBD configure node.
#9 RBD Solver. It’s time to simulate, baby!
#10 Drop down a RBD I/O. This is to cache the simulation.
#11 Do whatever you need to do next.
When setting up these scenes it’s important to consider these things.
Aesthetics: How realistic does your fracturing and overall simulation look?
Feedback: Can you change this setup without altering the end result too much if someone asks you to do so?
Further Flexibility: How does this setup work with certain geometry resolutions, or different geometry shapes? How functional is the setup? Can you easily alter the simulation without breaking it?
Performance: How long does the scene take to cache out? How long does it take to simulate? Can you improve cache, render, and simulation times?
Extensibility and Procce-durablity: Can you hand this build off to other users and have them easily understand it? Will someone have to break or add things to your build in order to use it?
Node by node this is pretty much what you should be doing:
#1 Get your Geometry
#2 Add a Convex Decomposition if you need it.
#3 RBD Material Fracture: Choose your material type.
#4 RBD Configure
#5 RBD Pack
#6 Add Velocity (If needed). This can be done with a wrangle.
#7 RBD Unpack (Turn on transfer attributes and add the attributes you want)
#8 And RBD or Bullet Solver
#9 You can now drop down an RBD Exploded view. You can also drop down this node to preview your
simulation and geometry at any stage of building your simulation.
Also keep in mind that when trying to fracture different objects you will also need to consider this different ideas, as well as research them:
How can you fracture the object in the most efficient method?
Is a particle system enough to create the debris you need, or do you need to use a full RBD system? Sometimes you can fake things, but your supervisor might know better. ;)
Will you have to create any secondary simulations for this project to make it look realistic?
Workflow For Glue Constraints
Constraints can be tricky. And even trickier to setup. So here is a breakdown on Glue Constraints and how you can approach them.
Long story short. Houdini allows you to glue RBD pieces together. These objects will stay together until they are told to break apart, or the strength of the “glue” is overcome.
There are two main workflows for using glue.
First one:
- Glue an object with no fracture groups or customized glue attributes together.
Second One:
- Get your object.
- Create fracture groups
- Import these chunks as pieces glued together.
Glue can be a great way to get your model to break apart in chunks and have a delay in its destruction. Or make the object fall piece by piece.
The way RBD is progressing in Houdini 19, to quote Mr CGwiki: RBD is copying vellum. It is becoming more SOP based, and very much so in the way it handles it’s constraint networks. Also, keep in mind that sometimes the SOP RBD tools work better without packing the geometry.
One easy way to set up your constraints before they enter your solver, is to use a RBD constraint property SOP.This node can help you set up your attribute constraints for bullet simulations.