Tutorial 1 "Making a Flag Flap"

Click here for the sample file.


1. Let's create a flag. In order to accurately simulate the flapping of the cloth part of the flag, the flag object needs to have a sufficient number of polygons. Triangular polygons can reproduce the natural motion of the cloth better than square (quad) polygons since quad polys have a tendency to collapse as they change shape.

A pole must also be created. The pole can be of any structure. However, since the pole must share points with the cloth section of the flag, merge the pole and the cloth. Also, the pole and the flag must be composed of different surfaces. Flag.lwo is the sample.

2. Open Layout and load the created object. Then open Motion Designer (Plug-in Options>Generics>LW_MotionDesigner).

Once MD is open, select the flag object flag.lwo from Object panel, and switch the Target setting to ON by clicking on it. The flag object is loaded to MD.

3. Set the parameters required for each surface in the Surface panel. Set Fixed to ON so the pole cannot be moved. Set the Spring (coefficient) of flag0 (the cloth section) to 1000 (which means the cloth is hard to stretch).

4. Set the wind and the gravity vectors on the Env panel. Make sure the settings are as follows: Gravity Y=1, Wind 1=1,0,-1 and Wind 2=1,0,1. Set the repetition cycle to 2 seconds.
The wind and the gravity make the flag flap. The sample scene that contains all of these settings is mdc01.lws.
The setting information of MotionDesigner is saved to the scene file as Tag information, so all you have to do to save the settings is return to Layout and save the scene.

5. Begin MD's calculation by clicking on the START button at the bottom of the display. The parameters of the calculation need to be set. You need to set the total time of calculation by setting the time directly and then deciding on either the number of frames, or by the number of frames per second(frame/s). 20 frames for two seconds(one every 0.1 second) should be adequate to begin with. For a more complex motion, you will want to set a higher number of frames per second.

6. If all the settings are correct, the flag should start flapping gradually. The flag will stop flapping as the specified calculation time expires. Play back the motion by manipulating the slider. If you are not satisfied with the result, modify the parameters and recalculate.

7. Save the calculated result in a file. Specify the filename by thebutton. Flag.mdd corresponds to the settings given here.

8. Go back to Layout and open the Object properties panel of the Flag. Then select MD_Plug as the displacement plug-in and load the recently saved .mdd file.

9. Manipulating the time slider should allow the flag to flap. Now add textures and other details to complete the job.


Back