Thoughts about Maya nCloth

non-rigid collision objects

Most times while simulating cloth on a character there are problems with

self-intersecting geometry parts. Very problemetic are self-intersection in

the elbows, axels and leg-torso intersections in sitting character poses.

So how to get self-coliding collisionbodys with only a little more calculation?


For example we have a human character for cloth simulation. The normal

nCloth workflow would be to turn the skined character's body into an

nRigid body. The rigid body would be deformed through the skin cluster.


But instead we are duplicating the character's body and turn it into in nCloth

object. Now we can have self-collisions, but wait. the body would just fall to

the ground. How maintain the shape of the skinned character?


We just take the input shape of our nCloth-body and control it by the skinned

character body with a blendshape. In the nCloth shape attributes we raise the

"attract to input mesh" value to 1. 


If we now start the simulation our nCloth-body tries to maintain the shape of our

skinned character, while having nice self-collisions. By painting the "input mesh

attract" and adjusting the "input mesh attract damp" we can easily control

the self-collsions.


But what is if some parts of the nCloth body just don't follow the skinned

character,although the "input mesh" attract is set to 1? (mostly arms and legs)

The soulution is to turn the skinned character in a nRigid body anddeaktivate the

collsions on it. Now we easily can "point to surface" constrain the area's that

didn't follow.


Bonus of this method: Because of the cloth simulation of our characters body,

we even can simulate jiggle of fat and flesh without additional computations.


n-cloth for hair simulation

nCloth Hairsimulation with Autodesk Maya`s nCloth Hair simulation and Autodesk Maya`s nCloth, how would that fit together? If you did a character hairstyle in Maya before you know how difficult it can be without the use of any plug-in. To get realistic style and movement can take really long time. After that there you have to handle the single hair cache file in network-rendering. But there is another method.


Why not take advantage of the strength and speed of the nucleus nCloth solver and get nice visual results with PaintFX. In addition you can get cloth and hair simulation within a single solve. Also as a result there are very accurate collisions between character, cloth, hair and environment. And one nCache-file per frame and geometry is real easy for network rendering.


All in all the workflow is like playing a 1991`s point and click adventure; you collect various items and combine them together in the most ridicules way. In this case you need to combine a hairstyle from polygon-modeling, a character-mesh, curves, nCloth and PaintFX.


The poly-hairstyle will be connected to the character-mesh and simulated with the nCloth-solver. On the flow of the simulated poly-hair curves are generated. Paint Effects than are attached to the curves for rendering.


After modeling the hair with single polygon-planes-strand, they are combined to a single object. This will save a lot of work- and solving-time. No faces should be penetrating others for a easy nCloth solve. The strands should be unwrapped. The vertices nearest to the character-scalp should appear in the uv-layout on the bottom-line. The hair-ends should appear near the uv-space top-line. To have this vertical uv layout will make painting the nCloth attributes real easy as well as selection for constraining. An unwrapped surface provides also the choice of texturing the poly-hair for direct rendering.


Now it is time to convert the character-mesh to a nCloth-rigidbody and the poly-hair into a nCloth-object. The poly-hair-input-mesh has to be bound to the character`s skull-base-joint via parent constraining or simple parenting. This will give the simulated hairstyle a guide when it is in heavy movement during simulation.


With painting the rigid-attribute in the hairstyle`s nClothshape you can define it`s the stability. Through the vertical uv-layout now it is easy to apply ramps to the attributes and convert them to vertex-attributes, to speed up your workflow and to paint them individually.


To prevent the hair-strands falling from the head, they have to be bound to the character-mesh using a point to surface constraint. If you go here in detail think about the possibilities nCloth opens to your hair-simulations. Animating the constraint`s strength values you can make your character lose all hair or if you use multiple constraints on hair to head or hair-strands-parts you can even give your character a haircut.


It is time for a first solve. To get the attributes right it is good to setup a character-test-animation first. With each test-solve you can see the hair`s behavior and get fast production ready settings.


Maya PaintFX render real fast and real nice. To use it on the poly-hair a curve has to follow each hair-strand`s movement. Select a continues edge-line on a strand and convert it to a curve on it with activated construction history. Repeat this for each hair-strand. These generated curves you can attach to a hair-system. To create a hair-system with connections to PaintFX, just create a sphere, paint hairs on it with the paint-hair-tool and delete sphere and hairs after it. Put the hair-systems solver to static and enjoy watching the strokes following your nCloth-simulation.