Documentation for vtkRIBExporter

vtkRIBExporter - export a scene into RenderMan RIB format.

Super Class: vtkExporter

Description:

vtkRIBExporter is a concrete subclass of vtkExporter that writes a Renderman .RIB files. The input specifies a vtkRenderWindow. All visible actors and lights will be included in the rib file. The following file naming conventions apply: rib file - FilePrefix.rib image file created by RenderMan - FilePrefix.tif texture files - TexturePrefix_0xADDR_MTIME.tif This object does NOT generate an image file. The user must run either RenderMan or a RenderMan emulator like Blue Moon Ray Tracer (BMRT). vtk properties are convert to Renderman shaders as follows: Normal property, no texture map - plastic.sl Normal property with texture map - txtplastic.sl These two shaders must be compiled by the rendering package being used. vtkRIBExporter also supports custom shaders. The shaders are written using the Renderman Shading Language. See "The Renderman Companion", ISBN 0-201-50868, 1989 for details on writing shaders. vtkRIBProperty specifies the declarations and parameter settings for custom shaders. Tcl Example: generate a rib file for the current rendering. vtkRIBExporter myRIB myRIB SetInput $renWin myRIB SetFIlePrefix mine myRIB Write This will create a file mine.rib. After running this file through a Renderman renderer a file mine.tif will contain the rendered image.

 

See Also:

vtkExporter vtkRIBProperty

 

Methods:

void vtkRIBExporter ()
void vtkRIBExporter ()
static vtkRIBExporter *New ()
const char *GetClassName ()
void PrintSelf (unknown & ,vtkIndent )
void SetSize (int ,int )
void SetSize (int *)
int *GetSize ()
void SetPixelSamples (int ,int )
void SetPixelSamples (int *)
int *GetPixelSamples ()
void SetFilePrefix (char *)
char *GetFilePrefix ()
void SetTexturePrefix (char *)
char *GetTexturePrefix ()
void SetBackground (int )
int GetBackground ()
void BackgroundOn ()
void BackgroundOff ()
void WriteHeader (vtkRenderer *)
void WriteTrailer ()
void WriteTexture (vtkTexture *)
void WriteViewport (vtkRenderer * ,int )
void WriteCamera (vtkCamera *)
void WriteLight (vtkLight * ,int )
void WriteAmbientLight (int )
void WriteProperty (vtkProperty * ,vtkTexture *)
void WritePolygons (vtkPolyData * ,vtkScalars * ,vtkProperty *)
void WriteStrips (vtkPolyData * ,vtkScalars * ,vtkProperty *)
void WriteData ()
void WriteActor (vtkActor *)
char *GetTextureName (vtkTexture *)
char *GetTIFFName (vtkTexture *)

 

Detailed Method Descriptions:

Specify the prefix of the files to write out. The resulting file names will have .RIB appended to them.

void SetFilePrefix (char *)
char *GetFilePrefix ()

Specify the prefix of any generated texture files.

void SetTexturePrefix (char *)
char *GetTexturePrefix ()

Set/Get the background flag. Default is 0 (off). If set, the rib file will contain an image shader that will use the renderer window's background color. Normally, RenderMan does generate backgrounds. Backgrounds are composited into the scene with the tiffcomp program that comes with Pixar's RenderMan Toolkit. In fact, Pixar's Renderman will accept an image shader but only sets the alpha of the background. Images created this way will still have a black background but contain an alpha of 1 at all pixels and CANNOT be subsequently composited with other images using tiffcomp. However, other RenderMan compliant renderers like Blue Moon Ray Tracing (BMRT) do allow image shaders and properly set the background color. If this sounds too confusing, use the following rules: If you are using Pixar's Renderman, leave the Background off. Otherwise, try setting BackGroundOn and see if you get the desired results.

void SetBackground (int )
int GetBackground ()
void BackgroundOn ()
void BackgroundOff ()

Write the RIB header.

void WriteHeader (vtkRenderer *)
void WriteTrailer ()
void WriteTexture (vtkTexture *)
void WriteViewport (vtkRenderer * ,int )
void WriteCamera (vtkCamera *)
void WriteLight (vtkLight * ,int )
void WriteAmbientLight (int )
void WriteProperty (vtkProperty * ,vtkTexture *)
void WritePolygons (vtkPolyData * ,vtkScalars * ,vtkProperty *)
void WriteStrips (vtkPolyData * ,vtkScalars * ,vtkProperty *)