MayaMan Help Contents

# MayaMan Advanced Options

The Advanced Options panel in the MayaMan Globals dialog contains parameters that do not normally need to be changed, except by advanced users.

### RIB Creation

#### RIB Style

RIB files can be written as a single flat file, or as multiple smaller files that are referenced by a main file. The options are outlined below.
ReadArchive
  Using this style, MayaMan will write out a separate RIB file for each object in your scene, and refer to them from the main RIB file. 'qual' files will also be written separately (see below).

DelayedReadArchive
  This style is similar to ReadArchive, but the main RIB file will only pull in the contents of the separate object RIBs if they are needed (i.e. if they are visible in the camera FOV or reflections, etc). This can be a huge render efficiency improvement. For example, if you had a complex polygonal object in your scene, but it was behind the camera or occluded by another solid object, then the geometry might never be read into the renderer, and so you save the memory and performance normally incurred by having that model present. This RIB style is the default. 'qual' files will be written separately (see below).

ObjectInstance
  This method will use an ObjectInstance call for any objects in your scene where it is appropriate (i.e. that can be described with a single RenderMan geometry primitive). Using RenderMan's ObjectInstance function has been widely derided, and so we don't recommend using this style. It has only been included here for completeness. 'qual' files will be written separately (see below).

Flat RIB plus Qual
  This style will result in one large RIB file containing all the scene geometry, and a few small files containing only the RenderMan quality settings. See below about 'qual' files.

Flat RIB
  This style will write only a single RIB file. This style is useful for keeping your RIB files simple, e.g. when submitting an example RIB in a bug report to Animal Logic or a renderer author.

Inline Archive
  This style is similar to ObjectInstance but is more flexible... in general it will result in a near optimal tradeoff between number of files created and total size on disk. Note, InlineArchive is now the default for renderers that support it, if you switch do a different renderer you may need to reset the rib style too.

'qual' Files:
All RIB styles except for 'Flat RIB' will result in small RIB files being written out along with the main RIB which contain only quality settings. Only one set of quality RIBs will be written when rendering an animation sequence. This enables you to render one sequence of RIB files, and to easily modify the quality settings (e.g. pixel samples or output resolution) for the whole sequence. Without this, you would need to edit the settings in every RIB file for the sequence, or generate the RIB files again using MayaMan. This can be quite a time saver in a production pipeline.

#### Identifier Name Format

The format of the values set for the renderman attribute 'identifier/name' can be set in one of three ways. The original and default format is to use the name of the transform and the name of the shape concatenated, in some cases it may be more useful to use just the transform or just the shape name.

### Quantization

Quantization is the process of converting floating point values (as generated by RenderMan) into discreet integer values (e.g. 0 to 255, as needed by most image formats).

#### Planes

This parameter controls whether you are setting the quantization parameters for the RGBA channels or for the Z depth channel.

#### One

The floating point values get multiplied by this value before being assigned an integer value. For example, if the floating point value was 0.5 and the 'one' value is 255, then the value would end up as 0.5 * 255 = 127.5.

#### Min/Max

The Min/Max parameters specified here control the range of values that the quantized value will be clamped within.

#### Dither

As the floating point values are converted to integer values, they can be dithered (given a small random offset) which helps reduce color banding which can be common in computer generated images.

### Exposure

This function controls the sensitivity and nonlinearity of the exposure process. Each component of color is passed through the following function:

    color = pow((color  gain), 1/gamma);

### Rendering Processes

#### Render Priority

When MayaMan launches the renderer it can reduce the process priority. Setting it to a 'Low' priority can be especially helpful on a single CPU computer, so that the user can continue using Maya while the render is progressing, without slowing down Maya's performance.

#### Number of Threads

For renderers that support multithreading (the latest versions of all supported renderers do) then this controls how many CPUs will be used by each rendering process.

#### Number Of Procs

For renderers that permit multi seperate invocations of the renderer to contribute to a single image (prman and 3delight do) then this sets the number of top level processes to use, each will use the number of threads indicated by the preceding option so be aware that the total number of CPUs used by a render will be the product of the number of threads and the number of procs.

#### Number of Renders

This is only important if you are rendering at the same time as doing ribgen and controls how many different frames should be processed at the same time. While ribgen is happening this number is reduced by one so that some resources are left over for mayaman. Note, this too is a multiplier, if you set it to two then the number of threads times the number of procs times the number of renders is how many CPUs will actually be used.

NB: The first RIB is always allowed to complete before the subsequent ones are started regardless of the number of cpus/renders selected, this is because the first frame might compute shadow maps/textures that are used for all frames.

### Tile Ribs

When tiled ribs are used (ie: when either of the X or Y tiles is > 1) then for each frame a set of ribs is created that each render a portion of the image. These images can then be assembled to form the final image. This can be a good way to handle rendering of a small number expensive frames. Note that in reality the total amount of time required to compute the images increases as more machines have to do the basic setup, the advantage lies in being able to get a lot of CPUs working on the problem. To make the image assembly relatively painless MayaMan will write out an extra script. If the render is called 'foo' then 'foo.mkmosaic.bat' (or .csh on irix/linux) will contain calls to BMRT's mkmosaic program. This program will assemble all available pieces and the script contains commands for all frames in the sequence, it's safe to run this periodically throughout the render so that you can view the partial results.

### Dice Camera

#### Camera

PRman only, sometimes you'll need to dice through a different camera... to do this, select the transform above the camera do be used for dicing and then press the checkerboard icon next to the Dicing Camera control, this will connect the camera to mayaman and it will be used for all dicing. This alternate camera may also be used for shadow map dicing.

#### Resolution

Set the resolution of the camera to be used for dicing, this is effectively the control over dice/shade rate when a reference camera is being used.

### Auxiliary Cameras

When producing stereoscopic images it's useful to render with exactly the same data for both eyes. Rather than generate multiple ribs MayaMan will now insert up to two additional cameras in the rib that can be selected later. This allows queuing and rendering of the main camera and if the render is approved the ribs can be re-rendered to produce the other views.

If no dice camera is specified then the auxiliary camera are diced with the main camera (if the renderer supports it).

The images produces will automatically be simple mutations of the main camera output image(s), an "auxa" or "auxb" subdirectory designation will be inserted below just before the image name.

Extra Pass ribs that do not select a special camera will also have these additional cameras inserted.

At the moment the way to trigger rendering of the alternate cameras is to modify the .search_path file to turn on a user attribute that will influence how the rest of the rib is interpreted. The .search_path file is the ideal location of such an edit as it's always ascii, is included before anything else, and is shared by all ribs. Of course this means that you can't be rendering from two cameras simultaneously. The line should look like this:

``

                 Attribute "user" "float AUX_CAMERA_A" [1]

or this:

``

                 Attribute "user" "float AUX_CAMERA_B" [1]

Note, setting the value to 0 doesn't turn it back off, the value is unimportant, all that matters is if the user attribute exists or not.

Users that employ RiFilters to manipulate the rib on the fly will find better ways of inserting this attribute at the last possible moment, thereby allowing simultaneous rendering of multiple views.

### Misc

#### Recover

This will cause "-recover 1" to be passed to prman renders. This will allow interrupted renders to continue from where they left off. So that old attempts at the render don't confuse this mechanism the target files are removed at rib-gen time.

#### Alternate Render Command

Normally MayaMan calls 'prman' or 'air' or some other program that's part of the renderer distribution in order to convert a rib into a picture. This control lets you provide a different program... these alternate programs will typically just filter the rib in some way and then pass it to the regular renderer.

#### Command Line Args

Sometimes you need to pass a command line argument to the renderer but MayaMan doesn't have a control for it... in this case you put the flags in this field. Be careful not to put things in here that MayaMan controls or the results will be undefined.

#### Global Material Override

When this attribute is connected to a shading group the nominated shading group will be placed on every model in the scene. This is useful for special purpose passes.

If you are processing a single renderLayer and it has a shadingGroupOverride then that override will take precedence over the mayaman one... this is more convenient than patching the mayaman global material override on a per-pass basis.

#### Forced Surface Shader

The name of a surface shader to apply to all surfaces. This is useful for special purpose passes. Should just be a simple shader name like 'matte', or 'defaultsurface', no provision for argument passing to this shader has been made. This can be more flexible than the global material override option because it preserves displacement and other material related information.

#### Pixel Variance

This setting can affect how often the scene is sampled (along with the Basic Options number of samples). Pixel Variance, being a method of adaptive sampling, can be used to increase scene quality. The value determines how much variation can be tolerated before the scene is super-sampled. If you had a scene with areas requiring high sampling, and others which don't, you could keep your samples low and reduce the pixel variance in order to only have higher samples in the areas needing them.

The process is described in detail on page 178 of The RenderMan Companion.

See also Min/Max Samples in the raytracing panel.

#### Relative Detail

This control is a scaling factor for RenderMan's Level of Detail functionality. If relativedetail is greater than 1, the effective level of detail is increased, and a more detailed representation of all objects will be drawn. If relativedetail is less than 1, the effective level of detail is decreased, and a less detailed representation of all objects will be drawn. Level of Detail is not currently implemented in MayaMan 25/Jul/2001

#### Hider Sampling

Controls which hider to use which basically is how the renderer figures out what to cull and is a setting mostly for advanced users. PRMan 11.5 has a new depth-mask sampler that is of interest though... an arbitrary surface can be used to generate a depth mask and the result used to clip the rest of the geometry. Objects that have the 'Visible To Depth Mask Pass' attribute set will contribute to a special shadow map that will hide part of the scene.

Note, during a depth mask pass the shaders applied to the objects will be subject to the 'Consider Surface Shaders' and 'Consider Displacement Shaders' settings in global shadow options.

### User Defined RIB Statements

This feature allows users to access particular unsupported options and features of renderers that are otherwise supported by MayaMan. The three text fields allow you to enter RIB statements that will be automatically inserted into the RIB that MayaMan outputs. The only difference between the three fields is their final location in the RIB. The "options" block will be output before the camera projection is setup, the "preworld" block will be output just before the "WorldBegin" in the RIB (good for clipping planes), and the "world" block will be output immediately after the "WorldBegin in the RIB file.

### Pre/Post Render Scripts

Any MEL script entered into these boxes will be run prior to the render, after the render, prior to each frame being rendered and after each frame being rendered, respectively. MayaMan will expand any environment variables and MayaMan variables (eg PROJECTDIR, SCENENAME) provided that they are used with the correct syntax, eg `print("My current Maya project directory is: $(PROJECTDIR) and MayaMan is installed to: $(MAYAMANROOT)\n")`

### Pre/Post Shell Scripts

Calls to these scripts are embedded in the .bat/.csh files that mayaman creates. These strings can contain arguments and will undergo variable expansion, for example:

    	call do_something.bat #f $(PROJECTDIR)

Note the the call at the start of the string.... this will usually be required for windows.

In the case of the 'Post Shadow' script, if expansion of frame number variables occurs then the script is run once per frame, otherwise, just once.

MayaMan Help Contents