POV-Ray : Newsgroups : povray.newusers : Animation without clock Server Time
1 Nov 2024 17:19:28 EDT (-0400)
  Animation without clock (Message 1 to 7 of 7)  
From: Cesar
Subject: Animation without clock
Date: 24 Feb 2005 15:50:00
Message: <web.421e3dcd625e6befca7192a50@news.povray.org>
Hi,

I want to render a few images of the same scene, but with the camera in
differente places. Is it possible to make them all at once, reducing
raytracing time? Do I have to use a clock for this? Or there's some other
way?

Thanks,

Cesar


Post a reply to this message

From: Slime
Subject: Re: Animation without clock
Date: 24 Feb 2005 16:03:37
Message: <421e4129@news.povray.org>
> I want to render a few images of the same scene, but with the camera in
> differente places. Is it possible to make them all at once, reducing
> raytracing time? Do I have to use a clock for this? Or there's some other
> way?

You could use frame_number:

#switch(frame_number)
    #case(0)
        camera {...}
    #end
    ...
#end

Or like this:

#declare locations = array[3] {<1,2,3>,<4,5,6>,<7,8,9>};
#declare lookats = array[3] {<3,2,1>,<6,5,4>,<9,8,7>};

camera {
    location locations[frame_number]
    look_at lookats[frame_number]
}

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

From: Cesar
Subject: Re: Animation without clock
Date: 24 Feb 2005 16:25:01
Message: <web.421e44f674fee23ca7192a50@news.povray.org>
Great! That's what I was looking for. But the performance question remains.
Will it be faster to render the scene like that rather than one image at a
time? I ask because I will automate this and there will be a c++ program
generating the .ini file(s). If I will render 20 images, should I generate
20 .ini files or just one and let povray deal with the animation?

If povray starts from the begining for every frame, then there's no speed
gain and I think i prefer to change the file for each image. But if povray
cut some steps cause they've been done before, the the speed gain might be
worthwhile.


"Slime" <fak### [at] emailaddress> wrote:
> > I want to render a few images of the same scene, but with the camera in
> > differente places. Is it possible to make them all at once, reducing
> > raytracing time? Do I have to use a clock for this? Or there's some other
> > way?
>
> You could use frame_number:
>
> #switch(frame_number)
>     #case(0)
>         camera {...}
>     #end
>     ...
> #end
>
> Or like this:
>
> #declare locations = array[3] {<1,2,3>,<4,5,6>,<7,8,9>};
> #declare lookats = array[3] {<3,2,1>,<6,5,4>,<9,8,7>};
>
> camera {
>     location locations[frame_number]
>     look_at lookats[frame_number]
> }
>
>  - Slime
>  [ http://www.slimeland.com/ ]


Post a reply to this message

From: Bob Hughes
Subject: Re: Animation without clock
Date: 24 Feb 2005 16:35:41
Message: <421e48ad@news.povray.org>
"Cesar" <ces### [at] terracombr> wrote in message 
news:web.421e3dcd625e6befca7192a50@news.povray.org...
>
> I want to render a few images of the same scene, but with the camera in
> differente places. Is it possible to make them all at once, reducing
> raytracing time? Do I have to use a clock for this? Or there's some other
> way?

With the official version 3.6, yes; using the clock along with #switch() 
#case() choices to select each different camera view. You're probably asking 
about putting all views into a single image at rendertime, though, and that 
cannot be done directly.

This has been a subject talked about plenty in the past so I looked for any 
custom-patched POV-Ray's and only found a stereo view one at: 
http://stereopov.ichthyostega.de/
At least that shows it could be done. Maybe someone else knows if another 
kind exists, my mind is drawing a blank about it.

Bob Hughes


Post a reply to this message

From: Cesar
Subject: Re: Animation without clock
Date: 24 Feb 2005 17:05:02
Message: <web.421e4f6d74fee23ca7192a50@news.povray.org>
Very interesting. I actually don't care for the pictures side by side. But
the developer of stereopov also talks about a considerable speed gain.
That's what I want. Maybe there's another patch for that? I jsut did some
tests and povray and the render time is the same for each image, as I
expected. I guess I'll spend some days rendering :( It's not that bad :)


> With the official version 3.6, yes; using the clock along with #switch()
> #case() choices to select each different camera view. You're probably asking
> about putting all views into a single image at rendertime, though, and that
> cannot be done directly.
>
> This has been a subject talked about plenty in the past so I looked for any
> custom-patched POV-Ray's and only found a stereo view one at:
> http://stereopov.ichthyostega.de/
> At least that shows it could be done. Maybe someone else knows if another
> kind exists, my mind is drawing a blank about it.
>
> Bob Hughes


Post a reply to this message

From: Slime
Subject: Re: Animation without clock
Date: 24 Feb 2005 18:33:33
Message: <421e644d$1@news.povray.org>
> Great! That's what I was looking for. But the performance question
remains.
> Will it be faster to render the scene like that rather than one image at a
> time?

Each frame will take the same length of time to render regardless of whether
it's a frame of an animation or a separate pov file.

> If povray starts from the begining for every frame, then there's no speed
> gain and I think i prefer to change the file for each image. But if povray
> cut some steps cause they've been done before, the the speed gain might be
> worthwhile.

The only steps that are cut are things like the initialization of the
rendering engine. If I were you I'd do it all with one file as a single
animation render, unless the files are completely unrelated to each other.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

From: Mike Williams
Subject: Re: Animation without clock
Date: 24 Feb 2005 23:34:00
Message: <FUhJ5BAbpqHCFwK5@econym.demon.co.uk>
Wasn't it Bob Hughes who wrote:
>
>You're probably asking 
>about putting all views into a single image at rendertime, though, and that 
>cannot be done directly.

It can be done directly in MegaPOV, using the "camera_view" pigment. 

I've not checked what the speed is like, but I'd guess that it's slower
at RENDER time than doing two separate renders because POV has the
additional step of finding the surface onto which the camera_view
pigment is painted.

There might well be speed gains in situations where there's an object
that takes a large amount of PARSE time to construct, since it would
only need to be parsed once.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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