CAP 203 - Computer Animation III

Flag Tutorial

Objectives:

This lesson provides some techniques from Henry Mbata, who has provided a video and project files. Objectives important to this lesson:

  1. Creating a flag with realistic motion
  2. Adding a texture to the flag
Concepts:

Henry Mbata, called Henry the Jedi, has provided a video of his process for creating a realistic flag. He has also provided the project files for download on his website, henrythejedi.com.

Assignment #17: Henry's Flag

  1. Open 3DS Max. If it is already running, reset the scene.
  2. Open the Create menu, and choose Shapes, Line.
  3. In the the Create panel, turn on Autogrid, and set Initial Type and Drag Type to Corner.
  4. Draw four lines, which will be the sides of a flag. Connect the end point of the last line to the start point of the first line. When 3DS Max asks if you want to close the spline, select Yes. The flag is a single line at this point, probably called Line01. Rename it, calling it Flag.
  5. Open the Modify panel and select Vertices. Click the Move button, then select the corners of the flag as needed, to move them so the lines are all straight.
  6. Switch to the Perspective viewport, and open the Create panel.
  7. Create a cylinder that will be used as a flagpole next to the flag.
  8. Right-click the Perspective viewport's name, and select Edged Faces. This will show you the sections of the cylinder.
  9. Open the Modify panel, and name the cylinder Pole.
  10. Set the Pole's sides to 12, radius to about 12, and the height to about 1250.
  11. With the pole still selected, right-click the select and move button. On the Move Transform dialog box that appears, set all x, y and z values to 0.
  12. Switch to the Front viewport. Select the flag object and move it so the top of the flag is just a bit below the top of the flagpole, and the edge of the flag next to the pole is just touching the pole at a tangent.
  13. Make sure the flag is selected. Open the Modify panel, if it is not open, and click the vertices button. Press ctrl-A to select all vertices of the flag.
  14. Find the Geometry rollout on the Modify panel, and click the Break button.
  15. Open the Modifier list, and add the Garment Maker modifier to the flag. (This was not covered in our texts.) You will see a pattern of triangles applied to the flag surface.
  16. Add the Cloth modifier to the flag. Select the Cloth modifier.
  17. On the Object rollout of the Modify panel, select Object Properties.
  18. In the Object Properties panel, click the Add Objects button. Add the pole to the Objects in Simulation list. (The flag is already in this list, since the cloth modifier is attached to the flag.) Note that both objects are tagged as Inactive at first.
  19. Select the flag object in the list, and click the Cloth radio button to the right of the list.
  20. Select the pole object in the list, and click the Collision Object radio button, near the bottom of the Object Properties panel. Click OK to save the property settings.
  21. Select the flag, and click the panel button that says Simulate. You should see the flag fall down. Click Erase Simulation.
  22. Click the Time Configuration button. In the Time Configuration panel, set End Time and Length to 500 frames. Click Rescale Time, OK, and OK.
  23. Click the plus sign for the Cloth modifier, the select Group from the four options that appear.
  24. Change to the Front viewport, and select all the vertices of the flag that touch the flagpole. (This should be one vertical line of vertices.) Click the Make Group button (on the Modify panel, in the Group rollout), name the group, and click OK.
  25. Click the Sim Node button in the Group rollout. Click the Select by Name button (or press H). Select the pole object, and click the Pick button.
  26. Select the Cloth modifier, and click the Simulate button again. This time the flag stays attached to the pole, but it still falls down where it is not attached. (There is no wind yet.)
  27. Open the Create menu, and choose Space Warps, Forces, Wind. Drag in the Front viewport, to the left of the flag and a bit below its midpoint, to create a Wind space warp.
  28. Click the Rotate button, then click the Angle Snap Toggle button. Rotate the wind gizmo so the wind arrow points parallel to the long axis of the flag, and a little toward the top of the flag.
  29. Apply the wind to the flag: Select the flag object. Click the Cloth Forces button in the Object rollout. Choose the wind object from the Forces in the Scene list, and click the button with the greater-than symbol on it to move the wind object to the Forces in the Simulation list. Click OK.
  30. Select the wind object and set its Strength to 14.
  31. Click the Erase Simulation and Simulate buttons again.

The lesson continues to apply a material and a bump map to the flag. The steps above are sufficient to make the flag wave. The next steps make it look like the flag our guide wants.

  1. Select the flag object, then press M to open the Materials Editor.
  2. Unlike our texts, Mr. Mbata first assigns a material to the flag by dragging the first sample and dropping it on the flag.
  3. He does not mention it, but he clicks the Show Material in Scene button.
  4. He then clicks the gray button next to the Diffuse material swatch for this sample.
  5. Select bitmap in the panel that appears, and browse for the www-HenryTheJedi-com logo file. Select it and click Open.
  6. Click the Assign to Object button. Simulate if you like.