Advertisement
  1. 3D & Motion Graphics
  2. Maya
Cgi

Understanding Particles and Dynamics in Maya—Part 5

by
Difficulty:IntermediateLength:ShortLanguages:

Preview

1. Cloth Tearing Simulation

Step 1

Open Maya.

Open Maya
Open Maya

Step 2

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

Create  Polygon Primitives  Plane
Create > Polygon Primitives > Plane

Step 3

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

Tool Settings
Tool Settings

Step 4

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

Draw the plane
Draw the plane

Step 5

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

nMesh  Create nCloth
nMesh > Create nCloth

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.

Vertex mode
Vertex mode

Step 7

With the vertices selected, go to nConstraint > Transform.

nConstraint  Transform
nConstraint > Transform

Step 8

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

Repeat the process
Repeat the process

Step 9

With the vertices selected, go to nConstraint > Transform.

nConstraint  Transform
nConstraint > Transform

Step 10

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

Window  Outliner
Window > Outliner

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.

dynamicConstraint1
dynamicConstraint1

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.

Move 20 frames ahead on the timeline
Move 20 frames ahead on the timeline

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.

Outliner window
Outliner window

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.

Hit the play button
Hit the play button

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.

Paint Selection Tool
Paint Selection Tool

Step 16

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

nConstraint  Tearable Surface
nConstraint > Tearable Surface

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.

Hit the play button
Hit the play button

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.

Hit the play button
Hit the play button

Step 2

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

nMesh  Create Passive Collider
nMesh > Create Passive Collider

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.

nConstraint  Point to Surface
nConstraint > Point to Surface

Step 4

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

Follow the same process
Follow the same process

Step 5

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

 nConstraint  Tearable Surface
nConstraint > Tearable Surface

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.

Create a collider object
Create a collider object

Step 7

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

nMesh  Create Passive Collider
nMesh > Create Passive Collider

Step 8

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

Hit the play button
Hit the play button

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.

nCloth reaction with rigid body
nCloth reaction with rigid body

Step 2

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

Create a ball
Create a ball

Step 3

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

Tearable Surface
Tearable Surface

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.

Ball looks like a soft body
Ball looks like a soft body

Step 5

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

Concrete
Concrete

Step 6

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

Final simulation
Final simulation

Conclusion

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



































Advertisement
Advertisement
Looking for something to help kick start your next project?
Envato Market has a range of items for sale to help get you started.