POV-Ray : Newsgroups : povray.newusers : rendering images in reverse Server Time
28 Mar 2024 19:18:54 EDT (-0400)
  rendering images in reverse (Message 1 to 5 of 5)  
From: Molly-J
Subject: rendering images in reverse
Date: 30 Mar 2022 00:15:00
Message: <web.6243d848b75db2b09cded0992eac0897@news.povray.org>
I want povray to produce images in both correct and reversed aspect(mirror).
I thought I saw the keyword "invert" somewhere in the documentation but maybe it
was a dream. how can I reverse my output images or get my camera to behave like
a  mirror?

Q) Why?
A) Because <REASONS>


Post a reply to this message

From: Bald Eagle
Subject: Re: rendering images in reverse
Date: 30 Mar 2022 06:30:00
Message: <web.624430632398ca21f9dae3025979125@news.povray.org>
"Molly-J" <nomail@nomail> wrote:
> I want povray to produce images in both correct and reversed aspect(mirror).
> I thought I saw the keyword "invert" somewhere in the documentation but maybe it
> was a dream. how can I reverse my output images or get my camera to behave like
> a  mirror?
>
> Q) Why?
> A) Because <REASONS>

suppose you want to reverse everything left-right.

instead of "right x" use "right -x" to reverse the camera view frustrum vector.


https://wiki.povray.org/content/Reference:Camera


Post a reply to this message

From: m@b
Subject: Re: rendering images in reverse
Date: 30 Mar 2022 07:02:10
Message: <624438b2$1@news.povray.org>
On 30/03/2022 6:26 pm, Bald Eagle wrote:
> "Molly-J" <nomail@nomail> wrote:
>> I want povray to produce images in both correct and reversed aspect(mirror).
>> I thought I saw the keyword "invert" somewhere in the documentation but maybe it
>> was a dream. how can I reverse my output images or get my camera to behave like
>> a  mirror?
>>
>> Q) Why?
>> A) Because <REASONS>
> 
> suppose you want to reverse everything left-right.
> 
> instead of "right x" use "right -x" to reverse the camera view frustrum vector.
> 
> 
> https://wiki.povray.org/content/Reference:Camera
> 
> 

To mirror an object (with image map):  scale<1,1,-1>

m@


Post a reply to this message

From: Kenneth
Subject: Re: rendering images in reverse
Date: 4 Apr 2022 18:50:00
Message: <web.624b750f2398ca24cef624e6e066e29@news.povray.org>
"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
}

----
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...


Post a reply to this message

From: Bald Eagle
Subject: Re: rendering images in reverse
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.