POV-Ray : Newsgroups : povray.general : Reading Consequtive Images Server Time
6 Nov 2024 02:23:54 EST (-0500)
  Reading Consequtive Images (Message 1 to 9 of 9)  
From: Ken
Subject: Reading Consequtive Images
Date: 5 Mar 1999 02:31:05
Message: <36DF91A6.A7D2421C@pacbell.net>
Hi, 

  First - Thanks to all who replied to the French to English thread.
The volume of responces was amazing to say the least.

  I know it's been discussed before and I should know this but I
forget.
  I have a set of images I would like to read in sequentially as an
animation progresses. Each can be numbered in what ever format is
necessary. Then it's a one frame one image kind of deal. Is it possible
to instruct pov to read iamges in this manner and if so what is the
exact syntax for doing so. For twenty or so images I can write twenty
pov files. I have closer to 500 images and no way am I going to hand
edit 500 pov files to make it work. Your help would be apppreciated if
you can provide the correct answer.
 

-- 
Ken Tyler

mailto://tylereng@pacbell.net


Post a reply to this message

From: Roland Mas
Subject: Re: Reading Consequtive Images
Date: 5 Mar 1999 04:37:40
Message: <m3bti8i8ez.fsf@clodomir.rezel.enst.fr>
Ken <tyl### [at] pacbellnet> writes:

> Then it's a one frame one image kind of deal. Is it possible to
> instruct pov to read iamges in this manner and if so what is the
> exact syntax for doing so.

The exact syntax can probably be found in the docs, but I'm pretty
sure that a solution lies in the vicinity of the float-to-string
conversion functions, and of the string manipulation functions.  The
idea is: you know clock, you know the number of frames, the initial
clock, the final clock.  From these data you can deduce the index of
the frame currently rendered.  Once this index is known, convert it
into a string and concatenate this string with the fixed part of your
file names.  And use the resulting string in your image_map.

> For twenty or so images I can write twenty pov files. I have closer
> to 500 images and no way am I going to hand edit 500 pov files to
> make it work.

You could do it quite simply with a Perl script.  Or even, just a
shell script.

Roland.
-- 
                                                         Roland Mas


Post a reply to this message

From: Andrew Cocker
Subject: Re: Reading Consequtive Images
Date: 5 Mar 1999 14:37:54
Message: <36e03292.0@news.povray.org>
Ken wrote in message <36DF91A6.A7D2421C@pacbell.net>...
>Hi,
>
>  First - Thanks to all who replied to the French to English thread.
>The volume of responces was amazing to say the least.
>
>  I know it's been discussed before and I should know this but I
>forget.
>  I have a set of images I would like to read in sequentially as an
>animation progresses. Each can be numbered in what ever format is
>necessary. Then it's a one frame one image kind of deal. Is it possible
>to instruct pov to read iamges in this manner and if so what is the
>exact syntax for doing so. For twenty or so images I can write twenty
>pov files. I have closer to 500 images and no way am I going to hand
>edit 500 pov files to make it work. Your help would be apppreciated if
>you can provide the correct answer.
>
>
>--
>Ken Tyler
>
>mailto://tylereng@pacbell.net


Hi Ken,

The following *should* do what you require. I used it to sequentially load 575 .inc
files,
each named ev_a0001.inc, ev_a0002.inc etc. I had to make the clock run from 1 to 575.
Credit must go to Bob Hughes for this, who helped me out in the first place.



#declare FC=clock;

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

#include INCF


Post a reply to this message

From: Ken
Subject: Re: Reading Consequtive Images
Date: 5 Mar 1999 23:55:54
Message: <36E0BEBF.94FB2F73@pacbell.net>
Andrew Cocker wrote:

> Hi Ken,
> 
> The following *should* do what you require. I used it to sequentially load 575 .inc
files,
> each named ev_a0001.inc, ev_a0002.inc etc. I had to make the clock run from 1 to
575.
> Credit must go to Bob Hughes for this, who helped me out in the first place.

That looks like it will do what I need. Thanks for the code example.
And thank you too Bob.

-- 
Ken Tyler

mailto://tylereng@pacbell.net


Post a reply to this message

From: Ken
Subject: Re: Reading Consequtive Images
Date: 6 Mar 1999 00:01:59
Message: <36E0C02C.984E772E@pacbell.net>
Roland Mas wrote:

> > For twenty or so images I can write twenty pov files. I have closer
> > to 500 images and no way am I going to hand edit 500 pov files to
> > make it work.
> 
> You could do it quite simply with a Perl script.  Or even, just a
> shell script.
> 
> Roland.
> --
>                                                          Roland Mas

I could have probably hacked something together in qbasic to generate
the files as well but the amount of space the files would take and
batch rendering nature of the process is not too appealing. I don't
recall the number but pov also has a top end for the number of files
it will hold in the file queue. I prefer when at all possible to let
Pov do the dirty work for me. And really who wouldn't ?

-- 
Ken Tyler

mailto://tylereng@pacbell.net


Post a reply to this message

From: Roland Mas
Subject: Re: Reading Consequtive Images
Date: 6 Mar 1999 02:49:37
Message: <m34snz12i7.fsf@clodomir.rezel.enst.fr>
Ken <tyl### [at] pacbellnet> writes:

> I could have probably hacked something together in qbasic to generate
> the files as well but the amount of space the files would take and
> batch rendering nature of the process is not too appealing. 

True, unless you just put one line in the include file, say 
#declare File_to_include = "thingy042.tga"
and it's all.

> I don't recall the number but pov also has a top end for the number
> of files it will hold in the file queue.

True too, unless you generate the include file "on the fly" with the
Pre_Frame_Command (or whatever, I never used it) option, in which case
the whole animation is but one entry on the queue.

> I prefer when at all possible to let Pov do the dirty work for
> me. And really who wouldn't ?

True, unless...  No "unless" that I can think of :-)

Roland.
-- 
Roland Mas


- Genki desu, ture en zinc.


Post a reply to this message

From: Bob Hughes
Subject: Re: Reading Consequtive Images
Date: 6 Mar 1999 04:31:31
Message: <36E0F5BB.4237AB14@aol.com>
Aw shucks. You all are always welcome, you know that. <mush>
Reminds me, wonder if the left-padded zeroes are working yet in the
str() function [under Windows platform anyhow]?
I'll have to take another look.


Ken wrote:
> 
> Andrew Cocker wrote:
> 
> > Hi Ken,
> >
> > The following *should* do what you require. I used it to sequentially load 575
.inc files,
> > each named ev_a0001.inc, ev_a0002.inc etc. I had to make the clock run from 1 to
575.
> > Credit must go to Bob Hughes for this, who helped me out in the first place.
> 
> That looks like it will do what I need. Thanks for the code example.
> And thank you too Bob.
> 
> --
> Ken Tyler
> 
> mailto://tylereng@pacbell.net

-- 
 omniVERSE: beyond the universe
  http://members.aol.com/inversez/POVring.htm
 mailto:inv### [at] aolcom?PoV


Post a reply to this message

From: PoD
Subject: Re: Reading Consequtive Images
Date: 6 Mar 1999 16:45:53
Message: <36E1A215.1159@merlin.net.au>
Here's a generic way to do it

#declare BaseName = "ev_a"
#declare Extension = ".inc"
#declare NameDigits = 8-strlen(BaseName); // or just a number
#declare LastFrame = 575;
#declare FirstFrame = 1;
#declare Frame = clock * (LastFrame-FirstFrame) + FirstFrame;
#declare FileName = concat( BaseName, str(Frame,-NameDigits,0),
Extension )
#debug concat(FileName,"\n")

Cheers, PoD.

PS
It'd be much easier with access to POV's variables, such as frame number
;)


Post a reply to this message

From: Bob Hughes
Subject: Re: Reading Consequtive Images
Date: 7 Mar 1999 19:32:25
Message: <36E31A58.11801619@aol.com>
I cancelled my previous reply post. I should not type when I get real
dumb.
Anyhow, the left-padded zeroes does work now for me in the Windows
version of 3.1d and your example is very easy.
Think everyone would want to see a direct frame number control.
Manipulation of the way the count goes would be good, every third frame
etc. output and the like.

PoD wrote:
> 
> #declare BaseName = "ev_a"
> #declare Extension = ".inc"
> #declare NameDigits = 8-strlen(BaseName); // or just a number
> #declare LastFrame = 575;
> #declare FirstFrame = 1;
> #declare Frame = clock * (LastFrame-FirstFrame) + FirstFrame;
> #declare FileName = concat( BaseName, str(Frame,-NameDigits,0),
> Extension )
> #debug concat(FileName,"\n")
> 
> Cheers, PoD.
> 
> PS
> It'd be much easier with access to POV's variables, such as frame number
> ;)

-- 
 omniVERSE: beyond the universe
  http://members.aol.com/inversez/POVring.htm
 mailto:inv### [at] aolcom?PoV


Post a reply to this message

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