Transforming Textures and Objects

Transformations may also be independently applied to pigment patterns and surface normal patterns. Note that scaling a normal pattern affects only the width and spacing. It does not affect the apparent height or depth of the bumps. For example:

Camera

Depending on the projection type some of the parameters are required, some are optional and some aren't used. If no projection type is given the perspective camera will be used (pinhole camera). If no camera is specified a default camera is used.

Regardless of the projection type all cameras use the **location**, **look_at**, **right**, **up**, **direction** and **sky** keywords to determine the location and orientation of the camera. Their meaning differs with the projection type used. A more detailed explanation of the camera placement follows later.

Type of Projection

**Perspective projection:** This projection represents 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 below for the geometry of the perspective camera.

The perspective camera.

**Orthographic projection:** This projection uses parallel camera rays to create an image of the scene. The size of the image is determined by the lengths of the right and up vectors.

**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 isn't the case, i.e. you get an elliptical image, you should read "Aspect Ratio".

**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:** 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.

**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. 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:

1 | vertical cylinder, fixed viewpoint |

2 | horizontal cylinder, fixed viewpoint |

3 | vertical cylinder, viewpoint moves along the cylinder's axis |

4 | horizontal cylinder, viewpoint moves along the cylinder's axis |

If the perspective camera is used the **angle** keyword overrides the viewing angle specified by the **direction** keyword and vice versa. Each time **angle** is used the length of the direction vector is adjusted to fit the new viewing angle.

You should note that the vista buffer can only be used with the perspective and orthographic camera.

Focal Blur

The **aperture** keyword determines the depth of the sharpness zone. Large apertures give a lot of blurring, while narrow apertures will give a wide zone of sharpness. Note that, while this behaves as a real camera does, the values for aperture are purely arbitrary and are not related to f-stops.

The center of the **zone of sharpness** is the **focal_point** vector (the default **focal_point** is <0,0,0>).

The **blur_samples** value controls the maximum number of rays to use for each pixel. More rays give a smoother appearance but is slower, although this is controlled somewhat by an adaptive mechanism that stops shooting rays when a certain degree of confidence has been reached that shooting more rays would not result in a significant change.

The **confidence** and **variance** keywords control the adaptive function. The confidence value is used to determine when the samples seem to be **close enough** to the correct color. The variance value specifies an acceptable tolerance on the variance of the samples taken so far. In other words, the process of shooting sample rays is terminated when the estimated color value is very likely (as controlled by the confidence probability) near the real color value.

Table Of Contents