Re: Ortho Cameras

Linas Vepstas (linas@innerdoor.austin.ibm.com)
Fri, 14 Oct 1994 17:52:35 -0500


> From: "Gavin Bell" <gavin@krypton.engr.sgi.com>
> Date: Wed, 12 Oct 1994 12:21:02 -0700
> To: www-vrml@wired.com
> Subject: Re: Ortho Cameras
>
> On Oct 11, 4:40pm, Linas Vepstas wrote:
> > Gavin Bell wrote a while ago:
> > > Implementing user interface that can deal with
> > > either orthographic or perspective scenes is the hard part.
> >
> > What's hard? What am I missing?
>
> "Zoom" is a little tricky. For perspective cameras, zoom corresponds
> to the field-of-view, which must be greater than 0 and less than 180
> degrees. For orthographic cameras, zoom corresponds to changing the
> width/height of the projection, which must be greater than zero and
> less than infinity. Coming up with a UI that works for both finite (0
> to 180) and infinite ranges is a little annoying.

??? I was trying to indicate in my last note that field-of-view is
clearly the wrong thing to manipulate (which is why it is a "hard
problem" for you). It is much easier to manipulate the width and
height -- both perspective and ortho have a concept of width and
height.

Furthermore, if you measure screen width and height at or near
the object at which you are looking, there is not all that much
of a visual difference between perspective & ortho. The screen
width & height are measured in world coordinates, so you get this
added benefit of knowing what your relative screen-size to viewed
object-size is.

Don't confuse "screen" with "monitor". The "screen" is the plane
onto which the projection occurs. The screen can be located anywhere
in world coordinate space. It is usually the most convenient to
locate the screen so that it intersects the object you are looking at.
Thats how/why you measure screen width and height in world coords.
The screen is usually perpendicular to the eye - lookat direction,
but doesn't have to be. The screen has its own normal vector.
The center of the screen does not have to coincide with the
lookat point -- thus, you have left, right, bottom and top coordinates
which are measured in screen (world) coordinate scales, using
the lookat point as the origin.

This is pretty textbook stuff, so I don't understand why you'd want
to use a field-of-view when this is a known-bad-thing-to-do.
Especially when its trivial to convert field of view to screen size.

> If you implement stereo viewing, you need to do slightly different
> things for ortho and perspective. Etc.

You mainpulate the lookat point, you manipulate the screen normal.
You can also manipulate the eye point. I admit I don't understand
the intricacies of stereopsis very well.

> You're right, all of this isn't really that big a deal, and it seems
> that enough people want orthographic cameras that the extra work is
> worth it.
>
> > -----------
> > I suggest replacing the height-angle with a screen height & width.
>
> What units are the screen height and width in? Pixels? (NOoooooo..)

Don't confuse "screen" with "video monitor". The screen is that thing
on which the projection occurs. Screen dimensions are always measured
using the same units as used in world coordinates.

> World coordinates at the near clipping plane? Far clipping plane?

?? Yes, you measure the distance to near and far in world coordinates,
along the line from eye to lookat point.

> Focal distance?

?? The focal distance is the distance between the eye and the lookat
point. The lookat point defines the origin of screen coordinates.

If you were to do depth-of-field effects, the screen is that plane
in which there is no blurring due to depth-of-field.

> Inventor's model seems to work pretty well...

I didn't mean to ding inventor, but now that I've looked at it
carefully, I wish to propose that a textbook-style camera may be
nicer to have/use. Certainly more flexible & powerful.

--linas