POV-Ray : Newsgroups : povray.animations : animation question (im amatuer) : Re: animation question (im amatuer) Server Time
28 Jul 2024 10:32:22 EDT (-0400)
  Re: animation question (im amatuer)  
From: Chris Colefax
Date: 29 May 2001 19:55:40
Message: <3b1436fc@news.povray.org>
"george ferguson" <geo### [at] ferguson123freeservecouk> wrote:
>i was trying to create animations in pov and encountered a problem...i
>dont have a clue how to use clock.  I am a complete amatuer so I was
>wondering if it would be possible to create a macro or *.inc file which
>makes animation easier to understand.  Maybe the script would look
>something like this
[snip]
>then you would just output all the renderings to a *.avi using some kind
>of plugin and bang.  You got an animation!!!  That is kinda what it
> would look like.  What i'd like to know is
>1  would it be possible
>2  if you like it!
>3  if anyone would be willing to take up the challenge!!!

One of the advantages of the clock variable is that animation can be
frame-independent - if you use mathematical functions to control the
animation, you can render 1 frame per second or 100 per second, and still
get a smooth result (just the way a mathematically ray-traced sphere can be
rendered at 100x100 pixels or 1,000,000x1,000,000 pixels and look completely
smooth, unlike a sphere defined by triangles).

For anything but simple movements, however, working out the maths involved
can indeed be very confusing.  One way to make things easier is to use
keyframing, where you set various aspects of your animation at particular
points in time, and let the computer work out what needs to fit in-between
(just as in cel-animation, where master artists draw the main
poses/expressions, and let others draw all the little tiny movements to get
from one keyframe to another).

I believe Moray has a keyframing function, but fortunately POV-Ray macros
also allow you to do all your keyframing directly in POV-script.  You can
take a look at my Automatic Clock Modifier macros, which would let you
control your sphere this way:

sphere {<0, 0, 0>, 1 translate From (1, <-15, 5, -2>) To (30, <5, 2, 10>)}

This moves the sphere from <-15, 5, -2> at frame 1 to <5, 2, 10> at frame 30
(providing you use suitable rendering options, i.e. Initial_Clock=1
Final_Clock=30 Final_Frame=30).  More than this, though, you can add as many
To() statements as you like, moving your sphere from one location to
another.  You can also specify various transition types (so the sphere
accelerates or oscillates, jumps or bounces between positions), and you can
use the statements to control any numbers within POV-Ray (sizes, scales,
rotations),  as well as pigments, textures, media, etc.

You can download the file from my site:

   http://www.geocities.com/ccolefax

There you'll also find the Compressed Mesh Macros, which include various
animation features (e.g. morphing), and the Spline Macro file (letting you
create and animate objects using smooth spline curves), plus links to
tutorials for each file (with an excellent animation tutorial by Steve
Shepherd).


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.