POV-Ray : Newsgroups : povray.newusers : #include, animations, : Re: #include, animations, Server Time
29 Jul 2024 06:26:43 EDT (-0400)
  Re: #include, animations,  
From: kurtz le pirate
Date: 4 Jun 2006 04:46:23
Message: <kurtzlepirate-12B112.10462204062006@news.povray.org>
In article <448259a6@news.povray.org>,
 Skywise <int### [at] oblivionnothingcom> wrote:

> I'm not really a new user since I've been using the program since
> DKBTrace. But since I'm new to the POVRay newsgroups, and I've
> only really dabbled with POVRay, I'll consider myself a 'noob'.
> [snip]
> my resolution.ini....
> 
>   [640x480, No AA, 365 frames]
>   Width=640
>   Height=480
>   Antialias=Off
>   Initial_Frame=1
>   Final_Frame=365
>   Initial_Clock=0
>   Final_Clock=364
> 
> from the pov file....
> 
>   #declare framenumber = clock+1;
>   #declare name = "spheres";
>   #declare frame = str(framenumber, -4, 0);
>   #declare extension = ".inc";
>   #declare filename = concat(name, frame, extension);
> 
>   #include filename
> 
> The only other stuff in the code is the usual color, texture,
> and shape includes, a light source, a camera, and the obligatory
> checkered floor.
> 
> The sequence of declares is what I use to generate the filename
> to be included in each frame. For example, on the first frame
> where the clock is 0, the filename becomes "spheres0000.inc", and
> the tenth frame is "spheres0010.inc". This works.
... on the first frame, the filename is "spheres0001.inc" no ?
but, why not using directly the 'frame_number' variable ?



> At first I though that each frame doesn't just include the one
> include file of the current frame, but all the previous includes
> as well!!! But the rendered image is fine. It shows exactly what
> it should show with no extra stuff from previous includes.

#declare index=0;
#while (index< frame_number)
  #declare filename=concat("spheres",str(index,-4,0),".inc");
  #include filename
  #declare index=index+1;
#end


with your 'ini' this give you "spheres0001.inc" to "spheres0365.inc" and 
at each 'frame', all previous "spheresxxxx.inc" are included but of 
course, all includes are parsed and parsed and parsed...



-- 
klp


Post a reply to this message

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