POV-Ray : Newsgroups : povray.general : Wide-screen orthographic camera? Server Time
31 Jul 2024 14:24:57 EDT (-0400)
  Wide-screen orthographic camera? (Message 1 to 10 of 27)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Steve Webb
Subject: Wide-screen orthographic camera?
Date: 6 Feb 2007 13:20:01
Message: <web.45c8c5dc6b774602d51f24440@news.povray.org>
Hello.

I'm trying to make a camera that'll make an orthographic (top-down, no
perspective) rendering of some objects that I can use as a background on my
desktop.  I want the image to not be stretched in any dimension and have
each pixel represent each pixel on the desktop, so if my desktop is
1280x1024, then I want a scene with a large box that's 1280x1024 to fill up
exactly every pixel in the resulting image which will be exactly 1280x1024.

* orthographic camera projection still changes the scale of the whole image
depending on the distance of my camera from the objects (is this even
correct - with parallel projection, should the location of the camera make
any difference with regards to scale at all)?

I figured out changing the aspect ratio, but with parallel projection,
shouldn't a 1280x1024 image have a scene that's 1280x1024 "units" in
resolution?

- Steve


Post a reply to this message

From: Warp
Subject: Re: Wide-screen orthographic camera?
Date: 6 Feb 2007 14:40:47
Message: <45c8d9be@news.povray.org>
Steve Webb <nomail@nomail> wrote:
> I'm trying to make a camera that'll make an orthographic (top-down, no
> perspective) rendering of some objects that I can use as a background on my
> desktop.  I want the image to not be stretched in any dimension and have
> each pixel represent each pixel on the desktop, so if my desktop is
> 1280x1024, then I want a scene with a large box that's 1280x1024 to fill up
> exactly every pixel in the resulting image which will be exactly 1280x1024.

  Assuming that the aspect ratio of your monitor is 4:3, then just use the
default camera settings and render using the 1280x1024 resolution.

> * orthographic camera projection still changes the scale of the whole image
> depending on the distance of my camera from the objects (is this even
> correct - with parallel projection, should the location of the camera make
> any difference with regards to scale at all)?

  You are doing something else than just changing the distance between
the camera and the objects.

> I figured out changing the aspect ratio, but with parallel projection,
> shouldn't a 1280x1024 image have a scene that's 1280x1024 "units" in
> resolution?

  No, why should it? A parallel projection just means that the rays sent
from the camera are parallel. It doesn't say anything about what is the
size of the projection window.

-- 
                                                          - Warp


Post a reply to this message

From: Steve Webb
Subject: Re: Wide-screen orthographic camera?
Date: 6 Feb 2007 16:05:00
Message: <web.45c8ed4cb7cf3473d51f24440@news.povray.org>
>   No, why should it? A parallel projection just means that the rays sent
> from the camera are parallel. It doesn't say anything about what is the
> size of the projection window.

So how do I change the size of the projection window to the width and height
of the output resolution?  Is there a way to do that no matter how far the
camera is from the scene?

- Steve


Post a reply to this message

From: Warp
Subject: Re: Wide-screen orthographic camera?
Date: 6 Feb 2007 17:06:04
Message: <45c8fbcc@news.povray.org>
Steve Webb <nomail@nomail> wrote:
> So how do I change the size of the projection window to the width and height
> of the output resolution?  Is there a way to do that no matter how far the
> camera is from the scene?

  What defines the size of the projection window is the distance between
the location of the camera and the look_at point (plus other settings).
If you change just the location parameter to be farther away and leave
the look_at unchanged, this will make the projection window larger. That's
probably what was confusing you.

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

-- 
                                                          - Warp


Post a reply to this message

From: Steve Webb
Subject: Re: Wide-screen orthographic camera?
Date: 6 Feb 2007 18:05:00
Message: <web.45c908a8b7cf3473d51f24440@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> Steve Webb <nomail@nomail> wrote:
> > So how do I change the size of the projection window to the width and height
> > of the output resolution?  Is there a way to do that no matter how far the
> > camera is from the scene?
>
>   What defines the size of the projection window is the distance between
> the location of the camera and the look_at point (plus other settings).
> If you change just the location parameter to be farther away and leave
> the look_at unchanged, this will make the projection window larger. That's
> probably what was confusing you.
>
>   If you want to move the camera without changing the size of the
> projection window, use 'translate' at the end of the camera block.
>
> --
>                                                           - Warp

Ok, here's what I'm trying to accomplish.  I'm making an "on demand"
rendered picture to show up on my desktop.  I capture the size and
locations of each window on my computer and compute a povray scene with
that info (each window is a "box" in my scene).  When window movement is
idle for a few seconds, I call povray to render a picture of the scene and
apply it directly to my desktop background.  So, my background picture is a
rendering the shadows of each window as if it were in the actual povray
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: Hugo
Subject: Re: Wide-screen orthographic camera?
Date: 6 Feb 2007 18:38:03
Message: <45c9115b$1@news.povray.org>
Hi Steve,

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.

You can set the height (width) of the viewing volume directly in the up 
  (right) camera vector statements.


Hugo.

-- 
www.bishop3d.com


Post a reply to this message

From: Trevor G Quayle
Subject: Re: Wide-screen orthographic camera?
Date: 6 Feb 2007 21:51:55
Message: <45c93ecb$1@news.povray.org>
"Hugo" <hug### [at] yahoocombr> wrote in message 
news:45c9115b$1@news.povray.org...
> Hi Steve,
>
> 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.
>
> You can set the height (width) of the viewing volume directly in the up 
> (right) camera vector statements.
>
>
> Hugo.
>
> -- 
> www.bishop3d.com

Mostly.  Use "right" and "up" to define your resolution, "location" and 
"look_at" define the viewing angle,  but, be aware also that "location 
defines the viewing plane, anything behind it will not be seen, so make sure 
your location is far enough back.  For your need, set your image size to 
+W1280, +H1024, for the camera: look_at 0, location z*(distance).   Make 
sure distance is large enough that you don't clip the scene, and center your 
scene at the origin with a size of 1280X1024.  Should work easy.

camera{
  orthographic
  right 1280
  up 1024
  look_at 0
  location z*1000
}

-tgq


Post a reply to this message

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

Goto Latest 10 Messages Next 10 Messages >>>

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