Simulating rigid-body deformations using reactor

Hello! I've written this tutorial because so many people have asked how I did the car deformations in my car crash animations.

Basically, they were done quite easily, by using a simple workaround/trick. What you've gotta do is actually setup two different simulations, and connect them using a link.

Here's a walkthrough showing how to do exactly that, only with a teapot instead of a car (the exact same principles can be used on a car of course...but for the purpose of making this tutorial as simple and easy-to-understand as possible...I'm using a teapot).

Step 1: Setting up the scene

Create a teapot and a reactor plane (which will be our ground deflector). Place the teapot above the plane, so it can drop down onto it and "crunch" upon impact. Your scene should look something like this:

Step 2: Simulating the deformation

Now, add a reactor cloth modifier to the teapot, so that we can simulate some deformations. You can use whatever settings you want, but here are mine:

We're now ready to do some simulating! All you need to do now is add the teapot to a CLcollection, and add the ground plane to a RBCollection. Using the default reactor utility parameters, you can now press the "Create Animation" button (from frame 0 to 100). Your animation should look something like THIS.

Now...as you can see...there's nothing "rigid" about that animation at all...and that's the problem. If you just use reactor cloth to simulate the deformations, then they'll always collapse. If you just use reactor softbody to simulate the deformations, then they'll always retain their shape. What we want is a simulation that will provide us with crumpling effects, but also with "freezing" effects....where, after a certain point in time the "rigid body" maintains its new "crumpled" shape (instead of collapsing or retaining its original shape).

Herein lies the "trick". First....slide the timeslider through the animation you just simulated and try to find a frame (post-impact) where the teapot looks like it's at a point where (if it were in real life) it would stop crumpling, and its shape would "freeze". In my animation, frame 25 looks like a good spot:

Now....click on the teapot, go into the cloth modifier settings and click "Clear Keyframes". Then, go back into the reactor utility panel and change the simulation's "end frame" to 25. Once you're done that, re-simulate the animation. The teapot will now hit the ground, and freeze at frame 25.

We're halfway done! But here comes the more difficult part.

Step 3: Setting up the rigid body collision

What we want to do now, is setup a 2nd simulation, using a "proxy" model of the teapot which will be included in a RBCollection instead of a CLCollection. The "cloth" teapot will then be linked to the "rigid" teapot....at which point everything will start to fall into place (no pun intended haha)

First, move your timeslider to frame 25 (if it's not already there) and create a snapshot of the teapot model, using the snapshot utility available in the "Tools" drop down menu. When you create the snapshot, you can leave the settings at default, since we just want a single mesh to be created using the current frame as a reference.

Next, move the newly created teapot model (which will be referred to as the "rigid body teapot" from now on) up to the point in space where the "cloth" teapot sits, at frame 0. A wireframe view of your scene should look like this (note that the rigid body teapot is outlined in white for easy distinction):

Next, click on your CLCollection object, and in the settings (in the modifier panel) click the checkbox "disabled" (because we don't want to re-simulate the cloth)

Then, add the rigid body teapot to the RBCollection.

Next, while the rigid body teapot is still selected go back to the reactor utility panel and change it's mass to 5, in the "Properties" rollout. Also, change the elasticity of both the teapot and the ground plane to 0.7. This will cause the rigid body teapot to bounce off the ground plane once it hits it...and will further accentuate the effect we are trying to achieve.

Change the reactor simulation "end frame" back to 100 and run the simulation. Once the simulation completes, your animation should look like THIS.

Step 4: Adding it all together

Now that we've got both our deformation, and our rigid body collision, we want to link the two together so that we have one smooth animation.'

So, do this:

Click on your "cloth" teapot, go into the motion panel, and change its transform controller from a "Position/Rotation/Scale" controller to a "Link Constraint" controller. Click on "Link to World" (with the timeslider at frame 0), then move the timeslider to frame 25, and add the rigid body teapot as a link.

Hide the rigid body teapot, and then play the animation. It should look like THIS.

And there you have it! That's the exact method I used to simulate the deformations in my crash animations, and as you can see...it's fairly straightforward and simple!

Pros and Cons of this method:

Pros:

-VERY fast simulation times. Because you're only simulating a few frames of actual cloth collisions, the simulation time can be as small as only a few seconds. And since the rigid body collisions don't take long to calculate either, the entire length of time it'll take to simulate all of the dynamics is still very small

-Deformations are tweakable apart from rigid body collisions. Since we're actually calculating everything in 2 parts, we can spend as much time as we want getting the deformations right, without having to worry about affecting the rigid body simulation at all

Cons:

-Inaccuracies. This method is inaccurate on several levels. First, our deformations are being simulated using cloth dynamics, so were not actually taking into consideration the many different physical properties of metal when we're doing this. This can lead to weird looking deformations in some cases...luckily, for the most part most people won't notice...especially in high-speed collisions.

Secondly, it can be very tricky simulating the rigid body collision while keeping it lined-up with the cloth object's movement. Because of that, it's difficult to create one fluid movement between the rigid body object and its cloth counterpart. Luckily, in this example using a teapot it wasn't too hard at all....but in my car scene it was quite a different story...especially because I had things like tires and z/x movement to worry about (not just gravity).

-Attachments don't work well. In this teapot example, the teapot is a single mesh so there were no attached objects to worry about. But, in my car crash animation, I had different non-deformable objects (like rear-view mirrors, windshield wipers and headlights) attached to the car's body, which can't be simulated to follow the cloth's deformations (at least to my knowledge). In that case, I simply keyframes those objects' movement to follow the car's deformed body properly...but that was very time consuming and not at all efficient.

***

Overall though, my method works pretty well I think, considering the resources and limitations that I had to work with while developing it. If you find it effective too, feel free to email me and show me your results! (or send your questions/comments)

Anyways, that's it for now! I hope this has helped!

-Tyson