| Downloads | |
|---|---|
| No Required Download |
Want the Blender 2.49 version of this tutorial? Check out the archive.
NOTE: In this tutorial, just like nearly all of my tutorials, I have provided what I call keystrokes lines. These are highlighted throughout the tutorial and are meant to allow you to see the actual keystrokes that I went through in order to get the results I get in the tutorial. More advanced users should be able to go through a tutorial without the keystrokes lines assuming I have explained myself sufficiently.
For this tutorial we are going to be making a billowing flag in Blender using a combination of soft bodies and wind and using only one plane acting as the flag itself. Let's start by opening up Blender and removing the default cube, if you have it. Next we want to add the actual flag to our scene. For this we are going to be using a plane.
Add-->Mesh-->Plane
The next step is resizing the plane so that it fits the dimensions of the flag you want to create. Since I am going to be making the flag for the United States, I am going to make the aspect ratio of the flag 1:1.9. What this means is that is the height of the flag is 1 unit, then the width of the flag is going to be 1.9 units long. So, for me I only need to scale my plane up by 1.9 in the X-direction and I am done, after that I can make my flag as big or small as I like. I decided to scale mine up by 4, so it is nice and big. If you want to find the dimensions of the flag in your country, you can find them all here: http://flagspot.net/flags/xf-size.html
S, Y, (First number)
S, X, (Second number), S, 4

Now we want to rotate our flag into the vertical position and subdivide it a bunch of times so that the billowing will look more realistic. I rotated by flag on the X-axis by 90 degrees to make it vertical. After that, go into Edit Mode by hitting the tab button. Select all of the flag and then click on the subdivide button on the left panel a few times, I did it five times.
Select the plane, R, X, 90, Go to Edit Mode, Subdivide (5x)


To make our flag act more like cloth, we need to give the plane cloth properties. To add cloth properties to the flag, we need to go to the Physics settings. This should be the right most button on the big row of buttons in the right hand panel. Once there, you should see the top section labeled Cloth. Click on 'Add' to make the plane use the cloth properties. As it turns out, the default setting (which is the cotton preset) seems to look pretty good for what we are doing, so I won't be changing any of the settings there.
Go to Physics settings, Click the Add button in the cloth section
With all of the settings for our flag complete, we can now add the wind that will make the flag move. If you go into the add menu, you can find 'Wind' under the Force Fields submenu. Once you have added that to your scene, we need to make sure that it is big enough to make the whole entire flag move. The size that you make the wind really depends on the size you chose to make the flag itself. In any case, I rotated by wind along the x-axis by -90 degrees and then I rotated it along the Z axis by -75 degrees. After that I moved it to the end of the plane, you can see what I mean in the image below.
Add-->Force Field-->Wind, R, X, -90, R, Z, -75, Move into position

If you click play on the timeline to test it out, you will see our plane start to fall. We also notice that the wind is having hardly any effect on the plane at all. To make the wind work, we need to select it then go into the Physics settings. You should be able to find a setting called Strength. Change that to 30. If you test it out now, you will see the wind effecting our plane. You may also see a new problem arise from this and that is that the flag seems to be going through itself. It fix this, select the flag and in the Physics settings there should be a section called Cloth Collision. If it is not checked, turn it on then turn on the setting 'Self Collision'. When you do that, the plane will no longer go through itself.
Select the wind, go to Physics settings, Change Strength to 30.000
Select the flag, go to Physics settings, turn on Self Collision in Cloth Collision section

That final thing we need to do is make the flag stay in place rather than falling, as mentioned above. Fixing this problem involves using vertex groups. Select the flag and go into Edit Mode. Then, select some vertices the top and bottom left corners of the flags. To put those vertices into a vertex group, go to the Object Data settings and click on the plus button in the Vertex Groups section. Finally, make sure that the weight settings at the bottom of this section is at 1.000, then hit the assign button.

Select the flag, go to Edit Mode, Select the corner vertices, go to Object Data Settings, Click the plus button, Change Weight to 1.000, Click the assign button
To make those corners stick in place, we need to go back to the Physics settings. In the section labeled Cloth, there should be a checkbox called Pinning. Turn that on. Below it a vertex group selection box should open up for use. Click on that and select the name of the vertex group we just made (probably just 'Group'). You should now be able to hit plan in the timeline and see our flag move in the wind. If you find that the flag isn't billowing as much as you would like, all you have to do is go back to the wind settings and give the strength a higher value.
Go to Physics settings, Turn on Pinning, Select the vertex group, Play your animation
That's all there is to it. Now you can go find an image of your flag and put it on there for rendering. Also, as a last little thing, you may see that your flag is not smoothed out when you render it. All you have to do to fix that is select the flag and on the left hand side in the Tool Shelf, you should find a smooth button. That should fix that problem.






