OpenGL and RenderMan, Introduction
[ contents ]
OpenGL and RenderMan, Introduction

While programming in OpenGL, I was faced with a puzzling predicament. How can I create high-resolution frames with my OpenGL code, without taking a performance hit(such as lower frame rate), because of their level of detail, complexity of models, or their extensive texturing.

The answer was to use OpenGL to generate the animation in realtime at lower resolutions, while additional code generates a scene description file of every frame for off-line rendering at higher resolutions.

I found Pixar's RenderMan Interface Bytestream(RIB) to be the perfect output for rendering. The RenderMan standard provides a procedural interface in C which can be linked to a modeling program(my OpenGL code). When those procedures are called, information is passed to an ASCII RIB file, which interfaces with the renderer. The renderer in this case are the Blue Moon Rendering Tools.

In addition, many of RenderMan's procedures are similar if not identical to procedures in OpenGL. This makes mirroring the calls to both the display and the RIB file easier.

There are a few holes in my power play for world domination. The camera coordinate system of the RenderMan Interface is left-handed with positive x, y, and z pointing right, up, and forward respectively, while OpenGL is right-handed with positive x, y, and z pointing right, up, and behind you. These differences are part of what is explored in this document.

This research was based on the OpenGL code I had written during the Fall 1997 semester for Contrast, an animated film . I was interested in rendering the animation with anti-aliasing, lighting effects, and surface shading. Having all of the geometry, position, and motion data available to me, I began porting the OpenGL code to the RenderMan Interface.

This document provides a side by side comparison of the OpenGL API and the RenderMan Interface procedures that I used for both versions of Contrast. This is not meant to be a definitive guide in any way, this document is intended to offer the intermediate programmer a quick glance at the ease with which they could add this feature to their own code.