Project Overview

Description

The Discontinuity Animation System project is an effort to create an easy-to-use program to help create animations with the POV-Ray raytracer.

POV-Ray provides a clock variable which can be used to create simple animations. However, using this mechanism to create anything more complex than a spinning cube is cumbersome and difficult. Discontinuity provides the ability to create multiple user-defined variables (called properties) which can change in a discontinuous manner.

Creating an animation with Discontinuity is a simple process. The user creates a property for all values in the POV-Ray source code which can change. The designer then defines a value for each property at various keyframes. Discontinuity then produces a POV-Ray .inc file which, interpolating between keyframes, #declares each property based on the clock variable. The .inc file can the be #included by a regular POV-Ray source code file which takes advantage of the #declared value.

An Example

Discontinuity's usefulness can best be explained by a simple example. In a scene, a programmer has a cube. The programmer would like the cube to move from the coordinate (0, 0, 0) to (10, 0, 0) during the first .5 clock units. The cube should remain in place for .2 clock units. It spends the remaining .3 units moving to (5, 5, 0). (Of course, an animation does not have to be exactly 1 unit long.) Meanwhile during the first .5 clock units, the cube slowly moves from white to red, while during the rest of the animation, it changes back to white.

The cube would be written as follows:

#include "example.inc"

box {
    <-1, -1, -1>, <1, 1, 1>
    translate <xtranslation, ytranslation, 0>
    pigment {
        rgb <1, whiteness, whiteness>
    }
}

The scene can be tested with a simple, temporary example.inc:

#declare xtranslation = 0;
#declare ytranslation = 0;
#declare whiteness = 1;

At this point, Discontinuity comes into play. The user defines the 3 properties - xtranslation, ytranslation, and whiteness. The following chart must then be filled:

Keyframe Property Value
Time Name xtranlation ytranslation whiteness
0.0 Start 0.0 0.0 1.0
0.5 Change direction 10.0 0.0 0.0
0.7 Stop 10.0 0.0 None
1.0 End 5.0 5.0 1.0

The data can then be exported as example.inc, replacing the temporary file. The animation can then be rendered from clock=0.0 to clock=1.0 (the default POV-Ray options) and the desired animation would be produced.

Feature Goals

Discontinuity will (hopefully) provide two major features to help create useful features to produce animations.

First of all, several types of properties will be available for use. Besides the obvious property types of numbers (as demonstrated in the example) and text (such as complete camera changes), other properties can be created to provide other, non-linear types of interpolation, such as bezier and cubic points. Perhaps custom property types should be allowed.

Another feature which will be implemented is the ability to create interdependence between property values and keyframe times. Examples of this include the ability to: