Volume 1 and Volume 2 of the
reference books are accompanied by a CD that contains demo versions of mental ray suitable
for Windows, Linux and MacOSX (32bit). Unfortunately, the CD does not provide clear
instructions on how to setup the renderer. This tutorial is intended to guide users through
the process of installing the demo version of mental ray contained on the CD. Because the
version of mental ray on the CD is somewhat limited in its capabilities it is referred to,
in these notes, as Demo Limited.
Linux & MacOSX
The directory structure for Linux and MacOSX are very similiar. You will require root privileges to create a directory named "mi" ie.
The following directories and files should be copied from the CD into the mi directory,
The files for the include directory (Linux, MacOSX and Windows) can be found on the CD in the following directory.
Create the directories shown in bold,
C:\Program Files\mental images\mental ray
The following directories and files should be copied from the CD into the mental ray directory.
The Users Directory Structure
When writing and testing shaders, users will create at least three types of documents, namely,
This section recommends the adoption of a simple directory structure that will help the reader keep their files organized. It is suggested that directories named,
The full paths to these directories are given in the tutorial "mental ray: Cutter Preferences". If Cutter's mental ray preferences are set correctly, mi interface description files will be automatically generated and saved in both the users shader_src and shaders directories.
The rayrc File
The rayrc document shown below has been adapted from a rayrc file written by Andy Kopra and Bart Gawboy. A .rayrc file provides a series of search paths that enable mental ray to find compiled shaders and their accompanying .mi descriptors. The .rayrc file required by Linux, MacOSX and Windows are almost identical. To prepare a rayrc file suitable for each operating system involves making a few edits. If you are working on,
Linux and MacOSX users should save the edited .rayrc file (note the leading dot) into the root directory of their USER_ACCOUNT. Windows users should save the rayrc file, (no leading dot), directly into the mental ray directory on their C: drive.
© 2002- Malcolm Kesson. All rights reserved.