<html>
<head>
<title>Cmdline</title>
</head>
<body bgcolor="#ffffff">
<tab id=0 indent=0>
<tab id=1 indent=4>
<tab id=2 indent=8>
<tab id=3 indent=12>
<tab id=4 indent=16>
<tab id=5 indent=20>
<tab id=6 indent=24>
<tab id=7 indent=28>
<tab id=8 indent=32>
<tab id=9 indent=36>
<tab id=10 indent=40>
<tab id=11 indent=44>
<tab id=12 indent=48>
<tab id=13 indent=52>
<tab id=14 indent=56>
<tab id=15 indent=60>
<tab id=16 indent=64>
<tab id=17 indent=68>
<tab id=18 indent=72>
<tab id=19 indent=76>
<p><a name=cB><h1>Usage and Command Line Options</h1></a> 

<p>When started from a shell command line, mental ray accepts a large number of options. Most of these correspond to similar commands or view statements as described in the Scene Description chapter. The relevant explanations there are repeated in this chapter. When an option is given on the command line, it overrides the corresponding command or view statement in the scene file, which in turn overrides the defaults. The defaults for certain options given in the option list below applies only if the corresponding command or statement is not present in the scene file. 

<p>For the option description, the same metasymbols as in the Scene Description chapter are used: a bar ``|'' denotes alternatives, items enclosed in tall square brackets ``[ ]'' are optional, and the ellipsis ``...'' denotes omission. Literal text is set in <tt><b>teletype</b></tt>, while variable metasymbols are set in <i>italics</i>. All other punctuation characters are literals. Strings are quoted with double quotes; this includes all names. The double quotes protect names from interpretation by the shell, they should be entered as shown here. 

<p>mental ray is started as 

<p> <tt><b>ray</b></tt> [<i>options</i>] [<i>scenefile</i>] 

<p>If no scene file is given, the scene is read from standard input. Scene file names must end in <tt><b>.mi</b></tt>; if the extension is missing mental ray will add it. The available options are: 

<p> 

<p>
<dl>

<dt><tt><b>-help</b></tt>
<dd>    Print a summary of all options with their allowed parameters, and terminate. 

<p>
</dl>

<dl>

<dt><tt><b>-verbose on|off</b></tt>
<dd>    This command turns <a name=iBEEF></a><u>verbose message</u>s on or off. Default is off. If verbose mode is enabled, objects found in the frame are listed as they are parsed, progress reports are printed during rendering, and time and memory <a name=iBEEG></a><u>statistics</u> are printed after rendering has finished. Verbose messages can slow down mental ray significantly while parsing. 

<p>
</dl>

<dl>

<dt><tt><b>-code "</b></tt><i>filename</i><tt><b>"</b></tt> ... <tt><b>--</b></tt>
<dd>    The named <i>filename</i> is interpreted as a C source file, ending with the extension ``.c'', is compiled and linked into mental ray. The shaders it defines are available in mental ray as shading functions. Multiple file names can be given. The list must be terminated with a double minus sign.<a name=iBEEH></a><a name=iBEEI></a> 

<p>
</dl>

<dl>

<dt><tt><b>-link "</b></tt><i>filename</i><tt><b>"</b></tt> ... <tt><b>--</b></tt>
<dd>    Like the code command, the link command attaches external shaders to mental ray, which can then be used as shading functions. While the code command accepts ``.c'' files as <i>filename</i>, the link command expects either object files ending in ``.o'', or dynamic shared object (DSO) files ending in ``.so''. Object files are linked, while DSOs are just attached without any preprocessing. <a name=iBEEJ></a>DSOs are the fastest way of attaching an external shader, and require no compilers or development options, which are sometimes sold separately by system vendors.For system and development software  requirements, see the Release and Installation Notes. However, not all systems support DSOs. If Dynamical Shared Objects are to be linked on SGI machines, the <tt><b>LD_LIBRARY_PATH</b></tt> environment variable must include the path of the .so file to be linked; see ``Dynamic Linking of Shaders''. The file name list must be terminated with a double minus sign. 

<p>
</dl>

<dl>

<dt><tt><b>-c_compiler "</b></tt><i>filename</i><tt><b>"</b></tt>
<dd>    If this option is given, the standard C compiler <tt><b>"cc"</b></tt> is replaced with <i>filename</i>.<a name=iBEFA></a> 

<p>
</dl>

<dl>

<dt><tt><b>-c_flags "</b></tt><i>options</i><tt><b>"</b></tt>
<dd>    The <i>options</i> string replaces the standard options given to the C compiler<a name=iBEFB></a>. The defaults depend on the machine used; for example, the default option string for single-processor SGI IRIX machines is <tt><b>"-O2 -mips2 "</b></tt> (note the trailing blank). The <tt><b>-c</b></tt> option is always inserted, as is <tt><b>-o</b></tt> if the compiler supports it.  

<p>
</dl>

<dl>

<dt><tt><b>-linker "</b></tt><i>filename</i><tt><b>"</b></tt>
<dd>    If this option is given, the standard linker <tt><b>"ld"</b></tt> is replaced with <i>filename</i>.<a name=iBEFC></a> 

<p>
</dl>

<dl>

<dt><tt><b>-ld_libs "</b></tt><i>libraries</i><tt><b>"</b></tt>
<dd>    The <i>libraries</i> string replaces the standard library options given to the linker<a name=iBEFD></a>. The defaults depend on the machine used, typically <tt><b>"-lm -lc"</b></tt>. Linker options are highly machine dependent and operating system dependent and cannot be changed. 

<p>
</dl>

<dl>

<dt><tt><b>-imgpipe <i>fd<sub>int</b></tt></sub></i></i>
<dd>    Normally mental ray prints connection information into the output image file that let programs like <i>imf_disp</i> connect and display pictures while being rendered. If <tt><b>-imgpipe</b></tt> is used, the relevant information is printed to the given file descriptor <i>fd</i> instead. This is mainly used by Softimage 3D, but can be used for command lines such as ``<tt><b>ray -imgpipe 1 scene.mi | imf_disp -</b></tt>''. The <i> </i> imf_disp program has been upgraded to allow image piping. 

<p>
</dl>

<dl>

<dt><tt><b>-nice <i>nice<sub>int</b></tt></sub></i></i>
<dd>    This option sets the <i>nice</i> value of the process. Values greater than 0 reduce the process priority. Values less than 0 require root privileges and are normally ignored. The allowed range is operating system dependent, typically values between -20 and 106 can be used. 

<p>
</dl>

<dl>

<dt><tt><b>-threads <i>nthreads<sub>int</b></tt></sub></i></i>
<dd>    Normally, mental ray starts one thread for each CPU in the system. In a single-processor host, the default is always 1. This option changes the number of threads. There is normally no advantage in increasing the number of threads, but it may be lowered to reserve CPUs for other users, to avoid monopolizing a multi-processor machine. 

<p>
</dl>

<dl>

<dt><tt><b>-hosts "</b></tt><i>hostname</i><tt><b>"</b></tt> ... <tt><b>--</b></tt>
<dd>    The host list overrides the host list taken from the <tt><b>.rayhosts</b></tt> file, if present. One slave is started on each host specified. Host names must be given as returned by the <tt><b>hostname</b></tt> Unix command on the respective machines. Machines used as slaves must be correctly configured; see the installation notes. The host list must be terminated by a double minus. 

<p>
</dl>

<dl>

<dt><tt><b>-server</b></tt>
<dd>    If the server option is given, mental ray runs in server mode, also called slave mode. This option should only be used in the inetd configuration file <tt><b>inetd.conf</b></tt>; see the installation notes for details. Other options should be used with care if <tt><b>-server</b></tt> is given because they would override options given in the scene file, which may cause the parts of the image rendered by this server to look different from parts rendered on other hosts. 

<p>
</dl>

<dl>

<dt><tt><b>-binary</b></tt>
<dd>    This option must be given if the scene file is in binary format, rather than the standard ASCII format. This option is for internal use only and not available in all versions of mental ray. 

<p>
</dl>

<dl>

<dt><tt><b>-log on|off</b></tt>
<dd>    This option, if given on the shell command line, collects all output from other hosts in files named <i>host</i><tt><b>.0.log</b></tt>, which can be inspected after mental ray terminates. This is useful for network debugging. Note that the syntax errors at the first token usually indicate that the versions of the master and slave (server) mental ray do not match. Logging is turned off by default. 

<p>
</dl>

<dl>

<dt><tt><b>-memory</b></tt> <i>maxmem<sub>int</sub></i>
<dd>    The memory command limits the maximum <a name=iBEFE></a><u>resident set</u> of mental ray to <i>maxmem</i> megabytes, on systems that support resource limits. Only the maximum amount of physical RAM used is limited, not the maximum amount of virtual memory. This means that swapping to disk may be increased if RAM runs out. This can be used to partition available <a name=iBEFF></a><u>physical RAM</u> among multiple processes, because it prevents mental ray from grabbing all available space. 

<p>
</dl>

<dl>

<dt><tt><b>-mc</b></tt>
<dd>    Use <a name=iBEFG></a><a href=functionality.html#iCAJ>Monte Carlo</a> methods for sampling of area light sources, motion blur, and depth of field as implemented by the <i> </i> lens_depth_of_field shader. 

<p>
</dl>

<dl>

<dt><tt><b>-qmc</b></tt>
<dd>    Use <a name=iBEFH></a><a href=functionality.html#iCBA>Quasi-Monte Carlo</a> methods for sampling of area light sources, motion blur, and depth of field as implemented by the <i> </i> lens_depth_of_field shader. For details on the <tt><b>-mc</b></tt> and <tt><b>-qmc</b></tt> options, see the Sampling Algorithms section in the Functionality chapter. 

<p>
</dl>

<dl>

<dt><tt><b>-base_name "</b></tt><i>filename</i><tt><b>"</b></tt>
<dd>    Overrides the file name given by the first file <tt><b>output</b></tt> statement in the view in the scene file. The full file or path name must be given, including extension if desired. 

<p>
</dl>

<dl>

<dt><tt><b>-file_type "</b></tt><i>format</i><tt><b>"</b></tt>
<dd>    Overrides the file format given by the first file <tt><b>output</b></tt> statement in the view in the scene file. File formats include <tt><b>"pic"</b></tt> for SOFTIMAGE image files, <tt><b>"rla"</b></tt> for Wavefront RLA files, or <tt><b> </b></tt> "ps" for PostScript files if contour mode is enabled. For a complete list, see the Output Shaders subsection in the Functionality chapter. 

<p>
</dl>

<dl>

<dt><tt><b>-focal</b></tt> <i>distance</i>|<tt><b>infinity</b></tt>
<dd>    The <a name=iBEFI></a><u>focal distance</u> is set to <i>distance</i>. The focal distance is the distance from the camera to the <a name=iBEFJ></a><u>viewing plane</u>. The viewing plane is the plane in front of the camera that the rendered scene is projected onto; its edges correspond to the edges of the rendered image. However, objects between the camera and the viewing plane will still be rendered; a common approach is to place the viewing plane in the middle of the interesting objects in the scene and then set the <a name=iBEGA></a><u>aperture</u> such that it is a bit larger than the horizontal extent of the objects in <a name=iBEGB></a><u>camera space</u>. If <tt><b>infinity</b></tt> is used in place of the <i>distance</i>, an orthographic view<a name=iBEGC></a> is rendered. An orthographic view turns off <a name=iBEGD></a><u>perspective</u>, all camera rays are parallel. View-dependent surface tessellation is not possible in orthogonal mode. 

<p>
</dl>

<dl>

<dt><tt><b>-aperture</b></tt> <i>aperture</i>
<dd>    The <a name=iBEGE></a><u>aperture</u> is the width of the <a name=iBEGF></a><a href=scene.html#iEFA>viewing plane</a>. The height of the viewing plane is <i>aperture</i> divided by <i>aspect</i>. Together with the <tt><b>focal</b></tt> and <tt><b>aspect</b></tt> <i>viewdefs</i>, <tt><b>aperture</b></tt> defines the lens of the camera. 

<p>
</dl>

<dl>

<dt><tt><b>-aspect</b></tt> <i>aspect</i>
<dd>    This is the <a name=iBEGG></a><u>aspect ratio</u> of the camera. The default is 1.33. In <a name=iBEGH></a><u>camera space</u>, <i>aperture</i> is the width of the <a name=iBEGI></a><a href=scene.html#iEFA>viewing plane</a> and <i>aperture</i> divided by <i>aspect</i> is the height. The viewing plane is divided into pixels as specified by the <tt><b>resolution</b></tt> <i> </i> viewdef, so the aspect will result in nonsquare pixels if it is not equal to the X <a name=iBEGJ></a><u>resolution</u> divided by the Y resolution.  For example, to render a PAL image at a resolution of <i> 720 *576</i> pixels, at an image ratio of 3:4 as defined by the PAL standard, pixels are slightly wider than tall, by a factor of <i>576 /720 *4  /3 = 1.0667</i>. If this number is specified as <i>aspect</i>, objects will appear undistorted on a PAL video display (but not on a computer display with <a name=iBEHA></a><u>square pixels</u>). 

<p>
</dl>

<dl>

<dt><tt><b>-resolution</b></tt> <i>x<sub>int</sub></i> <i>y<sub>int</sub></i>
<dd>    <a name=iBEHB></a>Specifies the width and height of the output image in pixels. 

<p>
</dl>

<dl>

<dt><tt><b>-window</b></tt> <i>x_low<sub>int</sub></i> <i>y_low<sub>int</sub></i> <i>x_high<sub>int</sub></i> <i>y_high<sub>int</sub></i>
<dd>    <a name=iBEHC></a>Only the sub-rectangle of the image specified by the four bounds will be rendered. All pixels that fall outside the rectangle will be left black. 

<p>
</dl>

<dl>

<dt><tt><b>-min_samples</b></tt> <i>min<sub>int</sub></i>
<dd>    This option determines the minimum <a name=iBEHD></a><u>sample rate</u>. Each pixel is sampled at least <i> 2<sup>2 *min</sup></i> times. If <i>min</i> is 0, each pixel is sampled at least once. Positive values increase the minimum sample rate; negative numbers reduce the sample rate to less than one initial sample per pixel (<a name=iBEHE></a><u>infrasampling</u>). <i>min</i> must be at least -2, which means that at least one sample per <i> 4 *4</i> pixels is taken. -2 is the default.  If <i>min</i> is chosen too small, small features may be lost if all samples happen to miss it (if it is found just once in any pixel of a task, mental ray will analyze the feature and render it correctly). If a <tt><b>filter</b></tt> view statement is used to set a filter other than <tt><b>box 1 1</b></tt>, <i>min</i> must be set to <i>-1</i> or greater. If depth, normal, or label frame buffers<a name=iBEHF></a><a name=iBEHG></a><a name=iBEHH></a> are used by an appropriate <a name=iBEHI></a><u>output statement</u>, the <i>min</i> parameter should be set to 0 or greater to avoid gaps.<a name=iBEHJ></a> 

<p>
</dl>

<dl>

<dt><tt><b>-max_samples</b></tt> <i>max<sub>int</sub></i>
<dd>    This option sets the maximum <a name=iBEIA></a><u>sample rate</u>. If neighboring samples find a difference in <a name=iBEIB></a><a href=scene.html#iEIH>contrast</a> exceeding the contrast limit, the area that contains the contrast is subdivided until the maximum recursion depth specified by <i>max</i> is reached. At most <i> 2<sup>2 * </sup> max</i> samples per pixel are taken. mental ray will also automatically analyze features once detected in one pixel, which permits choosing a very low minimum number of samples (such as -2). If a filter view statement or option is used to set a filter other than <tt><b>box 1 1</b></tt>, <i>max</i> must be set to <i> 1</i> or greater.<a name=iBEIC></a> 

<p>
</dl>

<dl>

<dt><tt><b>-recursive on|off</b></tt>
<dd>    This flag controls the recursive <a name=iBEID></a><u>sampling</u> method that takes image samples at pixel corners, and recursively subdivides pixels into subpixels where contrasts exceeding the contrast threshold are detected. Recursive sampling uses the <tt><b>-min_samples</b></tt> and <tt><b>-max_samples</b></tt> parameters. It is enabled by default unless <a name=iBEIE></a><u>contour</u> rendering or <a name=iBEIF></a><u>motion blur</u>ring is enabled. If it is disabled, the sampling method is chosen based on the <tt><b>-adaptive</b></tt> option; see below.<a name=iBEIG></a> 

<p>
</dl>

<dl>

<dt><tt><b>-samples</b></tt> <i>samples<sub>int</sub></i>
<dd>    The <i>samples</i> option exists for backwards compatibility only. It sets the maximum number of samples to <i>samples<sup>2</sup></i> for the non-recursive supersampling algorithm, which is currently used only when <a name=iBEIH></a><u>contour</u> rendering is enabled. This option may be removed from later versions of mental ray.<a name=iBEII></a> 

<p>
</dl>

<dl>

<dt><tt><b>-adaptive on|off</b></tt>
<dd>    The adaptive option, like the <tt><b>-samples</b></tt> option, is obsolete. If <a name=iBEIJ></a><u>contour</u> rendering or <a name=iBEJA></a><u>motion blur</u>ring is enabled, or if there is a <tt><b>-recursive off</b></tt> option, an algorithm that uses <tt><b>-samples</b></tt> and <tt><b>-adaptive</b></tt> is used. If <tt><b>-adaptive</b></tt> is <tt><b>off</b></tt>, the number of samples is always <i>samples<sup>2</sup></i>; if it is <tt><b>on</b></tt>, the number of samples is either 1 or <i>samples<sup>2</sup></i>. The <tt><b>-min_samples</b></tt> and <tt><b> </b></tt> -max_samples options offer a more flexible way of controlling the number of samples.<a name=iBEJB></a> 

<p>
</dl>

<dl>

<dt><tt><b>-contrast</b></tt> <i>r g b</i> [ <i>a</i> ]
<dd>    The <a name=iBEJC></a><u>contrast</u> controls supersampling. If neighboring samples differ by more than the color <i>r, g, b, a</i>, supersampling is done as specified by the sampling options<a name=iBEJD></a> (see above). Default for <i>a</i> is the average of <i>r</i>, <i>g</i>, and <i>b</i>. The <a name=iBEJE></a><u>recursive supersampling</u> algorithm controlled by <tt><b> </b></tt> -min_samples and <tt><b>-max_samples</b></tt> modifies the contrast based on the recursion level: at sample level 0, the contrast is used directly; at sample level 1, the contrast is doubled (effectively requiring a higher contrast to force another subdivision), and so on. Negative levels divide the contrast, i.e. use a fraction <i> 1 /2</i>, <i> 1 /4</i>, and so on. In general, the contrast is multiplied by <i> 2<sup>level</sup></i> at the supersampling level <i>level</i>, which is bounded by <tt><b>-min_samples</b></tt> and <tt><b>-max_samples</b></tt>.<a name=iBEJF></a> 

<p>
</dl>

<dl>

<dt><tt><b>-time_contrast</b></tt> <i>r g b</i> [ <i>a</i> ]
<dd>    The <a name=iBEJG></a><u>time contrast</u> controls temporal supersampling for motion blurred scenes. It works similar to the spatial contrast parameter explained above: If neighboring samples in time differ by more than the color <i>r, g, b, a</i>, supersampling is done.  Default for <i> </i> a is the average of <i>r</i>, <i>g</i>, and <i>b</i>. Using values for <tt><b>-time_contrast</b></tt> that are higher than <tt><b>-contrast</b></tt> can speed up motion blur rendering at the price of more grainy images without degrading the quality of spatial antialiasing.<a name=iBEJH></a> 

<p>
</dl>

<dl>

<dt><tt><b>-filter box|triangle|gauss</b></tt> <i>width</i> [<i>height</i>]
<dd>    The -<a name=iBEJI></a><u>filter</u> option specifies how multiple samples in recursive sampling mode are to be combined. The filter defaults to a box filter of width and height 1. The box filter can be replaced with a triangle filter or a gaussian filter centered on the pixel. The filter size in pixel units can also be specified; if no height is given the width is used. Larger filter sizes result in softer images. Typical values are 1.0 for box filters, 2.0 for triangle filters, and 3.0 for gaussian filters. For details on filtering, see the description of the <tt><b> </b></tt> filter statement in the Scene Description chapter. 

<p>
</dl>

<dl>

<dt><tt><b>-jitter</b></tt> <i>jitter</i>
<dd>    The <a name=iBEJJ></a><u>jitter</u>ing factor introduces systematic variations into sample locations. Without jittering, samples are taken at the corners of pixels or subpixels. Jittering displaces the samples by an amount calculated by lighting analysis, limited to <i>jitter</i> pixels. This is used to reduce artifacts. Jittering is turned off by specifying a <i>jitter</i> of <tt><b>0.0</b></tt>. Jittering works best in ray tracing mode. 

<p>
</dl>

<dl>

<dt><tt><b>-shutter</b></tt> <i>shutter</i>
<dd>    This option specifies the <a name=iBFAA></a><u>shutter</u> open time. A <i>shutter</i> value of 0.0 turns motion blurring off, values greater than 0.0 turn motion blurring on. The <i>shutter</i> value scales the motion vectors attached to object vertices; if <i>shutter</i> is 1.0, each vertex moves the distance given by its motion vector, and is blurred in the image over this distance. Values less than 1.0 reduce this path. 

<p>
</dl>

<dl>

<dt><tt><b>-trace_depth</b></tt> <i>reflect<sub>int</sub></i> [<i>refract<sub>int</sub></i> [<i>sum<sub>int</sub></i>]]
<dd>    <a name=iBFAB></a><i>reflect</i> limits the number of recursive <a name=iBFAC></a><u>reflection</u> rays. If it is set to 0, no reflection rays will be cast; if it is set to 1, one level is allowed but a reflection ray can not be reflected again, and so on.  Similarly, <i>refract</i> controls the maximum depth of <a name=iBFAD></a><u>refraction</u> and <a name=iBFAE></a><u>transparency</u> rays (which implement <a name=iBFAF></a><u>transparency</u> with and without <a name=iBFAG></a><u>index of refraction</u>). Additionally, it is possible to limit the sum of reflection and refraction rays with <i>sum</i>. For example, if <tt><b>3 3 4</b></tt> is given, an eye ray may be reflected 3 times, or refracted 3 times, or reflected twice and then refracted twice, or any other combination that sums up to at most 4. 

<p>
</dl>

<dl>

<dt><tt><b>-shadow_sort on|off</b></tt>
<dd>    This flag controls the way shadow shaders are called. Shadow shaders determine how much light from a light source passes through a shadow-casting object between the light source and an illuminated point on some other object. If the sorting flag is off (the default), the shadow shaders are called in random order. If sorting is on, the shadow-casting objects are sorted such that the shadow shader of the object closest to the light source is called first. This slows down rendering slightly, but is required if certain complex shaders such as fur shaders are used. 

<p>
</dl>

<dl>

<dt><tt><b>-acceleration spatial_subdivision</b></tt>
<dd>    Selects the <a name=iBFAH></a><u>binary space partitioning</u> (<a name=iBFAI></a><u>BSP</u>) rendering algorithm. This algorithm is often, but by no means always, faster. It is controlled by the <tt><b>-max_size</b></tt> and <tt><b>-max_depth</b></tt> options. 

<p>
</dl>

<dl>

<dt><tt><b>-acceleration ray_classification</b></tt>
<dd>    Selects the <a name=iBFAJ></a><u>ray classification</u> rendering algorithm. This algorithm is recommended for very large scenes. It operates with a constant acceleration memory size, controlled by the <tt><b>-subdivision_memory</b></tt> and <tt><b>-subdivision</b></tt> options. 

<p>
</dl>

<dl>

<dt><tt><b>-max_size</b></tt> <i>size<sub>int</sub></i>
<dd>    The maximum number of primitives in a leaf of the <a name=iBFBA></a><u>BSP</u> tree. This option is used only if <a name=iBFBB></a><u>binary space partitioning</u> is enabled, it has no effect on the <a name=iBFBC></a><u>ray classification</u> algorithm. Larger leaf sizes reduce memory consumption but increase rendering time. The default is 4. 

<p>
</dl>

<dl>

<dt><tt><b>-max_depth</b></tt> <i>depth<sub>int</sub></i>
<dd>    The maximum number of levels in the <a name=iBFBD></a><u>BSP</u> tree. This option is used only if <a name=iBFBE></a><u>binary space partitioning</u> is enabled. Larger tree depths reduce rendering time but increase memory consumption, and also slightly increase preprocessing time. The default is 25. 

<p>
</dl>

<dl>

<dt><tt><b>-subdivision</b></tt> <i>subdiv<sub>int</sub>  subdiv_2d<sub>int</sub></i>
<dd>    mental ray uses a ray tracing algorithm that subdivides the space of all rays<a name=iBFBF></a>. The optimal subdivision is determined automatically by a built-in scene analysis.  The <tt><b>-subdivision</b></tt> option can be used to modify the result of this analysis; arguments of 0 leave the calculated subdivision unchanged, positive numbers increase and negative numbers reduce the subdivision. <i>subdiv</i> controls general subdivision; <i>subdiv_2d</i> controls primary (eye) and shadow rays. This option has no effect if the BSP algorithm is used. 

<p>
</dl>

<dl>

<dt><tt><b>-subdivision_memory</b></tt> <i>memory<sub>int</sub></i>
<dd>    This option sets the amount of memory to be used by the ray space subdivision algorithm for acceleration data structures to <i>memory</i> megabytes on each CPU. It has no effect if the <a name=iBFBG></a><u>BSP</u> algorithm is used. mental ray allows presetting the amount of rendering acceleration memory independently of <a name=iBFBH></a><u>scene complexity</u> without sacrificing speed. The default is set to 6 megabytes, which is sufficient for most scenes.  Even for extremely large scenes, little can be gained from memory sizes greater than 12 megabytes. Note that this option does not affect the amount of memory used for the scene description, which depends on the complexity of the geometry in the current frame. Compare also the <tt><b>-memory</b></tt> option; see above. 

<p>
</dl>

<dl>

<dt><tt><b>-face front|back|both</b></tt>
<dd>    The <i>front</i> side of a geometric object in the scene is defined to be the side its normal vector points away from. By specifying that only front-facing<a name=iBFBI></a> triangles are to be rendered, speed can be improved because fewer triangles need to be tested for a ray. This works well unless there are objects whose back side is seen by refracted or reflected rays -- with <tt><b>face front</b></tt>, the back side would not be visible. The default is <tt><b>face both</b></tt>. 

<p>
</dl>

<dl>

<dt><tt><b>-clip</b></tt> <i>hither yon</i>
<dd>    The <i>hither</i> (near) and <i>yon</i> (far) planes are planes parallel to the <a name=iBFBJ></a><a href=scene.html#iEFA>viewing plane</a> that delimit the rendered scene<a name=iBFCA></a>. Points outside the space between the hither and yon planes will not be rendered (this does not apply to the infinite-radius <a name=iBFCB></a><u>environment map</u>s because they are not geometric objects). The <tt><b>clip</b></tt> statement specifies the distance of the hither and yon planes from the camera. The defaults are 0.0001 for the hither distance and 1000000.0 for the yon plane. 

<p>
</dl>

<dl>

<dt><tt><b>-shadow on|off</b></tt>
<dd>    By default, shadows are enabled. The -<a name=iBFCC></a><u>shadow</u> option can be used to turn shadows off globally. 

<p>
</dl>

<dl>

<dt><tt><b>-trace on|off</b></tt>
<dd>    Normally, mental ray will use a combination of a <a name=iBFCD></a><u>scanline</u> algorithm and <a name=iBFCE></a><u>ray tracing</u> to calculate samples of the scene. If <tt><b> </b></tt> -trace off is specified, ray tracing is disabled, and mental ray will rely exclusively on the scanline algorithm. Without ray tracing, <a name=iBFCF></a><u>reflection</u> rays and <a name=iBFCG></a><u>refraction</u> rays cannot be cast. However, scanline transparency that, unlike refractions, does not support changing the direction of the ray based on the <a name=iBFCH></a><u>index of refraction</u> of the <a name=iBFCI></a><a href=scene.html#iDJG>material</a>, and <a name=iBFCJ></a><u>environment map</u>s will work when ray tracing is turned off. Ray tracing is turned on by default. 

<p>
</dl>

<dl>

<dt><tt><b>-scanline on|off</b></tt>
<dd>    This statement allows turning the <a name=iBFDA></a><u>scanline</u> algorithm off to force mental ray to rely exclusively on <a name=iBFDB></a><u>ray tracing</u>. This will slow down rendering in most cases. By default, scanline is turned on unless motion blurring, the <a name=iBFDC></a><u>BSP</u> algorithm, or lens shaders are used. 

<p>
</dl>

<dl>

<dt><tt><b>-desaturate on|off</b></tt>
<dd>    If a first-generation material shader returns a color whose RGB components are outside the range [0, 1], mental ray will clip the color to a legal range<a name=iBFDD></a>. Negative component values are clipped to 0. If any of R, G, and B exceed 1, they are either set to 1 (if <a name=iBFDE></a><u>desaturation</u> is turned off), or R, G, and B are faded towards white (if desaturation is turned on). Alpha is always set to 1 if it exceeds 1, or to the maximum of R, G, and B if any of them exceed alpha<a name=iBFDF></a>. Desaturation is turned off by default. 

<p>
</dl>

<dl>

<dt><tt><b>-dither on|off</b></tt>
<dd>    mental ray supports both 8 and 16 bits per color component. In some cases, 8 bits per pixel, as supported by all popular picture <a name=iBFDG></a><u>file format</u>s, can cause visible <a name=iBFDH></a><u>banding</u> when the floating-point color values calculated by the material shader are quantized<a name=iBFDI></a> to the 8-bit values used in the picture file. Dithering mitigates the problem by introducing noise into the pixel such that the round-off errors are randomly distributed. Note that this can cause run-length encoded picture files to be larger than without <a name=iBFDJ></a><u>dithering</u>. Dithering is turned on by default. 

<p>
</dl>

<dl>

<dt><tt><b>-gamma</b></tt> <i>gamma_factor</i>
<dd>    Gamma correction can be applied to rendered color pixels to compensate for output devices with a nonlinear color response. All R, G, B, and alpha component values are raised to <i>gamma_factor</i>. The default gamma factor is 1.0, which turns <a name=iBFEA></a><u>gamma correction</u> off. 

<p>
</dl>

<dl>

<dt><tt><b>-field even|odd|both</b></tt>
<dd>    Field rendering<a name=iBFEB></a> is a technique that allows smooth <a name=iBFEC></a><u>animation</u>s on <a name=iBFED></a><u>interlaced video</u> displays. To reduce flicker, video displays first display only every other scanline of the picture, and then the remaining scanlines in a second sweep. Each sweep is called a <i>field</i>. Two fields are one frame. Since sweeps occur at one half of the frame rate, animated objects may have moved between sweeps. Not taking this into account results in rough animations.  By default, mental ray renders full frames, resulting in a non-interlaced output picture. If field rendering is set to <tt><b>even</b></tt>, every consecutive pair of rendered frames is combined such that the first frame contributes the even scanlines (counted from the top), and the second frame contributes the odd scanlines. This is reversed if field rendering is set to <tt><b>odd</b></tt>.  The decision of which frame is the first or second is based on the frame number; the first field has an odd frame number (usually 1).  If <a name=iBFEE></a><a href=scene.html#iFEJ>field rendering</a> is enabled, there must be an even number of <i>frame</i>s in the input file. 

<p>
</dl>

<dl>

<dt><tt><b>-frame <i>frame<sub>int</b></tt></sub></i></i>
<dd>    The given frame number overrides the first frame number given in the scene file, using the <tt><b>frame</b></tt> statement. The next frame number in the scene file, if present, will be overridden woth <i>frame + 1</i>, then <i>frame + 2</i>, and so on. The frame number is available to shaders. The frame time, which is also available to shaders, cannot be overridden. 

<p>
</dl>
The remaining options are for <a name=iBFEF></a><u>contour</u> rendering only. 

<p>
<dl>

<dt><tt><b>-contour on|off</b></tt>
<dd>    If contour rendering is turned on, mental ray will render contour lines based on the visibility, self-occlusion, transparency, and normal vectors instead of color images. This option is useful for <a name=iBFEG></a><u>cartoon animation</u>.  Contour rendering is turned off by default. If it is turned on, the <tt><b>output</b></tt> statements at the beginning of the <tt><b> </b></tt> view statement or the <tt><b>-file_type</b></tt> option must either specify <a name=iBFEH></a><u>PostScript</u> output files (<i>filetype</i> <tt><b>"ps"</b></tt>), or must specify an RGB or RGBA file type together with a <i>datatype</i> <tt><b> </b></tt> "contour". 

<p>
</dl>

<dl>

<dt><tt><b>-paper_size "</b></tt><i>format</i><tt><b>"</b></tt>
<dd>    If <a name=iBFEI></a><u>contour</u> rendering is turned on and the output is a <a name=iBFEJ></a><u>PostScript</u> file<a name=iBFFA></a>, <i>format</i> determines the <a name=iBFFB></a><u>paper size</u>. Available paper sizes are a3, a4, a5, a6, b4, b5, b6, 11x17 (or b), letter (or a), executive, or legal. All paper size strings are case-insensitive. The default is 11x17. 

<p>
</dl>

<dl>

<dt><tt><b>-paper_scale</b></tt> <i>scale</i>
<dd>    The <a name=iBFFC></a><u>paper scale</u> is a correction factor for the size of the <a name=iBFFD></a><u>contour</u> drawing on paper. The default is 1.0; numbers greater then 1.0 enlarge the drawing and numbers less than 1.0 reduce it. 

<p>
</dl>

<dl>

<dt><tt><b>-discontinuity</b></tt> <i>angle</i>
<dd>    Determines the angle discontinuity required to produce a contour line, in degrees. Any two triangles forming an angle of more than the specified number will produce a contour line segment between them. A value of 0.0 will outline every triangle. The default is 60.0. 

<p>
</dl>

<dl>

<dt><tt><b>-contour_line_width</b></tt> <i>width</i>
<dd>    This option determines the <a name=iBFFE></a><u>contour</u> line width in points for <a name=iBFFF></a><u>PostScript</u> output, and in pixels for picture output. The default is 0.5. 

<p>
</dl>

<dl>

<dt><tt><b>-contour_depth</b></tt> <i>depth</i>
<dd>    The <a name=iBFFG></a><u>contour</u> depth controls contours around occluded or self-occluding objects. A contour line will be drawn between two triangles in the same object if their z depths differ by more than <i> </i> depth. The depth is also used to decide whether to draw a contour line or not between two objects if only one of them has the <tt><b>nocontour</b></tt> flag set in its material. In this case, the Z depths of the two objects are compared, with <i>depth</i> being a threshold: if the two objects differ in Z by less than <i>depth</i> then --- assuming intersection or touching --- no contour line is drawn. If the two objects differ in z by more than <i>depth</i>, draw the contour line if contour generation for the <b>foremost</b> object is enabled; otherwise no contour line is drawn. <i>depth</i> must be positive. The default is 0.0. 

<p>
</dl>

<dl>

<dt><tt><b>-paper_transform</b></tt> <i>b d</i>
<dd>    The paper transformation defines a transformation that corrects distortions introduced by the printer. The PostScript coordinates expressed in points are transformed according to the matrix <i>(<tt><b>1</b></tt>  b  <tt><b>0</b></tt>  d)</i>. The default is the identical transformation, i.e. no distortion correction. 

<p>
</dl>
<br>
 <p><hr>
<a href=index.html#contents>Table of Contents</a>
</body>
</html>
