I have a rigid body simulation scaled up 16 times its normal size to get proper collisions and rotations of objects. I am having trouble pinpointing the correct scaling of gravity, however. If gravity is 9.8m/s/s for a scale of 1:1, for a scale of 16:1, would I just multiply 9.8 by 16? Or do I do 9.8^X, where X=4 (the square root of 16), making the scaling exponential?
2 Answers
When you scale your simulation you do not scale the gravity vector. Instead you multiply the simulation speed by the square root of the scale. You can set it in the Rigid Body World settings. For 16x scale you would set "Speed" to 4 to archive the same look.
Make sure to also scale all the masses to get the desired result. Easiest is to use the calculate mass by volume tool after scaling.
16x scale is very high to get good collision. You might want to try setting the collision margin very low and avoid using Mesh collision shapes.
-
$\begingroup$ You can't just confidently say that "16x scale is very high to get good collision" without knowing the scale of the objects beforehand. Anyway, I did some very basic tests with a cube and plane. Plane 9.8 meters below the bottomost part of the cube. 87 frames at 60FPS until it hit the plane. Scaling up the gravity 16X when the scene was scaled 16X seemed to have the same exact frame hit (87), however, setting the speed to 4X did not seem to achieve the same look. It was about 3% off (frame 90). It could be due to how time scale was coded but it seems more inconsistent. Plz cite next time $\endgroup$ Commented Jun 14 at 6:56
-
$\begingroup$ docs.blender.org/manual/en/latest/physics/rigid_body/… $\endgroup$ Commented Jun 14 at 7:09
-
$\begingroup$ Scaling the gravity is wrong. Scaling the time is physically accurate and is used for example for miniatures in movies. If you scale the gravity you will get a less accurate result since it does not adjust for inertia and friction. Think of a scaled up simulation with 0 gravity. Can't scale the gravity to adjust the scale. Obviously there will be some differences between scaled versions since no simulation is 100% accurate. But your "simple" test with a cube is simply wrong and does not prove that scaling the gravity vector works. Your marked solution will lead others to faulty results. $\endgroup$– MkarkusCommented Jun 14 at 16:22
There are two solutions, one with a caveat: You can scale the simulation speed 4X (under rigid body world - settings - speed). This will, however, increase times taken to bake the simulation (possibly linearly longer) and it is inconsistent (there is a small percentage error).
Alternatively, you can increase the gravity the same amount you increase scale. So if you have a project that you scale 16X for simulation purposes, multiply the gravity (if modeled to real-world scales, 9.81 m/s) by 16 as well to get 156.96 m/s.
It has been said that, when you apply a scale like this, you can then select your rigid bodies, press Ctrl+A and Apply Scale and then scale your objects down (16X in this case) and bake the simulation again. However, this can still cause issues with rotations, as Blender doesn't use the applied scale when computing rotations. You should bake the rigid bodies in the 'large-scale' simulation, bake the action (object - animation - bake action), and scale them down afterwards.