Page 1 of 1

Separating Self Cast shadows and Other object cast shadows

PostPosted: Sun Jul 29, 2018 5:37 am
by m0og0o
Hi :D , I was wondering if there was a way to separate out which shadows I use. I noticed if I turn on receive shadows and turn cast shadows off, my object will receive shadows from other objects. But if I turn receive shadows off and cast shadows on, my object, of course, does not receive shadows from anything.

Is there a way in custom lighting to only use shadows cast from other objects, and (assuming I need to possibly turn receive shadows off) blend them with the Albedo/Emission/Custom lighting channel?? I still want to keep cast shadows on in order to cast shadows onto other objects (the ground).

Thank you for your time,
m0og0o

Re: Separating Self Cast shadows and Other object cast shado

PostPosted: Mon Jul 30, 2018 11:39 am
by Amplify_Borba
Hello, thank you for getting in touch and for your support!

I don't believe that this is achievable without creating a custom Shader Template that has an extra pass for the cast shadows, however, you might be able to alternatively use a second mesh, invisible for the camera, that casts the shadows.

Light filtering in Unity is somewhat limited, but you can make use of the World Space Light Pos node in order to setup different behaviors according to the lighting type being used.

Re: Separating Self Cast shadows and Other object cast shado

PostPosted: Tue Jul 31, 2018 3:19 am
by m0og0o
Dude, awesome. Yea your second suggestion was what I tried and got working. But I can't imagine it is a proper workflow to have multiple of the same objects. A second pass is probably even more expensive huh....

But I will check into the shader templates. That's what I was hoping to hear.

Thanks for your suggestion, I will update the thread when I have a grasp on templates.

Best,
m0og0o

Re: Separating Self Cast shadows and Other object cast shado

PostPosted: Tue Jul 31, 2018 8:21 am
by Amplify_Borba
No problem, glad I was able to help!

Please don't hesitate to let us know if you have any further questions, looking forward to see what you create!