The mystery behind shadow passes – Tutorial

Maya render passes can output the following shadow passes:
1.    Shadow
2.    Shadow Raw
Each one is unique in the way it will be used when composited.

Once we create a shadow pass, we will notice that the buffer type is set to 16 bit float. This gives us the indication for the need of a floating points solution otherwise the values will be clamped.

We need to make sure that our frame buffer will support this type of frame buffer.  For this exercise, we will choose RGBA (HALF) 4*16 floating and image format is TIFF.

For this tutorial we will render the following passes

  1. Diffuse
  2. DiffuseWithoutShadow
  3. Shadow
  4. DirectIrradiance
  5. DirectIrradianceNoShadow
  6. RawShadow
  7. DiffuseMaterialColor

The first thing we will notice is the difference between shadow and shadow raw


Master beauty


Shadow


Shadow Raw

In the shadow raw pass, the shadow is “pure”.   We will also notice it’s not affected by the ground colors.

Shadow pass
The shadow equation is as such:
Diffuse=DiffuseWithoutShadow-Shadow
which means you will need to use a “minus” operation and composite the ‘shadow’ pass to ’diffuse without shadow’ pass.


Photoshop composite


Nuke composite

Note: the reason I have a grade node in NUKE, is simply to view my passes as they were sRGB.
You can ignore it for now.

Shadow Raw pass
The shadow equation is as such
DirectIrradiance=DirectIrradianceNoShadow-RawShadow


Photoshop composite

Diffuse=DiffuseMaterialColor∙(DirectIrradianceNoShadow-RawShadow)


Photoshop composite


Nuke composite

To insure a proper workflow we used a floating point framebuffer, to illustrate the outcome of a clamped framebuffe (8 bit) I comped the same tree using 8 bit files in Nuke.

We immediately notice that the shadow is very faint.

A typical fix is to add a color correction node to the shadow. In this scenario I used a grade node.

However,  it won’t give us the exact shadow as the diffuse.

In conclusion, it is recommended to use  a floating point solution when using shadow passes.

 

Recent Entries

4 Responses to “The mystery behind shadow passes – Tutorial”

  1. David Says:

    This will work ok as a workaround, but in reality I would avoid any pass that requires a multiplication process. (I know this was done to answer questions on how one *would use such a pass.)

    But as a whole, multiplicative operations in compositing should be avoided when possible.

    Short explanation here from Zap: http://forums.cgsociety.org/archive/index.php/t-688341.html

    Longer ones can be found on forum.mentalimages.com mymentalray.com etc.

  2. Colie Says:

    nice demo, man. Enjoyed this one. Thank you.

  3. Ashraf Says:

    Thanks Colie,
    for everyone reading, check Colie’s work
    coliewertz.com >> crazy talented artist ! :)

  4. Gabriela Besser Says:

    Cool! Thanks

Leave a Reply