The first and last keywords required in the definition of a camera are the CAMERA and END_CAMERA keywords. The PROJECTION keyword is optional, the remaining camera keywords are required, and must be written in the sequence they are listed in the examples in this section.
Camera projection perspective_dof focallength 0.75 aperture 0.02 Zoom 0.666667 Aspectratio 1.000000 Antialiasing 128 Raydepth 30 Center 0.000000 0.000000 -2.000000 Viewdir -0.000000 -0.000000 2.000000 Updir 0.000000 1.000000 -0.000000 End_Camera
The ASPECRATIO parameter controls the aspect ratio of the resulting image. By using the aspect ratio parameter, one can produce images which look correct on any screen. Aspect ratio alters the relative width of the image plane, while keeping the height of the image plane constant. In general, most workstation displays have an aspect ratio of 1.0. To see what aspect ratio your display has, you can render a simple sphere, at a resolution of 512x512 and measure the ratio of its width to its height.
The ANTIALIASING parameter controls the maximum level of supersampling used to obtain higher image quality. The parameter given sets the number of additional rays to trace per-pixel to attain higher image quality.
The RAYDEPTH parameter tells Tachyon what the maximum level of reflections, refraction, or in general the maximum recursion depth to trace rays to. A value between 4 and 12 is usually good. A value of 1 will disable rendering of reflective or transmissive objects (they'll be black).
The remaining three camera parameters are the most important, because they define the coordinate system of the camera, and its position in the scene. The CENTER parameter is an X, Y, Z coordinate defining the center of the camera (also known as the Center of Projection). Once you have determined where the camera will be placed in the scene, you need to tell Tachyon what the camera should be looking at. The VIEWDIR parameter is a vector indicating the direction the camera is facing. It may be useful for me to add a "Look At" type keyword in the future to make camera aiming easier. If people want or need the "Look At" style camera, let me know. The last parameter needed to completely define a camera is the "up" direction. The UPDIR parameter is a vector which points in the direction of the "sky". I wrote the camera so that VIEWDIR and UPDIR don't have to be perpendicular, and there shouldn't be a need for a "right" vector although some other ray tracers require it. Here's a snippet of a camera definition:
CAMERA ZOOM 1.0 ASPECTRATIO 1.0 ANTIALIASING 0 RAYDEPTH 12 CENTER 0.0 0.0 2.0 VIEWDIR 0 0 -1 UPDIR 0 1 0 END_CAMERA
CAMERA ZOOM 1.0 ASPECTRATIO 1.0 ANTIALIASING 0 RAYDEPTH 4 CENTER 0.0 0.0 -6.0 VIEWDIR 0.0 0.0 1.0 UPDIR 0.0 1.0 0.0 FRUSTUM -0.5 0.5 -0.5 0.5 END_CAMERA