Ncloth tutorial – how to make a flower lose its petals.

Download the Maya scene file HERE

This tutorial will teach you how to make a Polygon object into an nCloth object.
With the Flower.mb file open, go to the nCloth menu. Don’t forget to create a new project folder and set your scene. (Remember to always create a new project folder and not to use the default Maya project file.)

Open up the outliner and select the FlowerPetals group, expand the group and shift select polySurface1 through 6.
image1

With the polySurfaces1 to 6 (petals) selected go to nCloth >; Create nCloth
Photobucket
The assigned texture on the objects might lose connection after turning it to nCloth so just remember to reassign the texture before you render.
This will create a separate nClothShape node for every piece of geometry you selected and assign a nucleus solver to all the nCloth objects. Select the newly created nCloth in the outliner and group them to the FlowerPetals group.

Select one of the newly created nClothShapes and open up the Attribute Editor. Select the nucleus1 tab > Ground Plane section > check Use Plane
This will make a fake ground plane where the grid is located.
Photobucket
To make the flower petals collide with the pot we need to make it a passive object.
Select the FlowerPot object and go to > nCloth > Create Passive. Group nRigid1 that was just created to the FlowerPot object.
Photobucket
Do the same and make the FlowerStem passive as well. Don’t forget to group the new nRigid 2 to the FlowerStem.

Test the simulation, make sure to increase the timeline to something like 200 frames and play back the simulation.
Photobucket

Now in order to attach the newly created nCloth to the flower stem we have to create a constraint.
Why are we creating a constraint? We don’t want the petals to fall off right away. We want them to move with the flower and then get blown away.

First select the polySurfcace7 to 11(the other Flower petals, which are located in FlowerStemCntrls > Flowerjoint1 > Flowerjoint 6). Then Ctrl select each polySurface in order from 1 to 6 and go to nConstraint > Component to Component
Photobucket
(minimize FlowerStemCntrls, you won’t be needing it for a while)

Select dynamicConstraint1 object and open up its attributes under dynamicConstraintShape1 tab > locate the Dynamic Constraint Attributes section uncheck the Display Connections, this will turn the constraint springs wire display off so you can see the animation better. If you need to see what the constraint springs are doing you can always go back and check them back on. Place the newly created constraint in with the FlowerPetals group.
Photobucket
Photobucket

To help speed up the playback select nCloth1 through nCloth6 individually, open their attributes > Surface Properties section> uncheck self-Collide for all the nCloth objects. This will make the petals not calculate collisions between themselves. This helps speed up playback, but can cause the nCloth to not calculate correctly.
Photobucket

Save your scene and do a test playback to make sure that the constraints are working.

Now that we have the nCloth leaves attached and following the stem, we’re going to make them blow off in the wind. Select the dynamicConstraint1 in the outliner and open up the attributes. (Make sure you’re in the dynamicConstraintShape1 in the Attribute Editor)
Under the Connection Density Range section > locate the Glue Strength slider > go to frame 40 and set a key with a value set to 1.000. Move forward to frame 60 and set the Glue strength slider to 0.00 and set another key.
Photobucket

Test play the simulation

The flower petals fall but still act and behave like cloth – to fix this your going to increase their Rigidity.

Select nCloth1 in the outliner and open up the attribute window. Scroll down and find the Dynamic Properties section> locate the Rigidity slider> and increase the value to 1.000
Photobucket

Do the same for the remaining nCloths 2 through 6. Now when the flower petals fall they keep their shape as they hit the pot. All that’s left is to add some wind to the petals so that it matches the wind that is moving the flower.

To do this select one of the nCloth objects and in the attribute window locate the nucleus1 tab> find the Gravity and Wind section> and increase the Wind Speed slider to .0100. Also change the direction of the wind using the Wind Direction by adding a value of 1.000 in both the X and Z.
Photobucket

The last step is to tweak some of the nCloth properties, play around with the Friction of each nCloth object and any nRigid passive object that the nCloth may come in contact with. (Keep the friction value between 0.000 and 1.000). In each nRigid object you’ll find thickness controls in the nRigidShape tab> Properties section> which can be used to increase the collision area of the passive or active nCloth object. To see how thick the nRigid shape is use the Solver Display > and change it from off to Collision Thickness.
Photobucket
Photobucket

Play with the Lift and Drag of each nCloth (within the nClothshape tab) so you get a more random look to the flower petals. (Keep the lift under .500 or your nCloth object will blow away and not match the wind). You may also want to set keys for the windspeed from .010 to 0.00 after the petals fall so they stop moving when they hit the ground plane and the flowerpot.

Also you may want to select the nCloths that are colliding together and turn self collide back on so that they don’t intersect each other. Just be aware that your play back speed will slow down considerably. But it will calculate collision correctly and may fix some issues you are having with the nCloth colliding with a passive object.

Last create a polygon plane and place it under the flowerpot. Make it an nCloth passive object as well. Then go into the Nucleus tab and turn of use ground plane, because we want to use the newly created polygon plane as the ground.

Save your scene.

For this tutorial, we left all of our nCloth, nRigid, and dynamicConstraints names set to default, but you should always rename your objects accordingly.