Page MenuHome

Physics ignores unit scale
Closed, ResolvedPublic


(Model units centimeters. Scale 0.1)

A simgle ball 10cm diameter placed 1m over a simple plane should free-fall down to the plane in exactly 0.45s (Physics calculation).
At 60fps this should be 27 frames.

In Blender (with simulation speed left to 1) the fall takes 87 frames; as if physics in blender work 3 times slower than in reality.
We could artificially bump the simulation speed to 3, but shouldn't the default be physically accurate to start ?

Related Objects

Event Timeline

Sergey Sharybin (sergey) lowered the priority of this task from Needs Triage by Developer to Needs Information from User.Feb 8 2019, 10:21 AM

Please always attach file which demonstrates the issue.
In my quick experiment rigid body simulation works correct on both 24 and 60 fps. One thing though: changing fps does not invalidate cache, so should be careful there.

I think I triple checked, but there is always the chance I missed a setting somewhere. I am attaching the file here.

When the simulation is run it takes 87 frames to hit the plane. It should take only 27 frames.

Sergey Sharybin (sergey) raised the priority of this task from Needs Information from User to Needs Triage by Developer.Feb 8 2019, 10:51 AM

Ok, now i see what's happening.
The physics works in blender units, prior to the unit system is taking place. In fact, the unit system was originally an interface-only thing, and lots of areas are not aware of this.

In your case the ball is falling from height of 10.5m as seen by the physics.

@Jacques Lucke (JacquesLucke) , is it something fun for you to dig into? If so, please claim the report :)

Sergey Sharybin (sergey) renamed this task from Gravity too slow to Physics ignores unit scale.Feb 8 2019, 10:51 AM

Not sure if this will be fun, but yeah, I will dig into it.

Jacques Lucke (JacquesLucke) lowered the priority of this task from Needs Triage by Developer to Confirmed, Medium.Feb 8 2019, 11:07 AM

Ok, it is a bit frustrating. Mainly because one bullet wiki has been moved but not all pages are back. Therefore many links I find on the topic send me to 404 errors.
Most topics just link to But this page is down and I cannot find any (cached) version of it... (It will take some more time until the information is available again:

I hoped that there is a setting that controls the unit scale inside of bullet. However I could not find any details on that, although sometimes people mention that the unit scale could be set to a cm or so..
In general Bullet seems to have problems when the objects are very small. Therefore scaling everything down as preprocessing for Bullet might not work well (that would probably be a fairly big task by itself).
Also the Unit Scale exists in Blender so that this is not necessary. Maybe one could get around scaling all meshes down using some scaled container, but those still would have to be moved in the right positions, forces have to be changed, ...

Other solutions people suggested are to increase the gravity constant or to run the simulation faster. Both of which aren't real solutions to the problem.

Unless I can find a simple way to set the unit scale in bullet, this project feels like a time sink and is probably not worth the effort for now.
Interestingly, the issue seems to "fixed" in the bullet bug tracker, but the fix only seems to be to scale everything down beforehand and to use smaller time step.

Bullet may be an issue, but isn't this just about gravity which is already user configurable in the scene?

It appears that BKE_scene_unit_scale does not affect velocity and acceleration properties (or vectors in general). So the gravity displayed in the UI is wrong, and that could be fixed at least.

The other problem is more of a design issue, maybe out of the scope of the bug tracker. Currently the unit system only affects display and editing of values, which I think is generally a good thing. But it does mean that if you change the unit scale, gravity will change to a different value. We may want to make an exception for some physics constants.

Brecht Van Lommel (brecht) lowered the priority of this task from Confirmed, Medium to Confirmed, Low.Feb 13 2019, 5:21 PM

I wanted to create "proxy" prop for that but currently python API cannot create "array" properties. It would be helpful if you added this option... (e.g. array=3). Here's relevant C code:

prop = RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_ACCELERATION);
RNA_def_property_float_sdna(prop, NULL, "physics_settings.gravity");
RNA_def_property_array(prop, 3); // -> you cannot do it in python

You have to use a FloatVectorProperty in Python.