Increasing gravity to 900

Hi,

For an special use, I need to increase gravity to 900, but it is limited in the range (-200,200).
I’ve searched through the file “properties_scene.py”, however, I could not find any limits for that to change it,

Any help?

Thank you very much indeed beforehand.
Ehsan

Hi

you may need to change the following source code

line 9632 source\blender\makesrna\intern\rna_scene_gen.c


FloatPropertyRNA rna_Scene_gravity = {
	{(PropertyRNA *)&rna_Scene_use_gravity, (PropertyRNA *)&rna_Scene_unit_settings,
	-1, "gravity", 8195, "Gravity",
	"Constant acceleration in a given direction",
	0, "*",
	PROP_FLOAT, PROP_ACCELERATION | PROP_UNIT_ACCELERATION, NULL, 1, {3, 0, 0}, 3,
	rna_Physics_update, 0, NULL, NULL,
	offsetof(Scene, physics_settings.gravity), 4, NULL},
	NULL, NULL, Scene_gravity_get, Scene_gravity_set, NULL, NULL, NULL, NULL, NULL, NULL, <b>-200.0f, 200.0f, -200.0f, 200.0f</b>, 10.0f, 3, 0.0f, rna_Scene_gravity_default
};

and rebuild blender. No guarantees that this will work.

Is there any other simpler way (with more guarantee)?

change scale of objects? (factor 0.22 =~ 200 / 900)

seems good, but, I have almost thousand objects,
Do you know how to apply scale to all of those object with one command?

A simple test with a cube scaled to 0.02 falls at the same rate as default cube scale 1… well close enough, which is kind of what you’d expect with gravity.

Do you know how to apply scale to all of those object with one command?

Save a copy of your .blend, then select all objects. Shift+C to recenter, set pivot point to 3D Cursor, hit S and type 0.22, enter. That should scale everything you selected. If you got keyframed loc/rot/scale properties, it won’t work of course.

If you are to scale anything it would be the time scale, scaling the size of the objects will have no effect what so ever on the effect of gravity. It will change their size not their speed.

Remember these?

http://upload.wikimedia.org/math/4/3/6/436357594271ec28379aa9b0e6342b5a.png

If we have two cases a gravity of 10 and a gravity of 100 over a time period of 10 with no initial velocity from equation 2, will fall 500 and 50,000 units respectively.

Or put another way to make a simulation with gravity 10 that travels 500 in 10 seconds appear that it is travelling with gravity 100 it would take sqrt(2s/a) or 3.17 seconds.

I doubt even scaling the time however will make a physics simulation appear to be 10 times the gravity, especially if motion is involved. Out of interest what exactly is the “special use” that requires a gravity of 900?

PS

Another way to scale all objects is to select them all, parent them to an empty then scale the empty.