RifPlugin
Light Path Expressions


return to main index

Download: Builds for Windows, Linux and MacOSX
Source Code: LPE_Rif.cpp

Related Link
    Cutter & Light Path Expressions



Introduction

The RifPlugin presented here is intended to help artists experiment with LPE's. When using the RifPlugin there is no need to use the RenderMan Controls window because the DisplayChannel and secondary Display RIB statements are added by the rif. Another advantage of using the rif is that custom LPEs do not have to be added to the rendermn.ini initialization file. The LPEs are specified in a text file that is referenced by the rif. Please note that LPE_Rif.cpp probably needs some "polishing" but preliminary tests show it works on Windows, Linux and MacOSX.


Step 1 - get the Rif plugin

Pre-built versions of the plugin are available for downloading from the link at the top of this page. Alternatively, save the source code in the,
    Maya/projects/RfM_rif
directory. Open the file in Cutter and press control + e, or alt + e, or Apple + e to build the plugin.

Step 2 - create a LPE text file

Save the following text as trial.lpe in the Maya project directory that you intend to use for your LPE experiments, say,
    Maya/projects/LPE


Listing 1 (trial.lpe)


# Examples from Pixar's "LPE" doc
  
# specular
lpe:CS<L.>
      
# diffuse
lpe:CD<L.>
      
# refraction
lpe:(C<T[S]>[DS]+<L.>)|(C<T[S]>[DS]*O)
   
# shadow
lpe:shadows;C[<.D'collector'><.S'collector'>]<L.>
  
# indirectdiffuse
lpe:(C<RD>[DS]+<L.>)|(C<RD>[DS]*O)


Step 3 - assign the plugin

Go to the Render Settings Advanced tab and assign the plugin and the trial.lpe file.



Figure 1


Step 4 - edit 'r' edit 'r' etc...

Experimentation with one or more LPE's can proceed quickly by editing the trial.lpe document in Cutter (or any other text editor) and pressing 'r' in the "it" window to re-render. There is no need to keep Maya as a "front" window.



Figure 2





© 2002- Malcolm Kesson. All rights reserved.