Rendering

Once scenes have been created within the world blocking construct in AL, RenderMan can be invoked to render the environment. The simplest means of doing this is by invoking the function "render".
  ox --> (render)
One thing to always remember is to never, ever call (render) from within the world construct. This is because render, when called, reevaluates everything contained inside world. This results in an infinite loop...

Below are examples of how the most commonly used rendering options are set. See The AL Reference Manual for more specific and complete details.

Cameras

A specific camera can be specified as an argument to "render":
  ox --> (render "camera1")

Wireframe Rendering

Wireframe rendering can be accomplished by calling:
  ox --> ((render 'set-renderer!) "render -vector")

Rendering to Files

By default, rendering is done to the screen. Rendered images can be sent to a specific file with:
  ox --> ((render 'to-file) "myfile.rle")

Image Size

The size of the rendered image can be controlled by providing the width and height of the desired image to "render". Here is how you would request a standard video rez of 640x484:
 ox --> ((render 'set-option!) '(ri-format 640 484 1))

Background Color

The background color can be set when rendering by giving a color to the "ri-background" option. A red background would be specified with:
 ox --> ((render 'set-option!) '(ri-background '(1 0 0)))

Return to AL Introduction
mrl