Small Instantiation Language: Animation support

SILLY supports animation and motion blur via range expressions.

Interpolation

Range expressions in SILLY are created with the special var keyword. You must use this keyword as you would use an arithmetic function. It requires at least two parameters, and all of its parameters must belong to the same type.

camera
    perspective(
	location: var(-10^Z, -5^Z),
	target:   ^0,
	up:       var(^Y, ^Y, ^Y + 0.1^X),   // Three parameters in var!
        angle:    var(60, 45),
	width:    800,
	height:   600);

We have specified three ranges for our camera. First, the camera travels from its initial position -10^Z to -5^Z. At the same time, the lens angle is reduced from 60 degrees to 45, which is another zooming technique.

While the camera is traveling, we change the up vector, rotating the camera a small angle towards the right side. In this case, the var function has three parameters, for dividing the range in two equal length parts. In the first interval, the up vector is not touched, and all the rotation is performed in the second half of the camera path. You can use as many parameters in a var range as you need.

This technique is easier than the common alternative: a explicit clock variable. However, if you don't feel easy with ranges, you can still use the clock predefined macro, which has been defined like this:

set clock = var(0.0, 0.1);

Setting a clock value

There are several techniques for changing the internal clock value. You can set the clock for rendering a single scene by executing the Project|Show clock menu command. This command displays the following window:

However, clock and range expressions are more frequently used with the Animation form:

Finally, if something changes in a scene, you can render it using the Motion Blur form:

This form generates and combine several shots from the same scene, but with slightly different clock values.

See also

Home | Small Instantiation Language | Basic syntax | Data types | Expressions | Macros | Rendering