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

Cross Platform Substitute Tips

This information is lifted mostly from Vol. 1 of the Handbook series, Rendering with mental ray. I will present it from the perspective of what I would consider is a typical setup. I would think normally that you'd want 3D applications running on Windows PCs to be able to be rendered on Linux machines running standalone mental ray in some sort of renderfarm setup.

If the MI_RAY_SUBSTITUTE variable does not exist, mental ray defaults to the substitution:
/.dll$/.so/ /.obj$/.o/ /.lib$/.a/ /^[a-z]:// /^[A-Z]:// %\%/%
on a linux machine.

MI_RAY_SUBSTITUTE can be set to a substitution string list of the form: /search/replace/ and instead of / as a delimiter, any character except whitespace may be used that does not appear in either the search or the replace strings. So, in the above default there are six substitutions. The last one uses % as a delimiter in order to reverse backslashes to slashes, ie %\%/%

There are several special tokens:

  • caret(^) and backquote(`) stand for the beginning of the filename,
  • dollar sign ($) stands for the end of the file name,
  • question mark (?) stands for any character
  • square bracketed range ([a-z]) stands for any characer the the ASCII range a through z

So for example, in the default case the second-to-last substitution - /^[A-Z]:// - would remove C: from a PC filename being converted to linux. You might want to start with the above defaults and add something like:
% C:/yourWinPath/%/yourLinuxPath/%

Personally, I like using the default .bash_profile environment mechanism on Linux, so such an addition might look like this:

MI_RAY_SUBSTITUTE='/.dll$/.so/ /.obj$/.o/ /.lib$/.a/ /^[a-z]:// /^[A-Z]:// %\%/% % C:/yourWinPath/%/yourLinuxPath/%'
export MI_RAY_SUBSTITUTE


If you use .cshrc, you'd probably use something that looks more like:

setenv MI_RAY_SUBSTITUTE '/.dll$/.so/ /.obj$/.o/ /.lib$/.a/ /^[a-z]:// /^[A-Z]:// %\%/% % C:/yourWinPath/%/yourLinuxPath/%'


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