POV-Ray : Newsgroups : povray.newusers : rendering images in reverse : Re: rendering images in reverse Server Time
29 Apr 2024 10:54:23 EDT (-0400)
  Re: rendering images in reverse  
From: Bald Eagle
Date: 5 Apr 2022 07:05:00
Message: <web.624c21b42398ca21f9dae3025979125@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:
> "Bald Eagle" <cre### [at] netscapenet> wrote:
> >
> > instead of "right x" use "right -x" to reverse the camera view frustrum vector.
> >
>
> That is simple and elegant! And never occurred to me. It also works correctly
> even if the camera has an added 'rotation', like...
>
> camera {
>   perspective
>   location  <-.15, 1.48, -2>
>   look_at   <.35, 1.48,  0>
>   right     -x*image_width/image_height
>   angle 29
>   rotate 45*y
> }

Yeah, well, when I've screwed up the camera setup and/or position enough times,
I get to have a deeper appreciation of my little oopsies.  I've also had to
convert between the z-up and y-up vector spaces when modeling things, so that
"helped" too.  ;)

Playing with transforms and basis vectors let me sorta flesh all that out a bit.

Try:
up <1, 1, 0>

> ----
> I'm thinking that it would be nice to be able to render *both* standard and
> reversed views at the same time, side by side in the same image, but I have no
> idea how it could be done. I seem to recall that such a dual-camera(?) render
> may have been explained in an old newsgroup post... or maybe it's just my faulty
> old memory playing tricks on me...

That might have been a feature in Uberpov or Megapov ...

What I guess you could do is create a whole scene inside of a union:
#declare Scene = union {...}

And then do:
#declare Left  = object {Scene translate -x*VALUE}
#declare Right = object {Left scale <-1, 1, 1>}
object {Left}
object {Right}

To get both "views" in the same render.


Post a reply to this message

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