3D Artist

How to simulate nCloth with MPC

Tips & Tutorials

Learn how to create convincing cloth simulations good enough for Hollywood VFX with lead technical animator at MPC Mathieu Assemat

Thanks go out to Mathieu Assemat for this Autodesk Maya nCloth tutorial


01 Pick your character

This step by step guide is not related to one specific character. I’m sure you have your own character that you need to cloth, otherwise Maya has a library called the “visor” with includes some motion capture examples you can work with. (window > general editors> visor).
Before working with animation, we will work on a static model.


02 Gathering References

When it comes to cloth it’s crucial that you have a good understanding of the behaviour of the fabric you want to recreate. Researching the material on the internet will help but it is also really important to look at a real person in motion. For example if you are creating a pair of jeans, some people will wear them skinny style, others may wear them baggy… Why not be your own model?


03 Understand the nCloth solver

Before starting, remember Maya Help will be a good friend. You’ll find some really useful information there. I always have the documentation by my side when I create a new character. It will help you a great deal if you read the relevant information before you begin work.


04 Simulation meshes

You have a character you want to dress. Each piece of cloth should be simple. Try not to add too many wrinkles or too much detail as you will lose them in the simulation. Keep in mind that you need at least three edge loops to create a wrinkle. You need three points to make a curve. By looking at your references and at the level of detail you want, you should be able to tell how dense the mesh needs to be. In my example I want quite a realistic cloth, keeping decent simulation time. I adapt my resolution to what I think is necessary for the shirt, blue jeans, and leather jacket. We are going to call these simple meshes Simulation Meshes.


05 Space Scale

Once you have your Simulation Meshes ready you can convert them into nCloth (Select the mesh, nCloth > create nCloth). Your body can now become a collider (nCloth > Create passive collider). My character is about 1.80 meter tall. Right now he is 18 Maya Units. nCloth interprets Maya’s units as meters, and in my case 1 Maya Unit = 10cm. To sort this out I can set up the space scale in my nucleus to 0.1. If you use centimeters as units you should put 0.01. Also set your start Frame.


06 nCloth presets

Maya comes with a lot of nCloth presets. Let’s give piece of cloth a preset (preset button in the attribute editor) that we think may work. From now on my trousers will use the preset “heavy denim”, my shirt will use the “tshirt” preset, and my jacket the “thickLeather” preset. We don’t expect these to work out of the box but we need to start somewhere. You can save your own presets later on to save some time in the future.


07 nRigid

Maya comes with a lot of nCloth presets. Let’s give piece of cloth a preset (preset button in the attribute editor) that we think may work. From now on my trousers will use the preset “heavy denim”, my shirt will use the “tshirt” preset, and my jacket the “thickLeather” preset. We don’t expect these to work out of the box but we need to start somewhere. You can save your own presets later on to save some time in the future.


08 Preparing the cloth for testing

We first want to optimize the simulation speed a little. I usually untick the self collisions on every nCloth. The nCloth should also have a thickness. You can do the same process as before. Don’t make your cloth look thick thinking the collision will be better, it tends to be really unstable. Put the nucleus substeps value to 10 to start with. The substeps are the number of times maya will calculate a frame. If your value is too low, the behaviour of your cloth will be radically different. I only increase over 10 for stability purposes when required.


09 Adding constraints

You can go to your start frame and have a play now. If like me you have a pair of trousers or even a cape, you will notice that the trousers fall down to your character’s knees, or the cape might not be attached to the body. To avoid that, you can add point constraints. Select the vertices where the belt should be. In the example of the trousers, add the body to the selection and go to “ nConstraint > Point to surface”. It will now be attached. However, now you will see there is space between the trousers and the body. If you reduce the “rest length” value in your constraint, your trousers will get closer to the body. I set it up to 0.1 in this example. If your jacket slides, you may consider adding a constraint to the collar.


10 Collision layers

If like me you have more than one piece of cloth, they will interact together. Theoretically this is really nice, but in reality it can be hard to have a stable simulation. It is quite likely that the simulation will explode. Luckily each nCloth or nRigid node has a “collision layer” attribute. An object is only able to push other objects in the same or in a higher collision layer. For example an object in collision layer 1 will push object on collision 1 , 2 , 3 … but not an object in layer 0, however it can be pushed by an object on collision 0. The collision layer range in the nucleus specifies how many layers above an object can be pushed another. With this logic in mind, my body will be layer 0, trouser layer 1 , shirt layer 2, and jacket layer 3. I prefer that objects do not interact all together.


11 Rest length map

The rest length map will allow you to sculpt the cloth, by default it’s all white. If you paint some zones darker, it will shrink the cloth. With extreme dark It can look like we have added elastic to the cloth. I usually paint the seams of clothing at a value of 0.9. I also add some stains into the white to add some randomness to my fabric. To paint it, right click on your cloth geometry and select “paint > nCloth Vertex Map > rest length Scale”. The maps in the example are contrasted so you can see them clearly. I don’t have them below 0.85.


12 Rest length scale

The Rest length Scale in the nCloth is a multiplier of the map we’ve seen above. Does your cloth look too baggy? You can reduce this value and it will all shrink. I will set up all my rest lengths to 0.95 to shrink the pieces of cloth a little, as I went quite large in my model to avoid collisions.


13 Rest shapes

The rest shape is a maya mesh that your cloth will try to match when no forces are applied to it. You can sculpt details in a rest Shape to add some detail. If you start to like your simulation, why not stop it at a frame you like, duplicate your cloth to have a static mesh and do some sculpt on this mesh. I usually go through this process a number of times as this will add detail to your clothing. You can connect your newly created mesh as a restShape. Select this mesh, adding your matching nCloth node to the simulation and go to “nMesh > restShape > Connect Selected mesh to Rest Shape”


14 The values

Now try tweaking the cloth how you’d like it. If you want your cloth to have more creases, try reducing the bend resistance. If it stretches too much, increase the stretch resistance. There is no one way of doing this, and the best thing to do is to refer to maya to help remind yourself of all the attributes. I will give you my own values for this tutorial at the end. If you have a similar piece a cloth, you will see that it can still differ quite a lot!


15 Testing with animation

After a few hours of fine tuning, your cloth should look quite good. Now it’s time to try it out on an animation. Set the frameRange and the start frame to where your animation starts. You’ll find the results are not always good from the first play. In my case everything was a bit stretchy and was moving too slowly. To fix this I reduced the damp to fix the speed issues (too much damp and your cloth looks underwater) and I increased the substeps and stretch resistance to avoid the cloth over stretching. More calculation = a more stable simulation. My substeps are now 26. This is my final value.


16 Holding the details

At this stage with cloth simulations, some nice details will appear and you may want to keep hold of them, so you will need to build them into the fabric. The attribute “restitution angle” in the nCloth defines an angle after which the cloth can’t go back to its initial position. Lowering this value will allow your cloth to hold more detail. In my case I’ll set a default value to the shirt, 40 to the trouser and 20 to the jacket.


17 Extra modelling

We now have a single sided mesh, but we can still add details like pockets, buttons, belts etc…
Starting from a duplicate of your original sim mesh, add all of the extra details you want and use the wrap deformer to attach this mesh to your simulation mesh. You will now have everything moving and details can add a lot to it.


  • Vipin Meshram

    great info

  • essam abdullah al hanbali

    why you had self collide on in the values