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

  1. Select Create > Polygon Primitives > Plane > .

    The Polygon Plane Options window opens.

  2. Select Edit > Reset Settings.
  3. Set the plane options as follows:
    • Width: 10
    • Height: 10
    • Width divisions: 30
    • Height divisions: 30
  4. Click Create.

    Maya creates a plane centered at the origin.

  5. In the Polygons menu set, select Edit Mesh > Detach Component.

    The plane will become separated such that each face becomes a new plane.

  6. Select all the planes.
  7. In the nDynamics menu set, select nMesh > Create nCloth.
  8. In the Attribute Editor, change the name of the nCloth to “Confetti.”
  9. In the Collisions section, turn Self Collide off.
  10. 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
  11. 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

  1. Go to the beginning of the playback range.
  2. Select the Confetti plane.
  3. In the nDynamics menu set select Fields > Turbulence > .

    The Turbulence Options window appears.

  4. Set the Turbulence options as follows:
    • Magnitude: 1
    • Attenuation: 0
    • Frequency: 8
  5. Click Create.
  6. Set the End Time of the playback range to 100.
  7. Playback the simulation.

The simulation plays back more realistically, but also very slowly.

To improve the speed of the simulation

  1. Select the Confetti nCloth and open the Attribute Editor.
  2. 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

  1. Select the Confetti nCloth.
  2. In the Channel Box, set TranslateY to 30.
  3. In the Attribute Editor, select the nucleus1 tab.
  4. In the section Ground Plane, activate Use Plane.

Color the confetti

To add color to the confetti

  1. -click the nCloth and select Assign New Material > Ramp Shader from the context sensitive menu that appears.
  2. In the Attribute Editor, select the rampShader1 tab.
  3. In the Color section, select the checkered box next to Selected Color.

    The Create Render Node window appears.

  4. Select Ramp.
  5. Change to Shaded and Textured mode (hotkey: 6).
  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

  1. -click the Confetti nCloth and select Material Attributes...

    The Attribute Editor opens with the rampShader1 tab selected.

  2. In the Transparency section, select the checkered box next to Selected Color.

    The Create Render Node window appears.

  3. Select Ramp.
  4. In the Attribute Editor, under Ramp Attributes set Type to Circular Ramp.
  5. In the Ramp Attributes editor, click the box with an x at the center of the color ramp to eliminate the green marker.
  6. Select the small red circle at the bottom left of the color ramp. The colored box next to Selected Color should change.
  7. Click the colored box next to Selected Color.

    The Color Chooser that appears.

  8. Select the color black and click Accept.
  9. Under Ramp Attributes, set Selected Position to 0.45.
  10. Select the small blue circle at the top left of the color ramp.

    The colored box next to Selected Color should change.

  11. Click the colored box next to Selected Color

    The Color Chooser appears.

  12. Select the color white and click Accept.
  13. Under Ramp Attributes, set Selected Position to 0.5.
  14. 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

  1. Select File > New Scene.
  2. Select Create > Polygon Primitives > Plane > .

    The Polygon Plane Options window appears.

  3. Select Edit > Reset Settings.
  4. Set the plane options as follows:
    • Width: 10
    • Height: 10
    • Width divisions: 30
    • Height divisions: 3
  5. Click Create.

    Maya creates a plane centered at the origin.

  6. In the Polygons menu set, select Edit Mesh > Detach Component.

    The plane separates such that each face becomes a piece of confetti.

  7. 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.

  8. In the Attribute Editor, select the polySubdFace1 tab.
  9. Set the following attributes:
    • Subdivision Method: Linear
    • Divisions UV: 1, 8

  10. In the nDynamics menu set select nMesh > Create nCloth.
  11. 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.