Integrating 3D models with photography
Interested in integrating your 3D work with the real world? This might help
# 1 09-04-2011 , 05:28 AM
Perfecto's Avatar
Registered User
Join Date: Mar 2007
Location: TN (USA)
Posts: 1,889

Gravity v/s FPS

I thought I understood gravity fields pretty well until today. If I apply a gravity field to a 1" diameter sphere, default settings on gravity, then the rate of fall looks realistic as long as I play the animation with a setting of "play every frame". But if I play the animation at 24fps, it's way too slow. I can make it look right if I increase the gravity's magnitude dramatically but that would result in other problems.

My question is, how do I use gravity correctly for an animation that is 24fps?


Don't be satisfied with what you can do but rather strive to do the things you can't do!
Exceed Expectations!
# 2 09-04-2011 , 07:53 AM
LauriePriest's Avatar
Moderator
Join Date: May 2003
Location: London
Posts: 1,001
Sounds like its a scale problem. What units are you working with? One way to sort out scale issues really quickly without changing much is to use velocity scale on the nrigid solver instead of changing your gravity magnitude as this will just make every force bigger.

Alot of people use 10:1 units scale when working with maya which means leaving the units at cm but seeing every 1 maya unit as 10 cm, just looks better me thinks.

Remember that play every frame will run through the time line as quickly as it can so the result you see is of arbitary speed, and you cant really judge the movement of anything with it. I advise you to cache out all the dynamics as you test and use real time playback to judge the results.


FX supervisor - double negative
# 3 09-04-2011 , 02:01 PM
Perfecto's Avatar
Registered User
Join Date: Mar 2007
Location: TN (USA)
Posts: 1,889
Thank you very much LauriePriest. My scene was set to inches and I was using a 1:1 scale. I checked the animations using playblast. I tried adjusting the velocity scale on a falling sphere and there was no difference between Velocity scale of 1 and 10000. I created a uniform field on another sphere and changed it's attributes to simulate gravity but it gave the same results. Velocity scale didn't effect it. Am I changing it in the wrong place?

Attached Images

Don't be satisfied with what you can do but rather strive to do the things you can't do!
Exceed Expectations!
# 4 09-04-2011 , 04:37 PM
Perfecto's Avatar
Registered User
Join Date: Mar 2007
Location: TN (USA)
Posts: 1,889
I tried the 10:1 scale but with bad results. I created a 1" diameter ball in 10:1 scale (using cm) and then created a spiral slide. I attached gravity to the ball, assigned passive to slide and it wouldn't solve the animation. Without the slide, the ball fell realistically. However, it didn't seem to like interacting with other objects. When I increased the size of the slide, dramatically, Maya solved the animation. But if I increase the size of the objects, I'm back to square 1, lol.


Don't be satisfied with what you can do but rather strive to do the things you can't do!
Exceed Expectations!
# 5 09-04-2011 , 07:49 PM
Perfecto's Avatar
Registered User
Join Date: Mar 2007
Location: TN (USA)
Posts: 1,889
Still playing around with Maya's Gravity. I did some tests.

Gravity: 9.8
Expected distance an object should fall in 5 seconds=~122meters.

1:1 scale (cm): Sphere falls 124cm or 1.24 meters.
1:1 scale (inch): Sphere falls 47.5in or 1.21 meters.
1:1 scale (meter): Sphere falls 1.21 meters.

According to my findings, it looks like the gravity scale is off by a factor of 100. So to have a realistic animation, all my objects would need to be 100:1 scale which to me sounds pretty crazy.

Can anyone confirm this or is Maya just not working correctly for me?


Don't be satisfied with what you can do but rather strive to do the things you can't do!
Exceed Expectations!
# 6 09-04-2011 , 08:28 PM
Perfecto's Avatar
Registered User
Join Date: Mar 2007
Location: TN (USA)
Posts: 1,889
Did several tests with different scene settings. In all tests, I created objects 100x smaller than they should be and the results were realistic gravity animation.

Since gravity acceleration is tsquared, I did tests with objects at regular sizes but ran the animations with the assumption of 240 frames per second of animation. The results were identical to the tests with objects at 100x smaller.

My conclusion:
To get accurate gravity simulation in Maya, your model/scene needs to be 100x smaller than actual sizes.

-or-

Render out your animations at 240 frames per second, lol.

(Edit: or you can use a gravity magnitude of 9.8 x 100=980.)

All I can say is Hmmmmmm.


Don't be satisfied with what you can do but rather strive to do the things you can't do!
Exceed Expectations!

Last edited by Perfecto; 09-04-2011 at 08:48 PM.
# 7 10-04-2011 , 11:17 AM
LauriePriest's Avatar
Moderator
Join Date: May 2003
Location: London
Posts: 1,001
Ahh soz, mixing scale velocity with a similar characteristic in houdini. Scale vel just scales the display of velocity rather than the velocities themselves.

100:1 sounds crazy,
Rendering animations at 240 fps is also ott and not practical,
Also remember changing gravity 10 fold might make it feel accurate but thats only the one force and isnt really a practical way to tackle a scale issue.

The reason your slide setup might have broken is that your tolerance was too high, if its what it should be its a value that will tell maya to not bother solving a force if its below a certain strength, so when you working on a 10:1 scale and its not solving its just because maya isn't expecting forces of that size and considers them a waist of calculation and doesn't bother.

TBH the maya rbd solver is a little crap, bullet is really good if you can get your hands on it, really fast and stable.


FX supervisor - double negative
# 8 10-04-2011 , 01:09 PM
Perfecto's Avatar
Registered User
Join Date: Mar 2007
Location: TN (USA)
Posts: 1,889
Very helpful info, thanks a whole heap. I'll see if I can get bullet and test it out.


Don't be satisfied with what you can do but rather strive to do the things you can't do!
Exceed Expectations!
Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads