Dokumentierung der Quanternion und Rotation
Euler angles
When interpolating the animated rotations of an object using the Euler method, Maya uses Euler angles to determine the object’s axis-specific orientations over time. Euler rotations are calculated using three separate angles representing rotations about the X, Y, and Z axes, and an order of rotation.
The rotation order specifies the order in which an animated object is rotated about its X, Y, and Z axes. Changing an animated object’s rotation order changes its final orientation. You can specify the order of rotation for an object by setting its Rotate Order attribute. For example, if you set an animated object’s Rotate Order to YZX, the object will first rotate in Y, then Z, and finally X. You can use the Rotate Order attribute to match the rotation order of imported, animated objects to the co-ordinate systems (for example, XZY opposed to Maya’s default XYZ) of the 3D software packages from which they came. This is important if you want the animated rotations of your imported objects to appear as intended.
In Maya, the default method of rotation interpolation is Euler.
There are 2 kinds of Euler rotation interpolation in Maya: Independent and Synchronized. You can set the Euler rotation interpolation type for your curves from the Graph Editor. See Change Rotation Interp.
For Independent Euler curves, interpolation is calculated from key to key on each individual curve, independent of the their neighboring rotation curves. Use Independent Euler curves when you want to keyframe a single rotation channel or when you need to add additional keyframes (and thus detail) to a single rotation curve. Independent Euler curves are ideal for simple, animated rotations.
All the keyframes on Synchronized Euler curves are locked together in time. This means that if an object has Synchronized Euler rotation curves, interpolation is calculated from key to key on all of its rotation curves simultaneously. Use Synchronized Euler curves when you want to keyframe multiple rotation channels (X, Y, and Z) or when you need to add additional keyframes (and thus detail) to all the rotation curves of an animated object. Synchronized Euler curves are ideal for more complex animated rotations.
The main difference between Independent and Synchronized Euler curves are their keyframes. For example, moving a key in time on an Independent Euler Rotate X curve moves only the key on the Rotate X curve, whereas moving a key in time on a Synchronized Euler Rotate X curve will also move the corresponding keys on the Y and Z curves. Similarly, if you key only the Rotate X channel for an animated object, and the rotation interpolation type is set to Independent Euler, then only the Rotate X channel is keyed. However, if the rotation interpolation type is set to Synchronized Euler, then all three (X, Y, and Z) Rotate channels are keyed.
When Euler angles are used to interpolate the animated rotations of an object, the object’s orientation about its individual axes is evaluated one axis at a time. This is why Euler-angled rotation is prone to artifacts such as gimbal lock and flipping. Gimbal lock occurs when rotations about a single axis cause unwanted rotations about complementary axes or when axes become coincident. Flipping occurs when angles unexpectedly wrap around positive or negative 180 degrees during Euler-angled rotation interpolation between keyframes.
If gimbal lock or flipping occurs, you may be able to correct this behavior using the Euler Filter. For example, you can use the Euler Filter to normalize the mangled rotation curves from corrupted motion capture animation data. You can access the Euler Filter from the Curves menu in the Graph Editor or Dope Sheet. For more information on the Euler filter, see Euler angle filtering and filterCurve.
When should I use Euler rotation interpolation?
Use Euler rotation interpolation when you want specific control over the numerical values of your rotations and when you want smooth tangents for your rotation curves. In most cases, you should only use Euler rotation interpolation for rotation animation curves that you need to manipulate extensively in the Graph Editor. Unlike Quaternion curves, Euler curves support all tangent types and their keys possess tangent handles that let you easily tweak the curves.
Quaternions
Quaternions provide smooth interpolation of animated rotations and always produce the most efficient path between keyframes in comparison to Euler angles. Quaternions store the overall orientation of an object rather than a series of individual rotations. This means that a single Quaternion stores the same amount of rotation data as three Euler angles. Since Quaternions store only orientation values, they can be used to calculate the shortest rotation from one orientation to another.
When animating an object’s rotations with Quaternions, Maya first stores the keyed orientation values for the object as Euler angles, converts them to Quaternions for interpolation, and then converts the interpolated Quaternion rotation values back to Euler angles for display in the Channel Box and Graph Editor.
In Maya, Quaternions are displayed as Synchronized Euler curves and values. When an object’s rotation curves are synchronized, the keyframes on its X,Y, and Z Rotate curves are locked together in time. When you add, delete, or move a keyframe on one of the object’s rotation curves, the corresponding keys are also updated on the related rotation curves. This eliminates unexpected interpolation problems that can occur when keyframes are deleted from one of the axes, or when keys are moved independently in time.
The tangent settings for Quaternion curves affect how an object’s animated rotations are interpolated. For more information on tangent types, see Tangents menu. Maya uses the following types of tangents and interpolation to calculate the shortest rotation from one key to the next:
* Quaternion curves with clamped tangents use stepped interpolation
* Quaternion curves with linear tangents use spherical linear interpolation (also known as SLERP)
* Quaternion curves with spline tangents use cubic interpolation
Warning
Setting the tangents of a Quaternion curve to spline will produce unpredictable results.
For best results when using Quaternions, set the tangents of your Quaternion curves to linear.
When blending animation clips in the Maya® Trax™ Editor, you can select one of the following types of Quaternion rotation interpolation: Quaternion Shortest or Quaternion Longest. Quaternion Shortest interpolation uses Quaternion interpolation to find the shortest path between rotations from one clip to the next. Quaternion Longest interpolation uses Quaternion interpolation to find the longest path between rotations from one clip to the next. This path is in the opposite direction of Quaternion Shortest.
When should I use Quaternions?
Use Quaternions when you want smooth interpolation between two keys. Quaternions produce the most efficient paths of interpolation and they do not generate artifacts such as gimbal lock and flipping.
Warning
* It is difficult to isolate, view, and edit Quaternion curves in the Graph Editor.
* Quaternion curves do not support tangent handles and only work well with linear tangents.
Which type of interpolation is right for your animated rotations?
Each method of rotation interpolation has its advantages and disadvantages. It is up to you to select the type of interpolation that best suits your animation. See When should I use Euler rotation interpolation? and When should I use Quaternions?.
Euler angles
Advantages
* Easily create simple rotations around a single, primary axis.
* Support spin (rotation >360˚)
* Treat IN and OUT tangents independently
Disadvantages
* Are prone to Gimbal Lock and flipping
* Create rotations that are difficult to predict because interpolation is calculated separately for each rotation axis
Quaternions
Advantage
* Smoothly interpolate rotation from one orientation to the next
* Do not suffer from Gimbal Lock or flipping
Disadvantage
* Do not support spin (rotations >360˚)
* Curves are difficult to visualize
* Do not support tangent handles
* Tangents are difficult to view and edit in the Graph Editor and are not treated independently
高级!
马上要考试了,这些小点都要注意,这个东西就是用在动画里面的,我是学了好久了,但是一直不知道这东西干嘛的,今天细细读了一下,有必要归档记录,很有用----如果学计算机图形的话
看第一眼我还以为是讲量子的呢...
Änlich in Koordinator, ich glaube,daß in Computer Graphics die Algorithmus der Interpolation wichtige Rolle spielt.