POV-Ray : Newsgroups : povray.animations : Clockless_Animation : Re: Clockless_Animation Server Time
28 Apr 2024 18:45:30 EDT (-0400)
  Re: Clockless_Animation  
From: Kenneth
Date: 30 Jun 2017 00:50:00
Message: <web.5955d770992dfbe2883fb31c0@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:
>
> 3)...But unexpectedly, the animation proceeded *past* frame
> 100; in fact, it's never-ending, unless you stop the render.
>

That's not quite correct. The demo scene contains a #while loop, with the 'total
number of cameras' determined by the loop's counter. Although the animation
*does* proceed forever, it's because the #while loop itself is endlessly
repeated-- kind of like viewing an animated movie clip (with a definite number
of frames) that continuously loops. A clever feature, IMO!

From further experimenting, here are a few more bits of behavior worth
mentioning...

* The cameras in the scene don't *need* to be created in a #while loop or #for
loop (although that's definitely the most practical approach.) You could write
1001 INDIVIDUAL camera definitions-- with changing values of course-- and the
cameras are chosen one after another automatically, one for each new animation
frame.

* Using only 'real-time raytracing' ( +rtr )  *by itself* has odd behavior: Only
one animation frame appears-- it's with the *final* camera-- but the rendering
continues 'behind the scenes' endlessly.

* If your animated scene already has 'clock' and/or 'frame_number' in it for
changing something, that's OK, you don't need to comment-out those things; but
those actions are ignored (as if clock and frame_number are both set to zero and
remain so.) For that reason alone, you can't change anything in the scene
*except* the camera. But that's really useful anyway, for doing quick(er)
camera-movement test renders.

Given a typical animation scene-- one that wasn't initially set up to use these
features -- here's one way to make a few minor changes to the camera so that it
will work correctly (assuming that the camera was using 'clock' to vary its
parameters, and with default values of 0.0-to-1.0 for simplicity):

ORIGINAL camera statement example:
camera {
  perspective
  location  <0, 3 - 1.5*clock, -5>
  look_at   <-3*clock, 2 - 1.2*clock,  .5*clock>
  right     x*image_width/image_height
  angle 55
}

CLOCK (for the camera only) needs to be substituted with a #declared name:
#declare CLK = 0; // no longer the real clock

#while(CLK < 1.0)
// new camera statement...
camera {
  perspective
  location  <0, 3 - 1.5*CLK, -5>
  look_at   <-3*CLK, 2 - 1.2*CLK,  .5*CLK>
  right     x*image_width/image_height
  angle 55
}
#declare CLK = CLK + .005; // assuming that the original animation ran
// for 200 frames-- 1.0/.005 = 200
#end

For doing a typical NORMAL render of the animation, all that's necessary is to
comment-out the added #while-loop-specific parts (and re-#declare CLK = clock).


Post a reply to this message

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