Convert an fcurve interpolation

Article needs peer review

Summary

You have linear fcurves and you want to convert the linear data to spline interpolation.

Steps

  • Get the fcurve applied to the object (file import .fraw from the Animation Editor)
  • Create an action of the animation (Actions > Store Transformations). In case you have generated the clips using freeze to new source, instance the action in the mixer.
  • Once you have your Animation stored, simply open the script editor (Alt+4) and enter this script:
 FreezeClips,,,,20,3

You are entering a direct command: FreezeClips will execute the same command as if you were to go into Clip > Freeze to New Source. The ,,,, means you are skipping unnecessary steps. The 20 defines the Fcurvekind and the 3 gives the type of Interpolation (to be set as cubic).

Note: To get more information, highlight the command FreezeClips in the script editor and then click F1 to access the scripting documentation.

  • Make sure your StoredAnimPose clip is select then run the script. It will create a new Stored clip you will need to load it onto a new track RMB > Load Source > FrozenAction. Select the FrozenActionClip and RMB > Animation Editor. And you will see by selecting an Fcurves the type of Fcurve is currently set as Bezier. Note: Keep in mind that you can create a customer parameter with this script.
  • Select the instanced action node and choose Actions > Apply Action to "bake" fcurves to your object. You will need to Plot your Action using Tools > Plot > All Transformations. Make sure you give it an action name, and in the Fcurve options you can select the Kind of Fcurves:standard the Interpolation: spline (of course you are free to choose the type you prefer).
  • Now instance the ploted action on the mixer. Since plot creates a key per frame (which may not be what you want), you can Resample your Fcurves by choosing File > Preferences in the Animation Editor and selecting the Curve Processing Tab. In the Time Step value it will set a key to each number of frames, then click on Resample.



Applies To: XSI 1.5 on NT,Win2K,Irix

Posted: 4/20/2001



This page was last modified 19:34, 22 Nov 2005.
This page has been accessed 3819 times.

© Copyright 2009 Autodesk Inc. All Rights Reserved. Privacy Policy | Legal Notices and Trademarks | Report Piracy