Short Contents

5.5 Miscellaneous Guidelines

5.5.1 Dynamics Animation Rendering

3Delight for Maya could change the current time while rendering in two cases: when rendering a frame sequence (obviously) and when motion blur is enabled. If motion blur is requested, the blurred objects need to be sampled a number(12) of times during the frame's interval in order to detect the extent of their movement. This means that the current time will move a number times to sample the movement, and then jump back to the current frame once the rendering is done.

Since dynamics are computed incrementally(13) the time jumps introduced by 3Delight for Maya may yield consistent results. To avoid this problem, the dynamics computations need to be exactly the same for a given frame, regardless of what was the previously played frame. One way to achieve this is to cache the dynamics results. It is highly recommended to use Maya disk caching system when working with a scene that contains dynamics. Refer to the Maya documentation for more details about this; look into the Solvers and caching book in the Dynamics -> Dynamic and Effects section.

5.5.2 Using Atmosphere Shaders

Atmosphere shaders in RenderMan are used to compute the appearance of the volume between the camera and the object closest to it. This means that if there are no objects facing the camera at a given point in the camera's field of view, no atmosphere shader will be applied. Following this basic principle, here are some tips using atmosphere shaders, such as fog or smoke:

5.5.3 Textures In The Hypershade

If an object is shaded using an Hypershade shading network that uses a texture file (via a node such as the File 2D texture node), 3Delight for Maya will first convert the texture to 3Delight's texture file(14), and then use this converted file for rendering. It is possible to prepare the texture file manually in order to avoid this automatic conversion completely by using the tdlmake utility. The prepared texture file should have the `.tdl' extension. It can then be used directly in an Hypershade node such as the File 2D texture node.

IMPORTANT

It is recommended to use the `-preview' option of tdlmake; doing so will create an embedded thumbnail that Maya can display as a texture preview image.

5.5.4 File Path Expressions

When an attribute that specifies a file path contains a relative path, the path will be considered relative to the current Maya project directory. This path can contain various tokens; this allows the path to dynamically change to reflect the current value of a given token. The following tokens can be used in any file path:

` $VAR'
The value of the environment variable `VAR' will replace `$VAR' in the path.
` %VAR%'
The value of the environment variable `VAR' will replace `$VAR' in the path.
` ~'
The value of the HOME environment variable will replace the tilde character.
` @'
The current frame number will replace the @ character.
` #'
The current frame number, padded to form a 4 digits number, will replace the # character.
` {<frame_num_char><operator><operand>}'
Simple expressions to produce a frame number can also be used as a part of the file name. The expression must be enclosed in curly braces. The expression components are:
` <frame_num_char>'
A character that represents the current frame number. `@' will produce the current frame number, and `#' will produce the same current frame number, padded to form a 4-digits number.
` <operator>'
An arithmetic operator. Valid operators are: `+ - * / %'.
` <operand>'
A integer or floating point number.
For instance, the following are valid frame number expressions:
{#-10}
{@*2.5}
{#%5}
` `MEL command`'
The string enclosed in back quotes is evaluated as a MEL command and gets replaced with the command's result.
` <layer>'
This string will be replaced with the currently rendered Maya render layer.
` <project>'
This string will be replaced with the path to the current Maya project directory.
` <pass>'
This string will be replaced with the name of the render pass node used for rendering.
` <shape_name>'
This string will be replaced with the long name of the attached shape. This tag can currently only be used in light attributes nodes.
` <scene>'
This string will be replaced with the name of the scene.
` <ext>'
This string will be replaced with the file extension. File extensions are expanded for RIB files, shadow map files, and any file output by a display driver.
` <camera>'
This string will be replaced with the name of the camera shape being used for rendering.
` <fragment_set>'
This string will be replaced with the name of the object set used by the RIB fragment being output. It is valid only in render pass rib fragment filename attributes.
` <aov>'
This string will be replaced with the name of the variable being output in the display. It is valid only in render pass display filename attributes.
` <output_variable>'
This string is deprecated in favor of `<aov>'.

5.5.5 Automatic File Output Control

Some files are automatically generated by 3Delight for Maya. The destination directories for these files are defined in the Maya project. Like other Maya project settings, relative paths will be made relative to the project directory.
It is possible to prepend all of the 3Delight for Maya project directories that produce temporary files with a path assigned to the _3DFM_OUTPUT_PATH environment variable. Note that this variable needs to be defined before Maya is launched and does not apply to the templates project setting.
The available 3Delight for Maya project directories are:

3Delight Fur Files
3Delight for Maya needs to generate a geometry file for each Fur Feedback node visible in the scene. These files are saved under the folder specified in the 3Delight Fur Files project setting. If the _3DFM_FURFILES_PATH environment variable is defined, its value will be used (and thus will override the directory specified in the 3Delight Fur Files project setting). This project setting is also used to store RIB file produced by the Shave and a Haircut plugin in some cases. Refer to Shave and a Haircut Tips.
RIB Fragments
This project setting specifies the folder where RIB fragments will be saved. If the _3DFM_RIBFRAGMENTS_PATH environment variable is defined, its value will be used (and thus will override the directory specified in the 3Delight RIB Fragments project setting). See RIB Fragments for details about their purpose.
3Delight Shaders
When an object has no RenderMan shader attached to it, 3Delight for Maya will attempt to translate any Hypershade shading network attached to that shader to RenderMan shaders, which are then used in the rendering. This process generates shader source files, which are stored in a `src' directory. These source files are then compiled into a shader and the compiled shader files are stored under the `OBJ' directory. Both the `src' and `OBJ' folders are created under the directory specified in the 3Delight Shaders project setting. If the _3DFM_SHADERS_PATH environment variable is defined, its value will be used (and thus will override the directory specified in the 3Delight Shaders project setting). Note that this project setting is relevant only for translated shaders from Hypershade networks. It has no effect on RenderMan shader nodes or on the shader paths displayed in the Shader Selector.
Shadow Maps
Shadow Maps will be automatically generated only in the following cases:

  1. A light source has no light attribute node attached to it; its "Use Depth Map Shadows" attribute is turned on, and the render pass node used for rendering has its "Render Shadow Maps" attribute turned on.
  2. A light source has a light attribute node attached to it. This light attribute node has its "Generate Shadow Maps" attribute turned on, but nothing is specified in the "Shadow Map Name" attribute. The render pass node used for rendering has its "Render Shadow Maps" attribute turned on.
If one of these two situations is encountered, a shadow map file name will be generated based on the current values of the light source node's attributes in the section "Disk Based Dmaps". The file will be created under the directory specified in the 3Delight Shadow Maps project setting. If the _3DFM_SHADOWMAPS_PATH environment variable is defined, its value will be used (and thus will override the directory specified in the 3Delight Shadow Maps project setting). Shadow map rendering parameters are obtained by the current settings in the attached light attribute node. If no light attribute node is attached to the light source, the shadow map rendering settings are derived from the light source node's "Depth Map Shadow Attributes". Refer to Shadow Map Tips for more details.
3Delight Templates
This project setting specifies the folder where render pass templates will be saved. 3Delight for Maya will also look up this directory and list the render pass templates it contains in the Add Render Pass menu. If the _3DFM_TEMPLATES_PATH environment variable is defined, its value will be used (and thus will override the directory specified in the 3Delight Templates project setting). Note that template files are created on-demand only and are not affected by the _3DFM_OUTPUT_PATH environment variable. See Managing Render Passes.
3Delight Textures
Any node in an Hypershade network that uses a texture file name not ending with the `.tdl' extension will undergo a texture conversion process in order to speed up texture lookup during rendering. This conversion produces a 3Delight texture file that is stored under the directory specified in the 3Delight Textures project setting. If the _3DFM_TEXTURES_PATH environment variable is defined, its value will be used (and thus will override the directory specified in the 3Delight Textures project setting). It is possible to prepare texture files in order to avoid this conversion as explained in Textures In The Hypershade.

5.5.6 Hypershade translation quirks

3Delight for Maya automatically translates most hypershade networks into equivalent RenderMan shading language. However, some nodes require special attention for various reasons.

` bump2d'
To use the Tangent Space Normals and Object Space Normals modes, some extra setup is required. Create a vector attribute named bumpNormal on the node and connect the bump texture's output color to it. A connection of the texture's alpha to the bumpValue input like Maya is using is not required but will not hurt either.
` bump2d'
When using with a bump map, it is best if the map's average value is near 0 or some artifacts are likely to appear in areas of high curvature. As bump maps will typically average to grey, this can be achieved by setting the file node's alpha or color offset to -0.5.

3Delight for Maya 6.0. Copyright 2000-2011 The 3Delight Team. All Rights Reserved.