Old NCloth Notes

Hybrid Mixing Skinned Clothes With NCloth Workflow

The following method is one of the easiest methods to achieve a great cloth feel without having to do a full cloth sim. It still uses nCloth but we’ll mix the sim with a skinned mesh. So the result is largely skinned clothes with NCloth wrinkles that can look very convincing.

1. Create a SubD Cloth Mesh minus the wrinkles, the mesh should be mostly quads and simple topology.
2. Duplicate the mesh so there’s 2 meshes
– Mesh One: ClothSkinned
– Mesh Two: ClothPolySmooth
3. Skin the first mesh to the skeleton as you would skin any mesh.
4. Blendshape connect Mesh Two to Mesh One, so the ClothPolySmooth follows the ClothSkinned
5. Add a polysmooth to Mesh Two (ClothPolySmooth) set the divisions to 2 (or as desired)
Now the hires ClothPolySmooth should follow the first mesh ClothSkinned
6. Now duplicate the ClothPolySmooth at the bind pose call it ClothSim
7. NCloth ClothSim (local)
8. Turn Gravity on the nucleus node to 0
9. Now select the ClothSim mesh and in the node editor find the node “ClothSimShape” it’ll be an intermediate object so turn it off in the attribute editor to make it visible.
ClothSimShape > Attribute Editor > Object Display > Intermediate Object (off)
10. OutputCloth is the cloth mesh, but ClothSimShape is the one we want to move so the OutputCloth will be simmed for wrinkles. To hook this up connect the shape ClothSimShape via a blendshape to ClothPolySmooth.
11. Now the ClothSimShape should move with the ClothSkinned and ClothPolySmooth. Check it then hide meshes ClothSkinned and ClothPolySmooth.
12. Return the mesh ClothSimShape to be an intermediate object
ClothSimShape > Attribute Editor > Object Display > Intermediate Object (on)
13. Select The nCloth in the outliner and in it’s shape node go Dynamic Properties > Input Mesh Attract = 1
14. In the prefs switch to
Preferences > Settings > Time Slider > Play Every Frame
15. Press Play to Sim
The cloth should sim, though depending on size it will need tweaking

Last step is to add a new mesh that we can blendshape paint on
1. create a new dup of the polysmooth at bind pose
2. Create 2 blendshape nodes
– ClothPolySmooth
– another blendshape node (not shape we need a new node) for ClothSim
3. Switch on both blend nodes
4. Can paint out the last one which is the sim.

Tweaking The Cloth Sim Settings

Main thing to remember for all nCloth sims is to change the scale on the nucleus node scale to .01 to get it in maya cm scale and then you also have to change the Lift attribute in the nCloth node to .0001 to have it all work together.

Then use a nCloth preset like TShirt, but remember that it’ll reset the lift and the Input Mesh Attract attributes so switch back to
Lift = .0001
Input Mesh Attract = 1

Fur Settings Renderman

Switch on Maya Fur Plugins
Fur Attach Fur Description > Fur (or use GMH for hair)
Must be in old viewport render legacy
Attribute Editor UV samples to 128 say to help grooming
Fur Description Is The Settings
Baldness is for texture map for fur yes no

Renderman Hookup
Load Renderman
In the hypershape create a node PxrMarschnerHair
Add Custom Attribute (attr Editor) to X_FurFeedbackShape
Go to Extra Attributes then rightclick on Custom Shading Group Attributes then PxrMarschnerHair1SG node just created

Maya Tweaks
For the fur settings you can use maya presets, Renderman uses the native maya settings for anything to do with the curves etc
Renderman shader PxrMarschnerHair1 will be for colour and spec, eg material shaders.

Digital Tutors Notes

Intro to nCloth Digi tutes
2. Creating Basics
– Only Polygons
– quads or tirs but ngons are more problematic
– make sure the scene scale is correct
– it doesn’t matter what maya unit setting you have, ncloth is always in meters!
– other maya dynamics are always in meters
– playback every frame (for simulations)
– max playback speed can be limited
– delete history and freeze transforms, clean objects.
– select object then nDynamics > nMesh > create nCloth
– playback the cloth will fall no collisions
– nMesh > create passive collider
3. Exploring the Nucleus node
– nucleus node can be disabled, disables everything related to that node, all cloth sims
– gravity defaults are 9.8 meters squared, is realistic
– wind speed on nucleus node
– use plane (checkbox) – ground plane can act as a false ground. Can ossfet
– can add fields that aren’t in the nucleus node by default
– ncloth shape node (individual node)
– enable turns off on a per object (cloth) basis
– properties of the cloth
– slippery is defined by “friction and stickyness”
– the collider friction can also be set as well friction .5 + .5 = 1
– can also up the stickyness (also change on the collider)
– values past 1.5 will still add up. Even if one if the collider is set to 0
4. Importance of scene scale
– Nucleus > Scale Attributes > Space Scale
– Space scale should be .01
– after you scale we need to change some values in the ncloth to compensate.
– odd angle sim
– nClothShape set Lift attribute .0001 always for cm maya scale
5. Increasing the quality and reduce collisions
– introduce higher values for the solver attributes > substeps
– subteps is the amount of calculations between frames
– interpenetration is caused by a lot of movement without enough substeps
– so to fix many intepenetration problems increase the substeps on the nucleus node.
– collision iterations, is testing x times per frame, up it to 20, 30 or 40 to make sure there’s no penetrations
– causes slowdown, but it’s often unavoidable
– scroll down to Quality Settings Roll Out, this tests the amount of times the cloth is penetrating with itself.
– increase the max self collide Iterations, can be up to 20 or 30

6. nCloth input and Output Meshes
– the nCloth is making a duplicate shape node, the shape changes to output cloth
– nMesh > display input mesh (gets the original object back) now you have 2 shape nodes, needs to refresh
– nMesh > display current mesh (is the duplicated cloth mesh)
– don’t apply the smooth to the duplicated mesh (the cloth sim) apply smooth mesh to the hidden shape node, this applies before the sim in the history so to speak
– will be much slower
7. Exploring nCloth dynamic properties
– Dynamic Properties in the nClothShape
– stretchy
– compression (for folds)
– stretch Resistance 200 is a good start for cloth
– compression resistance ( tries to hold shape with higher values) cloth objects down to .2. This stops springy behaviour.
– so lift compression, stretch and lift are the main three attributes.
– to move objects initial movement go to “local force” -10 on z for example
– key the local force off at the point that you want to let it go.
– difficult to get the cloth to settle and stop jittering.
8. Controlling Cloth Collisions.
– changing the thickness feel
– nCloth Shape, thickness, self collisions
– turn on collision thikness – shows the shell
– remember that the collision happens on the nCloth and the collider
– nCloth has self collisions too.
– hold ctrl, self collide thickness is essentially thickness of the object itself
– couple of ways that the collisions happen. Full Surface is accurate but slow. Vertex is usually ok
– now you’ll see the individual dots as the thickness while refreshing the self collision display on.
– can adjust the vert points self collision until the vert display thickness touches, is quite ok.
– so you can add thickness just by tweaking the collisions, particularly the self collision thickness.
– reducing jitter and noise
– the most sure way of eliminating jitter is to up the substeps and the Max Collision Iterations, sometimes as high as 30 – 40 or higher
– Also might have to adjust (under Quality Settings) the max self collide iterations. Eliminates noise and shifting
– introduce some damping. Damping takes high frequency noise and forces it to drain out quickly. Keep in mind that you can also keyframe the damping value. Key on to stop and then key off.
– sometimes to get nicer results you can take the quads and turn them into triangles. This is personal preference. Bit easier to achieve. Use as a wwrap to final meshes.
– Can animate the is dynamic on and off featue on the shape node (channel box), this is good if you want an initial state. This is good because it doesn’t keep simulating for long time frames if you don’t need them.
9. Working With Constraints
– Select the verts on the cloth mesh, cloth shape is ok.
– nConstraint > Transform
– The transform will pin the verts. Once applied don’t move the constraints.
– Apply at the first frame. Sometimes it won’t let you on other frames.
– Can parent the transform locator to hardsurface objects.
– to unconstrain verts > nConstraint > remove members (with verts and the locator selected)
– to delete constraints just select the constraint locator node or > remove dynamic constraint.
10. create tearing and ripping cloth effects.
– setup the constraints so that they pull apart
– triangulate the geo to get nicer effects
– you can select where you want the tear to occur.
– select the area in verts that you want to have tear.
– nConstraint > tearable surface
– sim the mesh/aniamtion done
– select the highlighted points which represent the tearable constraint (dynamic constraint)
– settings are on that mesh, like the “Glue Strength”
– with a low Glue strength the objects can just break apart like as in an explosion.
– good for ripped clothes and paper etc.
11. Dynamic Property Maps
– Dynamic Property Maps under the nClothShape
– Wrinkle Map (almost like displacement for nCloth)
– black leave the cloth along white strtch the cloth together.
– wrinkle map scale will multiply the effect
– can plugin a fractal and possibly animate too, looks like old cloth, stretch the repeat on the place2d texture to make it look more like cloth.
– can animate the offset
– animate the fractal animating pattern. Animated wrinkle map
– Good for subtle effects and telling where the wrinkle appears.
12. Simulating cloth on a moving character.
– select the verts on the top of the skirt and the body mesh
– nConstraint > point to surface (object must be a collider first)
– for negative frames change the Time Attributes > start frame on the Nucleus Node
13. Identifying Potential Problems with your cloth simulation.
– make sure things aren’t intersecting
– you can switch off nCloth globally in the show menu
– fix animation frame by frame.
14. Caching Simulations
– use the presets
– be sure to change the lift to .0001
– increase the substeps on the nucleus node
– drag and damp adjust cause the dress settles slowly like it’s too hard.
– cache the simulation with nCache > create new cache
– after cacheing to delte go to nCache > delete cache
– we don’t have to override caches and choose
– change that in the cache node on the mesh
nCloth for Characters 2013
1. Check the asset
2. Simulating the sweater.
– play every frame
– need a animation from t pose
– nDynamics > nMesh > Create nCloth (options)
local and world space
world space is more for when you’ve already cached out the mesh and want to add more effects
– yes create new solver
– two nodes gets added, nucleus (dynamic behaviour of all objects) and ncloth
By defualt there’s no collisions
– Sweater speed, speed is relative to cms units
– to change the speed scale change in the nucleus node, > scale attributes > Time and Space Scale
– ncloth works on meters but the characters have been built in cms
– space scale should be .01 for cm based scale
– select the surface that needs to be a rigid body
– nMesh > Create passive Collider
– pick the current solver
– make collide
– by default values are very loose
– nSolver > Initital State > set from current. (optional if you need a new initial state)
– rename the rigid object
3. Modifying the cloth properties
– select the sweater (ncloth)
– loose means low stretch and compression values
– compression is the bunching up effect
– bend resistance also
– collisions > thickness
– change solver display to collision thickness
– rigid surfaces also have collision thickness
– increase the sweater to .5 and the pig to 1, this prevents interpenetration
– switch solver display to self collision thickness.
– presets are in the nCloth presets
– use the tshirt preset, gives us a note with some tips
– Create Cache file,
– nCache > Create new Cache – change the name of the folder, goes in data
– after cache and playblast is too loose
4. Adding Thickness to the Sweater

Leave a reply