PDA

View Full Version : nCloth - translation through wind / air field?


Soulcialism
05-15-2007, 01:25 AM
Hey everyone,
I'm trying to pick up enough basics about nCloth to do this, but I'm kind of stuck and there's not much documentation / web resources to draw from about nCloth yet...

I've got this situation where I want to blow a hemisphere like a parachute or an upside down bag - I want wind to fill it and billow out, and have it translate down an axis as it flows to the ground via gravity. The nucleus node gives me wind and gravity fields, which work well, but the wind field only seems to affect the object in-place, i.e. it does not translate it down the specified axis. It only translates towards the ground by virtue of the gravity field.

Also, somewhat related, I can't seem to get any of the other fields to influence the nCloth at all. I've tried disabling gravity and adding my own gravity field, but this does not affect the object, even though there are connections between the cloth object and the dynamics field in the hypergraph. Same with turbulence, newton, and others. Curious...

Has anyone accomplished similar simulations and would you be willing to clue me in on how i can acheive this kind of thing? Thanks!

Duncan
05-15-2007, 05:35 PM
The wind direction will push the cloth in the direction specified... I'm not sure what the problem is you are encountering. Perhaps the cloth is a bit too massive( thus requiring a hurricane to blow it... forces would need higher magnitudes to push it as well ). You could either lower the mass, increase the lift/drag or increase the air density(or use a very high wind speed). The other thing you might try is to raise the tangentialDrag on the cloth to about 0.1 (at a value of 1 the drag is omnidirectional). By default there is no drag parallel to the surface, as if the surface were totally slippery and smooth. In reality there is usually some drag in this direction.

It is odd the fields do not seem to work for you. The following workflow works for me:
Create a plane and make nCloth. Playback (falls).
Make gravity zero. Playback( stationary )
Select cloth mesh and do fields:gravity. Playback (falls at same speed as before)

In terms of filling a parachute, just keyframe the pressure attribute up a little to inflate and then key back to zero to allow to deflate.

Duncan

Soulcialism
05-15-2007, 08:50 PM
Hi Duncan,
I was able to get better results by generally lowering my values... I think my values for Mass were way too high, and as a result my wind values were really high too, even though they weren't really doing much. By bringing those down I got much better results. Also the lift / drag / air density made a big difference as well.

Thanks for your help.

Re: the fields thing, I tried following your workflow and still cannot get them to work. I may not need them to achieve what I need, but I'm still curious why they wouldn't be working. Here's my workflow

- create a plane
- make nCloth (tried both local space and world space)
- playback, it drops and hits the ground
- turn off gravity, playback, nothing happens
- tried selecting both mesh and nCloth node and then creating field while selected, can't get playback to work with either.

There's no sort of 'enable external dynamics' field that I'm missing or something?

Duncan
05-15-2007, 09:36 PM
Perhaps you have a large scene scale... the attenuation on the constraints is relative to worldspace distance. However the gravity field by default has no attenuation. (were you testing with a gravity field?) Also some fields push relative to mass, but gravity has the same push regardless of mass( as Galileo demonstrated ).
You might also try temporarily renaming your prefs and running with defaults.

The only other thing I can think of is that you might have an old dynamics mel script (one of the ones that handled field connections) lying around in your script path. Does the nCloth node have connections to the field after you apply the field? (editor:hypergraph connections)

If you can't solve it, it would be good to submit a bugreport with your prefs and configuration.

Duncan

Soulcialism
05-15-2007, 09:58 PM
This is a fresh install of 8.5 as of Saturday, and I accepted the default prefs upon startup (I actually had a seperate problem where I couldn't even access the nCloth menus because I had initially used my Maya 7.0 prefs... had to delete them and then let 8.5 create prefs for me).

My units are centimeters currently, but as you explained it doesn't sound like gravity should affect that.. I also set the space scale node to .01 to reflect my cm settings. If I create the gravity field, I do see several connections hooked up to the nCloth node, 2 inputs to the grav field and 1 back into the nCloth node. I attached a screenshot of the hypergraph.

Seems like most options are expended... Maya help makes it seem like it should 'just work' and from what you're saying, it sounds the same way. Can I submit bugs through Autodesk's web site?

Duncan
05-15-2007, 10:06 PM
Your node setup looks OK. You should get lots of force from the field, but I suppose you could try extremely high magnitudes to see if it has any effect. Perhaps you still have a bad install with some old dlls hanging around.

You can report a problem from off of the maya help menu.

Duncan

Duncan
05-15-2007, 10:24 PM
One other thought... you mentioned setting the spaceScale to 0.01. This increases the effect of the built in gravity by a factor of 100(this is the primary effect of this attribute). However it does not compensate for normal Maya fields. Thus when you run with a gravity field you would need to increase its magnitude by a factor of 100 to see the same effect.

Duncan

Derek Wolfe
05-15-2007, 11:30 PM
Make sure to show "nCloths" in the maya panel, "show" menu.
If I do not have them showing, external fields do not work for me.

Soulcialism
05-16-2007, 01:07 AM
There must be something up with my local setup, I tried setting magnitude way up and still got no influence whatsoever, and I verified that the nCloth is viewable in my panel, still nothing...

I submitted an Autodesk bug for that, but I'm able to work around it with the nCloth native fields, so thanks again for your advice Duncan.

Duncan
05-16-2007, 05:47 PM
Derek... I've entered a bug on fields not working when the nCloth is not displayed. Thanks for pointing that out. If the nCloth node icon (small circle with crosshair) does not appear in the viewport then the field will have no effect.

Duncan

Derek Wolfe
05-16-2007, 06:20 PM
Duncan.

Glad to help.

Soulcialism
05-16-2007, 09:37 PM
I was able to figure out what my problem was with Autodesk's help: I was turning off the entire nucleus node, so no solving was happening at all. I thought I was just turning off the dynamics which were part of the nucleus node, but I was actually turning the whole thing off (woops). I didn't realize that the proper way to turn it off was to zero out the values for both gravity and wind... learn something new every day.

CGTalk Moderation
05-16-2007, 09:37 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.