Raytracing in General

Raytracing is a computationally expensive computer graphics technique that attempts to generate photorealistic images, casting rays of light that are followed as they interact with and bounce off different object. Radiosity is a newer, even more expensive method that tries to really get the physics of light right. I've dabbled with ray-tracing for over 10 years for arty effects, but think the output with the interactive OpenGL in ribbons is good enough.

However, seeing the program POV-Ray has changed my attitude somewhat. It is fast, good, and free - support has been added for ribbons 3.0. The other previously supported ray-tracing formats are still there. These formats and the source code (for full-support license holders) should allow one to incorporate ribbons output into any ray-tracer. Ken Eward of BioGrafx made some very nice cover pictures for Nature Biotechnology by converting one of the old formats into POV-Ray. Tod Romo of Rice has modified the source code (see files print*.C) to create format in PIXAR Animation Studio's `RenderMan' format (they did the dinosaurs in Jurasic Park).

The list below gives the supported formats and links to the home pages of the ray tracing programs.

Supported Raytracing Programs


POV-Ray and ribbons

1) adjust the ribbons display to your pleasure.

The AlphaDiffuse slider of the Color Panel (alt-c) sets the transparency of the material for ray-tracing (but it has no visible effect in ribbons).

Lines cannot be used for bonds; for density maps thin cylinders are used. Cones are OK. Circular disks are drawn for dot surfaces, the size will only approximately match.

Perspective is used (unlike in ribbons) - this may cause some distortion. Suggest you leave extra room around the edges to make sure all is visible.

2) save a *.ray format ascii file of rendering commands:

     Menubar -> File -> Export VRML/Raytracing -> POV-Ray

3) run the x-povray program through my perl script:

Notes: x-povray has a clunky command-line interface (the PC version is better!). You must have the means to convert the default output TARGA file. Script uses 'imconv' (I'll supply if needed).

pov-rgb [options] yourfile.pov image.rgb

  options: 
  -a              (turn on quality antialiasing) 
  -p              (quick preview mode) 
  -x Width        (width in pixels[320];  Y adjusted to keep aspect 5/4) 
  -s              (generate side-by-side stereo pair)
  -l              (generate left-eye image)
  -r              (generate right-eye image)
  -d              (don't display rendering in progress in X-window) 
  -i povray.ini   (read a povray initialization file) 

Notes: You can create files at higher that screen resolution, eg: -x 2500 gives 2500x2000 pixel image.
The input '*.pov' file is ascii and can be edited for special effects. 4) get real fancy: Notes: A background plane (of color#16, a light green grass) is placed as the floor. The background is rendered as `sky' of the current background color. Shadows will be cast on this plane. See cool examples of backgrounds in $RIBBONS_HOME/misc/pov.


Rayshade and ribbons

1) adjust the ribbons display to your pleasure.

Notes: A background plane (of the background color, recommend grey) is placed at the far clipping plane (middle+right mouse to adjust). Shadows will be cast on this plane. The background grid may be turned on.

The AlphaDiffuse slider of the Color Panel (alt-c) sets the transparency of the material for ray-tracing (but it has no visible effect in ribbons).

Lines can not currently be drawn (eg, for bonds, density maps). Cones are OK. Circular disks are drawn for dot surfaces, the size will only approximately match.

Perspective is used (unlike in ribbons) - this may cause some distortion. Suggest you leave extra room around the edges to make sure all is visible.

2) save a *.ray format ascii file of rendering commands:

     Menubar -> File -> Export VRML/Raytracing -> Rayshade

3) run the rayshade program:

rayshade [options] < yourfile.ray

  options: 
   -O output_image.rgb ( default:  rayshade.rgb  with the sgi version )
   -R nxPixels nyPixels ( set output image size.  default 512x512 )
   -p   ( run in fast preview mode )
   -n   ( don't render shadows )
   -r   ( create a right-eye view for stereo )
   -l   ( create a left-eye view for stereo )

Notes: there are lots more options, above seem most useful to me. You can create files at higher that screen resolution, eg: -R 2500 2000 Example above maintains the 5/4 aspect ratio of ribbons, but don't have to. The input '*.ray' file is ascii and can be edited for special effects.


Wavefront and ribbons

1) adjust the ribbons display to your pleasure.

Notes: only the actual ribbon drawings will be saved. See the directory 2) save a *.wave format ascii file of rendering commands:

     Menubar -> File -> Export VRML/Raytracing -> Wavefront

This will create several files: the output `your.wave' is a Wavefront command file that can be processed in command mode:

  set path "your/full/path/directory"
  run your.wave

For each separate color and ribbon, files named `your_N.obj' are written that actually describe the graphical objects.

To get in other objects, ie, spheres, go to $RIBBONS_HOME/misc/wave and look at the Read.Me file. 3) run the wavefront program:

You are on your on - it has so many options. The example images had various wood and metalic textures applied.


Radiance and ribbons

1) adjust the ribbons display to your pleasure. Currently, only sphere, cylinder, and faceted polygons supported.

2) save the orientation matrix. Process all the files to transform the primitives. Will supply the *.C code & awk scripts on request. This makes it much easier to get the lighting right.

3) run the radiance program.

This needs more work - please let me know if interested.


Ribbons User Manual / UAB-CMC / carson@cmc.uab.edu