Separating Self Cast shadows and Other object cast shadows

Node-based Shader Editor

Separating Self Cast shadows and Other object cast shadows

Postby m0og0o » Sun Jul 29, 2018 5:37 am

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
m0og0o
 
Posts: 3
Joined: Sun Jul 29, 2018 5:30 am

Re: Separating Self Cast shadows and Other object cast shado

Postby Amplify_Borba » Mon Jul 30, 2018 11:39 am

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.
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Amplify_Borba
 
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am

Re: Separating Self Cast shadows and Other object cast shado

Postby m0og0o » Tue Jul 31, 2018 3:19 am

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
m0og0o
 
Posts: 3
Joined: Sun Jul 29, 2018 5:30 am

Re: Separating Self Cast shadows and Other object cast shado

Postby Amplify_Borba » Tue Jul 31, 2018 8:21 am

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!
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Amplify_Borba
 
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am


Return to Amplify Shader Editor

Who is online

Users browsing this forum: No registered users and 0 guests