STEP 1: Set the scene
Let’s start out with a scene of a quaint country gas station and flag pole out front. We’ll use a 30 x 25 polygon plane as our flag. Begin by lining up the polygonal plane ("the flag") with the hangers on the flag pole. A quick way to do this is to grab the flag and snap it to the bottom points of the hangers on the flag pole with Snapping. (Tip: Hold down Shift+V for point snap.)
STEP 2: Create an nCloth object
Next, select the flag and go to nCloth>Create nCloth menu. If you press play, you’ll see the flag fall through the air towards the earth. This is because the flag isn’t attached to the flag pole- a result of the default gravity settings in Maya nCloth. Your next step is to attach the flag to the flag pole.
STEP 3: Constrain the flag to the pole
After you select the vertices on the top corners of the flag, select the flag pole or portion of the flag pole to which we want to constrain the flag. In this example, we’re selecting the hangers on the flag pole. There are several types of constraints available in Maya nCloth. For this example, use the Transform Constraint, which will effectively constrain and parent the vertices to the pole. Select nConstraints>Transform and play back the simulation. You now have a sign-like flag attached to the pole.
STEP 4: Work interactively with nCloth
By using Dynamics>Solvers>Interactive Playback, we’ll be able to interactively adjust our simulation settings and tweak the look and feel of the flag. Under the nClothShape tab in the flag’s attributes, you’ll find the parameters for Collision Thickness and Self Collision to adjust to our liking. To review your settings on the fly without the need to render, you can select the flag pole and move it around to see the results of the constrained flag. Take note of the nice self-collisions of the cloth as you7 move it about. This is where you get into the beauty of the Maya Nucleus unified simulation framework- you’re interacting with your flag to modify it within the Maya nCloth module, but still have full creative control over the simulation.
STEP 5: Adjust Maya nCloth attributes
Now you need to rewind your play bar to zero to reset the flag. Once your have a functional flag, you can add some wind. Do this by adding Air Density and Wind Speed– these values are under the Nucleus tab in the flag’s attribute window under the sub-heading Gravity and Wind. Play back the scene interactively and adjust the Air Density and Wind Speed to get the effect you’re looking for. For our example, use an Air Density value of 2.0 and set the Wind Speed value to 0.5.
STEP 6: Define the tears
After you reset the playbar to zero, you’ll create a tear in your cloth that results from high wind or contact with other objects. Paint Select some points to define where we want your flag to tear and then add nConstraint>Tearable Surface. This move splits the polygons along your selection, and then joins them back together by constraining the vertices.
STEP 7: Ways to resist tearing
As you play the scene back, you can see the flag tear from the strength of the wind. Pieces fall off and float away. Interactively adjusting the Glue Strength and Wind Speed will produce different tearing thresholds. Most times, however, you won’t want your flag to tear. To create one that resists tearing, select one of the tear-constrained vertices and, in the nCloth Attributes menu, click the dynamicConstraintShape2 tab and adjust Glue Strength to .25 (found under the Connection Density Range subheading). Play back the scene and the flag stays together as one piece.
STEP 8: Let’Er rip
But if your cloth can handle a little wear and tear, here’s where you can have some real fun. Select or create an object and define it as a passive object through nCloth>Create Passive. This defines your prop as a collision object and it will interact with the Maya nCloth flag. We can enjoy toying with the laws of physics- as long as the object is defined as a passive object. The only limitation on what you can use for the collision is your imagination. Now, push the object through the flag. Light nudges will push and poke the flag, while more forceful jabs will tear the flag into pieces based on how you’ve defined our tears.
Your Guides
Daryl Obert & Craig Barr
Applications Engineers
Autodesk
Montreal, Canada
Daryl Obert was a senior application engineer at Alias for more than a decade, and is presently a technical marketing specialist at Autodesk. He designs animations for Autodesk events, including SIGGRAPH, MacWorld, and NAB. Daryl co-founded DotsPerMinute, an award-winning graphic design/animation firm whose clients include Sony, Atlantic Records, Warner/Elektra/Atlantic Corporation and FreeBase Society.
Craig Barr has been working in 3D animation and effects for film, commercials and games at various shops for nine years. He joined Alias in the summer of 2005, after working on Disney’s The Wild, and has been with Autodesk building demo content for Maya since Autodesk’s acquisition of Alias in January 2006.
Daryl and Craig say keep in mind…
Maya Nucleus is a new unified simulation framework found in Maya 8.5. The framework is based on a concept of linked particles and was developed by a team led by Jos Stam, Autodesk’s principal research scientist. As the first module within Maya Nucleus, Maya nCloth is a powerful cloth simulator that’s incredibly responsive and easy to use. In this tutorial, we examine a quick and easy approach to creating a flag in Maya nCloth that not only interacts with other objects, but tears as well.
Autodesk Media and Entertainment
www.autodesk.com
10 Rue Duke
Montreal, QC H3C 2L7 Canada
ph. 514.393.0110
med_ent@autodesk.com