Configuration Settings
mental ray internal defaults or advanced properties can be set with
the help of variables, either set in the runtime environment of the target operating system, or
in the internal registry of mental ray,
which is not platform dependent and more suitable in cases where
the software is integrated into parent applications.
Environment Variables
Environment variables can
be set from a shell prompt with shell commands such as
setenv (see the documentation of your shell) before mental
ray, or the application that mental ray is built into, is started
from the same shell. Environment variables set after mental ray is
started, or set from a different shell, have no effect. mental ray
will work without any environment variables, except that the
.rayrc startup script may not be found if MI_ROOT
is undefined.
- DISPLAY
- The Unix X11 display to be
used for OpenGL
acceleration.
- HOME
- Unix home directory, for finding the user's local
.rayrc file.
- HOMEDRIVE
- Windows NT home drive, such as C:.
- HOMEPATH
- Windows NT home directory. mental ray will try to load
%HOMEDRIVE%/%HOMEPATH%/rayrc.
- MI_ASSEMBLY_PATH
- A colon-separated or semicolon-separated list of paths to
search for assembly .mi files referenced in a assembly.
- MI_LIBRARY_PATH
- A colon-separated or semicolon-separated list of paths to
search for files loded with the link command.
- MI_LIGHTPROFILE_PATH
- A colon-separated or semicolon-separated list of paths to
search for lightprofile files.
- MI_MAP_PATH 3.8
- A colon-separated or semicolon-separated list of paths to
search for map data files.
- MI_RAY_HOSTSFILE
- Use this file name instead of the default
.rayhosts
to read host configuration for distributed rendering.
- MI_RAY_INCPATH
- A colon-separated or semicolon-separated list of paths to
search for files included with the $include command.
- MI_RAY_OPTIONS
- Extra options that are inserted by mental ray before the
options on the command line. This is commonly used for options such
as -xcolor.
- MI_RAY3_SERVICE
- The IP service that mental ray uses to contact slaves on other
machines. The default is mi-ray3 for mental ray 3.x. On
Unix, service names are defined
in /etc/services or in the services NIS map.
- MI_RAY_SERVICE
- If the previous variable is not defined, this one is used
instead. This makes mental ray 2.x compatible with mental ray 1.9
while allowing both to coexist on the same machine. The default is
mi-ray.
- MI_RAY_SUBSTITUTE
- An optional list of blank-separated substitution instructions,
each in the form /search/replace/. Any other character
besides / will also work.
- MI_ROOT
- The directory that mental ray searches for configuration files
such as rayrc.
- MI_STACKSIZE
- New thread stacks will be created with this size in kilobytes
if defined. The default is 16384 (16 MB) on Unix and 4096 on Windows. 4096 is
nearly always sufficient except when very complex recursive shaders
are used.
- MI_TEX_LOOKUP_LOCAL
- This variable can be set in network parallel rendering in order
to look up and remap texture file paths on the individual rendering
hosts instead of on the master host only. This allows to locate
textures on the slave machines at a different file system path than
on the master host.
- Note that MI_TEX_LOOKUP_LOCAL should be set on all
rendering hosts, not just the master.
- Note also that this also causes file names to be echoed in the
.mi format without performing file path substitutions.
- SI_LOCATION
- The directory of the linktab.ini file, which may be
used by applications to customize file path mapping.
- TMPDIR
- A directory for temporary code or object files to be compiled
or linked. The default is /usr/tmp on Unix and the current directory on
Windows.
- USER
- The current user name. This is optional, and if it exists may
be stored in image file headers, for example.
The mental ray registry
supports lookups of environment variables. The form $var
returns the value of the environment variable var, and
$?var returns 1 if the environment variable var
exists and 0 otherwise.
Registry Variables
Registry variables can be set from any .mi file. The special
file .rayrc
is automatically read by a standalone
mental ray upon startup for configuration purposes.
mental ray recognizes and uses registry variables that begin
with _MI_REG_ which have special meanings:
- _MI_REG_INCLUDE
- an include path where files included by $include
commands are found, in addition to paths set with the -I
command-line option.
- _MI_REG_LIBRARY
- an include path where shader libraries linked by link
commands are found, in addition to paths set with the -L
command-line option.
- _MI_REG_MAP 3.8
- a search path where map data files are found, in addition to
paths set with the -M command-line option.
- _MI_REG_MEMORY_LIMIT
- the number of megabytes to use as memory limit default. May be
overridden on the mental ray command line for a specific
rendering.
- _MI_REG_METASL_BACKEND 3.8
- for MetaSL shaders, selects
the back-end to use for compilation and execution of the shader
code. Supported values are
CPP
or C++
for
the C++ back-end using an external compiler, or LLVM
for the integrated low-level virtual machine translation
and execution engine.
- _MI_REG_TEXTURE
- an include path where texture image files referenced by
texture statements are found, in addition to paths set
with the -T command-line option.
- _MI_REG_LIGHTPROFILE
- an include path where light profile files referenced by
lightprofile statements are found, in addition to paths
set with the -lightprofile_path command-line option.
- _MI_REG_FBDIR
- a directory where memory mapped frame buffers are stored,
unless the -fb_dir command-line option has been specified.
- _MI_REG_ASSEMBLY
- a directory where assembly files are stored, unless the
-assembly command-line option has been specified.
mental ray provides and sets registry variables that begin with
_MI_RAY_ as follows:
- _MI_RAY_VERSION
- the full version number of mental ray, like "3.8.1.1".
- _MI_RAY_MAJOR_VERSION
- the major version number of mental ray, like "3".
- _MI_RAY_MINOR_VERSION
- the minor version number of mental ray, like "3.8".
- _MI_RAY_BRANCH
- the branch version number of mental ray, like "3.8.1".
- _MI_RAY_REVISION
- the revision version number of mental ray, like "85991".
- _MI_RAY_SYSTEM
- a general computer system name that mental ray has been
compiled for. This is one of the strings "windows", "linux", or
"macosx", and "unix" for all other systems.
- _MI_RAY_PLATFORM
- the compile platform string of mental ray. Common values are
"nt-x86-vc9", "nt-x64-vc9", "linux-x86", "linux-x86-gcc4",
linux-x86-64", "linux-x86-64-gcc4", "macosx-x86", and
"macosx-x86-64".
- _MI_RAY_DATE
- a readable form of the build date of mental ray, like "May 18
2009".
Copyright © 1986-2010 by
mental images GmbH