Lesson 4: Simulating the low resolution shirt
 
 
 

In this lesson, you simulate the character’s shirt using the workflow described in Lesson 3. Although there are some variations in attributes and their respective values, the principles are the same.

In this lesson you will:

Lesson Setup

To ensure the lesson works as described, do these steps before beginning:

  1. If you have not already done so, copy the nCloth Advanced Tutorial folder from the following location: www.autodesk.com/maya-advancedtechniques. Then, set the nCloth AdvancedTechniques directory as your Maya project.

    For this lesson, you need to access Maya geometry cache files in addition to the lesson scene file.

  2. Open the scene file named Character_LowRes_4.mb.

    This file can be found in the AdvancedTechniques directory that you set as your Maya project.

  3. If you use a Maya scene file from a previous lesson, ensure that you:
    • Turn off the visibility for the Reference_Character object in the Animation Layers Editor.
    • Hide the Pants_HighRes object.

Converting the shirt to nCloth

To convert the shirt to nCloth

  1. Show the Shirt_LowRes object by selecting it in the Outliner, and then selecting Display > Show >Show Selection.
  2. Select the low resolution shirt object (Shirt_LowRes) and select nMesh > Create nCloth > .

    The Create nCloth Options window appears.

    NoteIf the nCloth menu set appears in the Maya interface do not use it. You must use the nDynamics menu set to create and control nCloth. See nCloth menu set appears in Maya for information about removing the nCloth menu set from Maya.
  3. From the Solver drop down list, select nucleus1.
  4. Click Create Cloth.

    The low resolution shirt is converted to an nCloth object, and has been added to the existing May Nucleus solver.

  5. To ensure that low resolution nCloth shirt is easy to identify in your scene, rename it. To to this, in the Outliner, double-click nCloth1, and type nCloth_Shirt.
  6. Press .

  7. Cache your simulation and then play it back.

Applying a nCloth preset to the shirt

When you play back the simulation, you notice the following:

A useful way to solve a number of these simulation problems simultaneously is to apply an nCloth attribute preset to the nCloth shirt object.

To apply an nCloth preset to the shirt

  1. In the scene view, select the nCloth shirt.
  2. In the Attribute Editor, select the nCloth_ShirtShape tab.
  3. Click-hold the Presets button.
  4. Select the tshirt preset, and then Replace (tshirt > Replace).

Some important attributes adjustments made by the t-shirt preset are the following:

Wrapping the high resolution mesh

In this section of the lesson, you use a wrap deformer to create an influence object for the high resolution shirt.

To wrap the high resolution mesh

  1. In the scene view, show the Shirt_HighRes object by selecting it in the Outliner, and then selecting Display > Show >Show Selection.
  2. -select the nCloth shirt object.
  3. From the Animation menu set, select Create Deformers > Wrap.

    A wrap node appears in the Attribute Editor, and a Shirt_LowResBase object appears in the Outliner.

  4. In the Attribute Editor, click the wrap2 tab.
  5. In the Wrap Attributes section, turn on Exclusive Bind.
  6. Hide the Shirt_HighRes object, and play back the simulation.

Identifying problem areas in the simulated nCloth

When you play back the simulation, you notice the following:

The nCloth t-shirt preset has improved many of the simulation issues, however some Dynamic Properties attributes need further adjustment.

When editing the Dynamic Properties attributes, cache your simulation and then play it back between attribute adjustments to see how your new settings affect the nCloth shirt's behavior. For comparison purposes, you can also display the reference character in the scene. To do this, in the Display Layer Editor, turn on Visible.

To edit the shirt’s Dynamic Properties

  1. In the Attribute Editor, click then nCloth_ShirtShape tab.
  2. In the Dynamic Properties section, make the following settings:
    • Stretch Resistance: 55
    • Compression Resistance: 3
    • Bend Resistance: 0.3

  3. Cache your simulation, and play it back.

Editing the Quality Settings and resolving interpenetrations

When you play back the simulation, you notice the following:

To smooth the mesh and reduce instances of interpenetrations, edit the Collisions and Quality Settings.

To edit the Collisions and Quality Settings

  1. In the Attribute Editor, select the nCloth_ShirtShape tab.
  2. In the Collisions section, set the Self Collision Flag to Full Surface.
  3. In the Quality Settings section, set the following:
    • Max Iterations: 12000.
    • Max Self Collision Iterations: 8.
    • Turn on Trapped Check.
    • Turn on Self Trapped Check.

  4. Cache the simulation and then play it back.

Fine tuning the simulation

To further improve the quality of the simulation and reduce the instances of interpenetration in problem areas, such as the bunching of the shirt in the chest area (see frame 1040) you can set Push Out and Push Out Radius. Try setting the attributes values between the following ranges:

Experiment with your settings by creating duplicates of the meshes at specific frames of the simulation. For example, create mesh duplicates at frames 1040 and 1043. Cache the simulation, and then scrub through the Timeline and compare your simulation with your duplicate mesh to see the results of your attribute edits.

Comparing the final low resolution simulation with the simulated reference character mesh

In the section of the lesson, you compare the final simulation result of the nCloth shirt and nCloth pants objects with the simulated reference character object (the original simulated high resolution mesh).

To compare the simulations

  1. Hide the Shirt_LowRes and Pants_LowRes objects, selecting by selecting them in the Outliner, and then selecting Display > Hide > Hide Selection.
  2. Show the Shirt_HighRes and the Pants_HighRes objects by selecting them in the Outliner, and then selecting Display > Show >Show Selection.
  3. If you have not done so already, using the Displays Layers Editor, turn on Visible to display the Reference_Character object in the scene view.
  4. In the Shading menu, turn off Wireframe on Shaded.
  5. Scrub through the Timeline, to compare how nCloth meshes behave in the animation. Dolly and tumble the scene so that you can closely observe the problem area.

There are subtle differences between the way both the high resolution and reference character objects simulate, but overall the nCloth behaves in similar ways. Considering the amount of time saved of repeatedly working through the simulation workflow of caching the simulation and adjusting attributes on the low resolution mesh, the low resolution mesh workflow provides good results. Although the reference character object can be improved by optimizing the simulation, however, the higher resolution mesh would slow down caching and simulation time and might require more attribute adjustments.