Building polygon primitives

Let's build a kind of a hello world scene, where we just make a tablecloth, and just drop it onto a roundcircular table, and that will get us through the basic processes of nCloth.We want to decide on a scale convention to begin with, and as I said, I like tobuild my scenes at a 1 to 1 scale, because that's what most other programs use.So I just want to verify in my Settings Preferences, Preferences that my settingsare currently Working Units set to centimeter, and that means that a grid line iscurrently 1 centimeter.

I want to resize the grid itself, because this is only currently 12 centimetersfrom center to edge.I'll go up to the Display menu, and choose the Grid options, and the first onehere, Length and Width, is the extent of the grid in the perspective view.I'll set that to 200 centimeters. Hit Apply, and you'll see that extends now outto 200 units from the origin, but the spacing of the grid is too tight for me tobe able to see what I'm doing.

I am going to change the number of grid lines to be 1 grid line every 100units, and hit Apply.Now I have got a grid line every 100 units, but it's a little bit confusing,because we are also seeing subdivision lines here.Confusingly, the Maya subdivision and main grid lines are the same color by default,so it makes it really hard for you to know what you're doing.What I recommend is you set the grid lines and the subdivision lines to betwo different colors.

I'll just change that grid lines color to slightly darker gray, and hit Apply, andnow you can see what's going on here; this is a major grid line, and these areminor gridlines, or subdivision lines.Now, what we see here currently now is a major grid line every 100 units, anda subdivision line every 100 divided by 5, which is every 20 units, or every 20 centimeters.I'm just going to set the number of subdivisions to 10, and hit Apply.

Now what I've got is a major grid line every 100 units, and a minor gridlineevery 100 divided by 10, or every 10 units.If you're not quite sure what you're seeing here, you know, you can go scrollingdown into this Display section, and turn on numbers on the axes, and hit Apply, andthat will be a little bit easier for you to get a grasp on how big things are byjust looking at the grid.So I know that the distance from here to here is 1 meter, or 100 centimeters.

Now I am ready to build my tabletop. nCloth only works with polygon objects; youcan't use NURBS, and you can use subdivs, although you can smooth polygon objectsafter they have been built,but you'll always have to start from a polygon object.Drag out to create thatcylinder, release the mouse, that sets the radius, and then I'll click and drag upto set the height, and I have got a primitive cylinder.I'll press the 5 key, so I can see shading.I'll just go into the Shape node here, into this input, and just increase thenumber divisions a little bit, just so it's a little bit smoother around theedges. I'll set that to, let's say, 30, just so it's a little bit smoother. That's my tabletop.

Now I need a tablecloth to drop on it.Go back to the Create menu, Polygon Primitives > Plane, and with nCloth, you'llactually get the best results if you use two-dimensional geometry.In other words, planar geometry; something that has no thickness to it.Later in the course, we'll see how you can create cloth objects that have realthickness, involving using a wrap deformer.But the cloth objects themselves, the ones that are going to be dynamic, shouldreally be two-dimensional, and flat, no thickness, so that plane is perfect for that.

I just want to go into those Inputs once again, and I'll set the Width and Heightto be 200, so that's a pretty big plane; that's 2 meters, or 6 feet on a side.Then I have got the number of subdivisions. This will not deform, because it'sgot no internal geometry. It has to have some grid structure to it in order for it to deform.I'm going to go ahead and select Subdivisions Width and Height, and set thoseboth to a value of 20, and that should be fine.That's a pretty good level of detail for a cloth object.

Another important point about nCloth is that you are going to get best resultsif your polygons are square. That's not an absolute rule, but if the polygonsare long, and skinny, and rectangular, then that's going to negatively affect the simulation.If I had something like this, I would not get a very good result from that, orlikewise, if I had too few divisions running in the other direction.My advice is, try to make them square if possible.Also, try to avoid triangles, or n-gons, which is a polygon with more than four sides.

Just to keep on the safe side, I am going to delete the construction history on these.I have set the level of detail, and I want to protect myself from accidentallychanging the level of detail later, which, if I am not careful about what I'mdoing, I could actually break my simulation.So to prevent any negative outcomes from happening, I am going to delete theconstruction history on my entire scene. Edit > Delete All by Type > History, andnow when I select either one of those primitives, you will see that there is nomore input node, and there's no more parameters, like Radius.

And again, that just to safeguard myself against breaking the simulationlater on.

Resume Transcript Auto-Scroll

Author

Released

11/30/2012

Take an in-depth look at nCloth, the Maya toolkit for simulating high-resolution mesh cloth for 3D characters and animations. Author Aaron F. Ross explains the roles played by the various "actors" in an nCloth simulation, including the nucleus solver, nCloth objects, passive colliders, and nConstraints. The course begins with basic simulations such as flags and ropes, then progresses to building a simple garment, until finally integrating animation and special effects like falling leaves and tearing cloth. Aaron also covers performance optimization techniques such as nCloth and nucleus solver settings, proxy objects, collision layers, the Wrap deformer, and more.