Function curves created in XSI usually have keys that are located at various frames throughout your animation. XSI evaluates the fcurve and interpolates between the keys.
Fcurves generated from external sources such as motion capture, however, may have many more keys than necessary (commonly one key per frame) or they may contain “noise”—sharp spikes and jags in the fcurve. You may want to remove some of the keys or reduce the noise to edit the animation.
Conversely, if you keyframe an animation in XSI and you want to transfer the animation data to an external device that requires frame-by-frame information (for example, a camera), you may want to increase the number of keyframes and preserve the motion as best as possible.
Smoothing decreases the variation between consecutive keyframes on the fcurve. It recreates keyframes at a regular time interval along the fcurve. It also modifies each keyframe’s value, resetting it closer to the average value of all keyframes so that the result of repeated applications of the Smooth command would be a flat curve!
Do either of the following:
• Select one or more fcurves that you want to smooth, then choose Curves > Smooth from the fcurve editor command bar.
This immediately smooths the fcurves using the current options set for smoothing in the Fcurve Editor Preferences editor.
or
1. Choose Curves > Curve Processing Options or open the Fcurve Editor Preferences editor (see Setting Fcurve Editor Preferences).
2. On the Curve Processing page, choose the Smooth method:
- Use Average Filter to apply a moving average where the weights of the averages are uniformly distributed. You can define the number of keys to average at a time using Filter Size. A greater number of keys results in a straighter curve.
- Use Gaussian Filter to apply a moving average where the weights of the averages are distributed as a bell curve. Use the Variance setting to control the degree of smoothing. A higher variance results in a smoother curve. The Gaussian filter usually provides better results than the Average filter.
3. Choose Curves > Smooth from the fcurve editor command bar using the options you’ve set.
Decreasing the Number of Keyframes (Fitting)
Fitting reduces the number of keys on the fcurve while preserving the original shape of an fcurve. You can also use the Resample option to reduce the number of keys (see the next section).
To reduce the number of keyframes on an fcurve
Do either of the following:
• Select one or more fcurves that you want to fit, then choose Curves > Fit from the fcurve editor command bar.
This immediately fits the fcurves using the current options set for fitting in the Fcurve Editor Preferences editor.
or
1. Select one or more fcurves that you want to fit.
2. Choose Curves > Curve Processing Options or open the Fcurve Editor Preferences editor.
3. On the Curve Processing page, define a Fit > Tolerance value to set the processing accuracy.
The higher the value, the more keys are removed, resulting in the curve’s shape deviating more from the original fcurve. Smaller values yield a closer fit to the original curve, but retain more keys.
4. Choose Curves > Fit from the fcurve editor command bar.
Resampling before Fitting
If you are using a low-density fcurve (one with few keys), you may find it useful to resample a curve before fitting. This way, you can apply a fit using a spline curve to help preserve the smoothness of the resulting fitted curve. If you fit a low-density curve without doing this, the segments between the keys may be more linear than you want.
To resample a curve before fitting
• Select the Resample before fit option on the Curve Processing page in the Fcurve Preferences editor and specify a step by which to resample.
The resampling is performed first, then the fitting action as previously described.
Changing the Number of Keyframes (Resampling)
Resampling adds or removes keyframes at the interval that you specify.
To change the number of keyframes on an fcurve
Do either of the following:
• Select one or more fcurves that you want to resample, then choose Curves > Resample from the fcurve editor command bar.
This immediately resamples the fcurves using the current options set for resampling in the Fcurve Editor Preferences editor.
or
1. Select one or more fcurves that you want to resample.
2. Choose Curves > Curve Processing Options or open the Fcurve Editor Preferences editor.
3. On the Curve Processing page, set the Resample > Time Step. The time step determines the frequency of the generated keyframes.
For instance, a time step of 1 creates a keyframe on every frame, and a time step of 2 creates a keyframe on every second frame.
You can also choose to keep or discard your original keys by selecting Keep Existing Keys.
4. Choose Curves > Resample from the fcurve editor command bar.
SOFTIMAGE|XSI v.6.01