POV-Ray : Newsgroups : povray.general : How do I use a sequence of .inc files in an anim? Server Time
15 Nov 2024 21:17:48 EST (-0500)
  How do I use a sequence of .inc files in an anim? (Message 1 to 2 of 2)  
From: Andrew Cocker
Subject: How do I use a sequence of .inc files in an anim?
Date: 28 Nov 1998 10:40:33
Message: <36601971.0@news.povray.org>
I am using FORM06r to create organic shapes, and I have no trouble
rendering single frames, but FORM can output a series of .inc files which
evolve the shape from one pre-defined shape to another.
    If these files were numbered SHAPE001.inc through to SHAPE100.inc, how
do I get POV to load the relevant file each time it renders a new frame in a
hundred frame anim?
    I guess it has something to do with strings, but I'm not sure exactly to
go about it.

Any help would be appreciated.

Thanks in advance,

Andy Cocker


Post a reply to this message

From: =Bob
Subject: Re: How do I use a sequence of .inc files in an anim?
Date: 28 Nov 1998 10:59:34
Message: <36601de6.0@news.povray.org>
Here's a possible way:

#switch (FC) //frame count FC=frame number
#range (0,9)
#declare INCF=concat(Frame_Folder, Frame_Name, "00", str(FC,0,0), ".", "inc")
#break
#range (10,99)
#declare INCF=concat(Frame_Folder, Frame_Name, "0", str(FC,0,0), ".", "inc")
#break
#range (100,999)
#declare INCF=concat(Frame_Folder, Frame_Name, str(FC,0,0), ".", "inc")
#break
#end

FC is the running count frame-wise, and Frame_Folder is path to file, 
Frame_Name is name of file.
Reason for the triple digit division done here is because P-R 3.0* for Windows 
would not accept a -1 in the str() function to pad zeroes ahead of the frame 
number. That might work elsewhere but I could not get mine to.
Maybe this will help you out.

Message <36601971.0@news.povray.org>, Andrew Cocker  typed...
>
>    I am using FORM06r to create organic shapes, and I have no trouble
>rendering single frames, but FORM can output a series of .inc files which
>evolve the shape from one pre-defined shape to another.
>    If these files were numbered SHAPE001.inc through to SHAPE100.inc, how
>do I get POV to load the relevant file each time it renders a new frame in a
>hundred frame anim?
>    I guess it has something to do with strings, but I'm not sure exactly to
>go about it.
>
>Any help would be appreciated.
>
>Thanks in advance,
>
>Andy Cocker
>
>
>
>

-- 
 omniVERSE: beyond the universe
  http://members.aol.com/inversez/POVring.html
=Bob


Post a reply to this message

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