This is RenderMan 21 Documentation you are viewing. The Rmanwiki home page will redirect you to the current documentation.

Page tree

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Contents

RenderMan provides full support for typical camera simulation, including the two standard projections that PRMan has always supported - perspective and orthographic - as well as features like motion blur and camera effects like Depth of Field and Bokeh. Additionally, there is support for custom projection plugins, enabling the tracing of rays through arbitrary, potentially curved surfaces centered on the viewpoint. The distribution also includes built-in projections - spheretorus, and cylinder - that are compatible with all modes of the raytrace hider.

The Viewing Transformation

The viewing transformation can be broken down into two pieces, the camera-to-screen projection and the screen-to-raster projection. The camera-to-screen projection flattens the 3-D world onto the 2-D screen. The screen-to-raster projection maps every point on the screen onto some output pixel.

SCREEN-TO-RASTER PROCEDURES

In this section, we will discuss the screen-to-raster projection, whose job it is to figure out how to get that screen rectangle onto the raster.

Resolution

The first, and most obvious thing you might want to change is the image resolution. The default for resolution is determined by the output device. Each output device has a default resolution, and the default output device, a TIFF image, has a default resolution of 512 by 384. By using the RiDisplay call, you can change the output device, and this will determine the new default resolution. If you want strict control of the resolution, the RiFormat call can be used to set an explicit output resolution.

Pixel Aspect Ratio

Pixel aspect ratio defines the ratio of the width to the height of the individual pixels on the device. Many displays have square pixels, and the ratio is 1.0; other displays have pixels that are wider than they are tall, or vice-versa. The TIFF default for pixel aspect ratio is 1.0, and each framebuffer device has the correct default for its monitor. It is rare to need to change this value, but if you do (for example, you are rendering on one device for later display on another) it is done with RiFormat. If you want to use RiFormat to set the resolution, but don't want to change the pixel aspect ratio (or vice-versa), use a value less than or equal to 0.0 for the RiFormat argument you don't want to modify. It will then retain its default value.

Frame Aspect Ratio

The other aspect ratio which is available in RenderMan is the frame aspect ratio. This is used to force the exact ratio of the width to the height (shape) for the output image as a whole. For example, NTSC video has a 4 to 3 aspect ratio while 70mm film has a 1.85 aspect ratio. You can set the required frame aspect ratio with RiFrameAspectRatio. If you do not set it, it defaults to the full size of the output device, which is usually what you want.

It should be obvious that the combination of resolution and pixel aspect ratio already define what the frame aspect ratio is, and that specifying it again is either redundant or inconsistent. So why is it in the interface? If you know specifically what ratio you need, then you always want exactly that ratio, independent of what resolution or pixel aspect ratio you are using. In particular, you can make your rendering requests device-independent by specifying only the frame aspect ratio. Then the device can set the “default” (but actually “device maximum”) resolution and pixel aspect ratio, and your image will use the appropriate subset of that, in order to make the largest image possible which still has the correct frame aspect ratio.

What if you redundantly set both format and frame aspect ratio? You get the biggest image of the correct shape smaller than your specified format. Notice that if you let the pixel aspect ratio default, then frame aspect ratio is not really redundant, because going to a different device with a different pixel aspect ratio will give you a differently shaped image even though it has the same resolution.

Crop Windows

Sometimes you want to generate only a small part of an image rather than render the whole thing. You could move the camera, zoom in on the section you wanted, and adjust the resolution, but that would be pretty complicated. Instead, it is very easily done with RiCropWindow. Setting a crop window does not change anything about the camera placement or viewing parameters. The only thing it does is indicate which subset of the normal output pixels you actually want rendered to the device. The crop window is specified as a fraction of the total image, rather than in pixel numbers, so that it is a resolution-independent value. The default is obviously 0.0 through 1.0 in both x and y.

 

PxrCamera is a projection plugin that supports a perspective projection with a number of physical effects, including tilt-shift depth of field, chromatic aberration, lens distortion, vignetting, and a rolling shutter.

Perspective (l) and Orthographic (r)

 

A perspective projection is the kind we are used to, with a vanishing point at the horizon, and where objects shrink as they get farther away. Typically, we think of looking through the top of a pyramid, with the tip at the camera point, and the screen (film) plane exactly one unit in front of the camera. Objects are projected onto the screen plane along lines that intersect at the camera and get farther apart with distance. This projection allows users to specify depth of field settings for defocus, aperture settings for Bokeh, and shutter times for advanced motion blur effects.

 

An orthographic projection is a much simpler projection. This is sometimes called a parallel projection, because here we project objects onto the screen plane along parallel lines that are perpendicular to the screen. They don't go through the camera at all, unless you like to think of the camera as being an infinite distance behind the screen plane. Objects appear the same size on the screen independent of their distance from the camera.

 

With the move to fully ray-raced rendering, however, new projections become possible. Sphere, cylinder, and torus projections can be used to render environment maps and panoramic images. User-created projections can also be defined using plugins; rolling shutters, lens abberations, and theater dome projections are just some of the possibilities this enables.

 

More Information

More information, including in-depth technical details, can be found on the following pages in the documentation: