You are here: HomeNotesRendermanLearning Renderman (1) - Introduction

Learning Renderman (1) - Introduction


To learn Renderman, ideally, a REYES compliant renderer, that adheres to the Renderman Interface Specification, now in version 3.2, is required. For this journey, although for no particular reason, Aqsis has been chosen. Aqsis has been installed by downloading the source package and following the, included, installation instructions. The package has been installed in /usr/local/...

#include <ri/ri.h>

/* Declare a square as an array of four points. */
RtPoint Square[4] = {{.5, .5, .5}, {.5, -.5, .5}, {-.5, -.5, .5}, {-.5, .5, .5}};

/* Start the renderer. */

/* Scene description begins here. */

/* Render the surface with a constant colour. */
RiSurface("constant", RI_NULL);

/* Declare the square. */
RiPolygon(4, RI_P, (RtPointer) Square, RI_NULL);

/* Scene description complete. */

/* Clean Up. */

To test the installation an example, listing 2.1, has been taken from The Renderman Companion. This listing is shown as the highlighted code above.

To compile this listing the command line syntax shown below has been used.

gcc -o lst001021 lst001021.c -I/usr/local/include/aqsis -laqsis_ri2rib

The output of the file created, lst001021, can be redirected to Aqsis by using the following command:

./lst001021 | aqsis

The output produced from this sequence of commands is a 640 x 480 image file, ri.pic, which can be seen below in Figure 1.

Figure 1. The image file shown is the result of implementing the code listing above using the Aqsis ri2rib library and the C API binding. The output finally produced, ri.pic, can be viewed with any image editing program or with piqsl, the frameviewer supplied as part of the Aqsis rendering framework. The black background has been added to highlight the white square which is the result of the rendering.

Go to comments start