POV-Ray : Newsgroups : povray.binaries.animations : Rendering time using animations : Re: Rendering time using animations Server Time
29 Apr 2024 05:48:33 EDT (-0400)
  Re: Rendering time using animations  
From: nimda
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.