Rendering shadows and reflections separately
Maya also provides a way to create custom reflection and shadow passes. You may need to do this, for example, if you want to blur the reflections or shadows rendered with the Maya Renderer or adjust the shadow color in a compositing package.
Setting this up involves the Use Background Shader which acts as a shadow and/or reflection catcher. In the images below, a ground plane under the goggles has a Use Backgroimd Shader assigned and the Primary Visibility is turned Off for the goggles.
Chapter 8
Rendering shadows and reflections separately
- Below is an image rendered normally:
|
Use Background Attributes | |||
|
Specular Color |
]l..... Ill ' lL"d | ||
|
Reflectivity |
0 , 000 |
m--il | |
|
Reflection Limit |
2 | ||
|
Shadow Mask |
1 . 000 |
1 1' i 10 | |
Use Background Attributes
Use Background Attributes
To Render only the reflections
■ Open googlesUseBkgd.mb and assign a Use Background Shader to the ground plane.
The ground plane is the reflection-catching object in this case.
■ Turn Off the Primary Visibility on all objects other than the ground plane. The easiest way to do this is to RMB over the googlesLayer and select Select Objects. Then go to Window —> General Editors -> Attribute Spread Sheet and under the Render section for Primary Visibility, click+drag down all the boxes and type in 0. This will turn the Primary Visibility off.
Turing off Primary Visibility will ensure that the goggles are not visible but they will still show up in the reflections on the ground plane.
- Turn Off shadows temporarily by turning the Shadow Mask option in the useBkgd material to 0.
- In the Use Background Shader Attribute Editor, set the Reflectivity to the desired value between 0 and 1.
This value should be set to the same value as the Reflectivity on the original material assigned to the ground plane.
This rendered reflection pass shows the reflections in the RGB channels and a white mask in the alpha channel. In some cases, the alpha channel would not be used in the final composite because reflections are normally added to the background image. However, if the background image is a light or white color, adding the reflections will not be visible; in this case, the alpha is needed.
- Use Background Shader - RGB channels showing reflections only
Use Background Shader - alpha channels showing reflections mask
Use Background Shader - alpha channels showing reflections mask
To render only shadows
- In the Attribute Editor for the Use Background Shader, make sure the Shadow Mask is set to 1.0.
- Set the Reflection Limit to 0 on the Use Background Shader. This will ensure that no reflections are visible in the rendered results.If you are not Raytracing shadows, you can simply turn off Raytracing altogether.
Post a comment