Short Contents

4.1 Lighting Guidelines

4.1.1 Depth Map Shadows With Maya Lights

The same attributes that control depth shadow maps in Maya are acknowledged by 3Delight for Maya:

  1. In the `Depth Map Shadow Attribute' panel of a light node, check the Use Depth Map Shadows toggle.
  2. Create a render pass node by using the Add Render Pass item in the 3Delight menu and hit the Render button it displays in the Attribute Editor. Or, use an existing render pass node and make sure its Render Shadow Maps attribute in the Shadow Maps panel is checked.

4.1.2 Ray Traced Shadows With Maya Lights

When ray traced shadows are desired, a few extra steps are required since in 3Delight for Maya, objects are not visible to ray traced shadow rays by default. This procedure illustrates a way to get ray traced shadows working:

  1. For each light node that will cast ray traced shadows, enable its Use Ray Trace Shadows attribute.
  2. Select all objects that will cast ray traced shadows;
  3. Pop up the shader assignment panel and create a new geometry attribute node by clicking the texture button on the right of the Attribs option menu, then click the AE button to display its attributes in the Attribute Editor.
  4. In the Visibility panel, set Transmission to `Shader'.
  5. Create a rende rpass node by using the Add Render Pass item in the 3Delight menu (or select an existing render pass) and hit the Render button it displays in the Attribute Editor.

4.1.3 Deep Shadow Maps With Maya Lights

Here is a quick procedure to produce deep shadow maps:

  1. Select all light nodes that will cast shadows using deep shadow maps.
  2. Pop up the shader assignment panel and create a new light attribute node by clicking the texture button on the right of the Attribs option menu, then click the AE button to display its attributes in the Attribute Editor.
  3. Turn on the Generate Shadow Maps toggle.
  4. Select `deep' for the Shadow Map Type.
  5. It is recommended that, in each light node, the Bias attribute (6) is set to `0.2'.
  6. Select 3Delight as the default renderer and render.

Note that the same procedure can be used to create depth map shadows. Simply set the Shadow Map Type attribute to `normal'.

4.1.4 Lighting and Shadowing With RenderMan Light shader

A very basic setup using a RenderMan light shader node can be made with the following steps:

  1. Select a light node;
  2. Pop up the shader assignment panel and create a new light shader node by clicking the texture button on the right of the Light option menu, then click the AE button to pop up the Shader Manager.
  3. In the shader manager, double-click on the desired light shader file on the left section. A shader node is created and listed in the right section.
  4. Select the created light shader node and click the Assign button.
  5. Close the shader manager.
  6. Back in the shader assignment panel, notice that the newly created shader node is now the selected entry of the `Light' option menu. Click the AE button on the right of that option menu to edit the shader node attributes.
  7. Assign relevant values for the various shader attributes. Note that by default, these attributes are independent from the light node attributes.
  8. Select 3Delight as the default renderer and render.
NOTE

You might need to increase the RenderMan shader node attribute that controls the light intensity in order to see the light.


If the selected light shader node is able to use a shadow map, the following extra steps will produce shadowing:

  1. Select a light node that has been assigned a RenderMan shader node.
  2. In the shader assigned panel, create a new light attribute node by clicking the texture button on the right of the Attribs option menu, then click the AE button to display its attributes in the Attribute Editor.
  3. Turn on the Generate Shadow Maps attribute;
  4. Set a Shadow Map Name, using the browser brought up by clicking on the Folder button.
  5. Double-click on the shadow map name file path and copy it.
  6. In the shader assigned panel, click on the AE button next to the Light option menu;
  7. Paste the file path in the RenderMan shader attribute that specifies the shadow map.
  8. Make sure the Render Shadow Maps toggle of the render pass used to render is turned on. Then start the render.

It might be convenient to connect some of the RenderMan shader node attributes, such as the cone angle, to the light source for easier manipulation. The following is an example on how to do this with the spotlight shader that is packaged with 3Delight.

  1. Create a spot light. This example assumes that it is named spotlightShape1.
  2. Pop up the shader assignment panel and create a new light shader node by clicking the texture button on the right of the Light option menu, then click the AE button to pop up the Shader Manager.
  3. In the shader manager, make sure the Directory is set to `$DELIGHT/shaders'. Find the spotlight shader in the list on the left side of the shader manager and double-click on it.
  4. Select the created light shader node and click the `Assign' button.
  5. Close the shader manager.
  6. Back in the shader assignment panel, note that the newly created shader node is now the selected entry of the Light option menu. Click the AE button on the right of that option menu to edit the shader node attributes.
  7. The node name is displayed at the top of the Attribute Editor, in the delightShader text field. Rename it to `dl_spotlight1'
  8. Right-click the `coneangle' attribute and select Create New Expression...
  9. In the Expression section of the Expression Editor, type in the following expression:
    spotlight1.coneangle = deg_to_rad(spotLightShape1.coneAngle / 2 +
        abs(spotLightShape1.penumbraAngle))
    
    and then click the Create button.
  10. Right-click the conedeltaangle attribute and select Create New Expression...
  11. In the Expression section of the Expression Editor, type in the following expression:
    spotlight1.conedeltaangle =  deg_to_rad(abs(spotLightShape1.penumbraAngle))
    
    and then click the Create button.
  12. In the shader assignment panel, create a new light attribute node by clicking the texture button on the right of the Attribs option menu, then click the AE button to display its attributes in the Attribute Editor.
  13. Turn on the Generate Shadow Maps attribute;
  14. Set the Shadow Map Name, using the browser brought up by clicking on the Folder button.
  15. Open Maya's Connection Editor.
  16. Select the shape spotLightShape1 and click the Reload left button of the Connection Editor.
  17. In the shader assignment panel, right-click the Light option menu and select Select Shader(s). Then, click the Reload Right button of the Connection Editor.
  18. The following connections can be established:

    • spotlightShape1.color -> dl_spotligth1.lightcolor
    • spotlightShape1.intensity -> dl_spotlight1.intensity
    • spotlightShape1.dropoff -> dl_spotlight1.decay
  19. Back in the shader assignment panel, right-click on the Attribs option menu and select Select attrib node(s).
  20. In the Connection Editor, click the Reload Left button.
  21. Create the following connection: delightAttribs1.shadowMapName -> dl_spotlight1->shadowmap.
  22. Assign the beamdistribution attribute of the dl_spotlight1 shader node to `0.0' if you want an effect closer to the Maya spot light.
  23. Make sure the Render Shadow Maps toggle of the render pass used to render is turned on. Then start the render.

4.1.5 Shadow Map Tips

3Delight 8.0. Copyright 2000-2008 The 3Delight Team. All Rights Reserved.