[Home]

[Dave G's Animation System]

[Download]

[Links]

Breaking Apart the clock
A TimeLine for POV-Ray

Welcome to Dave G's TimeLine Animation System (DGTL) for POV-Ray. Using DGTL you can create complex pov scene files that are actually scenes!

What's wrong with the clock?

When I started trying to create fully animated sequences using POV-Ray I came across a little problem. There was only the clock variable. And, useful as it is, it has some drawbacks.

So I decided to break the single clock variable into chunks. Potentially many chunks. The result was a TimeLine.

How do I create the TimeLine?

Creating a TimeLine is very simple. The TimeLine is made of chunks called Segments. Each segment is assigned a duration using a simple #declare. Then you simply #include the DGTL.INC file. For example:

#declare DGTLSegment01 = 1
#declare DGTLSegment02 = 9

#include "DGTL.INC"

If you let POV-Ray render this as part of an animation DGTL will break the clock variable into two segments, Segment 1 and segment 2. As POV-Ray renders individual frames DGTL will step through the two segments.

In this case, the first 10% of the rendered frames will be spent in segment 1. The last 90% of the frames will be in segment 2.

So How Do I Use the TimeLine?

Well, DGTL returns a number of variables for you to use in your pov file. Each time POV-Ray renders a new frame DGTL will calculate new values for these variable. Then you simply use them in your file.

And since they will be different for every frame you can build logic around these variables. Here are some of them:

To put one of these to use, you could do something like:

#switch (DGTLCurrent_Segment)
#case (1)
// animate in segment 1
#break
#case (2)
// animate in segment 2
#break
#end

I wrote the TimeLine to allow me to create complex scenes in a single pov file. And, more importantly, to be able to render those complex scenes with one call to POV-Ray.

It simply breaks the POV-Ray clock variable into many 'sub' clocks that can have different durations relative to each other.

So That's All?

Well yes, and no. Yes, that's all there is to a TimeLine. There are a few more variables that allow for even more control, and you can have up to 99 segments, but its that simple.

But no, that's not all. The particle system I've written is TimeLine aware. You can create particles that only exist during a certain segment, or properly use the segment clock variable. So it can get much more interesting. And as I add more parts to the Dave G's series of include files they will all be TimeLine aware if possible.

So, if you're interested in trying it out for yourself, or just looking at some example code, why not download DGTL as part of Dave G's Animation System?

[ Go Home ]

Hosted by Geocities, your free personal home page on the web.

This page copyright David Govoni 1997

Any comments, or suggestions?
E-mail me
.