Join Craig Whitaker for an in-depth discussion in this video Building constraints and belts, part of VFX Techniques: Creating a CG Flag with After Effects and CINEMA 4D.
- View Offline
So before we start working our cloth simulation, we're going to want to go ahead and apply a texture to our plane. Now you may not have the final texture in place. The texture team may still be working on it. You may be the texture team. But before we start deforming our flag, it's important that we lock our texture down and tell it not to move. We want to stick our texture, so once we start deforming the plane, or our flag, the texture goes along for the ride. So we'll do that first. So we'll double click, make a new material, and apply it to our plane.
Which I will now rename Flag. So we'll go into Material > Texture > Surfaces > Checkerboard. We'll go ahead and set that to a flat projection. Let's put the tiles up to two. Now we're going to click on the flag, right click, go to Cinema 4D Tags > Stick Texture, and Record. And what that's doing is it's saying, if the flag deforms from now on, since we've recorded the texture with that projection, the texture won't slip or break as the flag starts to deform. At any point we can go back and easily swap out the texture with a bitmap. So, let's add a simulation to the flag. So we'll go to Simulation > Cloth. The Dresser tab has an option down here called Fixed Points.
And what that does, it's asking us to pick some points on our flag that we want to fix, or hold, or freeze in 3D space. So let's go to our vertex. Our vertices, we'll get out of this camera view. Go to the top of our flag. So we'll pick the top row. Our vertices here. And we'll select Fixed Points > Set. And you can see those vertices now change from that yellow orange color to the purple color. So if we zoom out and hit Play, you can see those points are fixed in space and the rest of the flag is starting to behave in a dynamic fashion, responding to gravity in the scene, awesome.
Next option, is for the belt, and what the belt's going to do, it's going to say okay, what points on this flag, in this case this bottom row, do you want to fall. Or do you want to be stuck somewhere else in space. So let's make a belt. By just using a simple cube, that we will parent to the flag, just to get its Properties > Position > Orientation. And then we'll pull it back out of that stack. Drag it to the bottom. Center it up. I'm just going to tumble around here, to get it in a good place here.
Press c on my keyboard, to make it editable. I want it to be roughly the same width. And we'll move it away. What's going to happen is we're going to tell the bottom row of vertices to stick to this belt. So let me get in nice and close here so you can see what's going on. On our flag we'll right click, go to Simulation > Cloth Belt. It's asking us, what would you like to put the belt on. I'm going to say, on this cube, which I'm now going to call Belt. So, put the belt on our belt. And we're going to set it to those points that we had selected a moment ago.
And when we do that, you can see that's there's a yellow line drawn, or a bunch of yellow lines drawn, connecting the bottom of our flag to our belt. So let's zoom out, center it up, wind back to the beginning, hit Play. Now it's behaving differently. The top points are fixed and so are the bottom points. But the bottom points have the ability to move based on the location of our belt like this. So wherever we move this belt, that bottom row of vertices is going to go. And the rest of the flag will behave in a very realistic, physically accurate manner.
All right? So, let's go back to the beginning. And we're going to pull the belt up to where we want the simulation to start from. How do we know where we want it to start? Well let's look through our Shot Camera. And hit Play, whoa, and it freaks out. Let's turn our background back on, now as soon as we hit Play, the bottom vertices jump way up to the position of the belt, giving you that rubber band spring kind of effect, right, kind of freaks out and jumps up there. That's okay. To fix that we're just going to let the simulation run for a while. And once we get it into a place that we're happy with, we'll tell Cinema 4D to use that as its initial state.
So let's turn off the background. I'll set my timeline pretty high, something like 3,000. Hit Play. And I'm just going to sit here and let it do its thing, until it gets into a final resting place, and we'll meet back up with you in a couple minutes. Okay. So we let that run for a while, and here we are back inside of Cinema 4D, and we have a resting place that we want to set as our initial state. You may also notice that the belt is in a slightly higher position. As I was adjusting it, while it was coming to a resting place, just trying to find the best position for it.
This is where I'm happy with. So let's go back to the cloth tag, and under Initial State, we're going to press Set. Now what this does is it memorizes this position for the start of the simulation. So now if we go back to the beginning of the animation, you'll see that it'll start right here. So if I hit Play. All of the points in the flag, except for the points that are fixed either to the belt or to the world, are able to move in a physically accurate, very realistic fashion. With the setup that we have now, we'll be able to move forward with making the flag animate.
- Collecting reference materials
- Planning and blocking out the shot
- Analyzing and tracking the footage
- Solving the tracked shot and setting up the environment
- Creating and adjusting the cloth simulation
- Texturing the flag
- Rendering passes from 3D
- Color grading, adding grain, and working with lens distortion