This example will show you how to use nCloth to simulate a buttoned shirt.
Buttoning the shirt together
The goal of this example is to button the two flaps of the shirt together rather than let them hang loose.
To template the buttons
- Select Window > Outliner.
Maya displays the .
- In the window select hairSystem1Follicles.
- In the main menu select Display > Object Display > .
The buttons change to a wireframe display. If you click on them you will be unable to select them. This will be helpful when
you need to select specific vertices when buttoning the shirt together.
To button the two sides of the shirt together
- Go to the beginning of the playback range.
- -click the shirt and select from the marking menu that appears.
Maya displays the vertices of the nCloth.
- Select the vertex directly underneath one of the buttons on the shirt and -click the nearest vertex on the flap underneath to include it in the selection.
Note
If you have trouble selecting the two vertices as described, you can change the display mode to (hotkey: 4) to make the selection process easier.
- Select nConstraint > Component to Component.
- In the , select the DynamicConstraint1 tab.
- In the section set to .
- Select nCache > Create New Cache.
Maya automatically plays back the nCloth simulation and saves it to disk as a cache.
- Playback the simulation.
The shirt now falls loosely over the body, but the two flaps remain fastened to one another at the button which you constrained.
- Go to the beginning of the playback range.
- Select Window > Outliner.
Maya displays the window.
- In the window, select DynamicConstraint1.
- Press to delete the constraint.
- -click the shirt and select from the marking menu that appears.
- -click each vertex underneath each button as well as each respective closest vertex on the flap underneath just as you did
for the third button in steps 3 and 4.
- Select nConstraint > Component to Component.
- In the section, set to .
- In the Outliner window, select hairSystem1Follicles and then select Display > Object Display > .
The buttons will become visible again in the scene view.
- Select nCache > Create New Cache.
Maya automatically plays back the nCloth simulation and saves it to disk as a cache.
- Playback the simulation.
The two shirt flaps remain together at each button.
Improve the shirt's behavior
While the shirt is now buttoned together, you will notice that the overall look of the cloth is still not correct. The cloth
appears to stretch too much and at some points and the two flaps pass through one another. You now need to make some adjustments
to fix this.
To enhance the appearance of the nCloth shirt
- Go to the beginning of the playback range.
- Select the shirt.
- In the , select nClothShape1.
- In the section, set the attributes as follows:
- In the section, set the attributes as follows:
- Select nCache > Create New Cache.
Maya automatically plays back the nCloth simulation and saves it to disk as a cache.
- Playback the simulation.
The two flaps of the shirt now collide with one another correctly without passing through each other.
Painting the shirt's properties
You may notice that although the collisions are now correct, some parts of the shirt still do not react like real cloth would.
Most notably, the collar and cuffs appear too loose, where on a real shirt they would be stiff. You can fix this by painting
vertex properties.
To stiffen the collar and front flap
- Go to the beginning of the playback range.
- Select the shirt and then select nMesh > Paint Vertex Properties > .
The cursor changes to an artisan brush.
- Open the .
- Adjust the tool settings as follows:
- Click .
The entire shirt is flooded black indicating no attraction to the input mesh.
- Set to 1.
- Using the artisan brush, paint the collar of the shirt.
- Set to 0.2.
- Using the artisan brush, paint the cuffs of the shirt.
- Select nCache > Create New Cache.
Maya automatically plays back the nCloth simulation and saves it to disk as a cache.
- Playback the simulation.
The collar now remains completely stiff, and the cuffs hang slightly, yet maintain their shape.
Improve the appearance of the shirt
To smooth the look of the shirt
- Go to the beginning of the playback range.
- Select the shirt.
- In the menu set select Mesh > Smooth.
- In the menu set select nCache > Create New Cache.
Maya automatically plays back the nCloth simulation and saves it to disk as a cache.
- Playback the simulation.
The shirt is more malleable and flows like real cloth.
Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License