Long thin objects are very unrealistic

Physics APIs, Physics file formats, Maya, Max, XSI, Cinema 4D, Lightwave, Blender, thinkingParticles™ and other simulation tools, exporters and importers
fast solve
Posts: 16
Joined: Tue Jan 02, 2007 1:57 am

Long thin objects are very unrealistic

Post by fast solve »

It is nearly impossible to, in real life, spin a pencil fast enough to keep it from falling over. But this simulated cylinder does stay up for a while with only a gentile spin. YES I remembered to do alt+r and ctrl+a after scaling the object. I know it's a LOT bigger than a pencil, but even an object this size shouldn't behave this way.


heres the blend: http://uploader.polorix.net//files/52/unrealistic.blend
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Post by Erwin Coumans »

Bullet favors stability over realism.Gyroscopic (Coriolis, velocity dependent) forces are not modeled at the moment.

This is added to the Physics Tips:
http://www.continuousphysics.com/mediaw ... ysics_Tips

Bullet might improve in this area, in the future.

Thanks for the feedback,
Erwin
fast solve
Posts: 16
Joined: Tue Jan 02, 2007 1:57 am

Post by fast solve »

From analysis of the problem, I found that objects don't precess ever if no torque is on them. In real life they do if they have different moments of inertia. Maby Euler's equations can help.

Newton game dynamics suffers from the same problem.
bone
Posts: 231
Joined: Tue Feb 20, 2007 4:56 pm

Post by bone »

ODE has a #define dGYROSCOPIC if you need gyroscopic precession. It seems like a relatively easy change, I'm sure Erwin is aware of what he would need to do. But it is less stable as he says, and typical game physics require stability.
fast solve
Posts: 16
Joined: Tue Jan 02, 2007 1:57 am

Post by fast solve »

My father worked out the math, and we programed in a solution, and objects spun out of control. But we made the precession calculation second order, and it works great as long as objects don't spin too fast.
fast solve
Posts: 16
Joined: Tue Jan 02, 2007 1:57 am

Post by fast solve »

This is a semifinal version, I promised it today, and I'll "publish" the final tomorrow. I'm pretty sure this works, me and my father used the file from Blender 2.43. If you have any trouble PM me right away.

http://uploader.polorix.net//files/52/btRigidBody.cpp

Just replace the CPP file in src\BulletDynamics\Dynamics with this.

The final will include a build (2.43, I can't compile 2.44), this file with descriptive comments, and a .blend with accurate physics baked into IPO for several examples.

Since humans don't usually see objects tumble freely for 10 seconds, at first glance some of the motions may appear a bit unrealistic, but it has held up to my most brutal physics tests.

Note: It doesn't merely estimate the precession, it uses a stable, robust RK4 model that works in any case (long thin, short fat, bricks, free rotation, touching ground, etc.).

I don't quite know how much this precession fix slows down the speed, but it is a small change, especially small for large scenes with high collision count.

I wanted to PM Erwin but couldn't.
fast solve
Posts: 16
Joined: Tue Jan 02, 2007 1:57 am

Post by fast solve »

Final Version:

http://www.graphicall.org/builds/builds ... how&id=451

It's very stable and accurate physics, with a negligible simulation speed slow-down.