CGTalk > Software > Autodesk Maya > Maya Dynamics
Login register
Thread Closed share thread « Previous Thread | Next Thread »
 
Thread Tools Search this Thread Display Modes
Old 09-13-2007, 01:16 PM   #1
NEO^AMiGA
Frequenter
 
Join Date: Jan 2004
Posts: 196
Send a message via ICQ to NEO^AMiGA
Question Where's the nCloth commands in the Maya command documentation? Does Duncan know?

Is it just me... Or did they forget to put the nCloth commands in there? Can't find any of them in the command-documentation. Isn't that a bit odd?
__________________
/NEO
 
Old 09-13-2007, 02:30 PM   #2
NEO^AMiGA
Frequenter
 
Join Date: Jan 2004
Posts: 196
Send a message via ICQ to NEO^AMiGA
Since I am pretty certain Duncan will read this sooner or later I must add that there probably are some minor bugs in the createNCloth command. When I create a bunch, 30+, nCloth's in my script with this little snip from my code:

Code:
//create nCloth for($j = 1; $j < ($inputCoins + 1); $j++){ select ("polyCoin" + $j); createNCloth 0; //parent to proxyCoin group select -cl; select ("nCloth" + $j); select -add "proxyCoins"; parent; }


Both nClothShape<number>.thickness and nClothShape<number>.pushOutRadius are randomised. Not that much of a difference on the values but I think it's enough for beeing visible.
__________________
/NEO
 
Old 09-14-2007, 01:08 AM   #3
Duncan
Expert
 
Duncan's Avatar
Duncan Brinsmead
Principal Scientist
Autodesk
Canada
 
Join Date: Jun 2002
Posts: 2,984
The thickness and pushout are not randomized... rather they are based on the triangle density and size of your object. This is to try to provide an optimal default collision thickness and method. The nCloth creation methods are entirely mel scripts. They create the nCloth with calls like "createNode -type nCloth" and then do connectAttrs to manage all the connections and parenting. Other commands in Maya are frequently true c code calls with flags and options. These ones automatically get added to the command documentation, whereas the mel ones do not. However we probably should document them. You could submit a bug report on this if desired. (help menu:report a problem)


One thing you may consider if you have lots of coins: do poly combine on them before making nCloth. This will tend to solve much faster and will only need one cloth node. However this will not work if you plan on using rigidity( the entire mass of coins would become rigid ). One relatively efficient way of doing a lot of coins might be to make a bunch of circular poly faces, combine them, make that cloth with lots of bend stiffness and high substeps, then extrude the output mesh to give the coins thickness.


Duncan
 
Old 09-14-2007, 04:50 AM   #4
NEO^AMiGA
Frequenter
 
Join Date: Jan 2004
Posts: 196
Send a message via ICQ to NEO^AMiGA
Morning Duncan!

Thanks for your answer! =)))

But if I with mel-script duplicate an object, then the triangle density and size would be identical on all those objects. Shouldn't the thickness and pushout then be identical if I make all those objects into nCloth objects?

Regarding the coins. I'm afraid they have to be rigid. This is mostly a test to see if I can recreate a setup that was made with rigidBodies. The thing is that it is scripted so at first maybe 5 coins falls down and creates a stack. Then maybe 10 coins falls down upon that. And after thay maybe just 4 coins falls down on the stack. So from a user interface one set how many coins that falls down and at what frame.
The old rigidBodies have not been the best for this. Have had some bad penetration problems (ehrm... with the objects that is ) wich kina forced me into splitting the whole dynamic simulation into several steps. So I was curious how nCloth would work in that case. But I do have to control the rigidity or some other atttribute so I know when the object dynamically simulates and when it's not. So I can controll when the individual coin fall and when they don't fall.

Regarding the documentation. Oh. I c. So then I can't create an nCloth object and set the attributes on the "nCloth call". However a better doumentation on those commands would be nice. I'll report a bug for i. =)

Thanks a million Duncan for taking your time and helping out on this wonderfull site.

Quote:
Originally Posted by Duncan
The thickness and pushout are not randomized... rather they are based on the triangle density and size of your object. This is to try to provide an optimal default collision thickness and method. The nCloth creation methods are entirely mel scripts. They create the nCloth with calls like "createNode -type nCloth" and then do connectAttrs to manage all the connections and parenting. Other commands in Maya are frequently true c code calls with flags and options. These ones automatically get added to the command documentation, whereas the mel ones do not. However we probably should document them. You could submit a bug report on this if desired. (help menu:report a problem)


One thing you may consider if you have lots of coins: do poly combine on them before making nCloth. This will tend to solve much faster and will only need one cloth node. However this will not work if you plan on using rigidity( the entire mass of coins would become rigid ). One relatively efficient way of doing a lot of coins might be to make a bunch of circular poly faces, combine them, make that cloth with lots of bend stiffness and high substeps, then extrude the output mesh to give the coins thickness.


Duncan
__________________
/NEO
 
Old 09-14-2007, 01:17 PM   #5
Sphere♥
Know-it-All
 
Sphere♥'s Avatar
 
Join Date: Feb 2005
Posts: 450
Hi, perhaps you are not working on coins (as you mention this was just a test), but if you are, consider using Nima Physx, I did a test a while ago with hundreds of coins using Nima and it ran real-time: coin drop playblast.
 
Old 09-14-2007, 01:30 PM   #6
NEO^AMiGA
Frequenter
 
Join Date: Jan 2004
Posts: 196
Send a message via ICQ to NEO^AMiGA
Holy MOLY!!! WOW! But that is a HW/SW-solution...? Right?


Quote:
Originally Posted by Sphere♥
Hi, perhaps you are not working on coins (as you mention this was just a test), but if you are, consider using Nima Physx, I did a test a while ago with hundreds of coins using Nima and it ran real-time: coin drop playblast.
__________________
/NEO
 
Old 09-14-2007, 01:37 PM   #7
Sphere♥
Know-it-All
 
Sphere♥'s Avatar
 
Join Date: Feb 2005
Posts: 450
No, it's pure software and it's a free plugin!
 
Old 09-14-2007, 01:42 PM   #8
stantang
New Member
portfolio
Stanley Tang
Director
Eyedation Creative
Hong Kong
 
Join Date: Oct 2003
Posts: 20
I want to add that you can bake the Physx simulation out for render. It's very fast for non-precise rigid body sim.
 
Old 09-14-2007, 01:52 PM   #9
NEO^AMiGA
Frequenter
 
Join Date: Jan 2004
Posts: 196
Send a message via ICQ to NEO^AMiGA
Oh... I got the impression that I need a AGEIA PhysX card for it to work in realtime? But that is not the case then?

You say non precise animation? What I need to animate has to be precise in the meaning that I must have control over objects so I can key them to be rigid or not. I will take a look at this plugin. Looks great!
__________________
/NEO
 
Old 09-14-2007, 02:10 PM   #10
Sphere♥
Know-it-All
 
Sphere♥'s Avatar
 
Join Date: Feb 2005
Posts: 450
I don't think Nima even supports the PhysX card at this time... it is using the Ageia software physics engine, and it's just very fast and efficient.

I don't know what stantang means by "non-precise"? I find Nima precise, in fact it will hold up a lot better than Maya's rb solver, which will often just fail or give up under stress. Perhaps he means the way PhysX handles collisions, they are more like a hard spring collision, so there can be a minor degree of interpenetration (but it never fails like Maya rb solver's interpenetration errors), it looks very realistic to me. Just make sure your objects have realistic sizes and thickness, like don't use a 2D poly plane for a floor, use a block, or better yet, use a PhysX box primitive.
 
Old 09-14-2007, 02:18 PM   #11
NEO^AMiGA
Frequenter
 
Join Date: Jan 2004
Posts: 196
Send a message via ICQ to NEO^AMiGA
I have started to test with it now. This is IMPRESSIVE! Though there ain't a 64bit version but at this speed I can live with two mayas installed. =)

To bad I started to test this 2 hours before the weekend. Now I will be glued infront of the computer all weekend! =) Have not looked at the documentation yet but I hope all commands are well described so it can be used in larget scripts. =)

Quote:
Originally Posted by Sphere♥
I don't think Nima even supports the PhysX card at this time... it is using the Ageia software physics engine, and it's just very fast and efficient.

I don't know what stantang means by "non-precise"? I find Nima precise, in fact it will hold up a lot better than Maya's rb solver, which will often just fail or give up under stress. Perhaps he means the way PhysX handles collisions, they are more like a hard spring collision, so there can be a minor degree of interpenetration (but it never fails like Maya rb solver's interpenetration errors), it looks very realistic to me. Just make sure your objects have realistic sizes and thickness, like don't use a 2D poly plane for a floor, use a block, or better yet, use a PhysX box primitive.
__________________
/NEO
 
Old 09-14-2007, 04:12 PM   #12
Duncan
Expert
 
Duncan's Avatar
Duncan Brinsmead
Principal Scientist
Autodesk
Canada
 
Join Date: Jun 2002
Posts: 2,984
I agree that you should be looking at dedicated rigid body solvers for this sort of thing. However for fun I created the following tutorial showing how nCloth can be used relatively efficiently for a large number of coins. A side benefit is that you can easily do things like bend or melt the coins. There is a file you can download and try out.
http://area.autodesk.com/blogs/blog/7/blogpost/5248/

Duncan
 
Old 09-14-2007, 04:46 PM   #13
NEO^AMiGA
Frequenter
 
Join Date: Jan 2004
Posts: 196
Send a message via ICQ to NEO^AMiGA
WOW! Duncan... You are insane! And I mean that in a totaly good way. =))) Thanks a million. I will for sure take a closer look at that scene.

Quote:
Originally Posted by Duncan
I agree that you should be looking at dedicated rigid body solvers for this sort of thing. However for fun I created the following tutorial showing how nCloth can be used relatively efficiently for a large number of coins. A side benefit is that you can easily do things like bend or melt the coins. There is a file you can download and try out.
http://area.autodesk.com/blogs/blog/7/blogpost/5248/

Duncan
__________________
/NEO
 
Old 09-14-2007, 04:57 PM   #14
Sphere♥
Know-it-All
 
Sphere♥'s Avatar
 
Join Date: Feb 2005
Posts: 450
Quote:
Originally Posted by Duncan
[...]I created the following tutorial showing how nCloth can be used relatively efficiently for a large number of coins. A side benefit is that you can easily do things like bend or melt the coins.[...]
Nice, thanks.
 
Old 09-15-2007, 04:55 PM   #15
Als
Expert
portfolio
Aleksandar Stiglic
digital artist, 3D
United Kingdom
 
Join Date: Apr 2003
Posts: 1,922
If you need thousands of coins, as I did, you might check this thread:

http://forums.cgsociety.org/showthr...912#post4649912

it will continue, how to bake it, when I get to it on monday...


Als
__________________
"No Bucks, NO Buck Rogers!"

VFX rule no. 387
# Just redo it!

 
Thread Closed share thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 02:57 PM.


Powered by vBulletin
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.