POV-Ray : Newsgroups : povray.binaries.images : Fractured Destination : Re: Fractured Destination Server Time
17 May 2024 15:36:16 EDT (-0400)
  Re: Fractured Destination  
From: Stephen
Date: 6 Jun 2017 09:05:01
Message: <5936a87d$1@news.povray.org>
On 6/6/2017 1:01 PM, Bald Eagle wrote:
> "Pekka Aho" <pek### [at] gmailcom> wrote:

>> Hehe, still trying to wrap my head around animation in POV, but perhaps some
>> day. :D
>
> Until you actually do it, it seems a little intimidating.
> But all it is, a separate "scene file" (the .ini file) that performs the
> equivalent of a for/next loop:
>
> #for (clock, 0, 1, STEP)
>       // render your scene file for all clock values
> #end
>

An alternative view.
I prefer to use frame_number rather than the clock variable.
For a start you will want to know how long your animation to last and 
the framerate of your animation. This will give you the total number of 
frames needed. I find it easier to work with integers as when working 
with complicated animations it is useful to define key frames where 
changes occur. The arithmetic* is not really harder than using decimals 
and reduces the chances of rounding errors. It also makes it easier to 
have cyclic functions within your animations using mod(A,B).



> ..... only this takes place OUTSIDE of the scene file, so for every clock value,
> the scene gets rendered, and then the clock increments - whereas, obviously, a
> #for-next loop INSIDE the scene file runs the full range and THEN the scene gets
> rendered.
>
> That's pretty much all there is to it.
> (just copy the scene and the .ini to a separate directory to keep all of those
> rendered frames easy to manage)

Or you can define where the image files are to be saved in the ini file. 
Alternatively there is an option to define the output directory in 
povray.ini. (But I cannot remember what it is as it has been years since 
I used it. :-(  )

> Then you just pop open something like VideoMach, highlight all of the frames,
> select the video file type, and hit GO.   And you're done.
>
> So you just use clock just like any other variable in your scene.
> Add it to anything, multiply things by it, divide things by it....
>
> clock * 360 will give you 360 degrees
> clock * tau will give you 2*pi radians
> translate <X+clock, 0, 0> will make something move to the right
> scale 1-clock will make it shrink away to nothing
>
Which reminds me that you can have your clock running from A to B not 
just 0 to 1


> you can use it in isosurface functions, as the amplitude for noise, as an rgb
> component, as a light source strength, a camera location or look_at attribute
> ......
>
> Just give it a go - you'll like it   :)
>
>

And it is fascinating watching your animation render frame by frame.
So don't let the multiple ways of doing things put you off. It is 
certainly easier using the clock variable to start off.


* I've given up on the maths Vs math controversy. I'm now going to 
concentrate in correcting the world when it uses maths for something 
that is only arithmetic. ;)


-- 

Regards
     Stephen


Post a reply to this message

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