Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.



In this tutorial, we discuss how to use the Maya Sampler Info node to control which items receive shadows and which don't. With the use of each object's ObjectID setting, a shadow-casting object can cast shadows on some other objects but not others. Accomplishing this will require some extra attributes from V-Ray to give the standard Maya node these additional abilities.

While for simple scenes it is possible to use a copy of the light (or lights) to illuminate different objects in different ways (by using shadow linking), for more complex scenes this method becomes unwieldy and overly complex. It is also prone to problems such as shadow Z-fighting unless one of the lights is moved slightly away from its copy. But using the samplerInfo node, with the V-Ray Additional outputs, it is possible to control which geometry casts shadows on other geometry within a scene. With this method, you control the casting and receiving of shadows via the VRaySwitchMtl material and Object IDs with a straightforward setup.




The Sampler Info node is a Maya utility node that provides various scene information that can be used in shading networks at render time. V-Ray Extra Attributes can be applied to the node to increase the node's output options. For more information, see the Additional Outputs section of the Texture Attributes page.


How it Works


Using the methodology in this tutorial, you can use Object IDs to determine which objects will receive shadows.