POV-Ray : Newsgroups : povray.general : changing includes during animation Server Time
30 Jul 2024 22:19:01 EDT (-0400)
  changing includes during animation (Message 1 to 6 of 6)  
From: kike
Subject: changing includes during animation
Date: 26 Mar 2008 10:35:01
Message: <web.47ea6c41461b9814be7bfb550@news.povray.org>
Hello everybody:

I'm working on an animation which is supposed to mix real video and povray
generated graphics. My question is:

I would like to change a call to an include statement, this is

on the first clock step -->#include "file1.png"
on the 2nd clock step -->#include "file2.png"
on the 3rd clock step -->#include "file3.png"
..
..
..
and so on.

The idea is that I dont know how to do it without writting hundreds of lines on
pov.

So the question is: is it possible to change the name of the files you call with
the include? Something like

#include "file"+clock+".png" ??????

Thank you very much folks.


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: changing includes during animation
Date: 26 Mar 2008 10:45:46
Message: <47ea6faa$1@news.povray.org>

> #include "file"+clock+".png" ??????

#include concat("file", str(clock, 0,0), ".png")

Read on the arguments for 'str' if you want decimal numbers or zero-padding.


Post a reply to this message

From: Warp
Subject: Re: changing includes during animation
Date: 26 Mar 2008 10:54:38
Message: <47ea71be@news.povray.org>
Nicolas Alvarez <nic### [at] gmailisthebestcom> wrote:

> > #include "file"+clock+".png" ??????

> #include concat("file", str(clock, 0,0), ".png")

  No, not "clock" but "frame_number".

-- 
                                                          - Warp


Post a reply to this message

From: Stephen
Subject: Re: changing includes during animation
Date: 26 Mar 2008 11:15:43
Message: <uitku39hc86sjug6cjoib061c82fq3klpo@4ax.com>
On Wed, 26 Mar 2008 12:45:37 -0300, Nicolas Alvarez
<nic### [at] gmailisthebestcom> wrote:


>> #include "file"+clock+".png" ??????
>
>#include concat("file", str(clock, 0,0), ".png")
>
>Read on the arguments for 'str' if you want decimal numbers or zero-padding.

Yes as Warp says, frame_number is better for this. It saves
calculating what the frame number (file number) should be. I use this
method to import numbered meshes into an animation.
-- 

Regards
     Stephen


Post a reply to this message

From: kike
Subject: Re: changing includes during animation
Date: 26 Mar 2008 11:20:00
Message: <web.47ea76f7ce341c0bbe7bfb550@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> Nicolas Alvarez <nic### [at] gmailisthebestcom> wrote:

> > > #include "file"+clock+".png" ??????
>
> > #include concat("file", str(clock, 0,0), ".png")
>
>   No, not "clock" but "frame_number".
>
> --
>                                                           - Warp

Thanks!!!!

As soon I finish the animation I will post a link.


Post a reply to this message

From: John VanSickle
Subject: Re: changing includes during animation
Date: 27 Mar 2008 01:00:30
Message: <47eb37fe@news.povray.org>
kike wrote:
> Hello everybody:
> 
> I'm working on an animation which is supposed to mix real video and povray
> generated graphics. My question is:
> 
> I would like to change a call to an include statement, this is
> 
> on the first clock step -->#include "file1.png"
> on the 2nd clock step -->#include "file2.png"
> on the 3rd clock step -->#include "file3.png"

#declare FileName=concat("file",str(frame_number,-3,0),".png");

Of course, you can't include .png files this way, but you can use them 
in image_map statements.

The -3 part indicates that the file numbers are three digits, padded on 
the left with zeros if need be.  If the number in the file name is not 
padded, then replace the -3 with 0 .

Regards,
John


Post a reply to this message

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