POV-Ray : Newsgroups : povray.beta-test : Camera: some explanation needed : Re: Camera: some explanation needed Server Time
29 Jul 2024 18:19:38 EDT (-0400)
  Re: Camera: some explanation needed  
From: Scott Gammans
Date: 22 Mar 2002 13:46:17
Message: <3c9b7bf9$1@news.povray.org>
I **finally** stumbled onto the correct syntax after getting no help from
the docs.

camera {
     orthographic
     location <1000,0,0>
     up y
     right 4/3*x
     look_at <900,0,0>
     angle 90
}

The important parts here:
(a) Your "location" needs to be greater than your "look_at" (an obvious
requirement, but bears repeating), and probably should be on a parallel
axis. For example, in the camera definition above I am 1000 units out on the
x axis, looking at a "viewing plane" that is exactly 100 units away (at 900
x units), but with the same y and z offsets.
(b) Your aspect ratio for your rendering needs to match what you put in your
"up" and "right" statements. For example, if you are doing a 640x480
rendering (4:3 aspect ratio), your "right" statement should be "right
4/3*x". If you are doing a perfectly square (1:1 aspect ratio) rendering,
you would have "right x". If you're doing an image that is taller than it is
wider (e.g., 400x300), you would change the "up" statement instead of the
"right" statement (e.g., "up 4/3*y right x").
(c) You have to have an "angle" statement at the end. The smaller the
number, the closer you zoom in to the viewing plane specified in "look_at".

Once you do all that, it should work. (Of course, toruses still look like
crap in orthographic... *sigh*).


Post a reply to this message

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