1
$\begingroup$

I would like to have about 20 shapes and animate the target position for those objects. The objects would try to reach those positions, but colliding with each other (instead of going through each other as ghosts).

Is that somehow possible, even if it involves scripting?

enter image description here

So far I've only figured out I can have a dummy with an attractive force, and then all objects try to reach that one dummy. But how could I have one target dummy per object?

Reading old posts I get the impression that one could have forces that are only active in one render layer. Using View Layers in Blender 2.8 doesn't seem to have that effect: the force seems to apply to objects in other view layers too.

$\endgroup$
3
  • $\begingroup$ You should be able to achieve this with Rigid Body Constraints, setting up a Generic Spring between your object and the 'target'. Moving the 'target' and adjusting the spring strengths via keyframes should allow you to influence the object, relaxing the spring strengths will allow the influence to be switched off. $\endgroup$ Commented Aug 1, 2019 at 12:33
  • 1
    $\begingroup$ Thank you Rich! You set me in the right path :) I posted the solution I came up with. $\endgroup$
    – aBe
    Commented Aug 1, 2019 at 22:21
  • $\begingroup$ Fantastic. Glad you’ve solved it - and well written answer :-) $\endgroup$ Commented Aug 1, 2019 at 22:42

1 Answer 1

1
$\begingroup$

The solution, indicated by Rich Sedman (thank you!), is to use Rigid Body Constraints with Generic Springs.

  1. Create 3 cubes
  2. Add Rigid Body to each cube
  3. Create 3 spheres (will act as targets)
  4. Add Rigid Body (passive) to each sphere. Mark it as animated and place it in Collections 2 to avoid colliding with the boxes.
  5. Add Rigid Body Constraint to each sphere, type Generic Spring. Activate Linear limits in all 3 axes. For Objects set First to the sphere itself, Second to the corresponding cube. Set Stiffness and Damping for Springs > Angular and Linear according to taste.
  6. Put each sphere centered in a cube. If you place the cube under the sphere, it will be hanging. When you animate the sphere position the cube will follow, hanging under it. I wanted to avoid that, so it doesn't feel like marionettes.
  7. Animate the sphere positions so they pass near other spheres. The Cubes will collide and avoid each other.
  8. Disable gravity (optional).

What's missing for me is to figure out the right values for the constraints so the motion feels right.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .