Cloth Simulation, Part 07: Unfurling a Banner

Photo of Donovan Keith

Instructor Donovan Keith

Share this video
  • Duration: 11:25
  • Views: 3221
  • Made with Release: 16
  • Works with Release: 16 and greater

Animate a large cloth banner dropping down the side of a building.

In this video we’ll animate an unfurling banner using an extruded helix, the Fix Points option of the cloth tag and the Cloth Collider tag.



Hey, and welcome to another video in our cloth animation tutorial series. In this one, we're gonna take a look at how to create a banner that is unfurling in front of a castle. Let's take a look at our project file and look at this banner and see how we're gonna trying recreate that sort of movement. So here is the project file and you can see that it's the illusion of the projection map. It breaks down really quickly. But the fabric is doing all right. So here I have a roll of fabric and it's made out of a helix that's been flattened and then extruded. Let's see if we can just show you that helix. It's a little hard to make out. There's the little helix right there. And then we've added some cloth simulation to that extrusion and we pinned just a couple of points. A couple of points in the very back so that as this guy unfurls, those stay fixed in place. And we've got some cloth surface subdivision, some regular subdivision and then smoothing things out a bit. And there's a little backstop here which is catching our cloth. So let's go ahead and recreate that in a new scene. So if you would create a new project file, and let's create the cloth first. So for that, I'm gonna use a helix and I'm using the helix because it is sort of like a straight line that has been rolled up. So that's kind of what we're doing with our cloth. We're taking our straight cloth and rolling it up. So, I wanna take the plane and I'm gonna change it to zy, so it's aligned with the x axis. So that when I'm looking at it from the front view I'll see the front of my cloth. I'm gonna change the height here to zero. So I'm just flattening out my helix. Then I want to adjust the end radius to make it a bit smaller. The same thing for the start radius. And you kinda wanna think about how big your radius should be based on the size of the cloth you're gonna be looking at. I'm gonna say, let's say, I don't know, 12 centimeters for our start radius and our end radius let's choose nine centimeters, something along these lines. What we get is a rolling from the outside towards the inside. That's the exact opposite of what I want. So I'm going to type in negative 20 here, and it's the age old which way should the toilet paper roll be debate. In this case, because this point right here is gonna be fixed. I wanna allow it sort of roll easily forward and we'll see how that goes. Next up, I wanna increase the number of rolls because if I was to take this spline and kind of unroll it in my mind, I see that it's really gonna be like 30 centimeters, not that long a banner, not that impressive. So, I'm going to increase my end angle here to, let's say negative 3,600 so 10 wraps around. So, let's add a couple more zeros there. Okay, 3,600. So now we've got quite a few rolls around but if you look at the start and the end. You've got a sort of odd behavior and I believe it's due to the intermediate points being set to adaptive. So I'm gonna change that from adaptive to none. And what this is doing, is it's saying you're actually going to create a point for every single point in our spline. So if I make this editable, we'll see there's actually just a series of points right there. So I'm now gonna hit undo and again using none, I wanna adjust the number of subdivisions. So subdivisions right now is set to 100. Let's see what happen when we set it to 200. It's about twice as dense and I'd say that's probably as dense as we're ever going to need. Now, one thing that's a little bit less than ideal about our set up here is that this last segment is a different size from our first segment. And unfortunately, there's no easy way to correct this with this method. Another technique that you could use to get around this is to take a plane and use a spline wrap deformer to wrap it around a spline like this. But for me the difference isn't significant enough to not do this. So let's take our helix and I'm going to extrude it. So I'm gonna hold down my alt or option key as I add extrude. And I'm gonna change the movement here from z to x. Let's try something like 220, nice and long. I'd say that's a pretty good aspect ratio for the start of our banner and if I go into Gouraud shading lines in my display. I can see the segments that make up my object. And I want square subdivisions, so I'm going to crank up the number of subdivisions here-- just sort of eyeball it, really, until I get something that looks like each of these little segment square. And just because I like round numbers, I'm gonna set this to 60. Again, the squares in the back are gonna be slightly different from those on the inside. It gets a little bit more rectangular towards the end here, but that's just a problem we're gonna have to live with. Let's go ahead and take this extrude and name it banner. And then, I'm gonna duplicate it and put it down to this bottom here and call this one banner backup. And this is a technique that you'll probably see me use in a lot or all of these cloth videos. And basically what I'm doing is I'm setting up a backup just in case we ever want to return to this because cloth has to be made editable. So let's take our banner, make it editable. We now see we've got a whole mess of points to play around with. But there's only two points that I particularly care about. The points at the very beginning on the edges here. So on the outside, there's a point on the corner that I want and there is an opposite point in the opposite corner that I want. Hold down shift and select both of those. And what I wanna do now is create my cloth simulation. So I'm gonna take my banner, go to simulation tags and choose cloth. And in my dresser tab, I can choose to fix these points. Now before you do this sort of fixing, it's typically best to line this up in your scene where you're gonna want it, so you don't have to deal with the problems of resetting and restarting your cloth. But since this is sort of a toy project right now, we don't have to worry about that. Okay, so let's press play and just see what our simulation is looking like. Ooh, not good. It is looking like, I don't know, some bubble gum that got overstretched and not at all like. . . I would not display this in front of my castle, I guess is the point I'm trying to make. So let's go to our tag settings and crank up the number of iterations. Now in previous videos we've used things like 10 or 20, but for this I'm gonna crank it all the way up to 100. And that's because there's just gonna be so much force on this cloth as it starts to fall down that anything less than a really high number is gonna result in that stretching and sort of disruption that we saw. Flexion, I'm gonna take down to zero. And that's because well one, most cloth keeps the flexion close to zero and two, I don't want it to retain in this curled up shape. I want it to unroll as easily as possible. Bounce I'm gonna kill because I don't wanna have too much energy in my cloth. Friction is not gonna be really important either way. So the next thing that I wanna do, and this is something I've sort of picked up from experience in playing around with this scene, is I wanna add a backstop. I wanna insert that after this cloth drops, it doesn't loop around or do anything too wiggy. I wanna ensure that it's not gonna collide or go through the wall of my castle. So, I'm gonna add a cube here and this is just gonna be called-- I guess we can just call it backstop. And what I wanna do with my backstop is adjust its size, adjust its positioning and here we can tap H in a few of these views to see that a little bit more easily. And I also wanna increase the height quite a bit and I'm basically just moving it around trying to ensure that no matter how far this cloth drops, it's not going to pass through the wall behind it. I'm giving it just a little bit of play for its unrolling, not too much. And next up, I wanna add a cloth collider tag to this object. So I go to simulation, cloth collider and I'm also gonna keep bounce on this pretty close to zero. I just don't want any energy being introduced because the more energy you get in your simulation especially with something as high energy as this, the more unstable it gets. So, whoa, that keep is massive. Well, it doesn't really matter. Let's just go ahead and take a look at our cache and calculate a cache for this simulation. You'll get notice this, it's taking a while. In fact, I'm gonna pause the video right here and come back once it's done. All right, we are back. I've taken the liberty of adding a checkerboard material to our cloth just so that we can get a better preview of what's happening and let's press play and see how we're doing. Our cache is done, it's falling down pretty well. There's a bit of flex up at the top and it's sort of a matter of personal preference, how stiff you want this cloth to seem. If you want it to seem more stiff, well you're gonna have to crank up your iterations and then endure the consequences of even longer simulation times. Let's just finish up the appearance of this just a little bit more by adding in a subdivision surface object and I'm gonna set this to one by one. I'm doing this to smooth out the worst of the issues in our cloth. And then the next thing I'm gonna do is add in a cloth surface object and that's just going to really extenuate any wrinkles that form in the middle of our simulation. So let's press play and see how is this looking. I'm gonna say this is looking quite good. And we won't really know how our final simulation is doing until we've rendered out a preview and gone from there. Oftentimes creating a realistic simulation just comes down to thinking about how something would be accomplished in the real world. If you're unfurling a banner in the real world, it's probably a roll of fabric and that's what we've created here. We've created a roll of fabric, we've pinned it at the corners like you would with a nail or some string and now we've just got it unfurling. There are some limitations that I wanna point out which you probably already noticed. When you're up really tight to this effect, it breaks down and that's because the cloth is actually sort of intersecting with itself as it unfurls. And that's because it's not unrolling per se. It's sort of just following in stages and unfortunately Cinema 4D's cloth simulation system is not really up to the task of having so many layers of cloth so tightly next to each other, but I suspect almost any cloth simulation system would be challenged by a situation like this. So there you go, that's how you simulate your cloth. Good luck with your own projects on recreating a banner like this one.
Resume Auto-Scroll?