Join Joel Bradley for an in-depth discussion in this video Holding it all together, part of Blender: Creating Rigid Body Simulations (2013).
When it comes to creating what I will refer to here as very believable behavior in our fracture (UNKNOWN) body simulations, the tools and options that we have available in Blender by default are somewhat lacking in both versatility and ease of use. In this bonus video, we're going to highlight a set of add-on constraint tools that can be readily downloaded, installed and used to make constraining data sets such as this, a pretty straight forward thing to do. To find this tool set, what you will first need to do is an internet search for Bullet Viewport Constraints tool, which should give you a number of possible links.
The download I am using came from blenderartist.org, and it's Version 0.3.7.4. To make the tools available inside Blender, all you need to do is place the Python script from the downloaded archive into your script's add-ons folder that can be found in your installation directory. if you are running blender inside of the Mac OS however, the process for getting this script up and running is a little different. Here, you would need to open the folder in which your blender run-time file exists.
Right click on the .app file. And from the menu list that appears, select the Show Package Contents option. The path we need to follow now is Contents, Mac OS 2.67, or insert whichever version of Blender you are currently working with here. Scripts, and finally the add-ons folder. Once there, copy the script to this folder and you should be set to go. Once all that is done, we will be ready to get started with our exercise.
If I just press Play in our start scene here, you can see that we have a variation of the fracture effects that we've been creating up to this point in our chapter. The animated bot, which of course is a rigid body, impacts our fractured bot in sleep mode wall, causing all of the active rigid bodies to wake up, which of course brings them all crashing down. Now, whilst with some clever staging and camera cuts, we can certainly get a decent shot out of this set up. There is a definite lack of control that does hurt the potential realism of the motion.
One object crashing through at the bottom of another object would not typically cause this kind of wholesale shatter and drop. This is where our Constraint tools add-on can help massively. We will of course need to go and enable the add-on. So, let's come to the File menu and click the User Preferences option to open up the dialog. Then in the Add-ons tab, let's type bullet in the search field. And when the Viewport constraints tool shows up, we can put a check in the box to enable it and close the Preferences dialog.
Now, in our Tools panel, if we just scroll down a way, you can see below our rigid body tools that we now have a new Bullet Constraint tool to roll out. In here, we find a whole range of constraint options, some of which will help us improve our current simulation setup. In fact, as our panel is a little narrow for the tools in here, I am just going to widen it out a little. To see how we go about using these, let's come up to the outliner and select our fracture group.
And then just Shift and right click to make one of these the active object. We need to do this, because unlike the tools in the rigid body roll-out, changes made to some of these options only get applied to the active object. So, we will need to make use of this Update Select button as we go. The first parameter we will change here is this neighbor limit option. Which basically controls how many objects inside the selected group, a constraint can link to. In this instance, we going to use a value of eight.
So, at any given time, a constraint we would add could have up to eight objects that it binds together. Very much related to that functionality is the search radius option. Which determines how far the constraint can look in order to find those eight objects. A value of nine should help us accomplish what we want here. Obviously, in your own scenes, these values will be different. To create the constraints that will be used, we need to click on this X Constraints button.
And then, just let blender run through and create constraints based on the values that we have entered. Once that is done. If I just press Play, you can see that as our bot impacts the wall geometry, rather than getting a fracture effect, we actually get motion that looks a lot like a mattress or piece of foam being thrown into the air. Clearly then, our newly added constraints are holding everything together. Of course, we do want to see some shattering or fracturing here. But before we actually get to that, I can see another little problem that we may want to deal with.
As I scrub here, you can see that our wall actually has a little drop that it makes right at the start of the simulation. And this is definitely not what we want. Let's scrub forward on the timeline then until our wall has settled on the floor. And with the mouse hovering in the Viewport, we can use the Ctrl and A keys, and from the popup menu, click the Visual Transform option. If I just press Play now, we do still get a little bit of settle as the constraints start to work.
But we have clearly eliminated the actual drop that was taking place. It's (UNKNOWN) localized break over the wall that we want now. We can come up to the out liner and select the rigid body constraints group that we created when we used the X Constraints button. This means we can now enable the breakable option for these constraints by putting the check in both of these boxes. And setting the threshold value down to one. Remember, having altered the parameters in here, we then need to click the Update Selected button to apply the same settings to all of the constraints in the group.
In fact, we might also want to switch our view port over to a rendered view before hitting play as well. Otherwise, we will be mostly looking at the visualization in the viewport of the constraints themselves. Having done that, if I just play the simulation until about frame 75. You can see, once the render updates, just how much of the upper wall is still being held together even though the lower half has started to crumble under both impact and weight.
This is a much more convincing effect for situations where realistic behavior may be a fairly critical requirement for the shot we are creating. In fact, if I just play through a little more, say to frame 115. You can clearly see, if I just rotate the view into position, that once the larger chunks hit the floor, they too shatter under the force of impact. Which is very nice. We do all so have to remember that we are again working with just the default steps per second and solve an iterations values here.
So, we have plenty of room for increasing both the quality and accuracy of the simulation should we feel that there is a need to do so.
- Setting up objects for simulation
- Setting up the physics world
- Choosing a collision type
- Applying a collision shape
- Creating an animated rigid body
- Baking to keyframes
- Working with the mesh collision shape
- Adding a force field to the mix
- Understanding constraints
- Creating fracture patterns