I have a lot of springs, connected in between cubes. These cubes are next to each other. How can I make the springs stretch and squeeze with stiffness, depending on the cube movements? With constraints or with physics? enter image description here

  • $\begingroup$ It could greatly depend on the degree of realism, versatility and easiness you wish, since you have three ways: simulation (physics), constraints (dynamic rules), and animation (static rules). Animation is "easier" to setup but gives "easily" less natural results not versatile at all, though if you can simulate the spring behaviour in the "blender game" mode, there you can automatically "record" the animation steps, frame by frame, and the reuse it in the animation. $\endgroup$ – m.ardito Oct 13 '15 at 16:01
  • $\begingroup$ for the last part, see this also: homepages.ihug.co.nz/~m_collett/blender/spring4.html or search similar tutorials $\endgroup$ – m.ardito Oct 13 '15 at 16:03

The stretching of the springs can be accomplished through the 'stretch to' constraint.

The motion of the cubes driven by the springs can be generated using Blender physics.

The animation, generated in Blender 2.76, uses rigid body physics to solve for the motion of the cubes and uses the 'stretch to' constraint to stretch the springs.

enter image description here

The steps to generate this kind of animation are:

  1. Add three cubes to the scene. Name the cubes 'top', 'mid', 'bot'. These will be the red, green, and blue cubes in the animation.
  2. In the physics tab, add rigid-body dynamics to each cube. Add rigid-body constraints. Setup spring constraints between each cube. For the top cube (the red one in the animation, check 'Animated'. This setup will animate the cubes moving up and down, driven by the springs.

    Physics settings

  3. Add 4 empties to the scene. The empties will be used to locate the ends of the spring on the cubes. Name the empties as follows: top-lower, mid-upper, mid-lower, bot-upper. These empties are placed at the upper and lower face of the cubes. The image below illustrates the placement on the bottom of a cube.

    Empty on bottom of cube

  4. Create the spring so it aligns with the y-axis. Parent the spring to the empty on the bottom of the cube. Repeat this each cube.

    Spring parented on the bottom

  5. Add the 'Stretch To' constraint to each spring. Chose the empty on the upper part of the cubes as the target.

Spring Settings

  1. Now, if the animation is started, the results should resemble the animation.

The blend file for this animation is:


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.