I have an object that I want to cast shadows into the scene, and I want to receive shadows from other objects in the scene, but I don’t want it to receive shadows from itself. How can I disable this?
The reason I don’t want it to cast shadows on itself is because it’s a round surface, and it gets streaking effects at the edges of where it’s illuminated.
Coming back to this 13 years later with a better understanding of how rendering pipelines work…
The reason you can’t do this (in any reasonable way), is that all shadow-casting objects are rendered per-light in one big batch (shadow-caster pass).
to cherry-pick one object to not cast shadows onto itself, it’d have to not be in the big batch
but to let it still cast shadows into the scene, it’d need to be added to that shadow-caster batch after it has rendered, but before all other objects have rendered.
In my case, the actual solution here was to just adjust the normal and depth biases on my shadow-casting lights (or today you can do this in the URP/HDRP asset’s settings).
As for why I thought this was possible, I think it was because I had seen a tech-breakdown of the Halo 2 trailer (which is also the end of the game’s first level), and one of the devs mentioned that they added support for “Self-shadowing”, which made me think it was something that could also be turned off. The reality is that when they added “self-shadowing” they actually meant 2 things:
They added shadow-casting, just… in general.
The normal maps added nice additional shading to the geometry (but didn’t cast shadows).
I still don’t get why this is not possible. Blender can do it in both eevee and cycles, MikuMikuDance can do it and that was developed in like a month. This is a must have feature for me. Only started messing around with unity a few days ago, but it’s looking like a hard pass for me. If anyone knows of a good 3d game engine that supports disabling self shadows pls let me know.
A round-about would be to write a custom shader, and ignore all shadows cast on points where the dot product of the point’s normal and the light direction was less than 0 (or fade the shadows based on the dot product), so self shadow won’t disturb the graphics very much. But that is quite complex if you don’t know how to write shaders.