CG Photography Other Stuff
CG Photography Other Stuff

Light and Shadow Linking

This elaborates on something Jeremy Birn said in one of the lectures for his Lighting and Rendering class. I was trying to sort out how light linking and shadow linking in Maya work. There are two things to set. First, in Render Settings (MayaSoftware) > Render Options > Lights and Shadows, Shadow linking can be set to "Shadows obey shadow linking", "Shadows obey light linking", or "Shadows ignore linking". Second, under the Lighting/Shading menu, the light from lights can be linked to objects (using the light-linking editor), and the shadow from lights can be linked to objects (using the Make Shadow Links, and Break Shadow Links menu items).

For the image below, I put two spotlights in the scene, each shining on a NURBS sphere, with both spheres set on a NURBS plane. There's a dim point light to provide general illumination to the scene, and since it's not linked, it casts a dim shadow from both spheres. The light on the left was a control, and I never adjusted any of its linking. The one on the right though was adjusted. For each of the three render options settings, I rendered with:

  • no light light and no shadow link
  • a light link only
  • a shadow link only
  • both a light link and a shadow link

When the render option is set to "Shadows obey shadow linking", unless a shadow link is established between the spot and the sphere, no shadow is rendered for the sphere (see the top two images versus the bottom two images in the first column). Either way though, if you have the spot light-linked to the sphere, you get the sphere illuminated (see first column, images two and four). If not, then not (images one and three).

When the render option is set to "Shadows obey light linking", shadow linking is irrelevant (second column, image three). The sphere will cast a shadow as long as a light is linked to it (second column, images two and four).

When the render option is set to "Shadows ignore linking", then you always get a shadow.

So, if you want an object unilluminated but casting a shadow, then:

  • Shadows obey shadow linking + shadow link only, or
  • Shadows ignore linking + no light links

If you want an object illuminated but not casting a shadow, then:

  • Shadows obey shadow linking + light link only

If you want an object unilluminated and not casting a shadow, then:

  • Shadows obey shadow linking + no links, or
  • Shadows obey light linking + no links, or
  • Shadows obey light linking + shadow link only

Finally, if you want an object illuminated and casting a shadow, then:

  • Shadows obey shadow linking + light link and shadow link, or
  • Shadows obey light linking + light link (with or without shadow link), or
  • Shadows ignore linking + light link (with or without shadow link)

As long as a light's "Illuminates by Default" setting is on (in the light's shape node), and "Shadows obey light linking" in the Render Options (these are both the default settings), then you get illuminated objects that cast shadows. You could also set an objects Render Stats in its shape node to turn off "Casts Shadows".