Section 5 - Animation

Animatable attributes can be driven by special entities called animation curves, which perform time-dependent interpolation of a specified set of knot values. There are 3 types of animation curve entities, ANIMCURVESCALAR, ANIMCURVEVEC2, and ANIMCURVEVEC3, which are used to drive scalar, vec2, and vec3 attributes, respectively. The times and knots attributes of an ANIMCURVE specify the knot vector, and the interptype attribute specifies the interpolation method used, either linear or spline. For example, the following file format fragment specifies an animation curve and uses it to drive the position of a sphere:

ANIMCURVEVEC3 { 
	name        AnimCurve1 
	times       { 0.0, 10.0 } 
	knots       { 0.0 0.0 0.0, 0.0 0.0 10.0 } 
	interptype  LINEAR 
} 

SPHERE { 
	name        MovingSphere 
	translate   <AnimCurve1> 
} 
Figure 1: Animating a sphere

Over the course of the animation from frame 0 to frame 10, the sphere will move in a straight line from (0,0,0) to (0,0,10). The frame sequence that a given camera will render is controlled by the animrange attribute of the camera.

Any attribute that is texturable is also animatable. While textured attributes are re-evaluated for every shading sample, animated attributes are evaluated only once per frame, as would be expected.