Digital Tutors: Introduction to nCloth in Maya

I went through the ‘Introduction to nCloth‘ tutorial today on Digital Tutors. It seems like it will come in useful for animating the floaty quality that we were thinking of for our character.

Towel simulation:

Flag simulation:

Dress simulation:

Screen Shot 03-31-15 at 07.58 PM - CopyScreen Shot 03-31-15 at 07.58 PM 001 - Copy

I was thinking that the movement of our character’s cloak and fins could possibly be simulated in a similar way to the flag or dress tests that I did. They could be modeled as separate pieces of geometry which are then turned into nCloth and parented or nConstrained to the main body (like in the pictures above). Do you think that this type of realistic simulation would fit okay with the style of our world?

These are notes I took to remind myself of points so they might not make a lot of sense out of context:

  • nCloth always works in meters regardless of what unit Maya is set to (so 2cm in Maya is read as 2m by nCloth). This applies to other Maya dynamics also.
  • Adjust playback and max playback.
  • Turn objects that need to interact with the cloth into ‘colliders’.
  • Nucleus (in outliner) controls various things like: wind, air resistance, gravity (9.8m/s^2).
  • values of cloth and collider are accumulative.
  • The importance of scene scale: change the scale attributes in the attribute editor of the nucleus to .01 (100m/100=1cm).
  • Increase the quality of our solver: change settings in nucleus node e.g. steps. Change settings in nClothShape ‘quality’.
  • The input mesh is the original piece of geometry before nCloth was made.  The ncloth is a duplicate of the geometry.  Don’t apply commands e.g .smooth to duplicate mesh. The input mesh is original geo. The ncloth simulation is calculated from the original geo, through the nucleus node and onto the NClothShape then fed back out to outputcloth which is displayed. Therefore apply commands to first part of node chain (original geo) so it can be factored into calculations.
  • Exploring dynamic properties: If scene is modeled in cm you need to adjust the ‘lift’ attribute of nclothshape. Also adjust stretch and compression resistance.
  • simulate movement through ‘local force’.
  • how to make it feel more like the material? collision: ‘thickness’ ‘solver display dropdown’. collision surface on both ncloth and colliders. ‘self collision thickness’. ‘self collision flag dropdown’ vertex suffices.
  • Get rid of unwanted jittering and noisyness: nucleus solver attributes. nclothshape quality settings. ‘damp’ sometimes works. Attributes can be keyframed at certain stages where there’re problems.
  • high substeps and max collisions might be needed to get rid of jitters.
  • keyframe the ncloth inputs ‘is dynamic’ on/off.
  • working with constraints: constraints can be applied directly on ncloth. Apply transform constraint to vertices at point of force. Parent locator to mass that moves. Use ‘remove members’ to remove vertices. from constraint.
  • Creating tearing cloth: select area to be torn with lasso and create ‘tearable surface’. See stretch resistance under ‘dynamic properties’. Use dynamicConstraintShape to tune the tear.
  • Dynamic property maps: e.g. stretchiness that varies over object or certain parts that bend. wrinkle map e.g. from a file of painted wrinkles. For animated wrinkles, connect e.g fractal instead of file. Edit attributes to make longer shapes. Keyframe the offset for motion. ‘Wrinkle map scale’ influences strength of wrinkle map effect.
  • simulating cloth on a moving character:select vertices and then shift-select the collider surface that the vertices are to follow then choose ‘point to surface’ constraint. Select bones then ‘select -hi’ in MEL to select rest of hierarchy of bones and move t-pose to something like -50. That way we can start ncloth simulation before main body animation (gives time for cloth to relax).
  • Identifying potential problems: frames when geo passes through cloth will confuse the cloth simulation. In ‘evaluate nodes’ disable ncloth. Scrub animation for points where two pieces of geometry go through eachother.
  • Caching nCloth simulations: You can manually adjust values in the attribute editor  e.g. stretch resistance or use Maya presets. ‘Lift’ might need to be changed to match scene scale. Cache the simulation so that when it’s opened on another computer you can be sure it’s the exact same simulation. ‘create new cache’ bakes animation into external file. ‘delete cache’ in order to preview changes. Having a cache allows you to hide the negative frames on the timeline as the cloth will remember the more relaxed position at frame 0.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s