In this tutorial you will learn to create a flag using soft bodies.
STEP 1:
First thing we are going to create is flagpole using cylinder and sphere. Then you create a NURBS plane and set it’s scale to x = 17 and y = 10, also set the UV patches to 17 and 10, because we are trying to make our spans on the flag as much square is possible. You will get something like the below picture.
step 2:
Now select the flag object with holding the right mouse button and select Control Vertex, also go to the top view. Now drag select (holding shift key) every other control vertex and move them slightly up. Then select remaining control vertices and move them slightly down. You should get the following result (below picture).
STEP 3:
Next thing is to convert your NURBS plane to soft body, you do this by selecting the Dynamics menu from the pool down menu in the upper right corner of screen, when you have done this select the NURBS plane and go to menu Soft/Rigid bodies and choose Create Soft Bodie Options. On the options screen set the following :
Creation options set to Duplicate, make copy
Check hide the non-soft object checkbox to on
Check the make non-soft goal checkbox to on and
Set the Weight to 1
You should get following result (picture below)

STEP 4:
Now we are going to add the fields (forces) that will be affecting the flag. With the flag selected click on the Dynamics -> Fields and then click to Air (this adds the air field). So do this procedure for Turbulence field and gravity field. Now select and move the Air Field to area behind the flag, then select the Turbulence Field and move it to the middle of the flag. Now select the copyOfnurbsPlaneShape1 (the flag object) and go to Dynamics (if not already selected from the drop-down menu) then Soft/Rigid bodies -> Create Springs Options and set the following:
Max Distance to 1 and
Wire Walk to 3
then click on Create button.
Now we are going to paint the weight of particles that we previously set to 1. With the mouse over the flag click and hold the right mouse button and from the menu choose Paint -> Particle -> copyOfnurbsPlaneParticleShape – goalPP.
You should get the following result (picture below).
STEP 5:
You see that the flag is white, that means that the forces will not affect particles of the flag because we are using spring. Now set the Value to 0.6 and paint the rest of the flag that will actually be much more affected by the wind, leaving the part of the flag that is close to the flagpole white.
You should get the following result.
STEP 6:
Now we are going to setup the Fields we previously added to scene.
Select the AirField and then press T, now adjust the Magnitude (by sliding the blue dot named Magnitude
). Now select the blue circle and adjust the direction of the airflow towards the flag , adjust the MaxDistance to OFF and Attenuation to 0. Now select the turbulence field and set Magnitude to around 90 and Attenuation to 0. If you play back the animation now you will se that the flag turbulence is not random and we want it to be random so we will tweak thing a little bit more to achieve this. Select the turbulence field and go to Turbulence Field Attributes click and hold right mouse button on the PhaseX and choose Create New Expression, window will open and in the Expression section type turbulenceField1.phaseX = frame * 10; and then click Create button, do this procedure for the remaining phaseY and phaseZ.
When you choose Create New Expression you will get the following picture, actually you will be in Expression Editor.
STEP 7:
Now go to any frame of animation (it’s important that it’s not the first or couple of first frame so for example go to middle of animation) and then select Solvers -> Initial State and click on Set for all dynamics. With this last tweak you will be avoiding the time Fields need to begin to influence the flag.
This is a simple example of “how to” , with precise tweaking of weights and fields you will be able to make more realistic flag behavior.
This is final result of dynamic flag with soft-body and springs





