POV-Ray : Newsgroups : povray.general : Wide-screen orthographic camera? Server Time
31 Jul 2024 16:29:28 EDT (-0400)
  Wide-screen orthographic camera? (Message 11 to 20 of 27)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 7 Messages >>>
From: Hugo
Subject: Re: Wide-screen orthographic camera?
Date: 7 Feb 2007 12:50:43
Message: <45ca1173@news.povray.org>
Warp wrote:
  >   Not true. The size of the projection is still determined using the
> distance between location and look_at. Just try it if you don't believe me.
> 

Hi Warp,
I did test it before my first post; perhaps we are talking about 
different things. Here is my test scene:

// -w150 -h150
background { color rgb <1,1,1> }

sphere { 0, 1 }

#declare PositionZ = 10;
#declare LookAtZ = 0;

// change the above values at will, keeping
// PositionZ > 1
// and
// LookAtZ < PositionZ

camera {
   orthographic
   location <0,0,PositionZ>
   look_at <0,0,LookAtZ>
   right 2*x
   up 2*y

}

Regards,
Hugo.

-- 
www.bishop3d.com


Post a reply to this message

From: Steve Webb
Subject: Re: Wide-screen orthographic camera?
Date: 7 Feb 2007 13:30:00
Message: <web.45ca1a96b7cf3473d51f24440@news.povray.org>
Ok, I have a solution.

What works for me:

camera {
        orthographic
        right image_width/2
        up image_height/2
        look_at 0
        location z*1000
        }

That seems to provide the correct values for me to map the output image to
the scene.  Plus, the "location" doesn't alter the zoom-factor at all.

Thanks!

- Steve


Post a reply to this message

From: Warp
Subject: Re: Wide-screen orthographic camera?
Date: 7 Feb 2007 13:43:58
Message: <45ca1dee@news.povray.org>
Hugo <hug### [at] yahoocombr> wrote:
> perhaps we are talking about different things.

  Yes: I didn't use 'right' nor 'up'.

-- 
                                                          - Warp


Post a reply to this message

From: Trevor G Quayle
Subject: Re: Wide-screen orthographic camera?
Date: 7 Feb 2007 14:10:01
Message: <web.45ca23e7b7cf3473c150d4c10@news.povray.org>
"Steve Webb" <nomail@nomail> wrote:
> Ok, I have a solution.
>
> What works for me:
>
> camera {
>         orthographic
>         right image_width/2
>         up image_height/2
>         look_at 0
>         location z*1000
>         }
>
> That seems to provide the correct values for me to map the output image to
> the scene.  Plus, the "location" doesn't alter the zoom-factor at all.
>
> Thanks!

I think it should be:

         right image_width
         up image_height

If your scene is your exact resolution.

Yes, location shouldn't change the zoom factor, but it will clip at the
viewing plane, make sure it is far enough away from the scene.


-tgq


Post a reply to this message

From: Warp
Subject: Re: Wide-screen orthographic camera?
Date: 7 Feb 2007 14:33:32
Message: <45ca298b@news.povray.org>
Trevor G Quayle <Tin### [at] hotmailcom> wrote:
> I think it should be:

>          right image_width
>          up image_height

  Doesn't that assume that pixels are square?

  If he is using a 4:3 monitor with a 1280x1024 resolution, the pixels
are not square and the rendered image will then look distorted.

-- 
                                                          - Warp


Post a reply to this message

From: Trevor G Quayle
Subject: Re: Wide-screen orthographic camera?
Date: 7 Feb 2007 14:55:00
Message: <web.45ca2d98b7cf3473c150d4c10@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> Trevor G Quayle <Tin### [at] hotmailcom> wrote:
> > I think it should be:
>
> >          right image_width
> >          up image_height
>
>   Doesn't that assume that pixels are square?
>
>   If he is using a 4:3 monitor with a 1280x1024 resolution, the pixels
> are not square and the rendered image will then look distorted.
>
> --
>                                                           - Warp

That's true, but I'm just basing on the original code, tracing pixel for
pixel at 1280x1024 resolution.

-tgq


Post a reply to this message

From: Steve Webb
Subject: Re: Wide-screen orthographic camera?
Date: 8 Feb 2007 11:15:01
Message: <web.45cb4b81b7cf3473d51f24440@news.povray.org>
FYI:

The actual camera settings didn't mesh-up correctly afterall, but after a
bit of fiddling, I found a camera setting that works for all resolutions.
I also have a screenshot in case anyone is interested:

camera {
        orthographic
        right image_width/1.7315
        up image_height/1.7315
        look_at 0
        location z*2000
        }

(Don't ask me why 1.7315 is the magic divisor, but it works perfectly).

Screenshot is here:

http://badcheese.com/Screenshot.png

Thanks again, everybody!

- Steve


Post a reply to this message

From: Charles C
Subject: Re: Wide-screen orthographic camera?
Date: 8 Feb 2007 12:45:00
Message: <web.45cb5faeb7cf347374eed8480@news.povray.org>
"Steve Webb" <nomail@nomail> wrote:
> (Don't ask me why 1.7315 is the magic divisor, but it works perfectly).

1/1.7315 must be the factor between unit size and pixel size.... It looks
like you're scaling the camera to your scene which must vary in size by
pixel count. Try (image_width/1.7315)/2.  You should get the middle half of
your desktop.

Another way would be to put the camera in the 0 to 1 range (up 1 right 1)
and scale everything (less the background because if it's an image_map it
should start out in the 0 to 1 range) in your scene by
<1/image_width,1/image_height,1>.

Charles


Post a reply to this message

From: scott
Subject: Re: Wide-screen orthographic camera?
Date: 8 Feb 2007 14:15:42
Message: <45cb76de@news.povray.org>
>  If he is using a 4:3 monitor with a 1280x1024 resolution, the pixels
> are not square and the rendered image will then look distorted.

I think it's more likely he is using an LCD, in which case the aspect ratio 
will be 5:4.


Post a reply to this message

From: Warp
Subject: Re: Wide-screen orthographic camera?
Date: 8 Feb 2007 14:25:19
Message: <45cb791f@news.povray.org>
scott <ask### [at] mecom> wrote:
> I think it's more likely he is using an LCD, in which case the aspect ratio 
> will be 5:4.

  I don't really understand why LCDs would do that. The current trend is
to go to wider screens, not narrower ones.
  (I'm not doubting what you are saying. I'm just saying that if that's
true, I really don't understand why they would do that.)

-- 
                                                          - Warp


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 7 Messages >>>

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