Reader small image

You're reading from  Taking Blender to the Next Level

Product typeBook
Published inMay 2022
PublisherPackt
ISBN-139781803233567
Edition1st Edition
Right arrow
Author (1)
Ruan Lotter
Ruan Lotter
author image
Ruan Lotter

Ruan is a 3D Generalist and Visual Effects (VFX) Artist specializing in Motion Graphics, Compositing, 3D Tracking, and 3D Simulations. He currently works as a VFX artist and compositor in the advertising industry and also teaches multiple 3D and VFX-related classes online. He also created the YouTube channel, TunnelvizionTV where he shares tutorials on multiple creative topics.
Read more about Ruan Lotter

Right arrow

Chapter 9: Rigid Body Simulation: Destroying a Statue Using Physics

In this chapter, we will be destroying a statue model using Rigid Body physics! First, we will break our statue into smaller pieces by using a free Blender add-on called Cell Fracture. Then, we will apply physics properties to these fractured pieces and link them together using Rigid Body constraints. We will also animate an impact object that will activate the physics simulation and destroy our model. Let's get started!

In this chapter, we will cover the following topics:

  • Installing the required add-ons
  • Setting up the scene
  • Using Cell Fracture to break our model into smaller pieces
  • Fracturing the impact point using the Annotation Pencil
  • Applying Rigid Body physics to the fractured pieces
  • Linking fractured pieces together using Rigid Body constraints
  • Animating a Rigid Body impact object
  • Baking the final physics simulation

Installing the required add-ons

Let's begin by activating the required Blender add-ons we're going to use in this chapter. There are two add-ons we need to activate. First, we need the Cell Fracture add-on, which will break our model into smaller fragments. The second add-on, called Import-Export STL, is optional and is only required if you are importing an STL model. We'll look at STL models in more detail in the next section.

Let's begin by installing these two add-ons:

  1. Create a blank new Blender project and delete all the default objects by pressing A and then X. Then, click Delete to confirm this.
  2. Click Edit | Preferences to open the Blender Preferences dialog box.
  3. Click the Add-ons tab on the side of this window to display the active add-ons.
  4. In the search box, type cell. Then, tick the box next to Object: Cell Fracture. This will activate this add-on.
  5. Again, in the search box, type stl. Then, tick the box next to Import-Export: STL...

Setting up the scene

In this chapter, we will import the statue model that we're going to destroy. You can download my statue model from https://github.com/PacktPublishing/Taking-Blender-to-the-Next-Level/blob/main/Chapter09/Chapter%2009%20-%20Statue.obj or you can use your own 3D model instead. You can also download free models from various websites. MyMiniFactory has some great free statue models that you can download for free from their Scan The World collection. These models are 3D scans of real statues from around the world.

Please note that these 3D scanned models are high-poly and may need some work to bring their poly count down. I will explain how to do that in this section. These 3D scanned models are mostly in STL format, and that's why we're activating the Import-Export: STL format add-on. Let's get started:

  1. Click File | Import | Wavefront (.obj).

Note that if you are importing an STL model that you have downloaded from MyMiniFactory...

Using Cell Fracture to break our model into smaller pieces

In this section, we will be using the Cell Fracture add-on to break our statue model into smaller pieces. We will be breaking different parts of our model multiple times to create variation in the fragment sizes, so think about which parts of your model should have smaller fragments and which parts should have larger fragments. This way, the simulation will look more realistic, and the pieces won't be uniform in size.

Let's get started:

  1. Click the statue model in the 3D Viewport to select it. Then, click the Object menu at the top of the 3D Viewport, select Quick Effects, and then click Cell Fracture.
  2. The Cell Fracture dialog box should open. At the top, under the Point Source section, click Own Verts. This will use the object's vertices to generate the fragments.
  3. Increase Source Limit to 200. This is the number of fragments that will be generated.
  4. Next, increase Noise to 1.00. This will...

Fracturing the impact point using the Annotation Pencil

In this section, we're going to focus on the impact point, where an object will impact our statue and break it apart. First, decide where you want the object to hit your statue. Then, we will use the Annotation Pencil to indicate the point of contact and use the Cell Fracture add-on to generate fractures using the lines we drew with the Annotation Pencil.

Let's get started:

  1. Decide where the impact point will be on the statue and zoom in closer to that specific fragment.
  2. Click the Annotation Pencil tool in the Tools menu to the left of the 3D Viewport.
  3. At the top of the 3D Viewport, you will see the Placement area of the Annotation Pencil. Click the drop-down menu and select Surface from the list. This means we will be drawing on the surface of our model using the Annotation Pencil.
  4. Now, using Annotation Pencil, draw lines from the center of the impact area outward, as shown in the following screenshot...

Rigid Body physics

In this section, we will apply Rigid Body physics to all the fragments of the statue. We will also look at the different physics parameters and what they do. You will also learn how to calculate the mass of each fragment to create a realistic-looking simulation.

Let's get started:

  1. Let's begin by centering the origin (or pivot) of each fragment. Select all the fragments in the 3D Viewport (without selecting the ground plane). An easy way to do this is to right-click the Fracture collection in the Outliner section and click Select Objects. This is an easy way to select all the fragments or objects in that collection.
  2. Click the Object menu at the top of the 3D Viewport, then click Set Origin and select Origin to Center of Mass (Volume). This will position the origin of each fragment to the center of its mass by volume.

Figure 9.12 – Centering the origin of each fragment

  1. Next, let's apply Rigid Body...

Linking fractured pieces together using Rigid Body Constraints

Let's talk about Rigid Body constraints. At the moment, our whole statue crumbles at the same time when we start the simulation. While this is very exciting, we can make it a lot more realistic. Let's say we have an object that hits our statue – we want the statue to start breaking at the impact point. Then, the rest of the statue should start to crumble, piece by piece, and then it should collapse.

This is possible with constraints. Constraints are joints or the glue that's connecting the fragments. This is the secret sauce to any destruction simulation. Working with constraints involves a lot of tweaking, so please remember to save your project often. Before playing the simulation after each tweak, remember to hit that save button.

Let's get started:

  1. Select all the fragments by right-clicking the Fracture collection in the Outliner section and clicking Select Objects.
  2. Click...

Animating a Rigid Body impact object

In this section, we will create a very basic impact object that will crash into our statue. We will also look at how to start the simulation as deactivated, thus waiting for the force from the impact object to trigger the physics simulation.

Let's see how we can do this:

  1. Let's create a Sphere object by pressing Shift + A and selecting Mesh | UV Sphere.
  2. Press S and scale it down to a reasonable size.
  3. Move the sphere a short distance away from the impact position on the statue. I am choosing the area with the most and smallest fragments. Use G to move the sphere into its first position.
  4. Make sure that you are on frame 1 by pressing Shift + left arrow.
  5. Let's create a keyframe. With the sphere selected, press I and choose Location from the drop-down menu to create a Location keyframe on frame 1.

Before we create the second keyframe for the sphere, let's change our fragments' physics properties...

Baking the final physics simulation

Baking will also save your simulation so that you don't have to recalculate it the next time you open this project file. Let's get started:

  1. Make sure you are on frame 1.
  2. Still under the Scene Properties panel, scroll down until you see Cache.
  3. Click the Bake button. It's as simple as that:

Figure 9.23 – Clicking the Bake button to bake your simulation

  1. You can always delete your bake if you want to change any of the simulation parameters by clicking the Delete All Bakes button. Then, you can make the required changes and bake the simulation again once you are happy with the results.

Summary

Congratulations! With that, you have created an amazing physics simulation using Rigid Body physics and constraints! You have learned how to install the required Blender add-ons, Cell Fracture and Import-Export STL, and how to use them. You should now be familiar with the Cell Fracture add-on and how to use it to break objects into smaller fragments by using automatic fracturing or making use of the Annotation Pencil to specify where to fracture objects.

You also learned how to apply Rigid Body physics to the fractured pieces and how to tweak the parameters to adjust your simulation. We also looked at how you can link the fractured pieces together using Rigid Body constraints to create a more realistic simulation. After that, we added an animated object to our scene that will interact with your simulation. Lastly, we learned how to bake the final simulation to cache.

Simulations are all about experimenting and tweaking parameters one at a time to see how they affect...

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Taking Blender to the Next Level
Published in: May 2022Publisher: PacktISBN-13: 9781803233567
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Ruan Lotter

Ruan is a 3D Generalist and Visual Effects (VFX) Artist specializing in Motion Graphics, Compositing, 3D Tracking, and 3D Simulations. He currently works as a VFX artist and compositor in the advertising industry and also teaches multiple 3D and VFX-related classes online. He also created the YouTube channel, TunnelvizionTV where he shares tutorials on multiple creative topics.
Read more about Ruan Lotter