Cloth Simulation, Part 09: Sliding Open Stage Curtains

Photo of Donovan Keith

Instructor Donovan Keith

Share this video
  • Duration: 12:54
  • Views: 5862
  • Made with Release: 16
  • Works with Release: 16 and greater

Animate a curtain that is being opened by hand using the Cloth Tag, Cloth Belt Tag, and some timeline tricks.

Animating an opening curtain is one of the more challenging tasks you can undertake with Cinema 4D’s cloth engine. We’ll model our curtain using an extruded spline, bind it to a contracting curtain rod, and repeat and offset that animation to create the illusion of a person pulling on a rope to open the curtain.



In this video I'm gonna show you how to animate a curtain opening like this. It's actually one of the harder things to pull off in Cinema 4D's cloth system, or it's surprisingly difficult, but I'm gonna hopefully show you a technique that will make it a bit easier on you. We're gonna start in our Cinema 4D project file by creating a spline that looks like a curtain. Then we're going to extrude that up, we'll make it editable and turn it into a polygon object, add some cloth tags to it. Then we'll create a rod object, a curtain rod, that is going to contract over time in a way that makes it look like our curtain is being actually opened and closed by a real live human being. So let's go ahead and go through this process together. If you would create a new scene file and go into your top view. Once there, I want you to zoom out until you can see two of these larger grid blocks whilst still seeing the smaller ones, and turn on snapping. This is what we're gonna be using as our, sort of, framework as we are snapping or rather as we're drawing out our spline. So I'm gonna turn on work-plane-snap, and also grid-point-snap. Having done that, I'm gonna take my cubic spline tool and I'm gonna start at the very center of my scene, and I'm just gonna be sort of alternating forward, back, forward, back down the line till I've got 10 of these humps. Now, yes, if you were clever you could use the formula object, and I fancy myself to be pretty clever. And my clever butt got myself into about a 30 minute investigation of how to set up the proper formula. And you know what, this doesn't feel efficient, but it's actually way more efficient than trying to figure out the correct formula. So just draw that out. Having drawn out our spline like this, we can now name it. Curtain profile. And I'm going to take a look at it and say, "Whoa, it's big." So what I want to do is take this object and scale it down. Now I'm gonna scale it down until it's about, 300 centimeters, something like that. And I actually just grabbed my X. I'm gonna hit undo and just scale it down completely until the width of it is about 300 centimeters. Perfect. Having done that now I can also come in here and if I want, just slide it back a little bit. I'm just sliding it back sort of half way there until it's lined up nice and neatly. I'm gonna turn off my grid point snapping as well. I just wanna evenly intersect the middle points of all of these just because it's gonna make it a bit easier once I start adding my curtain rod. Okay, having done this, I now want to extrude up this shape. So I'm gonna hold down, I believe alt, and choose extrude, which will add my extrusion. My extrusion I now need to modify its height. So I'm gonna set movement on z to zero, and crank up the movement on y maybe to something like 500. Fifteen feet, it's a little too tall. Maybe 400. There we are. Having done that, I now want to take a look at my subdivisions on my object. And again, with cloth you're always looking to get square polygons or as close to that as you can manage. So for one, I'm noticing that our polygon density is very different in the peaks and in the valleys than on these straightaways. So my curtain profile, I'm gonna change the intermediate points here from adaptive to uniform, and that will give me a more uniform distribution. I just wanna bring down the count here, two, three, four. Looks like somewhere between three and four is gonna be good for me. I'll just go with four for now. And now I wanna adjust the visual or rather the vertical subdivisions of this. So I'm going to drag up the number of subdivisions on my extrude object, and I'm just gonna eyeball this. It doesn't have to be totally perfect, but you want more or less square polygons. There we go. So I've got a final value of 92. Your results may vary. I'm now gonna call this curtain, and as I'm planning on making this editable, I'm just gonna duplicate it and make it editable now and take my duplicate called curtain backup, and I'm gonna hold down the option key on my keyboard and turn all these off and hide them. Great. And now I'm gonna take my backup and put it underneath my curtain. And having done that I can now start building my curtain rod. So my curtain rod we're not actually gonna see in our final animation, so we can sort of approximate what it is and add a cube, I'm gonna make it 300 units wide. And for all my other values maybe something like five, just very small. And then I want to move it over on x until it's lined up rather perfectly, so I'm holding on shift and dragging over on x. And then I want to drag it up on the y axis. And I want this lined up with this second line of points right here. That's looking good. Now, I now need to create divisions that are lined up. So I'm actually gonna move this up just a little bit so that we can see the lines or our segments here as we start to add them. I think that we've got 20 humps, something like that, or we can just count it. 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20. Today's lesson is in just doing whatever you have to do to get it done. And having done that, we can also adjust the width of this guy until these all line up semi-neatly. Some it looks like are more effective than others. All that counting, I still didn't get it. So you could also just as a last resort just crank up the number of segments so that you're likely to have a point that is close by. In fact, maybe that's what I recommend. Okay, having done that, let's say I drag this down until it is intersecting with these points right here. Okay, it's now intersecting, but I now need to get the points that it may be intersecting with. So looking inside of this, I can now take my curtain, take my points tool, and take my live selection. Turn off only select visible elements, and select these guys right here. And if I want, I can temporarily turn off my cube and just see how effective that was. Less effective than I had hoped. So maybe some of these more forward ones are also points that we want to grab. So I'm gonna hold down shift and get those. And we now have points along the front middle of our curtain all the way along the length. I turn my cube back on. And let's just call this curtain rod. Okay, I've got my curtain rod. And I now want to attach my curtain to my curtain rod. So let's take our curtain rod, take our curtain and make it a cloth object. So simulation tags, cloth. And I'm just now remembering that I'm gonna wanna scale down my curtain rod here, but not the middle. I wanna scale it down from one end so I'm just gonna make it editable by tapping my C key. I'm gonna turn on snapping again, and I'm gonna temporarily hold down my L key so I can snap it to this corner of the curtain rod. Turning off snapping again. I can now scale my object down on x. And yep, we can see we can get a nice animation of that. Okay, with our curtain now, curtain object, or rather a cloth object, I can also add a cloth belt tag. So right click on your curtain, choose simulations, cloth, belt. And from there, select your curtain rod. And your curtain, let's go into points mode just to make sure we've got those points selected. Select that cloth belt tag and choose set. You see that all of those points have now turned yellow and they are connecting with our curtain rod. So if we press play, they are now hanging by a thread, really, to our curtain rod. So let's adjust those cloth settings. Get something a little bit better looking. Let's take our cloth tag, and first thing I need to do is really just crank up the number of iterations. We've got so many polygon segments that we really have to increase the number of iterations or everything is just gonna start going funky. So those are holding much better now. Next up I'm gonna reduce flexion to a very low number, like 1 or 2%. And the goal in doing that is to allow our cloth to be flexible, but not so flexible that it starts colliding with itself. Leaving stiffness there at around one. Mass we'll leave at one. And let's set our air resistance, here, to something like 75. So now let's press play. It's sort of falling in place, not really doing too much of anything. Let's now play around with animating our curtain rod. So I'm gonna take my curtain rod and in the coordinates tab, I'm gonna start animating my scale on x. So we'll start at one. Let's go to frame 10, just have it hang out for a bit. Then at frame 20 we can get this down to maybe something like 0.75. And record again. So now when we press play, it's hanging out, hanging out, hanging out. And then it is compressing. That's looking pretty good. What I want to do is take that animation and repeat it. So I'm gonna go into my timeline. I'm going to select my curtain rod and all of its tracks, and then if I go into F curve mode it'll be a little bit clearer what's happening. I'm gonna tap the H key so I can see all of my animations, and then the after setting, I'm gonna change that to offset repeat. And what that's gonna do is it's gonna take my curve, copy it and shift it down. I'm gonna do that two times, so it's gonna go 100% to 75, 75 to 50, 50 to about 25%. Nice and compressed. So when I press play now, it starts shrinking, calms down for a second, starts shrinking, calms down for a second. It's looking pretty good. I would say that I might want a little bit more gravity possibly, or I might want to reduce my air resistance, because it's just hanging out a little bit too much. So maybe I'll set that to 25 to make this seem like slightly heavier fabric. And just to see a preview of what this is really gonna look like, I'm gonna turn on calculate cache. And we'll wait for that to cache. There we are. We now have a fairly convincing cloth animation. I feel like we might want to slow down the rate at which it's sort of tugging all that in, but overall looking pretty good. We can improve the look quite a bit by just throwing in a subdivision surface object just to smooth it out. And then if you want, you can create another curtain. So duplicate it. Move it over. And eventually once you start texturing and adding in some lights, you'll get a scene kind of like this. And I've included this scene in the downloads so you can really tear it apart and see where my settings were a bit different. I suspect that my forces are a little bit different from what I've selected here. By carefully placing our poly-segments and lining up the corresponding belt object, we were able to precisely open and close our curtain. The flexion settings allow us to prevent the cloth from colliding with itself too much and give us a surprisingly pleasing result. I hope this series has been useful to you. It's been a lot of research and a lot of work to get it going. But having done this now, I have a lot more faith in Cinema 4D's cloth system, and I'm really enjoying working with it. And I hope that you, too, can have fun as you add cloth into your future projects. Feel free to leave feedback in the forums and have a good day.
Resume Auto-Scroll?