How to hide object but keep visible object’s shadow .I tried to add my Object in layer which ignores camera culling mask,but shadow disappears together with object in “Game” window.Also, the shadow disappears if I switch off Object “Mesh renderer” .Any ideas ?
try using a projector take a picture of the object go to photoshop and turn the object to black then delete the surrounding area and make it transparent. import to unity project it using a projector. use your same controls for it
Thanks ,but what about moving or skinned objects ?
By the way I need real dynamic shadow.This topic is about optimization, there are no reason drop shadow from hi poly skinned object, i need shadow from HIDDEN ! low poly reference
Anybody ? :shock:
I’ve tried figuring out a way of doing this and it seems to be a limitation of Unity’s shadow system. At least you won’t be paying twice for mesh skinning this way.
There’s a thing I haven’t tried yet. If you look at the built-in shaders source (look for the sticky thread in the Shaderlab section), you can see in shaders like Normal-VertixLit.shader there is a ShadowCaster pass. Maybe you can copy that pass into a new shader and somehow have the normal drawing pass a no-op. I don’t know how to do the second part.
Maybe there’s a different answer if your name is Aras and you wrote the shadow system.
-Jon
This seems to work for simple stuff… but seriously untested for anything real world.
Shader "Shadow No Render"
{
SubShader
{
UsePass "VertexLit/SHADOWCASTER"
}
}
HTH,
Ethan
Thanks a lot ! Ill try