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