Nucleus and nCloth in Maya8.5

By -
Duration
3 mins
Last modification: 2 Jan, 2018

Now that Maya 8.5 is out I finally have an opportunity to update this blog. I have been working on the nCloth feature and now that it is in user hands I hope people will have fun with it. NCloth is the first thing in Maya to use our new Nucleus solver framework. Over the next few weeks I hope to populate this blog with several tutorials on nCloth. To start the ball rolling we've put some some attribute presets for the nCloth node on the bonus tools page: bonus tools To use first unzip this file and place the folder "nCloth" inside the folder "presets" in your maya install location. In Maya select a mesh and do "nCloth: Create nCloth". In attribute editor for the nClothShape when you click on the button "Presets" the new presets should appear. Simply select a preset to apply it to that cloth. Note that these preset files do not set all attributes on the cloth node, but just a relevant subset. Thickness and self collide settings are generally not affected, for example. Also all these presets set the scalingRelation attribute to "object space". This allows the stretch to be more or less constant when applied to meshes of different resolutions. Note that it is usually important to get the sense of gravity right for the scale of your objects. By default things are set up with the assumption that units are meters ( the actual Maya unit setting, which defaults to centimeters, is ignored by Maya dynamics). If your object is modeled with the sense of units being centimeters then the gravity will be off by a factor of 100. To compensate set the spaceScale to 0.01 on the nucleus node. This will make the gravity much stronger, and one may need both higher stretchResistance, constraint strength levels and subSteps as a result. In general high gravity is harder to simulate with, especially with detailed cloth meshes. Also note that if one is putting clothing on a mouse then the effective gravity is even higher due to the small scale( a piece of cloth will fall from head to foot of a mouse in the blink of an eye ). In such situations it might make more sense to work with lower gravity, simulating more of a human scale and making solving easier. Also note that lowering gravity is also roughly equivalent to slow motion. In some cases low gravity can provide more interesting, flowing results.

Posted By
Published In
Tags
  • nCloth
15 Comments
To post a comment please login or register
| 8 years ago
very good
| 8 years ago
it is so helpful to fresher people like me
| 8 years ago
it is so helpful to fresher people like me
| 10 years ago
thank you so much , I try to find out this tutorial for many time.
| 11 years ago
thanks for your response. Lowering the mass would also mean more flap and more tiny wrinkles, or am i wrong? In my "experiments" (i still have to call it that way, i´m not intuitive here yet) i raised the mass up, to "calm" the tiny and small wrinkles down, it´s at about 3.5. If this unit is kg it´s a quite heavy flag, for sure (is it kg?). The resolution is already quite high (above 7000 quads), sized 2.0 * 0.8 units (so, 2m times 0.8m). If i now lower the mass again, and reduce some amount of wind, how can i prevent those tiny wrinkles happening, if the cloth is very thin? And last question: don´t i have to also tweak the other resistances, compression, bend - and the damping? Thanks for your help! I Stefan
| 11 years ago
I can't upload that example at the moment, however some things to try: *lower the mass of the cloth (will have more drag and lift) instead of increasing the windspeed.. too much flapping is a sign of heavy cloth in a hurricane *increase the resolution of the mesh and increase the substeps and stretch resistance to better handle the detail mesh. Lower the thickness and use full surface self collisions. *if you want a huge rolling flag then gravity should be relatively low... or simply model at a larger scale, which will have the same effect.
| 11 years ago
Hello Duncan, could you please post this flag example? I´m tweaking a flag-demo here for some hours now, but i can´t get the same nice effect. most of the time, my flag "flaps" to much, i don´t get the nice ripples by the wind flowing through the cloth. thanks in advance Stefan
| 12 years ago
The workflow is outlined in this blog entry: http://area.autodesk.com/index.php/blogs_duncan/blog_detail/a_very_simple_ncloth_flag/ I used a higher resolution mesh than in that example and had higher stretch resistance. The drag, lift, and windspeed are key attributes to adjust for the desired effect. For example one could have lower windspeed with more drag or visa-versa depending on the weight and size of the cloth. Duncan
| 12 years ago
Wow!! Nice flag!! I've tried to make the same effect, but I can't get the same ripples and smoothness... Can you post the scene file?? It would help a lot to understand the whole effect... Thanks in advance!! Regards.
| 12 years ago
One no longer needs bonus tools for the nCloth presets. They have been included with Maya since Maya 8.5 service pack 1. Duncan
| 12 years ago
Joshua.. If you want the cloth to push on a sphere then the sphere must also be nCloth( it does not yet push on standard rigid bodies ). You can use the rigidity attribute on the sphere nCloth to make it stiff. Paul... the example shown has a moderately dense quad mesh with increased substeps and stretch resistance. The output mesh then has a poly smooth applied so the rendering is nice and smooth. A quad mesh provides balanced stretch resistance due to x shaped crosslinks. In addition it results in better surfaces when you do a poly smooth.
| 12 years ago
First allow me to thank you for the great tools! Second; the link "bonus tools" in your post doesn't work for me. Please help. Where can I find the nCloth presets? Pretty please! Many thanks....
| 12 years ago
The flag is a quad mesh. I do a poly smooth on the result, which works better with quads than triangles. Also nucleus internally creates balanced crosslinks for quad meshes( turn on display stretch links on the cloth node to see ). Joshua..for the rigid sphere cloth collision problem try lowering the rigidity on the sphere. In some cases rigidity trumps collisions for larger values(although higher substeps generally fix this). If possible use bend/compression/stretch resistance instead of rigidity. One can also create a componentToComponent constraint for the sphere and use maxDistance on the the constraint to build several internal constraints to make the sphere more rigid. Duncan
| 12 years ago
Great stuff, I've been playing with it already, I saw your demo at siggraph last year and it was amazing. So I have a quick ncloth question for you. I set up a piece of ncloth suspended by a point constain to a sphere at each corner, so the cloth hangs nicely. Now I drop a collision object in this case a sphere into the cloth. The sphere and the cloth interact nicely, until the sphere just keeps falling stretching out the cloth, until finally the ball interpenetrates the cloth and just pops out of the bottom. I have tried a number of different settings from stretch resistance, to rigidity, to adding more substeps to the simulation(and a number of other settings as well). That latter seems to hold the object for longer, yet it still ends up poping out. I assume you've run into this problem before, and was wondering if you had any help full advice. Thanks, Joshua AM
| 12 years ago
great ripples...it makes me wonder how dense the mesh object is....and are you using quads or triangles?
*Save $66 per month on Autodesk's Suggested Retail Price (SRP) when purchasing 1 year term 3ds Max or Maya subscription.