3.6 The Light Attribute Node
| 3.6.1 Overview | ||
| 3.6.2 Shadow Maps | ||
| 3.6.3 Shadow Objects | ||
| 3.6.4 Photon Maps | ||
| 3.6.5 Category | ||
| 3.6.6 Area Light | ||
| 3.6.7 MEL Scripts |
3.6.1 Overview
The Light Attribute Node is used to specify parameters that are not contained in the light shader. For instance, several light shaders can use shadow maps; the Light Attribute Node can be used to generate these shadow maps. When there are no light attribute node attached to a light, 3Delight for Maya will do its best to extract relevant parameters from the Maya light node.
3.6.2 Shadow Maps
This panel controls the shadow map generation for the attached light source.
|
- ` Generate Shadow Maps'
- This attribute toggles on and off the generation of a shadow map for this particular light. It is set to off by default. Note that even if this attribute is on, when the render pass used to render has its Render Shadow Maps attribute unchecked, no shadow maps will be rendered. Refer to Shadow Maps.
- ` Shadow Map Name'
- This attribute specifies the filename of the shadow map and is empty by default. It can be set to a relative or absolute path and contain tokens, as explained in File Path Expressions. It can also be left empty, in which case a shadow map name will be generated using each of the attached light node's Shadow Map File Name, Add Scene Name, Add Light Name and Add Frame Ext attributes. This name generation will occur regardless of the light node's Use Depth Map or Disk Based Dmaps attributes. Using this method (or using the `<shape_name>' expression), a single Light Attribute Node can be attached to several light sources and generate shadow maps for each and everyone of them, as long as they can all share the same parameters except for the file name. It is recommended to turn on the light node's Add Frame Ext attribute if the Generate First Frame Only attribute is turned off. Refer to Automatic File Output Control. Note that a decent default file name is automatically generated when the Generate Shadow Maps toggle is turned on while the shadow map name is left empty.
- ` Shadow Map Resolution'
- This attribute specifies the image resolution for the shadow map. The default resolution is 512x512.
- ` Shadow Map Shading Rate'
- This attribute specifies the Shading Rate to be used for the rendering of this shadow map. The default value for this attribute is `1.0'. Note that the shading rate value entered here is not a multiplier of render pass' shading rate; it is used "as is". Refer to Quality for more information about the shading rate.
- ` Shadow Map Type'
- It is highly recommended to read the discussion about shadow map types that be found in 3Delight User's Manual; it details the pros and cons of each type. The available shadow map types are:
- ` normal'
- Select this value to compute depth map shadows. This is the default value and should be the preferred type since it is faster to compute.
- ` deep'
- Select this value to compute deep shadow maps.
- ` Shadow Map Depth Filter'
- This attribute is only available when Shadow Map Type is set to `normal'. The value selected here defines what depth filter is used when rendering the shadow map. If some objects exhibits self-shadowing problems, adjust the `shadow bias' value in the light shader (or the Maya light node if there are no RenderMan shaders attached to the light), or choose a different `depth filter' value. The available values are:
- ` min'
- This is the default value.
- ` max'
- ` average'
- ` midpoint'
- This value is a little slower to compute but is usually very good at getting rid of the self-shadowing problems.
- ` Volume Interpretation'
- This attribute is only available when Shadow Map Type is set to `deep'. The available values are:
- ` Discrete'
- This value should be used to compute shadows cast by solid objects.
- ` Continuous'
- This value should be preferred for computing shadows cast by participating media (fog, clouds, smoke, etc.)
- ` Distance Inside'
- ` Shadow Map Pixel Samples'
- This attribute specifies in how many sub-samples each pixel will be subdivided for the shadow map rendering. The default is 2x2.
- ` Generate First Frame Only'
- If selected, 3Delight For Maya will only render the shadow map on the first frame of animation. This is a good choice when the objects that cast shadows are not animated. It is recommended to avoid inserting a `#' in the Shadow Map Name attribute (or to check the Add Frame Ext attribute of the light node when the Shadow Map Name is left empty) when this option is turned on. By default, this attribute is set to off.
- ` Generate With Motion Blur'
- When this attribute is on, the shadow map will be rendered using the same shutter opening and closing times as the camera used for rendering the frame. This will produce motion-blurred objects in the shadow map, provided that at least one object has at least one of the transformation blur or deformation blur options turned on. Since depth shadow maps do not contain any transparency information, they are not recommended for creating proper motion blurred shadows. The motion blurred portions of the shadow map will produce grainy shadows; however it is possible to blur these grainy parts to some extent using the light source shader's shadow blur or shadow filter size attributes. Deep shadow maps are a better choice when motion blurred shadows are needed; however a moving, motion blurred, self-shadowing object will only be properly shadowed if the deep shadow map is not motion blurred. Refer to Motion Blur and Motion Blur for details on the motion blur options.
- ` Generate Cube Shadow Map'
- If this light attribute is attached to a point light, you may want to generate a shadow map for each direction (since point lights illuminate in every direction). Enabling this toggle will force 3Delight for Maya to generate an aggregated shadow map that contain six shadow maps. This option is off by default.
- ` Shadow Camera'
- This attribute specifies what camera will be used to render the shadow map. When no camera is specified, the light source attached to this attribute node will be used to position the camera used for the shadow map rendering; in this case the camera's angle of view is defined by the light's cone angle (if the light source is a spotlight). By default, no camera is selected.
- ` Near Clipping Plane'
- This attribute defines the near clipping plane for the shadow map rendering. The default value is `0.001'.
- ` Far Clipping Plane'
- This attribute defines the far clipping plane for the shadow map rendering. The default value is `10000.00'.
3.6.3 Shadow Objects
|
- ` Shadow Objects'
- This attribute defines what objects will be rendered in the shadow map. When `<light linker>' is selected, only objects that are lit by the light this attribute node is attached to will be rendered in the shadow map. This is the default. This menu will also list all Maya object sets in the scene; when a set is selected, only the objects it contains will be in the shadow map, regardless of the light linking.
3.6.4 Photon Maps
|
- ` Emit Photons'
- When this attribute is on, it enables the generation of photon maps for this light source. Generally, only point lights and spot lights should enable this toggle. Note that the total number of photons to trace into the scene is specified in Photon Maps: 3Delight for Maya will automatically compute how much photons are needed per light, depending on their intensity. This attribute is off by default.
3.6.5 Category
|
- ` Key Light'
- This attribute can be used to differentiate some light sources from the others by tagging them as key lights. Key lights have specific AOVs that can be used to render a specific component of their contribution to the image's overall appearance, isolating their contribution form the effect of the other light sources of the scene. Refer to Secondary Displays for more information on these specific AOVs.
- ` Category'
- This attribute can be used to define categories to which the attached lights belong. Categories are used in shaders to do computations on a subset (or category) of the scene's light sources. This attribute is empty by default.
3.6.6 Area Light
|
- ` Samples'
- This attribute defines the number of samples used for the area light. Larger values take longer to render but give smoother results. The default is 16. This attribute has no effect if the attached light shape is not an area light.
- ` Sampling Strategy'
- This attribute controls how the attached area lights are rendered. The two possible values are:
- ` Faster'
- In this mode, specular highlights will not follow the shape of the area light(1), only shadows will be rendered correctly.
- ` Better'
- In this mode, both the specular highlights and the shadows are rendered correctly. This setting is recommended when accurate specular highlights are important.
3.6.7 MEL Scripts
As for the render pass (MEL Scripts), 3Delight For Maya let you run MEL scripts before and after each shadow map. Two variables are automatically defined in the context of these scripts execution:
- ` string $shape_path'
- This variable is assigned the current light shape path.
- ` string $attribs_node'
- This variable is assigned the current geometry attribute node name.
|
- ` Pre Render MEL'
- This attribute specify a MEL script that will be executed before the shadow map is rendered. More precisely, the script will be executed just before the FrameBegin RIB statement of the shadow map. This attribute is empty by default.
- ` Post Render MEL'
- This attribute specify a MEL script that will be executed after the shadow map is rendered. More precisely, the script will be executed just after the FrameEnd RIB statement of the shadow map. This attribute is empty by default.
3Delight 8.0. Copyright 2000-2008 The 3Delight Team. All Rights Reserved.