POV-Ray : Newsgroups : povray.binaries.animations : Rendering time using animations Server Time
4 Dec 2024 21:39:58 EST (-0500)
  Rendering time using animations (Message 1 to 9 of 9)  
From: nimda
Subject: Rendering time using animations
Date: 30 Mar 2013 13:00:07
Message: <web.515717f612820c0238fbe2840@news.povray.org>
Hello people,

I had trouble with the rendering time of frames. If a scene needs, let's say,
ten minutes to render then an animation of 6000 frames would take approximately
41 days, which is a bit too much for only 4 minutes of movie (at 25 fps). But in
general the objects needing a lot of rendering time do not move, and on the
other hand the animated objects do not need a lot of time consuming details as
the eye of the viewer has not enough time to inspect the object thoroughly.
So I came upon the following idea: Instead of parsing and rendering the same
objects over and over again, let's just do it once, capture the scene in an
image file and use it as an image map on a z-plane. A bit like the scene in a
theater. This basically works fine but the animated objects
1)  don't cast shadows,
2)  do not disappear behind the immobile objects.

I have a workaround for both of these problems in some cases, but is is not
always possible.

For the first problem I thought of an horizontal plane with the "no-image"
object modifier but it doesn't capture shadows, the same thing happens when I
use the "Clear" color pigment. A good solution is to only recreate the "ground"
for each frame. In general grounds do not need a lot of detail, and
sophisticated objects like buildings, musical instruments etc. are standing
upright.

For the second problem I see as a solution to only rebuild the complex objects
(or only parts of them) for those frames in which the disappearance occurs.

I wonder if anybody has a better idea about this?


Post a reply to this message

From: John VanSickle
Subject: Re: Rendering time using animations
Date: 30 Mar 2013 22:24:44
Message: <51579e6c$1@news.povray.org>
On 3/30/2013 11:55 AM, nimda wrote:
> Hello people,
>
> I had trouble with the rendering time of frames. If a scene needs, let's say,
> ten minutes to render then an animation of 6000 frames would take approximately
> 41 days, which is a bit too much for only 4 minutes of movie (at 25 fps). But in
> general the objects needing a lot of rendering time do not move, and on the
> other hand the animated objects do not need a lot of time consuming details as
> the eye of the viewer has not enough time to inspect the object thoroughly.
> So I came upon the following idea: Instead of parsing and rendering the same
> objects over and over again, let's just do it once, capture the scene in an
> image file and use it as an image map on a z-plane. A bit like the scene in a
> theater. This basically works fine but the animated objects
> 1)  don't cast shadows,
> 2)  do not disappear behind the immobile objects.
>
> I have a workaround for both of these problems in some cases, but is is not
> always possible.
>
> For the first problem I thought of an horizontal plane with the "no-image"
> object modifier but it doesn't capture shadows, the same thing happens when I
> use the "Clear" color pigment. A good solution is to only recreate the "ground"
> for each frame. In general grounds do not need a lot of detail, and
> sophisticated objects like buildings, musical instruments etc. are standing
> upright.
>
> For the second problem I see as a solution to only rebuild the complex objects
> (or only parts of them) for those frames in which the disappearance occurs.
>
> I wonder if anybody has a better idea about this?

See if you can replace the complex objects and their shadows with 
sprites.  Getting the projection math right is going to be non-trivial.

Regards,
John


Post a reply to this message

From: nimda
Subject: Re: Rendering time using animations
Date: 31 Mar 2013 11:30:01
Message: <web.515855867cfdb22c38fbe2840@news.povray.org>
John VanSickle <evi### [at] KOSHERhotmailcom> wrote:
>
> See if you can replace the complex objects and their shadows with
> sprites.  Getting the projection math right is going to be non-trivial.
>
> Regards,
> John

I suppose this will involve the use of the "trace" function?
Or, maybe take a picture of the object/shadow and make the surroundings
transparent with GIMP or so, en then use this as an image-map on a box or so.


Post a reply to this message

From: John VanSickle
Subject: Re: Rendering time using animations
Date: 31 Mar 2013 20:45:27
Message: <5158d8a7$1@news.povray.org>
On 3/31/2013 10:25 AM, nimda wrote:
> John VanSickle <evi### [at] KOSHERhotmailcom> wrote:
>>
>> See if you can replace the complex objects and their shadows with
>> sprites.  Getting the projection math right is going to be non-trivial.
>>
>> Regards,
>> John
>
> I suppose this will involve the use of the "trace" function?
> Or, maybe take a picture of the object/shadow and make the surroundings
> transparent with GIMP or so, en then use this as an image-map on a box or so.

The second choice.

You can tell POV-Ray to make the surroundings transparent, so that the 
GIMP is not needed.

You will probably also want to make another rendering to use to make the 
shadow in the scene, so that each of these objects is represented by two 
polygons.  One polygon is shadowless and has the image of the object 
itself.  The other polygon is the cast shadow.  This is because the 
sprite representation of your object will probably not cast a realistic 
shadow.

I should probably give this idea a test to see how difficult it is.

Regards,
John


Post a reply to this message

From: nimda
Subject: Re: Rendering time using animations
Date: 2 Apr 2013 04:30:01
Message: <web.515a961b7cfdb22c1b4d85a60@news.povray.org>
John VanSickle <evi### [at] KOSHERhotmailcom> wrote:
> On 3/31/2013 10:25 AM, nimda wrote:
> > John VanSickle <evi### [at] KOSHERhotmailcom> wrote:
> >>
> >> See if you can replace the complex objects and their shadows with
> >> sprites.  Getting the projection math right is going to be non-trivial.
> >>
> >> Regards,
> >> John
> >
> > I suppose this will involve the use of the "trace" function?
> > Or, maybe take a picture of the object/shadow and make the surroundings
> > transparent with GIMP or so, en then use this as an image-map on a box or so.
>
> The second choice.
>
> You can tell POV-Ray to make the surroundings transparent, so that the
> GIMP is not needed.
>
And how would that be done?

> You will probably also want to make another rendering to use to make the
> shadow in the scene, so that each of these objects is represented by two
> polygons.  One polygon is shadowless and has the image of the object
> itself.  The other polygon is the cast shadow.  This is because the
> sprite representation of your object will probably not cast a realistic
> shadow.
>
> I should probably give this idea a test to see how difficult it is.
>
I'm certainly going to do that.

> Regards,
> John

Thanks for the hints.

Greetings,
Marc


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Rendering time using animations
Date: 2 Apr 2013 19:17:21
Message: <515b6701$1@news.povray.org>
nimda wrote:

> And how would that be done?

there is a command line option for this, +ua IIRC (and it needs to
be used with an output file type that supports transparency such as
png +fn). Basically if a ray does not hit an object (would render
with "background" color) it is considered transparent.

Regarding sprites you may also be interested in this thread

http://news.povray.org/povray.binaries.images/thread/%3C4a28f56d%241%40news.povray.org%3E


Post a reply to this message

From: clipka
Subject: Re: Rendering time using animations
Date: 2 Apr 2013 20:27:12
Message: <515b7760$1@news.povray.org>
Am 03.04.2013 01:17, schrieb Christian Froeschlin:
> nimda wrote:
>
>> And how would that be done?
>
> there is a command line option for this, +ua IIRC (and it needs to
> be used with an output file type that supports transparency such as
> png +fn). Basically if a ray does not hit an object (would render
> with "background" color) it is considered transparent.

Not exactly: In "#version 3.7" mode, if a ray does not hit an object the 
pixel is coloured as specified by the background colour; if that is 
transparent, then the pixel will be transparent (given that you use +ua).


Post a reply to this message

From: Kenneth
Subject: Re: Rendering time using animations
Date: 3 Apr 2013 15:15:00
Message: <web.515c7ed87cfdb22cc2d977c20@news.povray.org>
>
> ...So I came upon the following idea: Instead of parsing and rendering
> the same objects over and over again, let's just do it once, capture
> the scene in an image file and use it as an image map on a z-plane.
> A bit like the scene in a theater. This basically works fine but
> the animated objects
> 1)  don't cast shadows,
> 2)  do not disappear behind the immobile objects.

And John Van Sickle wrote...

> See if you can replace the complex objects and their shadows with
> sprites.  Getting the projection math right is going to be non-trivial.

The idea of rendering one image of the scene and then projecting it onto simple
geometry is a very good one. Instead of a plane, though, it would probably look
better if projected onto  *multiple* simple objects, in space, to give the
resulting scene a more 3D appearance. Like multiple 3D 'billboards.' (Or
sprites?) The trouble with that is figuring out the necessary image scalings
that would need to be done to the overlaid image_map(s), to get the individual
'sizes' of the projected images to all be correct (that is, all the *same* size)
from the camera's point of view. Certainly not trivial!

A really unique and simple way of doing such a thing is to use an include file
for POV-Ray called "Illusion.inc", found here...

http://runevision.com/3d/include/

Essentially, it takes your single rendered image_map and projects it onto as
many objects in the scene as you like, while automatically scaling the image in
depth. I.e., so that a box at 500*z gets its piece of the image_map at the same
'projected size' as a box at 5*z. The overall result is that your animated
camera can move around (within limitations) and all the '3D billboards' will
still show their pieces of the image_map correctly-sized. As an additional
detail, you could have the image_map's 'point of projection' follow the camera's
position, always being projected from there. (I'm not even sure what that effect
would look like!--but it sounds intriguing ;-)  )

There are more details to this, of course, but the code might be worth checking
out.

I'm not sure if would solve your particular shadow problem, though.

BTW, I posted an animation to the newsgroups not too long ago, illustrating what
Illusion.inc does, in a basic way; it might be more easily-grasped than my
explanation here.


Post a reply to this message

From: nimda
Subject: Re: Rendering time using animations
Date: 8 Apr 2013 09:20:01
Message: <web.5162c3b17cfdb22c787874620@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:
> >
> > ...So I came upon the following idea: Instead of parsing and rendering
> > the same objects over and over again, let's just do it once, capture
> > the scene in an image file and use it as an image map on a z-plane.
> > A bit like the scene in a theater. This basically works fine but
> > the animated objects
> > 1)  don't cast shadows,
> > 2)  do not disappear behind the immobile objects.
>
> And John Van Sickle wrote...
>
> > See if you can replace the complex objects and their shadows with
> > sprites.  Getting the projection math right is going to be non-trivial.
>
> The idea of rendering one image of the scene and then projecting it onto simple
> geometry is a very good one. Instead of a plane, though, it would probably look
> better if projected onto  *multiple* simple objects, in space, to give the
> resulting scene a more 3D appearance. Like multiple 3D 'billboards.' (Or
> sprites?) The trouble with that is figuring out the necessary image scalings
> that would need to be done to the overlaid image_map(s), to get the individual
> 'sizes' of the projected images to all be correct (that is, all the *same* size)
> from the camera's point of view. Certainly not trivial!
>
> A really unique and simple way of doing such a thing is to use an include file
> for POV-Ray called "Illusion.inc", found here...
>
> http://runevision.com/3d/include/
>
> Essentially, it takes your single rendered image_map and projects it onto as
> many objects in the scene as you like, while automatically scaling the image in
> depth. I.e., so that a box at 500*z gets its piece of the image_map at the same
> 'projected size' as a box at 5*z. The overall result is that your animated
> camera can move around (within limitations) and all the '3D billboards' will
> still show their pieces of the image_map correctly-sized. As an additional
> detail, you could have the image_map's 'point of projection' follow the camera's
> position, always being projected from there. (I'm not even sure what that effect
> would look like!--but it sounds intriguing ;-)  )
>
> There are more details to this, of course, but the code might be worth checking
> out.
>
> I'm not sure if would solve your particular shadow problem, though.
>
> BTW, I posted an animation to the newsgroups not too long ago, illustrating what
> Illusion.inc does, in a basic way; it might be more easily-grasped than my
> explanation here.

I solved the shadow problem in quite a different way. Suppose I have a picture
of a wall parallel to the z=0 plane and a horizontal floor that is quite
difficult to render or only available as the perspective view as given by the
picture. I cut out the floor and copy the floor let's say to "floor.png", the
remaining with the floor replaced by transparency to "wall.png". Then I use
"floor.png" as an image-map on the vertical plane z=0 and tilt this so that the
tiles look much like squares. The resulting picture which I called
"tilted_floor.png" is then used as an image map on the vertical plane z=0 which
I tilt back until it looks like in the original picture and is more or less
horizontal. I then add a vertical plane with "wall.png" as an image map and a
floor which is nearly horizontal and can be used to cast shadows on like it
would in reality.


Post a reply to this message

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