Short Contents

5.5 Configuration file (`rendermn.ini')

Some of the default options and attributes are settable through the `rendermn.ini' initilization file. The renderer looks for it in four different locations, in order:

  1. In 3Delight's installation directory, as specified by the $DELIGHT environment variable.
  2. In the directories specified by the $DELIGHT_CONF environment variable (a colon separated list).
  3. In user's home directory, as specified by the $HOME environment variable. It looks also for an `.rendermn.ini' file in the same directory.
  4. Finally, 3Delight tries to load `rendermn.ini' in the current directory.

If 3Delight encounters the file in more than one location, it uses the latest keys and values it finds. This enables the user to have a site specific initialization file in the $DELIGHT directory and user specific settings in their home directory.

Note that this file has nothing to do with the `.renderdl' file that is read by the renderdl executable (see section Using the RIB Renderer - renderdl). The main difference (other than the file format) is that `rendermn.ini' is read by 3Delight's core library which means that applications linked with this library (including renderdl) are affected by the content of `rendermn.ini'. On the other hand, `.renderdl' is only read by renderdl.

Each line in the configuration file is of the form "key value1 [value2 ... value_n]"; `key' being the option or attribute, in lowercase. As illustrated in Listing 5.2, the naming conventions for `key' are closely related to its RIB binding.

Additionally, each key can be prefixed by `/3delight' which will make it meaningful to 3Delight only. This can prove useful if more than one RenderMan compliant renderer is used in a facility. Note that such keys will override the keys that do not have the `/3delight' prefix (as shown in Listing 5.2). Recognized options and attributes are:

/exposure %f %f
/geometricapproximation/motionfactor %f
/geometricapproximation/focusfactor %f
/shadingrate %f
/shadinginterpolation %s

All attributes and options which can be set with RiAttribute (see section Attributes) and RiOption (see section Options) can also be set this way. A few examples:

/attribute/dice/hair 1
/attribute/limits/eyesplits 5
/option/limits/othreshold 0.96 0.96 0.96
/option/netcache/cachedir /tmp/3delight_cache/
/option/netcache/cachesize 2000

Default resolution and aspect ratio can be specified for any display driver using the following three keys:

/display/displaydrivername/xres %d
/display/displaydrivername/yres %d
/display/displaydrivername/par %f

It is possible to specify a translation for a display driver name using the following key:

/displaytype/displaydrivername %s

It is also possible to directly specify the library to use for a given display:

/display/dso/displaydrivername %s

Note that the translation is still applied before looking up this key.

Default search paths for different resources are also settable in the `rendermn.ini' file. Those could then be extracted using the `@' symbol when specifying search paths using Option "searchpath". Environment variables are accepted and specified using the $VAR convention.

/defaultsearchpath/texture %s
/defaultsearchpath/shader %s
/defaultsearchpath/display %s
/defaultsearchpath/archive %s
/defaultsearchpath/procedural %s
/defaultsearchpath/resource %s

The current directory mapping zone is set using:

/dirmap/zone %s

The timeout when waiting for rendering hosts to connect to the master in multi-process rendering (see section Network Rendering) is set in seconds with:

/3delight/networkrender/jobtimeout 600

# Yes, '#' at the _beginning_ of a line indicates a comment.
# Specify a gamma correction.
/exposure                                  1.7 1

# 3delight specific options
/option/limits/texturememory               100000
/option/limits/bucketsize                  16 16
/option/limits/othreshold                  0.99608 0.99608 0.99608

# curves are diced as hair 
/attribute/dice/hair                       1

# default shading rate becomes 0.5
/shadingrate                               1.0

# override the shading rate for 3Delight
/3delight/shadingrate                      0.5

# set default shader path
/3delight/defaultsearchpath/shader         $HOME/shaders:$DELIGHT/shaders


# the file display drivers defaults to tiff
/displaytype/file tiff

# set default resolution for the tiff display driver
/display/tiff/xres                        800
/display/tiff/yres                        600

# specify the library to use for a custom display driver
/display/dso/stereo                       /lib/foo/stereo_dd.so
Listing 5.2: An example `rendermn.ini' file.


Finally, setting the $DL_DUMP_DEFAULTS environment variable forces 3Delight to print all read keys and their values from the configuration file(s).

3Delight 10.0. Copyright 2000-2011 The 3Delight Team. All Rights Reserved.