You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

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.

Light Attribute nodes are created empty. Attributes can be added and removed by using the Add / Remove Attributes button. Left-Clickon this button brings up the Add / Remove Attributes Window, which is better suited for multiple attribute addition or removal (see The Add / Remove Attributes Window). Right-Clickon the Add / Remove Attributes button offers the same functionality through popup menus, which are more convenient when only one attribute or attribute group needs to be added or removed.

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 Section 3.9.3.6 [Render Pass Shadow Maps], page 76.

Shadow Map Name

This attribute specifies the file name 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 Section 5.5.4 [File Path Expressions], page 141. 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 Section 5.5.5 [Automatic File Output Control], page 143. 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 512 x 512.

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 Section 3.9.3.3 [Render Pass Quality], page 61 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’ and ‘deep’ (for 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, ‘average’ and ‘midpoint' (the latest 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 possible values are listed in the table below.

 

ValueDescription
`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

Only useful for a specific hack where the deep shadow map contains the distance to the occluding surface (to render absorption, for example)

 

Shadow Map Pixel Samples

This attribute specifies in how many sub-samples each pixel will be subdivided for the deep 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 Section 3.5.8 [Geometry Attribute Node Motion Blur], page 25 and Section 3.9.3.4 [Render Pass Motion Blur], page 63 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’.

Shadow Objects 


The Shadow Objects 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.

Photon Maps 


The Emit Photons attribute 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 Section 3.9.3.7 [Render Pass Global Illumination], page 78: 3Delight for Maya will automatically compute how much photons are needed per light, depending on their intensity. This attribute is off by default.

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 Section 3.9.3.5 [Render Pass Displays], page 65 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.

Motion Blur


The Transformation Blur attribute controls if the camera used for rendering the shadow map will have transformation blur applied to it or not. This camera is either explicitly specified, or it is derived from the attached light’s position and orientation (see [shadow camera attribute], page 50). Note that this attribute is ignored unless the "Generate With Motion Blur" attribute is turned on (see [generate with motion blur attribute], page 50). The available options are detailed below.

 

ValueDescription
OffNo transformation blur will be applied to the shadow map camera, regardless of the render pass current  Transformation Blur settings. This is the default.
OnTransformation blur will be applied to the shadow map camera, even if the Transformation Blur attribute is turned off in the render pass. The number of samples is determined by the "Trans- formation Samples" of the render pass. This value has no effect if "Generate With Motion Blur" is turned off.
Inherit

Transformation blur will be applied to the shadow map camera according to the Transformation Blur attribute of the render pass. The number of samples is determined by the "Transformation Sam- ples" of the render pass. This value has no effect if "Generate With Motion Blur" is turned off.

Area Light 


Samples

This attribute sets the number of samples to use when sampling 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.

ValueDescription
FasterIn this mode, specular highlights will not follow the shape of the area light , 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.

MEL Scripts 


3Delight For Maya lets you run MEL scripts before and after each shadow map.

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.

Two variables are automatically defined in the execution scripts execution as show in the following table.

VariableDescription
string $shape_path Contains the current light shape path.
string $attribs_node Contains the current light attribute node name.

 



  • No labels