2.3.1.2 Types of Projection
The following list explains the different projection types that can be used with the camera. The most common types
are the perspective and orthographic projections. The CAMERA_TYPE should be the first item in a camera
statement. If none is specified, the perspective camera is the default.
You should note that the vista buffer can only be used with the perspective and orthographic camera.
2.3.1.2.1 Perspective projection
The perspective keyword specifies the default perspective camera which simulates the classic pinhole
camera. The (horizontal) viewing angle is either determined by the ratio between the length of the direction
vector and the length of the right vector or by the optional keyword angle , which is the
preferred way. The viewing angle has to be larger than 0 degrees and smaller than 180 degrees. See the figure in
"Placing the Camera" for the geometry of the perspective camera.
2.3.1.2.2 Orthographic projection
The orthographic camera offers two modes of operation:
The pure orthographic projection. This projection uses parallel camera rays to create an image of the
scene. The area of view is determined by the lengths of the right and up vectors. One of
these has to be specified, they are not taken from the default camera. If omitted the second method of the camera is
used.
If, in a perspective camera, you replace the perspective keyword by orthographic and
leave all other parameters the same, you will get an orthographic view with the same image area, i.e. the size of the
image is the same. The same can be achieved by adding the angle keyword to an orthographic camera. A
value for the angle is optional. So this second mode is active if no up and right are within the camera statement, or
when the angle keyword is within the camera statement.
You should be aware though that the visible parts of the scene change when switching from perspective to
orthographic view. As long as all objects of interest are near the look_at point they will be still visible if the
orthographic camera is used. Objects farther away may get out of view while nearer objects will stay in view.
If objects are too close to the camera location they may disappear. Too close here means, behind the orthographic
camera projection plane (the plane that goes through the look_at point).
2.3.1.2.3 Fisheye projection
This is a spherical projection. The viewing angle is specified by the angle keyword. An angle of 180
degrees creates the "standard" fisheye while an angle of 360 degrees creates a super-fisheye
("I-see-everything-view"). If you use this projection you should get a circular image. If this is not the
case, i.e. you get an elliptical image, you should read "Aspect Ratio".
2.3.1.2.4 Ultra wide angle projection
This projection is somewhat similar to the fisheye but it projects the image onto a rectangle instead of a circle.
The viewing angle can be specified using the angle keyword.
2.3.1.2.5 Omnimax projection
The omnimax projection is a 180 degrees fisheye that has a reduced viewing angle in the vertical direction. In
reality this projection is used to make movies that can be viewed in the dome-like Omnimax theaters. The image will
look somewhat elliptical. The angle keyword is not used with this projection.
2.3.1.2.6 Panoramic projection
This projection is called "cylindrical equirectangular projection". It overcomes the degeneration problem
of the perspective projection if the viewing angle approaches 180 degrees. It uses a type of cylindrical projection to
be able to use viewing angles larger than 180 degrees with a tolerable lateral-stretching distortion. The angle
keyword is used to determine the viewing angle.
2.3.1.2.7 Cylindrical projection
Using this projection the scene is projected onto a cylinder. There are four different types of cylindrical
projections depending on the orientation of the cylinder and the position of the viewpoint. A float value in the range
1 to 4 must follow the cylinder keyword. The viewing angle and the length of the up or right
vector determine the dimensions of the camera and the visible image. The camera to use is specified by a number. The
types are:
-
vertical cylinder, fixed viewpoint
-
horizontal cylinder, fixed viewpoint
-
vertical cylinder, viewpoint moves along the cylinder's axis
-
horizontal cylinder, viewpoint moves along the cylinder's axis
2.3.1.2.8 Spherical projection
Using this projection the scene is projected onto a sphere. Syntax:
camera {
spherical
[angle HORIZONTAL [VERTICAL]]
[CAMERA_ITEMS...]
}
The first value after angle sets the horizontal viewing angle of the camera. With the optional second
value, the vertical viewing angle is set: both in degrees. If the vertical angle is not specified, it defaults to half
the horizontal angle.
The spherical projection is similar to the fisheye projection, in that the scene is projected on a sphere. But
unlike the fisheye camera, it uses rectangular coordinates instead of polar coordinates; in this it works the same way
as spherical mapping (map_type 1).
This has a number of uses. Firstly, it allows an image rendered with the spherical camera to be mapped on a sphere
without distortion (with the fisheye camera, you first have to convert the image from polar to rectangular coordinates
in some image editor). Also, it allows effects such as "environment mapping", often used for simulating
reflections in scanline renderers.
|