Timewarp: What is the architecture behind timewarp?

Article needs peer review

Question

Is timewarp a node-based approach to an fcurve lookup? This is where a time node feeds each fcurve node with a time reference, and where the fcurve node computes the value, then sends the value to the parameter input.

Answer

Although this is a little complex, the answer to your question is yes, the time warping is generalized for clips. It is a way of arbitrarily mapping from a container (global) time to a localized animation time while taking into account other things like scales, cycles etc.

Timewarp in XSI takes two forms (both refer to action clips in the animation mixer): the time control for a clip, and the "warp" or "iwarp" variables used in clip effects.

The first form is an additional fcurve which is associated with the time control property of a clip. (The time control property is a "node" property used to handle timing changes on action clips.) If you activate timewarp on the time control, then the warp curve is used as an additional intermediate time transformation between container (global) time and the time taken from the action source that is used for a clip (fcurves, expressions, etc.).

For example, if you're at global time 10 and you evaluate an action clip, it?s the time control property that is responsible for determining the time that the animation inside the action is actually evaluated. Part of that is handling scale, offset, cycling etc., and you can add a warp to that as well (so it becomes something like AnimationSourceTime = WarpCurve(GlobalTime)).

This type of warp is quite good for simple things, but you can't write scripts referring to the warp curve, you can't open the curve in the main animation editor, you can't replace the warp with another animation source (such as an expression), and finally, the warping effect is also cycled when you cycle a clip (the warp is applied on the animation clip time, not the extrapolated clip time). The time control warp is applied for all items inside the clip.

The second, more flexible way in which you can control timewarp is by using the special variables "warp" or "iwarp" for a clip effect.

The "warp" variable allows you to define a custom parameter for the clip (called "warp"), and refer to it in the value map expression strings for any item in the clip (this is detailed in the Animating guide - it's tricky, but powerful). The advantages are that you can connect any sort of animation source to the warp parameter (since it?s a normal parameter), you can view the source in a standard animation editor, you can write scripts referring to the parameter, and you can decide if you want the warp repeated over cycles or not. In the basic use, you enter "warp" as the string for all the value map strings (you can script this too), then attach your own curve to a custom parameter called "warp", and you're done.

With the "iwarp" variable, you can have a distinct per-animation-channel (such as per fcurve source in the action clip) warp effect by treating the per-item parameter as a warp, attaching a curve or whatever, and using the string "iwarp" in the effect.

You can write a script to control timewarp (creation, navigation etc), and warp the entire clip with one curve (or other source), or have a separate warp over every item inside the clip.



Applies To: XSI 1.5 on NT,Win2K,Irix

Posted: 4/11/2001


This page was last modified 15:46, 6 Dec 2010.
This page has been accessed 5371 times.

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