Join Alan Demafiles for an in-depth discussion in this video Understanding cloth dynamics in C4D, part of Cloth Simulations for Motion Graphics in CINEMA 4D.
- There are several different dynamics engines inside Cinema 4D, and all of them rely on good practices in order to attain good simulations and decent viewport interactivity. Because simulations in general can be quite a computationally expensive endeavor, keeping these concepts in mind while building our simulations will allow us to experiment further. So this video, we're going to take a look at four different cloth simulations. And as you can see here, I've got one that's a three by three, in fact, I'll come over here to Display, and enable gouroud shading with lines so you can see the subdivisions.
So our first one's three by three, this one's 20 by 20, 50 by 50 and 100 by 100, and I've got cloth tag on each one of those flags, but what I'm going to do is enable the first one, and one of the first concepts that you need to grasp when working with cloth is that it must be on an editable piece of geometry. If you notice, this icon here has the points and a polygon in the middle. If you were to work with a straight plane, primitive, make this z so it faces us.
You'll notice you can still tweak out these segments, but they're parametric in nature. Meaning you can't dive in to point mode, edge mode, or polygon mode until you make this editable, and you can do that over here by hitting this button or typing the keyboard shortcut C. And once you do that, now you've got access to all the sub-object levels, point, edge and polygon mode. So once that's an editable polygon, you can add the cloth tag.
So this first flag, it's a three by three polygon, and with that cloth engine enabled, what we're going to do is play the timeline, now this is pretty important, so when you're experimenting and going through different iterations of all these settings here to see what works for you, you're going to want to play the timeline. And by playing the timeline you're actually telling Cinema 4D to calculate the simulations on the fly. And it's going to do that as fast as it can. And down here at the bottom... I've got my frames per second running, so it'll tell you how many frames per second it's actually drawing, so because this is a lower resolution flag of lower resolution geometry, it's drawing as many frames as it can per second, and that's a pretty high framerate.
You can hit Shift + V in your viewport and bring up the HUD, and down here, frames per second, you can enable that if it's not already enabled for you. So while that's fairly low resolution geometry, let's see what happens when we move to a 20 by 20. I'm going to come back here to my cloth tag and disable it, and on my 20 by 20 flag I'll enable the cloth engine here. I'm going to rewind and push F8 on the keyboard, or the play forwards here. And you'll notice 20 by 20, we're getting some pretty decent movement.
And it's low resolution enough to where we're not taking a big hit on the framerate. Right now we're getting about 45 frames, and so that's a pretty decent start. You'll notice as we go through and add more geometry that the framerate takes a hit. So, I've enabled this flag for 50 by 50, the cloth engine is on now, and we'll rewind and hit play again. Now you'll notice that the frames per second is somewhere in the six, seven, eight frames per second. So there's some detail there that we gain in the flag simulation, but it's at the cost of a slower experience, slower viewport.
And just to accentuate this, a flag that's 100 by 100 you'll notice that the framerate will drop pretty considerably, so let's run this. Now we're down to one to two frames per second. Now there's ways around this to compensate for the lack of viewport interactivity with the higher resolutions, and that's done through caching, which we'll cover through in some of the later courses. But for now, it's important to know that the object needs to have enough polygons to allow for various deformations that a real cloth exhibits.
But not so dense that it bogs down the computer. And so, when we're experimenting with these different cloth simulations, you'll notice that as I went through each one of these cloth tags and disabled each one. When you're working with multiple cloth tags, that's just that much more the computer's got to figure and figure out for the simulation. If you have to work with multiple cloths, it's generally a good idea to disable all of them except the one that you're working on. And that way you can focus in and devote all the resources to just that one simulation.
You'll notice as I'm running through here, I'm going to enable the other cloth engines and you can watch that frames per second decrease as we go along. And I'll enable this one. Keeping these general ideas in mind when using the cloth engine in Cinema 4D will help us get better simulations with faster viewport interactivity.
Cloth Simulations for Motion Graphics in CINEMA 4D is a project-based learning experience that follows three projects from start to finish: an animated flag blowing in the wind, opening and closing theater curtains, and a cloth-on-object logo reveal. Each project is rich with lessons that artists can adapt and apply to any cloth animation. Author Alan Demafiles will help viewers use the C4D Cloth tag and colliders, attach cloth to other geometry in a scene, loop simulations, correct imperfections with the morph deformer, and apply logos and other patterns to fabric. Start watching to incorporate cloth simulations into your mograph skillset.
- Creating geometry for cloth
- Working with the C4D Cloth tag
- Using caches
- Modeling and texturing cloth
- Adding constraints
- Attaching cloth to geometry
- Creating cloth collisions
- Adding lights
- Animating morphs and reveals
- Rendering the cloth animation