Los Angeles mental ray® User Group
 Home   About   Info   Summaries   Gallery   Forum   Resources   Contact   Jobs 


Resources Sections

General

Install/Setup

Options Settings

Performance Optimizations

mi Scene File

FG/AO/GI

Subsurface Scattering

Shiny Stuff

mrfm (Maya)

Shader Writing

Hair and Geometry Shaders

Maya to mr Standalone Tips

OK some pointers.

The MI_ROOT points to a location in which you can have a "rayrc" file for whatever package. You can use this to set local mental ray registry values to load libraries etc. Also you can force mental ray to use different paths from the system default for .mi and .shaders.

METHOD 1: .....................

You can specifically load the mayabase.mi and link the mayabase.so in the rayrc like this:

registry "{_MI_REG_INCLUDE}" value "/pathToMayaIncFiles"
end registry
registry "{_MI_REG_LIBRARY}" value "/pathToMayaShaders"
end registry
$include "mayabase.mi"
link "mayabase.so"


[ed. note: Be careful to ensure that all the mi shader libs you use are also located there, for example, base.mi contour.mi physics.mi and base.so contour.so physics.so Then add the appropriate $include and link statements.]

METHOD 2: ......................

Method 1 is fine but you get some whining from RAY about the fact these are already in the maya generated mi file which assume the lib location. So what we do at The Mill is switch the default search paths for the ray with the following variables. We then symbolically link all the shaders we need for the render into a single location.

MI_LIBRARY_PATH
MI_RAY_INCPATH

You need to:

setenv MI_LIBRARY_PATH to the location where you will find all the shared objects (shaders), specifically base.so and mayabase.so. In our setup, they are: base.so contour.so mayabase.so physics.so.

setenv MI_RAY_INCPATH to the location of the .mi declaration files, specifically base.mi and mayabase.mi. In our setup, they are:base.mi contour.mi mayabase.mi physics.mi.

Then you can render the mi file generated by maya with whatever ray binary is appropriate (3.2.4 is current from SI). For example,

setenv MI_LIBRARY_PATH /yourpathtoshaders
setenv MI_RAY_INCPATH /yourpathtodeclarations

/yourPathToRayExecutable/ray mayamademifile.mi

As far as NT to UNIX goes there is a neat legacy from the softimage days you can use rather than mess with the MI_RAY_SUBSTITUTE environment variable. [ed. note: As the following is an older approach, it is neither documented nor supported explicitly by mental images.]

You set an environment variable named SI_LOCATION to point to the location of a file called "linktab.ini". In our setup, it contains the following line(s):

/mill3d/server/ S:/

First entry is our unix path. Second is the windows equivalent. That's it really. This will allow windoze generated mi files to render on the unix box. Obviously you need to sort out licencing but if you are running already on unix you should already have this sussed.

The real screwup is mixing ray binaries in a networked setup from different vendors. You can't run an Alias OEM RAY from a SI licence so if you have a mix then you will have to install the binaries locally and include all the licence servers in the SPM_HOST variable.

Good luck chaps.....
Dave


Discuss on LAmrUG forum


 © 2003-2006 Los Angeles mental ray® User Group, All Rights Reserved.
mental images and mental ray are registered trademarks of mental images GmbH, in the United States
and other countries. Other product names may be trademarks of their respective owners.


About Us| Contact Us