Bl
Bl
Bl
Bl
Bl
You are here:   Home »  Import CAD Formats »  NGRAIN's 3KO Solutions  
Bl

>>> Animation Keyframe Resampling Options


Arrow Animation Keyframe Resampling Options

This dialog box controls the most important aspect of the animation export conversion: keyframe resampling. These options are used, for example, when animation data is being exported via the 3D Studio, Lightwave and DirectX export converters.

These parameters control a process called "keyframe resampling". Keyframes are "snapshots" of certain transformations in time, such as a rotation angle at time 0, time 10 and time 20. In many cases it is not possible to directly convert transformation keyframe data from one 3D animation program to another due to a difference in the underlying mathematics used by the respecitive animation program. For example, Lightwave stores rotations as explicit "Euler X, Y, Z" angles, 3D Studio r4 stores rotations in angle/axis form whereas most modern animation programs store rotations in Quaternion form (DirectX, 3D Studio MAX and others).

To overcome the problem of converting keyframe data from one animation program to another, a complex algorithm was developed for this program which will "resample" the keyframe data from one format to another. For example, the Euler rotation angles of an imported Lightwave animation can be resampled by this algorithm into equivalent Quaternion angles for ultimate use in DirectX or 3D Studio MAX.

Internally, this program (PolyTrans or NuGraf) has one of the most complex animation "engines" in any 3D program. This animation system allows all varieties of animation data to be imported from other 3D animation programs, previewed and exported to other file formats. Most importantly, the "animation engine" allows rotation data to be imported in Euler, Quaternion or Angle/Axis form then resampled to any other angular format.

The "resampling process" proceeds by creating a new, but temporary, keyframe list just prior to the animation export process. This new list has one key for each and every frame in the current animation. For example, if the original data had two keys at frame 0 and 60 that represented a 360 degree rotation, then the new keyframe list would contain 61 keyframes each representing a segment of the overall rotation animation. Since the internal "animation engine" can evaluate any rotation type (angle/axis, Euler or quaternion), this new keyframe list basically represents a new "snapshot" of the rotations at each and every frame in the animation. Once the new keyframe list is created the keys are converted to the desired export transformation method (such as angle/axis, Euler or quaternion when exporting rotation keyframes).

As an optional last step, this resampling algorithm can remove redundant keyframes from the new (but temporary) keyframe list. The optimized keyframe list will then exhibit similar behavior but with many fewer keyframes.

More Dialog Box Options

Re-Sample All Animation Data At Every Frame

If this checkbox is enabled (check-marked, which is the default) then all keyframe data will be re-sampled, as described above, prior to being exported. This re-sampling process is most useful when exporting rotation keyframe data between programs such as DirectX, Lightwave, 3D Studio r4 and 3D Studio MAX. For example, this option allows 3D Studio r4 rotations (angle/axis notation with angles > 180 degrees) to be properly exported to DirectX (quaternions, which only allows rotations to be in the range -180 to 180 degrees, a limitation of quaternion mathematics).

The three check boxes marked 'Translation', 'Scaling' and 'Rotation' allow the re-sampling algorithm to be applied selectively to the translation keyframes, the scaling keyframes and/or the rotation keyframes. These are all enabled by default.

Time Interval To Perform Re-Sampling

These two radio buttons determine over which range of time the new re-sampled keyframes are to be created:

Within Time Extents of Each Keyframe List

Selecting this radio button will only re-sample each keyframe list over the time interval from its first keyframe time to its last keyframe time. For example, if the overall animation runs from time 0 to 100, but a rotation keyframe list only has keys from time 30 to 60, then the re-sampled keyframe list will only have keys in the tmie range 30 to 60.

With Time Extents of Entire Animation

Selecting this radio button will re-sample all keyframe lists from the current 'start' point of the animation to the current 'end' point fof the entire animation. For example, if the overall animation runs from time 0 to 100, but a rotation keyframe list only has keys from time 30 to 60, then this option will cause the new rotation keys to be re- sampled and created for time 0 to 100. In many cases a keyframe list will have an implicit 'loop-around' flag which allow a small number of keyframe to be looped indefintely. In such cases this radio button should be chosen so that the cyclical animation is captured in the re-sampled keyframe list. Take for example a bouncing ball for which the explicit animation keyframes are defined from frame 30 to 60 but which has a 'loop' flag enabled so that the bouncing will continue indefinitely - if this radio button were not chosen then the exported animation data would only run from frames 30 to 60, but if this radio button were chosen then explicit keyframes would be created outside this range as well. In general, if you export some animation data and find that an object no longer moves or rotates then try enabling this radio button.

Remove Redundant Keyframes From Re-Sampled Data

The re-sampling process creates one new keyframe for each frame in the current animation, hence there can be an overabundance of new keyframes in the exported animation. To alleviate this problem a robust 'keyframe reduction' algorithm was written which intelligently removes some or most of the re-sampled keyframes. The resulting exported animation will exihibit the same or similar behavior, but with much fewer keyframes. If this checkbox is not enabled (not check-marked) then no keyframe reduction will be performed.

'Distance' Difference Threshold

This numeric value indirectly controls how many redundant keyframes are to be removed from the re-sampled keyframe list. It is applicable to the following types of keyframe lists: translation, scaling, Euler rotation and path translation. Higher values will cause more keyframes to be removed. This value is the maxmum 'distance' the new keyframe list is allowed to deviate from the original re-sampled keyframe list. Take for example a sphere that is animated along a path; if this threshold value is set to 0.5 distance units (which is the default) then redundant keyframes of the animated path will be removed until such point that the sphere begins to deviate by more than 0.5 units from its 'ideal' location. In other words, if the value is set to 0.5 then you are guaranteed that the new reduced keyframe list will move the sphere along the same path in space, except that the sphere is allowed to deviate by 0.5 units from its original path. Smaller numbers will make the sphere adhear closer to its original path, but at the expense of retaining more keyframes.

Angular Distance Threshold (Degrees)

This is the same as the previous numeric value except that it applies to reduction of quaternion and Angle/axis rotation keyframe lists. The value is measured in degrees. For example, if set to 5.0 (the default) then redundant keyframes will be removed from a keyframe list until such point that a rotation angle begins to deviate from its ideal angle by more than 5 degrees. Small numbers (such as 1.0 and 0.5) will cause less deviation and more precise rotation conversions, but at the added expense of retaining more keyframes.