Oval and rectangular viewports

Computer graphics is basically a simulation of our eyes, of creating a scene where our eyes will be, even (or especially) if the scene is imaginary. I’m going to touch a little bit on viewports. Think of viewports as surfaces where the scene is displayed. Your television screen or an application window on your computer are viewports with this definition.

Oval viewports

There aren’t really any oval viewports. This part is based on my observation and there are no references (that I could find).

So your eye works like a pinhole camera. What you see comes through your eye, gets inverted vertically and falls on your retina. The retina consists primarily of rods and cones (described this way because of their shapes). Rods are more sensitive to light, and are responsible for our night vision. Cones are responsible for our colour perception.

The image that forms on your retina is circular, because your pupil is circular. Obviously this would go on for a long time if I had to explain the full biology of our optical organs, so I’m rushing through a bit.

You have two eyes, so the two resulting images overlap each other. Your eyes can only focus on one thing at a time. To “compensate” for this, your brain shifts focus very quickly, and your eyes make minute adjustments. This gives the impression that you’re looking at many things (or at least a larger area) at the same time.

Because of the overlapping circular images and the minute readjustments of the eyes, I concluded that this was why I see a sort of oval shaped field of focus… see image below.

Retinal image

Oval viewport

I want to mention that this is a conclusion of mine based on my own observations. Feel free to let me know any citations or incorrect portions of my explanation. I’m mentioning this because this is related to…

Rectangular viewports

Most viewports are used on a computer screen, and a rectangular shape is most natural. The aspect ratio is typically 4:3, which is the width to height ratio.

One thing I want to point out is, our vision stretches to near infinite distances (or at least very very very far). Anything within our field of view (or FOV) is visible, provided it’s not blocked by something. Of course, just because it’s visible doesn’t mean we pay attention to it.

Oh dear, I seem to be rambling on and on… there’s just so much I need to tell you! *sigh*

Anyway, computer resources are limited because of calculation speed. To reduce the number of calculations, we limit the visible portion.

Rectangular viewport

We cut the visible portion using two planes, a near plane and a far plane. This coupled with a pyramidal view, creates a cut pyramid (with 6 flat planes). This cut pyramid or frustum defines our viewing volume. Anything within this is considered “visible”.

The far plane is set at a distance where it’s deigned so far that even if there’s an object present, it’s almost not visible. We can cut out more objects (and hence more calculations) by moving the far plane closer to the virtual camera.

The near plane is actually our viewport. So anything between the virtual camera and the near plane is technically invisible. In practice, the near plane is actually very near the camera, like 0.01 units away.

And that’s all I can think of that’s necessary for your understanding. I probably mislabelled some terms, either for simplification or I’m just wrong. Feel free to correct me so I can explain this part better.

Sorry, comments are closed, but you can contact me directly if you like.

Trackbacks

  1. […] learned a bit on viewports already. Now, we’ll look at how lights and cameras are used in a 3D […]

  2. […] plane is upright, representing the screen. The z-axis simply protrudes out of the screen. The viewport can cover all four quadrants of the XY plane. The illustration only covered the first quadrant so I […]

  3. […] outdoor scenes need to be “contained”. The trick is to use clipping planes, a near plane and a far plane, to restrict the amount of visible […]