0% found this document useful (0 votes)
2 views15 pages

Types of Constraints.

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views15 pages

Types of Constraints.

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 15

Types of constraints

Topics in this section


 Point constraints
 Aim constraints
 Orient constraints
 Scale constraints
 Parent constraints
 Geometry constraints
 Normal constraints
 Tangent constraints
 Pole Vector constraints
 Animation-Constraint blending
 Set Driven Key-Constraint blending
 Point constraints



 A point constraint causes an object to move to and follow the position of an object, or
the average position of several objects. This is useful for having an object match the
motion of other objects.
 You can also use a point constraint to animate one object to follow a series of objects.
 See Create point constraints and Constrain > Point.


 Aim constraints



 An aim constraint constrains an object’s orientation so that the object aims at other
objects. Typical uses of the aim constraint include aiming a light or camera at an
object or group of objects. In character setup, a typical use of an aim constraint is to
set up a locator that controls eyeball movement.
 See Create aim constraints and Constrain > Aim.


 Constrained object’s orientation for aim constraints
 The constrained object’s orientation is controlled by three vectors: the aim vector,
the up vector, and the world up vector. These vectors are not displayed in the
workspace, but you can infer their effect on the constrained object’s orientation.
 You do not need to understand the details of how these vectors work in order to use
constraints effectively. If you are new to constraints, you can skip the rest of this
section. However, if you want to exercise a high degree of control over an aim
constraint, you’ll need to work with these vectors. Also, familiarity with these vectors
can help you to understand how a constrained object can suddenly roll.
 NoteAim constraints may have update issues if the aimVector and the upVector are
colinear or if worldUpType is None.
 The way that these constraints work is to rotate the object so that the aimVector
points in the desired direction. Then, twist the object about the aimVector so that the
upVector points as closely as possible to the worldUpVector.
 If the aimVector and the upVector point in the same direction, then this second
rotation is impossible. No matter how the object is rotated about the aimVector, the
upVector will not get any closer to the worldUpVector.
 This can be a useful effect since it allows the constrained object to aim in any
direction without ever flipping. It rotates by the least amount so that the aimVector
aims at the object and then it stops. However, it rotates from the current position so
if you do not evaluate the same sequence of frames every time, you will not get the
same answers. This can wreak havoc with your rendering and it is best to avoid this
situation.
 Aim vector
 The aim vector constrains the constrained object so that it always points at the target
point. The aim vector starts at the constrained object’s pivot point and always points
at the target point.
 How the object rotates to point at the target point depends on how the aim vector is
defined relative to the object’s local space. For instance, by default, the aim vector is
defined so that it points in the same direction as the local rotation positive X-axis.
Consequently, by default, a constrained object’s local rotation positive X-axis will
point at the target point.
 By itself, the aim vector does not completely constrain the object, because the aim
vector does not control how the object might rotate about the aim vector. The
orientation of the object about the aim vector is controlled by the up vector and the
world up vector.
 Up vector and world up vector
 The up vector controls the orientation of the constrained object about the aim vector.
Like the aim vector, the up vector is defined relative to the constrained object’s local
space. By default, the up vector tries to point in the same direction as the world up
vector, which is defined relative to the scene’s world space. The up vector orients the
constrained object about the aim vector by trying to align itself as closely as possible
with the world up vector.
 When you move the target object(s), the constrained object’s aim vector moves to
point at the target point, and orients the constrained object accordingly.
Simultaneously, the constrained object orients itself about the aim vector as directed
by the up vector.
 For instance, by default, the up vector is defined so that it points in the same
direction as the local rotation positive Y-axis. A constrained object’s local positive X-
axis will point at the target point, as directed by the default aim vector.
Simultaneously, the object’s local positive Y-axis will try to point in the same direction
as the world up vector, as directed by the object’s up vector. The aim vector and up
vector work together to constrain the orientation of the constrained object.
 By default, the up vector tries to stay as closely aligned with the world up vector as
possible. However, you can control the role of the world up vector in a variety of
ways. For example, instead of defining the world up vector relative to the
workspace’s world space (the default), you can define it relative to some other
object’s local space. Such an object is called a world up object.
 Orient constraints



 An orient constraint matches the orientation of one object to one or more other
objects. This constraint is useful for making several objects orient simultaneously. For
example, you can make a group of characters all look in the same direction at the
same time by animating one character’s head and then constraining all the other
character’s heads to the head you’ve just animated.
 See Create orient constraints and Constrain > Orient.

 Scale constraints



 A scale constraint matches the scaling of one object to one or more other objects.
This constraint is useful for making several objects scale simultaneously. For
example, you can make a group of characters all look in the same direction at the
same time by animating one character’s head and then constraining all the other
character’s heads to the head you’ve just animated.
 A constrained object is an object whose scaling is driven by the scaling of one or
more target objects. The scaling of one or more target objects is called the target
scale.
 See Create scale constraints and Constrain > Scale.

Parent constraints

With a parent constraint, you can relate the position—translation and rotation—of one object
to another, so that they behave as if part of a parent-child relationship that has multiple
target parents. An object’s movement can also be constrained by the average position of
multiple objects.

When a parent constraint is applied to an object, the constrained object does not become
part of the constraining object’s hierarchy or group, but remains independent and behaves
as if it is the child of its targets. The constraining object is also known as the target object.
See What are constraints?.

An object with a parent constraint does not behave the same as an object with a point and
orient constraint. When a Parent constraint is used, rotating the target objects affects the
constrained object’s rotation along the world axis. When a Point and Orient constraint are
used, rotating the target objects affects the constrained object’s rotation along its local axis.
This is shown in the following figure.
Related topics
 Create a parent constraint

 Constrain > Parent


Please send us your comment about this page

Geometry constraints

A geometry constraint restricts an object to a NURBS surface, NURBS curve, or polygonal


surface (mesh). If you also want the constrained object to orient itself to the surface of the
target object(s), use a normal constraint. For more information on normal constraints,
see Normal constraints.

See Create a geometry constraint and Constrain > Geometry.


Target point for Geometry constraints
The target point is the position of the target object’s nearest surface location. If there is
more than one target object, the target point is the average position of the nearest surface
locations of all the target objects. If you are using more than one target object, you can vary
the influence of each target object on the calculation of the target point. The target point
can be a weighted average of the nearest surface locations of the target objects, with some
target objects having more influence than others. The influence of target objects on the
weighted average is specified by target object weights.

Geometry constraint motion history dependence


Motion history dependence refers to how an object can provide different motion effects in
situations that are identical except that the object has been previously manipulated or
animated.

For instance, when you animate an object and run the animation in a loop, if the object ends
up moving in slightly different ways at the same frame in each loop, the object is motion
history dependent. At a certain frame, the object may be oriented differently depending on
its previous orientations. In contrast, if the object moves in exactly the same way during
each loop, then the object is motion history independent.

Objects constrained by geometry constraints are motion history dependent. That means that
the end result of a constrained object’s animation depends on where the object started.
Using a point constraint with a geometry constraint
You can create a point constraint for an object that is already constrained by a geometry
constraint. The constrained object’s position will be the point on the target object’s surface
that is closest to the point constraint’s target point.

For more information on point constraints, see Point constraints.


Normal constraints

A normal constraint constrains an object’s orientation so that it aligns with the normal
vectors of a NURBS surface or polygonal surface (mesh). Normal constraints are useful for
having an object travel across a surface that has a unique, complex shape. Without normal
constraints, moving or animating the object across the surface could be tedious and time-
consuming. For example, you might want to have a tear falling down along character’s face.
Instead of animating the tear directly, you could constrain it to the face’s surface.

See Create normal constraints and Constrain > Normal.

Typically, you use normal constraints with geometry constraints. For more information on
geometry constraints, see Geometry constraints.

Constrained object’s orientation for normal constraints


The constrained object’s orientation is controlled by three vectors: the aim vector, the up
vector, and the world up vector. These vectors are not displayed in the workspace, but you
can infer their effect on the constrained object’s orientation.

You do not need to understand the details of how these vectors work in order to use
constraints effectively. If you are new to constraints, you can skip the rest of this section.
However, if you want to exercise a high degree of control over a normal constraint, you’ll
need to work with these vectors. Also, familiarity with these vectors can help you to
understand how a constrained object can suddenly roll.
NoteNormal constraints may have update issues if the aimVector and the upVector are
colinear or if worldUpType is None.

The way that these constraints work is to rotate the object so that the aimVector points in
the desired direction. Then, twist the object about the aimVector so that the upVector points
as closely as possible to the worldUpVector.

If the aimVector and the upVector point in the same direction, then this second rotation is
impossible. No matter how the object is rotated about the aimVector, the upVector will not
get any closer to the worldUpVector.

This can be a useful effect since it allows the constrained object to aim in any direction
without ever flipping. It rotates by the least amount so that the aimVector aims at the object
and then it stops. However, it rotates from the current position so if you do not evaluate the
same sequence of frames every time, you will not get the same answers. This can wreak
havoc with your rendering and it is best to avoid this situation
Aim vector

The aim vector constrains the constrained object so that it always aligns with the target
vector. The aim vector starts at the constrained object’s pivot point and then aligns with the
target vector.

How the object rotates to align with the target vector depends on how the aim vector is
defined relative to the object’s local space. For instance, by default, the aim vector is
defined so that it points in the same direction as the local rotation positive X-axis.
Consequently, by default, a constrained object’s local rotation positive X-axis will align with
the target vector.

By itself, the aim vector does not completely constrain the object, because the aim vector
does not control how the object might rotate about the aim vector. The orientation of the
object about the aim vector is controlled by the up vector and the world up vector.
Up vector and world up vector

The up vector controls the orientation of the constrained object about the aim vector. Like
the aim vector, the up vector is defined relative to the constrained object’s local space. By
default, the up vector tries to point in the same direction as the world up vector, which is
defined relative to the scene’s world space. The up vector orients the constrained object
about the aim vector by trying to align itself as closely as possible with the world up vector.

When you move the target object(s), the constrained object’s aim vector moves to align with
the target vector, and orients the constrained object accordingly. Simultaneously, the
constrained object orients itself about the aim vector as directed by the up vector.

For instance, by default, the up vector is defined so that it points in the same direction as
the local rotation positive Y-axis. A constrained object’s local positive X-axis will align with
the target vector as directed by the default aim vector. Simultaneously, the object’s local
positive Y-axis will try to point in the same direction as the world up vector, as directed by
the object’s up vector. The aim vector and up vector work together to constrain the
orientation of the constrained object.

By default, the up vector tries to stay as closely aligned with the world up vector as possible.
However, you can control the role of the world up vector in a variety of ways. For example,
instead of defining the world up vector relative to the workspace’s world space (the default),
you can define it relative to some other object’s local space. Such an object is called a world
up object.

Rolling effects
In certain situations, the constrained object can rapidly rotate about its aim vector. To
understand why this happens, you need to understand how aim vectors, up vectors, and
world up vectors work. If you are new to constraints, you can skip this section. For more
information, see the previous section,Constrained object’s orientation for aim constraints.

As the aim vector approaches pointing in the same direction or the opposite direction of the
up vector, the constrained object rotates more rapidly about the aim vector. When the aim
vector points in exactly the same direction, or in exactly the opposite direction, the
constrained object can suddenly rotate by 180 degrees about the aim vector.

These rapid rotations provide rolling effects that you might want to prevent. You can prevent
rolling effects by moving or animating the world up vector. For more information,
see Control motion history dependence effects for aim constraints.

Motion history dependence effects


Motion history dependence refers to how an object can provide different motion effects in
situations that are identical except that the object has been previously manipulated or
animated.

For instance, when you animate an object and run the animation in a loop, if the object ends
up moving in slightly different ways at the same frame in each loop, the object is motion
history dependent. At a certain frame, the object may be oriented differently depending on
its previous orientations. In contrast, if the object moves in exactly the same way during
each loop, then the object is motion history independent.

Motion history dependence effects can be a problem if you want predictable motion effects.
However, if you are seeking some unpredictable motion effects, you might want to take
advantage of an object’s motion history dependence.

In certain situations, a constrained object’s orientation can become motion history


dependent. To understand why this happens, you need to be familiar with aim vectors and
up vectors (see Constrained object’s orientation for aim constraints).

A constrained object can become motion history dependent if you define the aim vector and
the up vector to point in the same direction. For example, you might do this if you define the
aim vector relative to the constrained object’s local Y-axis, but do not change the default
direction of the up vector, which is also relative to the object’s local Y-axis. For more
information, see Control motion history dependence effects for aim constraints.

A constrained object can also become motion history dependent if you set the
constraint’s World Up Type attribute to None. For more information, see Edit point constraint
attributes.
Tangent constraints

Tangent constraints constrain an object’s orientation so that as an object moves along a


curve, the object always points in the direction a curve. The curve provides the path of the
object’s motion, and the object orients itself to point along the curve. Tangent constraints
are useful for having an object follow a curve’s direction, such as a roller coaster car
following the tracks.

See Create tangent constraints and Constrain > Tangent.

Typically, you use tangent constraints with geometry constraints. For more information on
geometry constraints, see Geometry constraints.

Target vector for tangent curves


The target vector, or weighted average vector, represents the tangent vector along the
curve at the position of the constrained object. Maya calculates the target vector as a
weighted average of the curve’s nearby tangents (that is, the curve’s tangent vectors).

Constrained object’s orientation for tangent curves


The constrained object’s orientation is controlled by three vectors: the aim vector, the up
vector, and the world up vector. These vectors are not displayed in the workspace, but you
can infer their effect on the constrained object’s orientation.
You do not need to understand the details of how these vectors work in order to use
constraints effectively. If you are new to constraints, you can skip the rest of this section.
However, if you want to exercise a high degree of control over a tangent constraint, you’ll
need to work with these vectors. Also, familiarity with these vectors can help you to
understand how a constrained object can suddenly roll.
NoteTangent constraints may have update issues if the aimVector and the upVector are
colinear or if worldUpType is None.

The way that these constraints work is to rotate the object so that the aimVector points in
the desired direction. Then, twist the object about the aimVector so that the upVector points
as closely as possible to the worldUpVector.

If the aimVector and the upVector point in the same direction, then this second rotation is
impossible. No matter how the object is rotated about the aimVector, the upVector will not
get any closer to the worldUpVector.

This can be a useful effect since it allows the constrained object to aim in any direction
without ever flipping. It rotates by the least amount so that the aimVector aims at the object
and then it stops. However, it rotates from the current position so if you do not evaluate the
same sequence of frames every time, you will not get the same answers. This can wreak
havoc with your rendering and it is best to avoid this situation
Aim vector

The aim vector constrains the constrained object so that it always aligns with the target
vector. The aim vector starts at the constrained object’s pivot point and then aligns with the
target vector.

How the object rotates to align with the target vector depends on how the aim vector is
defined relative to the object’s local space. For instance, by default, the aim vector is
defined so that it points in the same direction as the local rotation positive X-axis.
Consequently, by default, a constrained object’s local rotation positive X-axis will align with
the target vector.

By itself, the aim vector does not completely constrain the object, because the aim vector
does not control how the object might rotate about the aim vector. The orientation of the
object about the aim vector is controlled by the up vector and the world up vector.
Up vector and world up vector

The up vector controls the orientation of the constrained object about the aim vector. Like
the aim vector, the up vector is defined relative to the constrained object’s local space. By
default, the up vector tries to point in the same direction as the world up vector, which is
defined relative to the scene’s world space. The up vector orients the constrained object
about the aim vector by trying to align itself as closely as possible with the world up vector.

When you move the target object(s), the constrained object’s aim vector moves to align with
the target vector, and orients the constrained object accordingly. Simultaneously, the
constrained object orients itself about the aim vector as directed by the up vector.

For instance, by default, the up vector is defined so that it points in the same direction as
the local rotation positive Y-axis. A constrained object’s local positive X-axis will align with
the target vector, as directed by the default aim vector. Simultaneously, the object’s local
positive Y-axis will try to point in the same direction as the world up vector, as directed by
the object’s up vector. The aim vector and up vector work together to constrain the
orientation of the constrained object.

By default, the up vector tries to stay as closely aligned with the world up vector as possible.
However, you can control the role of the world up vector in a variety of ways. For example,
instead of defining the world up vector relative to the workspace’s world space (the default),
you can define it relative to some other object’s local space. Such an object is called a world
up object.
Rolling effects

In certain situations, the constrained object can rapidly rotate about its aim vector. To
understand why this happens, you need to understand how aim vectors, up vectors, and
world up vectors work. If you are new to constraints, you can skip this section. For more
information, see the previous section,Constrained object’s orientation for aim constraints.

As the aim vector approaches pointing in the same direction or the opposite direction of the
up vector, the constrained object rotates more rapidly about the aim vector. When the aim
vector points in exactly the same direction, or in exactly the opposite direction, the
constrained object can suddenly rotate by 180 degrees about the aim vector.

These rapid rotations provide rolling effects that you might want to prevent. You can prevent
rolling effects by moving or animating the world up vector. For more information,
see Control motion history dependence effects for aim constraints.

Motion history dependence effects


Motion history dependence refers to how an object can provide different motion effects in
situations that are identical except that the object has been previously manipulated or
animated.

For instance, when you animate an object and run the animation in a loop, if the object ends
up moving in slightly different ways at the same frame in each loop, the object is motion
history dependent. At a certain frame, the object may be oriented differently depending on
its previous orientations. In contrast, if the object moves in exactly the same way during
each loop, then the object is motion history independent.

Motion history dependence effects can be a problem if you want predictable motion effects.
However, if you are seeking some unpredictable motion effects, you might want to take
advantage of an object’s motion history dependence.

In certain situations, a constrained object’s orientation can become motion history


dependent. To understand why this happens, you need to be familiar with aim vectors and
up vectors (see Constrained object’s orientation for aim constraints).

A constrained object can become motion history dependent if you define the aim vector and
the up vector to point in the same direction. For example, you might do this if you define the
aim vector relative to the constrained object’s local Y-axis, but do not change the default
direction of the up vector, which is also relative to the object’s local Y-axis. For more
information, see Control motion history dependence effects for aim constraints.

A constrained object can also become motion history dependent if you set the
constraint’s World Up Type attribute to None. For more information, see Edit point constraint
attributes.
Pole Vector constraints

A pole vector constraint causes the end of a pole vector to move to and follow the position
of an object, or the average position of several objects.
In character setup, the pole vectors of IK rotate plane handles for arm joint chains are often
constrained to locators placed behind the character.

In general, you will want to constrain a pole vector so that the joint chain does not
unexpectedly flip when you manipulate the IK rotate plane handle. Because flipping can
occur when the handle vector approaches or intersects the pole vector, you should constrain
the pole vector so that the handle vector is unlikely to cross it.

Target objects for pole vector constraints


A constrained pole vector is a pole vector whose position is driven by the position of one or
more target objects. The position of one or more target objects is called the target point.
Constrained pole vector’s end position
The constrained pole vector’s end position is driven by the target point. However, you can
offset the constrained pole vector’s end position from the target point. Offsetting the
constrained pole vector’s end position from the target point can be useful in situations
where you don’t want the local axis of the constrained pole vector to coincide exactly with
the target point.

Keep in mind that the IK chain controlled by the pole vector’s IK rotate plane handle rotates
when the target point moves. If you move the target object, the movement of the pole
vector will cause the IK chain to rotate.

You might also like