Surface Constraint

Animation menu > Constraints > Surface Constraint

Main toolbar > Track View > Select a position track in the Track View Hierarchy > Track View toolbar > Assign Controller > Surface

The Surface constraint positions an object along the surface of another object.

The type of object that can be used as the surface object is limited to those whose surfaces can be represented parametrically. Use the Surface constraint with the following types of objects:

The surface used is a "virtual" parametric surface, and not the actual mesh surface. Objects with a low number of segments might have a mesh surface quite different than the parametric surface.

The parametric surface ignores Slice and Hemisphere options. So if the object is sliced, for example, the controlled object will position itself as if the missing portion were still there.

Since the Surface constraint only works on parametric surfaces, if you apply a modifier that converts the object to a mesh, the constraint will no longer work. For example, you can't use it with a cylinder with a Bend modifier applied.

Procedure

Example: To animate a sphere over the surface of a cylinder:

  1. In the Top viewport, create a cylinder and a sphere.

  2. Select the sphere, open the Motion panel, expand the Assign Controller rollout, and then expand the Transform heading in the list.

  3. In the list window, click the Position item and then click Assign Controller.

  4. In the Assign Position Controller dialog, choose Surface and then click OK.

    The Surface Constraint Parameters rollout replaces the Key Info rollout.

  5. Click Pick Surface, and then select the cylinder.

  6. Turn on Animate, and place the time slider at frame 0.

  7. Use the V Position spinner to move the sphere to a starting position at the bottom of the cylinder.

  8. Place the Time Slider at frame 100.

  9. Use the V Position spinner to place the sphere at the top of the cylinder.

  10. Set U Position to 300.

    Play the animation. The sphere moves over the surface of the cylinder in a helical path.

Interface

The Surface Constraint parameters rollout is in the Motion panel.

Current Surface Object group

This group provides a method for selecting and then displaying the selected surface object.

Text: Displays the name of the selected object.

Pick Surface: Selects the object you want used as a surface.

Surface Options group

This group provides controls for adjusting the position and orientation of the object along the surface.

U Position: Adjusts the position of the controlled object along the U coordinates of the surface object.

V Position: Adjusts the position of the controlled object along the V coordinates of the surface object.

No Alignment: When on, the controlled object is not reoriented, regardless of its position on the surface object.

Align to U: Aligns the local Z axis of the controlled object with the surface normal of the surface object, and the X axis with the U axis of the surface object.

Align to V: Aligns the local Z axis of the controlled object with the surface normal of the surface object, and the X axis is aligned with the V axis of the surface object.

Flip: Flips the alignment of the local Z axis of the controlled object. This check box is not available if No Alignment is turned on.