Cloth Simulation, Part 02: Quickstart: Animate a Tablecloth Falling Onto a Table

Photo of Donovan Keith

Instructor Donovan Keith

Share this video
  • Duration: 08:59
  • Views: 3016
  • Made with Release: 16
  • Works with Release: 16 and greater

Learn the absolute essentials for simulating cloth in Cinema 4D.

Learn how to quickly setup a good looking tablecloth simulation using the Cloth Tag. We’ll start with an overview with the types of cloth objects, move on to setting up a quick simulation, and cover strategies for caching your simulations to improve playback speed and rendering predictability.



- So, you've got 20 minutes to get some simulated cloth in your animation. And you want to learn how to do it as fast as possible. Well this is the video for you. I'm going to be going over the very basics of how to use 4D's cloth tag to do some simple cloth simulations. I'm going to be skipping over what each and every parameter is doing. But I'll give you some decent defaults to work with. So, let's go ahead and get started. I'm going to have a look at our end file here so we can tear it apart and see just a little bit about what's going on before we move forward. We've got a cloth surface object in here which is giving some smoothness to our cloth. We've also got a subdivision surface which is getting rid of the really tough kinks in our cloth. We've got a tablecloth polygon object which is plane that I've made editable. And it has got a cloth tag on it. And then there is a tablecloth plane here which is basically, the same object here and it's serving as a backup if we ever want to make changes. Our cloth tag has got some settings applied. So, we've got some gravity and so forth moving our cloth. And then down below here, we've got our table object. It is got a cloth collider tag. That is ensuring that our tablecloth is colliding with our table. So, let's take a look at our starting file and get going. So first things first, we've got a plane. And if we go to display Gouraud lines, I'm just going to click out of my camera here; we can see that we've got a bunch of grid points here. It's a little hard to make out exactly what's going on. So I'm going to turn off textures, let me see this grid. It's a pretty dense polygon mesh. It looks pretty good. In general, you want to have as few polygons as you can get away with. So, I'm going to try 30 by 30 if we can get away with that. And, I'm going to duplicate my tablecloth by holding down the control or command key. I'm going to drag it underneath. I'm going to call this one "backup." And then I'm just going to hide it. So, I'm holding down the option key, clicking twice, and I'm going to disable it. So this is an object we can always go back to should we want. Next up let us add a cloth tag to this object. But before we do that, we have to make it editable. So, I'm just going to tap the C key or press that button there, right-click simulation tags, cloth. If I press play right now, my cloth is falling but it falls right to the floor through my table. So, I have to tell it about the table. So, I click on the table object down here, core, circle, dish, round and add a simulation cloth collider object. Let's press play now and see what that buys us. It starts out going pretty quickly but once it collides, things start getting a little bit slower, a little bit uglier. We've also got a very slippery tablecloth. So there are some settings we need to start tweaking. So go into your cloth tag. Whenever you are tweaking your cloth settings, I highly recommend starting out at frame zero. First, you want to go into your tag settings and generally, you just want to bring up this iterations number. Maybe do something like five or six at a minimum. Stiffness, always keep at 100% unless you want to have a cloth that is a little bit flexible. Flexion here, I tend to take down to zero or maybe only 1 or 2%. And mass, I almost invariably, take down to .1, which is the lowest it can get. And it gives you a lighter, airier feeling. Next up on the forces tab, we've got gravity here which is 9.81 meters per second per second I believe. In general, you want to model your object accurately so that gravity looks right. So my tablecloth is roughly tablecloth size. We're going to skip over these wind settings here. I'm going to turn on some air resistance. I'm going to set that value to 75 which is going to mean our tablecloth is actually going to float down a little bit and respond to our air. So when I press play, it's falling down just a little bit more lightly, which I like. Now if I go into the cache tab here, I can turn on calculate cache. And what it's going to do is play through my whole animation and save my completed simulation. When I press play now, I get to see this animation in more or less real time and see what that feels like. It's looking pretty good. On the expert tab, I'm going to up my sub-sampling. Now, you don't typically need to do that unless you're actually seeing errors. But I'm also going to turn on self-collision so that my cloth does not run into itself. And, I'm going cache it again. Now, expect this to take a little bit longer. Because every time you turn on self-collision, things just take bit, because no longer is your cloth just colliding with the table, it's also trying to avoid colliding with itself. And when it's doing that five times every frame, it just starts to take awhile. I think I've killed enough time. We're almost done caching this cloth. Let's take a look at what we've got. Looking pretty good. We've got a little bit of motion in there. If we want to quiet it down and get some of that nervousness out of the cloth, what we can do is one, up the amount of friction that we have. So on the tag settings, I'm going to increase friction to say, 95%. I'm going to do the same for my table just to ensure that we don't have much going on there. I'm going to lower the bounce to zero on both my table and on my cloth here. And that will ensure that once our cloth hits the table, it doesn't move around too much. I'm going to cache this again. But to speed up my preview, I'm going to set the length of my animation to 50 frames. That way, it's a little bit faster to see what's going on. That's a pretty decent simulation. Let's turn on our textures again. So, I'm going to go to options, textures. I'm going to go to my standard Gouraud shading view so we can see what this looks like. If we look through our camera, we can see a bit more of what it should look like. It looks all right. I would say though that we are definitely missing some smoothness on these shapes and to solve that, I'm going to select my tablecloth. I'm going to add a subdivision surface object while holding down the option key, or the ALT key. So it's added that to division surface. It's now smoothing everything out. I'm going to set subdivision editor and renderer just to 1 so it's smoothing a bit, not too much. I'm also going to add a cloth surface object while holding down ALT or option. That is going to allow us to add thickness to our cloth if we want. And it smooths it out while also keeping the hardest part of the creases. So it's better suited to cloth than some other things. So, we now have a basic cloth simulation. What if, for example, you want to make some changes? Well the cloth tag is not the friendliest with changes you might want to make. So for example, if I've got my move tool and I try to move this object on frames zero, that's working pretty well, but it's moving the whole thing. That's because I've got my cache on. So, I'm just going to hit undo there. And if I want to manipulate the starting position of my cloth, I have to turn off cache mode. On the tag settings, I have to turn off my cloth engine so it's no longer calculating the cloth. And then, I can re-position it a little bit closer to the start of this table surface. And once I've done that, I can now go to my dresser tab. And I have to choose set, next to init state, so initial state. I'm going to set that, and then I go back to my tag settings and I turn off auto and I can calculate my cache again. Then I'll be able play through it. So that procedure is really important because otherwise, you're just going to be moving the points of your object and it's going to get out sync with the axis, and it's a whole mess. So just remember to always go back to frame zero, turn off your cloth engine and go from there. Let's take a look at how that looks. Much better. If we wanted, we can extend our animation a bit. But I would say that we've got a pretty good looking cloth simulation. That pretty much covers it. So while there are quite a few settings in the cloth tags, so long as you remember to apply your cloth tags to a polygon object, you should get some sort of simulation. And if you want a better sense of what each and every one of these parameters does, stick around for the next video. And, we're going to be going into the guts of how all of that works.
Resume Auto-Scroll?