Show in Contents
Add to Favorites
Home: Autodesk Maya Online Help
nCloth Zipper
nCloth Examples
nCloth Bag of Marbles
nCloth Confetti
This example will show you how to create realistic
looking nCloth confetti that collides with objects and forces in
its scene as well as itself.
Create Confetti
To
create the confetti
- Select
Create > Polygon Primitives > Plane > .
The Polygon Plane Options window
opens.
- Select Edit
> Reset Settings.
- Set
the plane options as follows:
- Width:
10
- Height:
10
- Width
divisions: 30
- Height
divisions: 30
- Click Create.
Maya creates a plane centered at the origin.
- In
the Polygons menu set, select
Edit Mesh > Detach Component.
The plane will become separated such that each
face becomes a new plane.
- Select
all the planes.
- In
the nDynamics menu set, select
nMesh > Create nCloth.
- In
the Attribute Editor, change the
name of the nCloth to “Confetti.”
- In
the Collisions section, turn Self
Collide off.
- In
the Dynamic Properties section,
adjust the settings as follows:
- Stretch
Resistance: 2
- Compression
Resistance: 2
- Bend
Resistance: 0
- Mass:
0.2
- Tangential
Drag: 0.5
- Playback
the nCloth simulation.
The cloth falls uniformly. To change this, you
need to add turbulence.
Enhance the way the confetti falls
To
add turbulence to the nCloth
- Go
to the beginning of the playback range.
- Select
the Confetti plane.
- In
the Dynamics menu set select
Fields > Turbulence > .
The Turbulence Options window
appears.
- Set
the Turbulence options as follows:
- Magnitude:
1
- Attenuation:
0
- Frequency:
8
- Click Create.
- Set
the End Time of the playback range to 100.
- Playback
the simulation.
The simulation plays back more realistically,
but also very slowly.
To
improve the speed of the simulation
- Select
the Confetti nCloth and open the Attribute Editor.
- In
the nucleus1 tab set the Space Scale attribute
to 0.1.
Maya has been treating the nCloth as a 10x10
meters object according the default dynamics settings. By setting
the space scale to 0.1 the plane is now 1 meter square in terms
of dynamics. This makes it simulate much faster.
You should now add the ground plane and some
color.
To
add a ground plane to the simulation
- Select
the Confetti nCloth.
- In
the Channel Box, set TranslateY to
30.
- In
the Attribute Editor, select the
nucleus1 tab.
- In
the section Ground Plane, activate Use
Plane.
Color the confetti
To
add color to the confetti
- -click
the nCloth and select Assign New Material
> Ramp Shader from the context sensitive menu that
appears.
- In
the Attribute Editor, select the
rampShader1 tab.
- In
the Color section, select the checkered
box next to Selected Color.
The Create Render Node window
appears.
- Select Ramp.
- Change
to Shaded and Textured mode (hotkey: 6).
- Playback
the simulation.
The confetti now glitters and falls as real
confetti would. Now that you have a base simulation for your effect,
you can perform a number of optional steps to enhance the simulation.
Customize the shape of confetti (optional)
You can create circular confetti using a very
similar procedure.
To
create circular confetti
- -click
the Confetti nCloth and select Material
Attributes...
The Attribute Editor opens
with the rampShader1 tab selected.
- In
the Transparency section, select
the checkered box next to Selected Color.
The Create Render Node window
appears.
- Select Ramp.
- In
the Attribute Editor, under Ramp
Attributes set Type to Circular
Ramp.
- In
the Ramp Attributes editor, click
the box with an x at the center of the color ramp to eliminate the
green marker.
- Select
the small red circle at the bottom left of the color ramp. The colored box
next to Selected Color should change.
- Click
the colored box next to Selected Color.
The Color Chooser that
appears.
- Select
the color black and click Accept.
- Under Ramp
Attributes, set Selected Position to
0.45.
- Select
the small blue circle at the top left of the color ramp.
The colored box next to Selected
Color should change.
- Click
the colored box next to Selected Color
The Color Chooser appears.
- Select
the color white and click Accept.
- Under Ramp
Attributes, set Selected Position to
0.5.
- In
the place2dTexture1 tab, under 2d Texture Placement
Attributes set Repeat UV to
30, 30.
Now when you render the simulation the confetti
appears as circles instead of squares.
NoteThe confetti appears as circles only when
rendered. The confetti appears as squares in the scene view. You
may need to change to Wireframe mode (hotkey: 4) to see the confetti.
nCloth Streamers
You can use this procedure to generate streamers
as well.
To
create streamers
- Select
File > New Scene.
- Select
Create > Polygon Primitives > Plane > .
The Polygon Plane Options window
appears.
- Select Edit
> Reset Settings.
- Set
the plane options as follows:
- Width:
10
- Height:
10
- Width
divisions: 30
- Height
divisions: 3
- Click Create.
Maya creates a plane centered at the origin.
- In
the Polygons menu set, select
Edit Mesh > Detach Component.
The plane separates such that each face becomes
a piece of confetti.
- Select
the plane and select
Edit Mesh > Add Divisions.
Maya adds a number of divisions to the plane.
These are used to allow the streamers to swirl and bend.
- In
the Attribute Editor, select the
polySubdFace1 tab.
- Set
the following attributes:
- Subdivision
Method: Linear
- Divisions
UV: 1, 8
- In
the nDynamics menu set select
nMesh > Create nCloth.
- In
the Attribute Editor, change the
nCloths’s name to “Streamers” and adjust the nCloth’s attribute
values as follows:
- Self
Collide: Off
- Mass:
0.2
- Tangential
Drag: 0.5
- Stretch
Resistance: 2
- Compression
Resistance: 2
- Bend
Resistance: 0
At this point you can add turbulence, color,
and a ground plane exactly as you did for the confetti.