Output Objects
This object manages the output objects needed by the photo realistic renderer. Images are rendered into one or more output objects. There is an output object for rendering to various file formats (JPEG, TIFF, etc.), to a network socket or to a window, just a name a few.
The scene passed to the rendering engine can be divided into two main parts: geometric objects and those defining properties for them. For example, Color, Transparency, Refraction factor and Reflectivity are properties the user can define for any geometric surface. The user can also create any custom properties, such as age, and assign them to desired geometric objects similar to Color and Transparency. In addition to this, rendering engine itself defines number of properties, such as 'Depth' (Z-buffer).
Any of these properties can be passed through the entire rendering pipeline (scanline, ray tracing, post processing). Output setting objects specify the interface to final 'output device' such as BMP, TGA, JPG or a window.
Output objects also allow the user to define 'bindings' between the rendered properties. For example, the user can create TARGA output setting object and ask Realsoft 3D to direct 'depth' channel to the Red color channel.
To enumerate output objects:
R3OBJ *outputlayer;
R3GetAttrs(currentlayer, R3T(R3LAYLA_Outputs, &outputlayer), R3TAG_END);
int print_outputs(R3OBJ *obj, void *hookdata) {
char *name;
R3GetAttrs(obj, R3RA_Name, &name, R3TAG_END);
printf("found object %s\n", name);
}
R3Do(outputlayer,, R3OLAYM_ENUMOBJECTS,
R3T(R3RA_Hook, print_outputs),
R3T(R3RA_HookName, NULL),
R3TAG_END);