This example will show
you how to create a bag of marbles out of a single nCloth bag and
a number of particles.
Create the marbles
You will begin by creating
a number of nCloth marbles.
To generate a mesh for your marbles
- In the Polygons menu
set, select
Create > Polygon Primitives > Plane > .
The Polygon
Plane Options window appears.
- Select Edit > Reset Settings.
- Set the plane options as follows:
- Width divisions:
2
- Height divisions:
2
- Click Create.
Maya creates a plane
centered at the origin.
- Select
Edit Mesh > Extrude.
- In the Attribute Editor,
select the polyExtrudeFace1 tab and enter the following:
- Divisions:
2
- Local Translate:
0, 0, 1
Maya generates a cube
based on your original plane.
- Select
Edit Mesh > Merge.
- -click
the cube and select Object Mode.
- Select the cube.
- In the nDynamics menu
set select
nMesh > Create nCloth.
- Open the Attribute Editor.
- In the Collisions section,
adjust the following attributes:
- Thickness:
0.25
- Solver Display: Collision
Thickness
- Collision Flag: Vertex
- Self Collision Flag: Vertex
The nCloth now appears
as a number of colliding particles.
- In the Dynamic Properties section,
adjust the following attributes:
- Stretch Resistance:
0
- Compression Resistance:
0
- Bend Resistance:
0
- Lift: 0.0
- Tangential Drag:
1.0
- Select the nucleus1 tab and turn on Use
Plane.
- In the scene view, select the nCloth
and translate it above the ground plane. You may also rotate it
if you desire.
- Playback the simulation.
The cloth falls like
a pile of marbles.
Creating the bag
To complete the simulation
you need to hide the nCloth marbles and create a bag.
To hide the cloth mesh
- In the Attribute Editor,
select the outputCloth1 tab.
- In the Render Stats section,
adjust the attributes as follows:
- Cast Shadows: off
- Motion Blur: off
- Primary Visibility: off
- Visible in Reflections: off
- Visible in Refractions: off
- In the Attribute Editor,
select Object Display.
- In the Drawing Overrides section
adjust the attributes as follows:
- ObjectDisplay: Drawing
Overrides
- Enable Overrides: on
- Level Of Detail: Bounding
Box
The nCloth marbles no
longer appear in the scene view or render view.
To model the marble bag
- In the Polygons menu
set select
Create > Polygon Primitives > Platonic Solids > .
The Polygon
Platonic Solid Options window appears.
- Set the platonic type to Icosahedron and
click Create.
- Select
Mesh > Smooth.
The icosahedron becomes
more spherical.
- In the Attribute Editor,
select the polySmoothface1 tab.
- Adjust the attributes as follows:
- Method: Linear
- DivisionLevels:
1
- Divisions per Face:
10
- Push Strength:
1.0
- Roundness:
1.45
- In the Channel Box,
adjust the channel values as follows:
- TranslateY:
0.848
- ScaleX: 1.5
- ScaleY: 1.5
- ScaleZ: 1.5
- In the nDynamics menu
set select
nMesh > Create nCloth.
- Playback the simulation.
The bag of marbles falls
to the ground.
Constraining the Bag
In order to keep the
bag suspended you need to constrain its position.
To constrain the bag
- -click
the bag and select Vertex from the marking menu
that appears.
- Select a number of vertices at the top
of the bag.
- Select
nConstraint > Transform.
- Playback the simulation.
The top of the bag now
stays in place while the marbles weigh the bottom down.
Adjusting the pressure
of the bag
When you render this
scene, you may want the marbles to show through the bag more prominently.
You can do this by adjusting the pressure setting of the bag.
To enhance the marbles displayed through
the bag
- Select the bag.
- In the Attribute Editor,
select the nClothShape2 tab.
- In the Pressure section,
set Pressure to -0.5.
- Playback the simulation.
The air is sucked out
of the bag as the marbles fall which allows the marbles to show
through the bag more clearly.
To animate the bag at full speed
- Go to the beginning of the playback range.
- Select the bag and then select
nCache > Create New Cache.
Maya automatically plays
back the nCloth simulation and saves it to disk as a cache.
- Playback the simulation.
The simulation plays
at full speed.