Understanding Particles and Dynamics in Maya—Part 5

In the next part of the tutorial, I’ll show how to create a character’s cloth using nCloth.

Understanding Particles and Dynamics in Maya—Part 5

Preview

1. Cloth Tearing Simulation

Step 1

Open Maya.
Understanding Particles and Dynamics in Maya—Part 5

Step 2

Go to Create > Polygon Primitives > Plane and click on its option box.

Understanding Particles and Dynamics in Maya—Part 5

Step 3

In the Tool Settings box, set the Width and Height Divisions to 25.

Understanding Particles and Dynamics in Maya—Part 5

Step 4

Draw the plane in the front view. You need to change it into cloth using nCloth.

Understanding Particles and Dynamics in Maya—Part 5

Step 5

With the plane selected, jump in the nDynamics mode and go to nMesh > Create nCloth to convert the plane into cloth.

Understanding Particles and Dynamics in Maya—Part 5

Step 6

With the plane selected, do a right click with the mouse and select the Vertex mode. In the vertex mode, select the vertical vertices of the extreme left side.

Understanding Particles and Dynamics in Maya—Part 5

Step 7

With the vertices selected, go to nConstraint > Transform.

Understanding Particles and Dynamics in Maya—Part 5

Step 8

Repeat the process and this time select the vertical vertices of the extreme right side.

Understanding Particles and Dynamics in Maya—Part 5

Step 9

With the vertices selected, go to nConstraint > Transform.

Understanding Particles and Dynamics in Maya—Part 5

Step 10

Go to Window > Outliner to open the outliner window. Here you can see two dynamic constraints applied for each side.

Understanding Particles and Dynamics in Maya—Part 5

Step 11

In the outliner window, select dynamicConstraint1 to open its attribute editor. Make a right click on the Translate attribute and click on Set Key to set a key frame at the first frame on the timeline.

Understanding Particles and Dynamics in Maya—Part 5

Step 12

Move 20 frames ahead on the timeline, and drag the selected vertices to the left a bit. It makes another key frame at the 20th frame on the timeline.

Understanding Particles and Dynamics in Maya—Part 5

Step 13

Repeat the process with the right side’s vertices also. In the Outliner window, select dynamicConstraint2 to open its attribute editor. Secondary-click on the Translate attribute and click on Set Key to set a key frame at the first frame on the timeline. Move 20 frames ahead on the timeline, and drag the selected vertices to the right a bit. It makes another key frame at the 20th frame on the timeline.

Understanding Particles and Dynamics in Maya—Part 5

Step 14

Hit the play button to see the simulation. You will see that both sides of the cloth are getting pulled out and stretched. You need to define the part where you want the cloth to be torn apart.

Understanding Particles and Dynamics in Maya—Part 5

Step 15

With the cloth selected, press F9 to jump in the vertex selection mode. Click on the Paint Selection Tool and select some vertices of the cloth randomly as shown in the following image.

Understanding Particles and Dynamics in Maya—Part 5

Step 16

With the random vertices selected, go to nConstraint > Tearable Surface.

Understanding Particles and Dynamics in Maya—Part 5

Step 17

Hit the play button and you will see the cloth is getting torn apart from the middle according to the defined tearable zone.

Understanding Particles and Dynamics in Maya—Part 5

2. Cloth Tearing by An Object

Step 1

The cloth can be torn apart by an object also. Following the previous steps, make a plane with 50 subdivisions and create two cylinders at both sides of the plane.

With the plane selected, go to nMesh > Create nCloth to convert the plane into cloth.

Understanding Particles and Dynamics in Maya—Part 5

Step 2

With the poles selected, go to nMesh > Create Passive Collider to convert the poles into collider objects.

Understanding Particles and Dynamics in Maya—Part 5

Step 3

With the plane selected, do a right click with the mouse and select the Vertex mode. In the vertex mode, select the vertical vertices of the extreme left side and then select the left pole.

With the pole and vertices selected, go to nConstraint > Point to Surface. This constraint allows the vertices of the plane to stick with the pole.

Understanding Particles and Dynamics in Maya—Part 5

Step 4

Follow the same process with the right side vertices and the pole also.

Understanding Particles and Dynamics in Maya—Part 5

Step 5

With the middle vertices of the cloth selected, go to nConstraint > Tearable Surface.

Understanding Particles and Dynamics in Maya—Part 5

Step 6

I’ve created a small box. I have animated it from up to down and through the cloth. This will act a sword which is cutting the cloth apart.

Understanding Particles and Dynamics in Maya—Part 5

Step 7

With the box selected, go to nMesh > Create Passive Collider.

Understanding Particles and Dynamics in Maya—Part 5

Step 8

Hit the play button to start the simulation and you will see the box is tearing the cloth apart.

Understanding Particles and Dynamics in Maya—Part 5

3. nCloth Reaction with Rigid Body

Step 1

I have made a small scene to show you the example of nCloth reaction with rigid body. I have created a cloth and constrained the transform of both sides.

Understanding Particles and Dynamics in Maya—Part 5

Step 2

I have created a ball over the cloth and turned it into nCloth too.

Understanding Particles and Dynamics in Maya—Part 5

Step 3

I have also defined the middle vertices of the cloth as Tearable Surface.

Understanding Particles and Dynamics in Maya—Part 5

Step 4

Hit the play button to start the simulation. You will notice the ball acts like a soft body when strikes to the surface of the cloth.

Understanding Particles and Dynamics in Maya—Part 5

Step 5

To make the ball as a rigid body, go to nClothShape2 and change the preset of the cloth to Concrete.

Understanding Particles and Dynamics in Maya—Part 5

Step 6

Press the play button now and you will see the ball is tearing the cloth where it strikes.

Understanding Particles and Dynamics in Maya—Part 5

Conclusion

In the next part of the tutorial, I’ll show how to create a character’s cloth using nCloth.