From BlenderWiki

Jump to: navigation, search

Stretch To Constraint

Mode: Object and Pose modes

Panel: Constraints (Object context and sub-context, F7, or Editing context, F9, when in Pose mode)

The Stretch To constraint causes its owner to rotate and scale its Y axis towards its target. So it has the same tracking behavior as the Track To constraint. However, it assumes that the Y axis will be the tracking and stretching axis, and doesn’t give you the option of using a different one…

It also optionally has some raw volumetric features, so the owner can squash down as the target moves closer, or thin out as the target moves farther away. Note however that it is not the real volume of the owner which is such preserved, but rather the virtual one defined by its scale values. Hence, this feature is working even with non-volumetric objects, like empties, 2D meshes or surfaces, curves…

With bones, the “volumetric” variation scales them along their own local axes (remember that the local Y axis of a bone is aligned with it, from root to tip).

Options

The Stretch To constraint panel.
Target
This constraint uses one target, and is not functional (red state) when it has none.
(Bone Target)
When using a bone target, you can chose where along this bone lays the target point, using the Head/Tail numeric field.
Rest Length
This numeric field sets the rest distance between the owner and its target, i.e. the distance at which there is no deformation (stretching) of the owner.
R
When clicked, this small button will recalculate the Rest Length value, so that it corresponds to the actual distance between the owner and its target (i.e. the distance before this constraint is applied).
Volume Variation
This numeric field controls the amount of “volume” variation proportionally to the stretching amount. Note that the 0.0 value is not allowed, if you want to disable the volume feature, use the NONE button (see below).
Vol
These buttons control which of the X and/or Z axes should be affected (scaled up/down) to preserve the virtual volume while stretching along the Y axis.
If you enable the NONE button, the volumetric features are disabled.
Plane
These buttons are equivalent to the Up ones of the Track To constraint: they control which of the X or Z axes should be maintained (as much as possible) aligned with the global Z axis, while tracking the target with the Y axis.


Examples

Target

In (Stretch To just added), target_1 has not been yet moved, so it is at the rest distance from Owner, and hence the later is not deformed. Note that to visualize better the three axis of the owner, the target is not on the same plane.

For the last three pictures below, the constraint settings are let to their default value (Volume Variation: 1.0; Vol: XZ; Plane: X).

Effect of moving the target
Without constraint.
Stretch To just added.
Target_1 is twice nearer…
Target_1 is twice farther…


Volume

Effect of changing Vol
Volume effects on the X axis only (Vol: X).
Volume effects on the Z axis only (Vol: Z).
No volume effect (Vol: NONE).
Volume Variation: 5.0.