POV-Ray : Newsgroups : povray.general : Wide-screen orthographic camera? Server Time
31 Jul 2024 18:26:00 EDT (-0400)
  Wide-screen orthographic camera? (Message 8 to 17 of 27)  
<<< Previous 7 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Charles C
Subject: Re: Wide-screen orthographic camera?
Date: 6 Feb 2007 23:40:00
Message: <web.45c957c3b7cf3473704594a90@news.povray.org>
A couple of handy terms for this kind of stuff are image_width and
image_height.  You can use those in figuring apropriete "up" and "right"
vectors in your camera.
Charles



"Steve Webb" <nomail@nomail> wrote:
....
> scene.  However, I need any desktop resolution to work.  So, if my actual
> window on my desktop is 600x400+20+20, then I want the final rendering to
> show the corresponding "box" at exactly 600x400+20+20 in the output image.
> See what I mean?  I'm using an orthorgaphic projection, so nothing gets
> tweaked, but depending on the camera distance from the scene, the whole
> scene can zoom in and out.  I don't want to fiddle with the zoom manually
> and hard-code all kinds of distances for every resolution, I just want to
> say, I've got a desktop of 1280x1024, so my resulting image should be
> 1280x1024 and use some math so everything lines-up correctly.  I've got the
> aspect-ratio thing worked out, so dual-screen desktops work, but I can't
> figure out the zoom in orthographic-mode.  Clear as mud?  :)
>
> - Steve


Post a reply to this message

From: Warp
Subject: Re: Wide-screen orthographic camera?
Date: 7 Feb 2007 05:28:08
Message: <45c9a9b8@news.povray.org>
Hugo <hug### [at] yahoocombr> wrote:
> I believe that if you omit the angle keyword, the size of the "viewing 
> volume" is not affected by the position of the camera or by the look_at 
> keyword.

  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.

  If you want to move the camera around without changing the size of the
projection window, use 'translate'.

-- 
                                                          - Warp


Post a reply to this message

From: Charles C
Subject: Re: Wide-screen orthographic camera?
Date: 7 Feb 2007 12:50:00
Message: <web.45ca1071b7cf3473704594a90@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> Hugo <hug### [at] yahoocombr> wrote:
> > I believe that if you omit the angle keyword, the size of the "viewing
> > volume" is not affected by the position of the camera or by the look_at
> > keyword.
>
>   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.
>
>   If you want to move the camera around without changing the size of the
> projection window, use 'translate'.

I have a working-scene with an orthographic camera and macros for making
graphs.  I use it for manually creating/editing splines.  Anyway I tried
moving the camera location around by just multiplying the location by
various factors.  Even for the large ones there was no change in viewable
area, but there were some interesting side effects like lines only being
partially visible depending on what was behind a given part of the line.
Usually empty space doesn't obscure things but here it seems to.  (Ambient
1 cylinders, no AA involved and background color doesn't seem to matter.)
Charles


Post a reply to this message

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

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

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