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