nCloth Tutorial
This tutorial will help you learn a few basics of nCloth and its properties.
The amount of subdivisions in a plan will determine how much the nCloth will bend and move. The more subdivisions the more the cloth will move.
This cloth only has 20 subdivisions. You can see how poorly the cloth sits on the sphere, there aren't enough subdivisions for the cloth to sit better on the sphere so right now it looks more like a piece of paper than a piece of cloth.
This cloth has 100 subdivisions and you can clearly see the difference between the two. This cloth sits on the sphere a lot better than the previous one. So you can see the difference with having a higher subdivisions. Just remember that the higher the subdivisions the longer the render time.
Right so for this tutorial I will show you the basics of nCloth, with help as to what button does what. I will also demonstrate some of the features.
This is the ncloth bar in the ndynamics sub menu, I will do a quick run through as to what each button does.
To save confusion I will refer back to this list when I use certain buttons for help. eg (1).
1. Turns a selected object into an nCloth object
2. Turns a selected object into a collider
3. Delete nCloth from selected mesh
4. Show Mesh
5. Hide Mesh
6. Interactive playback
7. Paint a mappable thickness
8. Creates a constraint to hold up an nCloth
9. Constrains two nCloth objects together
10. Constrains an nCloth to a collision object
11. Constrains an nCloth to a collision object
12. Stiches 2 nCloth objects together
13. Turns objects into a tearable object
14. Select dynamic objects and or cvs to suppress collisions.
15. Select cloth components to disable collisions with all other objects
16. Remove selected dynamic constraints
17. Paint mappable strength
18. Create new cache on selected objects
19. Delete cache on selected objects
20. Disable all cache on selected objects
21. Enable all cache on selected objects
22. Merge existing cache to new cache on selected objects
23. Replace frames in cache on selected objects
24.Paint cache weights
Note: Some of these tools apply to nParticles as well.
Wind Simulator
Here we are going to view the basics of the wind simulation in Maya. Here I've modelled a simple flag out of polygons. You don't just have to apply this technique to flags. It can be used for many other designs. For this tutorial I will use a flag on a flag pole.
So after I had modelled my scene I turned the objects into colliders and the flag into an nCloth. to do this I selected the objected then in the nDynamics submenu I clicked (2) to turn the floor into colliders so that the nCloth interacted with these objects rather than pass through them.
I then turned the flag into an nCloth object by selecting the flag and pressing (1) not much will change but you will see a little circle come up which means its turned into an nCloth. Its that easy.
I then turned the flag into an nCloth object by selecting the flag and pressing (1) not much will change but you will see a little circle come up which means its turned into an nCloth. Its that easy.
Once I pressed play on my time line the flag just fell and hit the ground. This isn't what I wanted so I need to attach the flag to the pole so that it stays in the air and will flow in the wind.
To do this I go to VERTICES by clicking and holding the right button. I then select the vertices I want to be attached, so for this case I selected the edge closest to the pole.
I then pressed (8) to create a constraint to hold the flag in place. You'll know you've done this right when the selected vertices are a dark blue and a locator is present, you can scale the locator to any size you want.
Now that the flag is constrained to a fixed point I tested to see if it was working. Now instead of the entire flag falling, only the side that isn't constrained falls. this its starting to look more flag like. But we need a breeze to make the flag move and give it life.
In the attribute editor there are 2 sections you can use to control different aspects such as the wind power, the direction and gravity.
Under nClothshape1 (Ideally you should name all your objects to help yourself when producing work, This is the default name for your nCloth objects, if you are going to have more than one in your scene it is ideal to re name them to help you find the object)
In the sub menu WIND FIELD GENERATION there are 4 aspects you can use to control your nCloth, while these don't straight away effect your nCloth they will effect them one we apply some wind speed.
In the attribute editor in the nucleus1 tab, under the GRAVITY AND WIND sub menu is where the magic happens.
Gravity- This makes the cloth either very light or very heavy depending on the environment, I left the gravity on 0 for this tutorial as I just wanted to simulate a flag blowing in the wind.
Gravity Direction- The 3 values here correspond to your X Y and Z axis. This controls the direction in which the gravity effects the cloth.
Air Density- This determines the weight of the wind and how much the wind will pull on the object affecting the drag. Also Air Density decreases with the increase of altitude. So if my flag was on the top of a mountain there would be very little air density as opposed to if it was in a city where there is more air density.
Wind Speed- This controls the speed at which the wind hits the flag, so the more you put the value up the faster the flag will move.
Wind Direction- The 3 values here correspond to your X Y and Z axis. So depending on which way you want the wind to blow will depend on the values you but in the boxes.
Wind Noise- Is the level of randomization for the wind on your nCloth.
And there you go, a quick and simple way to show you the basics of the wind feature in nCloth. Here is a simple playblast of the flag with some minimal settings on to show you how you can create a simple flag in nCloth.
Note: The geometry went a little bit funny on my flag, I'm not sure why the ends weren't as smooth as the rest. I probably would have needed to tweak some vertices.
Stitching Tutorial
I am also going to do a quick tutorial on stitching two nCloth objects together. I thought Id give a quick run down on stitching as for some unknown reason my Maya has such trouble doing it. I don't know whether its because I'm doing it wrong or that Maya is being stupid. I like to think its because of the latter :)
Here I have a simple scene to demonstrate stitching. This technique can be applied to many different scenes. I made some simple polygons to show the effect of stitching to objects together.
This is what happens when you don't stitch two objects together, they fall and separate in the middle, and seeing as this is not the effect I want I need to stitch them both together. I used two different colours so you can see each piece.
Right so we want the green and blue cloth to be stitched together. Remember you can only stitch nCloth objects together so make sure your objects you want stitched have been made into nCloth objects (1).
(Maya crashed on me before I had a chance to save so I had to redo the scene.......I told you that Maya never let me stitch properly TT^TT)
Right to stitch the objects together we need to select the edges of both of the planes and literally sew them together. To do this select the vertices of one planes, selecting the side you wish to sew to the other then SHIFT select the other planes vertices. You must shift select the other set of vertices or the sewing will not work. Once you have the vertices of both planes selected press (12) and if done correctly the selected vertices will go green. if unselected you should see blue vertices and stitches between them.
Now when I do the same thing as before the cloth stays stitched together. You can make it so there no seam but I left a gap so that you could see the stitching.
Heres a quick play blast of what the cloth looks like. there aren't loads of subdivisions in this cloth so it looks a bit stiff. I also messed up my render settings and rendered out waaaaaay too many frames :P
Now you dont have to do just one technique with nCloth, you can combine them too.
Here I combined the previous two tutorials to make a little banner. I simply stitched smaller planes together, constrained them so that they didn't fall to the ground and applied some wind.
I hope you found these tutorials helpful :3