Skip to content
07-848 2005

V-Ray for Maya

Remove self shadowing from a mesh but still cast shadows

copied from https://forums.chaosgroup.com/forum/v-ray-for-maya-forums/v-ray-for-maya-general/980136-remove-self-shadowing-from-a-mesh-but-still-cast-shadows

Last updated 1 September 2026

copied from https://forums.chaosgroup.com/forum/v-ray-for-maya-forums/v-ray-for-maya-general/980136-remove-self-shadowing-from-a-mesh-but-still-cast-shadows

attached very simple example scene on the same forum thread.

todo:

  1. change the below into an easy-to read tutorial
  2. change title to something more meaningful afterwards
  3. add a more meaningful example scene
  4. add some toon-ish diagrams like the ones found here Controlling Shadows Using the Sampler Info Node
  5. somehow merge this page and this Controlling Shadows Using the Sampler Info Node into one.
  6. both should probably be something like two separate parts explaining that this approach makes selective shadow casting and can be used to disable one object from casting shadow to another one, but just as well can be used to simply remove self-shadowing

Q: is there any way I can remove the self shadowing of a mesh, but still cast and receive shadows from other objects? Or any workarounds for this,

A: There is a somewhat complicated way. I just gave it a try and seems to work for me.

Here's the gist of it: I'm using the samplerInfo with V-Ray additional outputs. The parentObjIDTex output goes into the switch input of a vraySwitchMtl. The object, for which I want to only disable self-shadowing, gets V-Ray Material Override attributes and the SwitchMtl is assigned as a shadow material. The SwitchMtl contains two materials - one opaque and one transparent (shadow material overrides only work with transparency and nothing else). Then I assign a V-Ray objectID to my non-self-shadowed object and set it to whatever slot my transparent material occupies in the switchMtl.
For exampe, let's say my SwitchMtl has an opaque material at slot 0 and a transparent at 1. The objects that receive shadows from my special object, should have an object ID 0, and those that won't receive shadows from the special object will have an ID of 1 (they will receive transparent shadows).
Since the special object also casts shadows onto itself, and its ID is 1, it will not receive shadows from itself. All other objects don't need an objectID to cast shadow onto the special object.

This is probably a bit better described in this tutorial: https://docs.chaosgroup.com/display/...pler+Info+Node

And I've attached a sample scene to illustrate the setup to this post. Let me know if that works for you or if you need any other help with this setup.