2
$\begingroup$

I'm making a scene with multiple gravities affecting different objects that can interact with each other (those gravities are going in two different directions so I can't just cheat by changing an object's mass, since blender doesn't allow for negative mass values) and I want both gravities to work in the way the Gravity under the Scene tab works (a vector who's magnitude is the acceleration).

I read this but both answers present a problem for me--dampening doesn't alter the direction and force fields are fundamentally different from Blender's gravity (they pull towards a particular point or surface rather than a direction in general and the distance between them and the object just complicates things).

Is there any way I can actually set up multiple gravities for different objects or, if not, figure out a cheat to make force fields behave just like Blender's gravity (i.e. a vector who's magnitude is the acceleration and is not dependant on location)?

$\endgroup$
  • $\begingroup$ Can you tell us more about these objects? Regular Meshes. Are they Particles? Fluid Simulations? Smoke Simulations? Many times I am not allowed to reveal everything about the Blender Scene. Yet more description would help. $\endgroup$ – atomicbezierslinger Mar 21 at 17:54
  • $\begingroup$ You do know that there is a world gravity which has dominance by default. It can be turned off as well. Then a local gravity can take place. In some circumstances. If I have more time I will make more comments. Also not the links on the right side of this web page. $\endgroup$ – atomicbezierslinger Mar 21 at 18:07
  • $\begingroup$ Does interact mean visible collisions or something less demanding? Less Demanding might mean visible near each other and no collision. $\endgroup$ – atomicbezierslinger Mar 21 at 18:14
  • $\begingroup$ @atomicbezierslinger I'm looking for a general solution, so that, assuming I have a scene feature regular meshes, particles, and fluid and smoke simulations, am able to have any combination of those. Interaction in this case does mean rigid body, soft body and fluid collisions. $\endgroup$ – thepufferfish Mar 22 at 0:36
  • $\begingroup$ @atomicbezierslinger I'm not entirely sure what you mean by 'local gravity.' As I've said, force fields do not behave like the world gravity under "scene," so I don't want to use them. I'm looking for a way to set up multiple gravities that all function like the world gravity: it applies to all areas of space in the scene the same (there is no actual coordinate location for the source of gravity), and I can alter a the direction and magnitude of a constant acceleration (two objects of differing height will fall with the same acceleration with the world gravity but different with force fields). $\endgroup$ – thepufferfish Mar 22 at 1:00
1
$\begingroup$

You can actually achieve this with force fields - providing all your objects have the same mass (or a limited range of masses so that you can have a range of forces - one set for each mass in each direction of simulated "gravity") - similar to the linked answer.

In order for the force to not fall off over distance (so it doesn't ebb away the further away from the force) you need to ensure the falloff power is 0. The strength of the force falls off based on the distance as Force = strength * distance^power (where ^ is 'raised to the power of' - sometimes written as **) - so a power of 0 results in a constant force, irrespective of distance.

For a force that doesn't repel from a single point, use a 'Plane' force - ensuring that the Z direction of the force object is in the desired direction of the force (it can be useful to change the Empty display of the force to 'Arrows' to be able to see the direction of the force 'empty').

Then all that is required is to place the forces and objects on multiple render layers (since forces only affect those objects on their own layer) - so all objects and the associated force that want to experience one 'direction' of gravity on one layer, the next set on another layer, etc.

setup

This can produce the following result :

result

Note that this is not 'true' gravity as the force experienced by each object will be affected by its mass. To work around this, you can create a separate force per set of masses (so objects with half the mass should be paired with a force of half the strength) - obviously this will only work if you have a very limited set of masses.

Blend file included

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.