Cinema 4D Cinema 4D Prime Character Menu Character Tags Constraint
Function available in CINEMA 4D Prime, Visualize, Broadcast, Studio & BodyPaint 3D
Constraint

Basic PSR Aim Up-Vector Parent Clamp Spring Mirror

Clamp

This powerful constraint has many uses. As its name suggests, Clamp lets you attach objects to other objects. For example, you can use Clamp to restrict an object's movement in the following ways: to move along one axis only of another object; to move along a spline; to move over an object's surface, or to move on a plane defined by two axes.

You can also specify a gap distance the object should maintain or not exceed or not fall below. The constraint also works with deformed objects provided you set the Priority on the Basic Properties tab accordingly.

Strength [-∞..+∞%]

Defines the overall strength of the constraint's influence on the object taking all targets in the Targets group into account.

Draw Clamp

Draws the clamp as a line in the viewport.

Color

Defines the color of the line drawn for the clamp in the viewport if Draw Clamp is enabled.

 Targets

Here you can add targets that should control how the object is clamped.

Add

Adds a new target including all appropriate settings.

Remove

Deletes the last target you added.

Target

Drag & drop an object you want to use as a target for clamping into this field. The options which are then available depend on the type of object involved.

In addition to objects, the following Tags can be used:

Lock Position

This option locks the current clamping for the object. Suppose To is set to Plane, Mode is set to Fix and Distance is set to 100. If you move the object around with Lock Position disabled, it will move over the chosen plane keeping a fixed distance apart. If, on the other hand, you enable Lock Position, the object can no longer be moved but can still be rotated freely around the locked position.

Weight [-∞..+∞%]

Controls the strength of the target's influence. This parameter is only available if two or more targets are defined. This is because if only one target is defined, its strength is controlled by the Weight value at the top of the tab. If more than one target is defined, lowering this value means the other targets will have more influence.

Distance [-∞..+∞m]

Defines the gap distance as used by the Mode setting.

To

Defines to where the object should be clamped. The following options are available:

Origin

Clamps the object to the target's origin.

Axis

Clamps the object to one of the target's axes. An additional parameter will appear: Axis.

Plane

Clamps the object to a plane defined by two of the target's axes. An additional parameter will appear: Plane.

Point

Clamps the object to the nearest point on the target. This only works for point objects, such as polygon objects, editable splines and FFDs.

Surface

Clamps the object to the target's surface. This works for polygon objects (even if deformed, provided the Constraint tag's Priority on the Basic Properties tab is set to Generators) as well as for primitives and Generator objects (including Subdivision Surfaces).

Note that an earlier priority may appear to work for the tag when it constrains polygon objects that use deformers. But in reality, the constraint is evaluating the previous frame in the animation, leading to a time lag problem.

Spline

Clamps the object to a spline if one is defined as a target.

Bounds

Clamps the object to the approximated volume of another object. The target object can be polygonal, parametric or Spline.

Keep in mind that constraining the object using this mode to an open volume can create some unwanted behavior, when the constrained object reaches the open parts of the target (it will snap back to the edge of the surface). Try to constrain only to closed volumes, if possible, or keep you constrained object from pushing against an open area of the mesh.

Constraining to closed splines is a great way to build custom sliders for your rigs, as the constrained object will be able to move freely within the bounds of the spline, but still be constrained to its shape. Think of it as a custom 2D vector User Data.

Mode

The Mode and Distance parameters define the area within the space defined by the To parameter within which a clamped object can move. You can select from:

Min
Max

The clamped object is allowed to move within these distance values.

Example: You have set the To parameter to Surface and Mode to Max, with a Distance value of 100m. The clamped object can now only move 100m away from the target’s surface. If Min were defined, the object would be kept a minimum of 100m away from the target’s surface.

Fix Pos

Fixes the clamped object to the surface, plane, axis, etc. No distance can be defined.

Min

Prevents the gap between the object and its clamp from falling below the value defined by Distance.

Max

Prevents the gap between the object and its clamp from exceeding the value defined by Distance.

Fix Pos

When in this mode, the object will be kept at a constant distance. This mode locks the object’s offset position but not the axis itself.

Fix Axis

When in this mode, the object axis will be kept at a constant distance to the Clamp. This mode works better than the previously described mode, particularly when you want to fix an object on a deformed surface. In this instance you should always use this (stabilizing) option. The Fix mode is only still available for reasons of compatibility.

Use Normals

This option will only be displayed when Surface is set to On. This option in conjunction with the Distance option described below can prevent surfaces from being penetrated when the Clamp Object moves too quickly between animation frames.

Align

Here you have the option to choose for one of the object's axes to be aligned. The usual choices are available.

As

Defines how the object should be aligned. The following options are available:

None

Disables alignment.

Constraint

Aligns the axis defined by Axis so that it forms an extension of the line drawn for the clamp in the viewport (Draw Clamp enabled).

Phong Normal

This option is only available when the target object is of the type described for the Surface option above. The axis defined in the Align setting will be aligned in the direction of the phong Normals of the object to which it is currently clamped.

Normal

This option is only available if the target is one of the objects described for the Surface option. The axis defined by Axis is aligned along the length of the normal for the polygon to which the object is currently clamped.

Tangent

This option is only available if the target is a spline. It aligns the object to the spline tangentially using the axis defined by Axis.

Axis

Here you can choose which axis is used for clamping if To is set to Axis:

Plane

Here you can choose the plane used for clamping if To is set to Plane