POV-Ray : Newsgroups : povray.general : Sequence of images but not animation : Re: Sequence of images but not animation Server Time
30 Jul 2024 08:30:00 EDT (-0400)
  Re: Sequence of images but not animation  
From: CShake
Date: 18 Jun 2009 14:12:44
Message: <4a3a839c@news.povray.org>
Daniel wrote:
> Hi. I have a povray file that has a few stuff in it, and I can use it to render
> an image. One of the things is:
> 
> mesh { #include "mesh.inc" inside_vector <1, 0, 0> translate <0, -2, 0>}
> 
> , which is a file that includes a complex mesh in triangle forms.
> 
> Now I have a huge series of meshes numbered as follows:
> 
> mesh00000.inc
> mesh00001.inc
> mesh00002.inc
> 
> etc, all the way to about 800 or something.
> 
> How can I get a single povray file to render all images, changing the value of
> the include file only for each seporate image?
> 

> serperate files. Oh, and the files should be saved as bmp format, same as the
> input mesh. So mesh00000.bmp etc...
> 
> anyone?
> 
> 

I came across a similar problem a while ago while working on macros, 
where I needed to call functions with different names depending on a 
parameter. The way I got it to work, thanks to clipka, was using a 
'parse literals' function:
#macro ParseLiteral(s)
   #declare ParseLiteralFile = "ParseLiteral_$$$.inc";
   #fopen ParseLiteral_FD ParseLiteralFile write
   #write (ParseLiteral_FD,s)
   #fclose ParseLiteral_FD
   #include ParseLiteralFile
#end

This would work for you by calling:
ParseLiteral(concat("#include mesh", str(MeshNumber,-5,0), ".inc"))
where 'MeshNum' is your frame number.

If you're looking to output to the animation style sequence of files, 
I'd recommend treating it like an animation with the proper frame usage 
(+KFI, +KFF, etc), and using the current frame number as MeshNumber.

Hope this helps, and if I'm wrong with some of the syntax that you can 
figure out the idea!

CShake


Post a reply to this message

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