The location is simply the x, y, z coordinates of the camera. The camera can be located anywhere in the ray-tracing universe. The default location is <0, 0, 0>. The look_at vector tells POV-Ray to pan and tilt the camera until it is looking at the specified x, y, z coordinates. By default the camera looks at a point one unit in the z-direction from the location.
The look_at specification should almost always be the last item in the camera statement. If other camera items are placed after the look_at vector then the camera may not continue to look at the specified point.
This tells POV-Ray to roll the camera until the top of the camera is in line with the sky vector. Imagine that the sky vector is an antenna pointing out of the top of the camera. Then it uses the sky vector as the axis of rotation left or right and then to tilt up or down in line with the sky vector. In effect you're telling POV-Ray to assume that the sky isn't straight up. Note that the sky vector must appear before the look_at vector.
The sky vector does nothing on its own. It only modifies the way the look_at vector turns the camera. The default value for sky is <0, 1, 0>.
If you are using the ultra wide angle, panoramic or cylindrical projection you should use a unit length direction vector to avoid strange results.
The length of the direction vector doesn't matter if one of the following projection types is used: orthographic, fisheye or omnimax.
The necessary calculations to convert from one method to the other are described below. These calculations are used to determine the length of the direction vector whenever the angle keyword is encountered.
The viewing angle is converted to a direction vector length and vice versa using the formula The viewing angle is given by the formula
where right_length and direction_length are the lengths of the right and direction vector respectively and arctan is the inverse tangens function.
From this the length of the direction vector can be calculated for a given viewing angle and right vector.
From this the length of the direction vector can be calculated for a given viewing angle and right vector.
or the look_at parameter (in combination with location). The directions of an explicitly specified right and up vector will be overridden by any following look_at parameter.
While some camera types ignore the length of these vectors others use it to extract valuable information about the camera settings. The following list will explain the meaning of the right and up vector for each camera type. Since the direction the vectors is always used to describe the orientation of the camera it will not be explained again.
Perspective projection: The lengths of the up and right vectors are used to set the size of the viewing window and the aspect ratio as described in detail in section "Aspect Ratio". Since the field of view depends on the length of the direction vector (implicitly set by the angle keyword or explicitly set by the direction keyword) and the lengths of the right and up vectors you should carefully choose them in order to get the desired results.
Orthographic projection: The lengths of the right and up vector set the size of the viewing window regardless of the direction vector length, which is not used by the orthographic camera. Again the relation of the lengths is used to set the aspect ratio.
Fisheye projection: The right and up vectors are used to set the aspect ratio.
Ultra wide angle projection: The up and right vectors work in a similar way as for the perspective camera.
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 isn't used with this projection.
Panoramic projection: The up and right vectors work in a similar way as for the perspective camera.
Cylindrical projection: In cylinder type 1 and 3 the axis of the cylinder lies along the up vector and the width is determined by the length of right vector or it may be overridden with the angle vector. In type 3 the up vector determines how many units high the image is. For example if you have up 4*y on a camera at the origin. Only points from y=2 to y=-2 are visible. All viewing rays are perpendicular to the y-axis. For type 2 and 4, the cylinder lies along the right vector. Viewing rays for type 4 are perpendicular to the right vector.
Note that the up, right and direction vectors should always remain perpendicular to each other or the image will be distorted. If this is not the case a warning message will be printed. The vista buffer will not work for non-perpendicular camera vectors.
Most computer video modes and graphics printers use perfectly square pixels. For example Macintosh displays and IBM SVGA modes 640x480, 800x600 and 1024x768 all use square pixels. When your intended viewing method uses square pixels then the width and height you set with the +W and +H switches should also have the same ratio as the right and up vectors. Note that 640/480 = 4/3 so the ratio is proper for this square pixel mode.
Not all display modes use square pixels however. For example IBM VGA mode 320x200 and Amiga 320x400 modes do not use square pixels. These two modes still produce a 4/3 aspect ratio image. Therefore images intended to be viewed on such hardware should still use 4/3 ratio on their up and right vectors but the +W and +H settings will not be 4/3.
For example:
This specifies a perfectly square image. On a square pixel display like SVGA you would use +W and +H settings such as +W480 +H480 or +W600 +H600. However on the non-square pixel Amiga 320x400 mode you would want to use values of +W240 +H400 to render a square image.
Section 7.4.4.2
The Sky Vector
Section 7.4.4.3
The Direction Vector
Section 7.4.4.4
Angle
angle = 2 * arctan(0.5 * right_length / direction_length)
direction_length = 0.5 * right_length / tan(angle / 2)
Section 7.4.4.5
Up and Right Vectors
Section 7.4.4.5.1
Aspect Ratio
Table Of Contents