Cutout shadow caster

Your feedback is very important to us. We are listening.
Post Reply
pointcache
Posts: 2
Joined: Sat Nov 03, 2018 7:54 am

Cutout shadow caster

Post by pointcache »

Hi im making a shader that makes objects invisible when in certain radius, so a see through shader.
However i can't figure out how to make the object cast shadows.
The objects must be cutout, think tree cronas and such.
If i manually add pragmas
alpha addshadow
It casts shadows when fully transparent, it works for structures, roofs etc, however the trees then cast "square" shadows from leaves planes, instead of normal shadows.
i tried forceshadows also.

I need a way for cutout to be transparent and still cast proper shadows, is this possible with AS?
User avatar
Amplify_Borba
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am

Re: Cutout shadow caster

Post by Amplify_Borba »

Hello, thank you for getting in touch and for your support!

You should be able to achieve that type of effect, as you can see in the example I'm sharing below:

Image

Could you share a sample of what you've built so far so that we can check for any potential issues? Thanks!
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!
pointcache
Posts: 2
Joined: Sat Nov 03, 2018 7:54 am

Re: Cutout shadow caster

Post by pointcache »

https://imgur.com/a/k2BpJI0

Here you can see how my shader works
Here's the archive with the shader and control maps

https://drive.google.com/open?id=1en76G ... BPruRnnb8f

What i need from it is to keep shadows when leaves are fully transparent,
the problem is that no matter what transparency setting i use i can't achieve it.
Basically i can achieve this with geometry, adding alpha addshadow to the shader pragma, this way i can hide walls, and keep shadows.
I can't do this with transparent, no matter what i do.
User avatar
Amplify_Borba
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am

Re: Cutout shadow caster

Post by Amplify_Borba »

Thank you for taking the time to provide a sample!

I'm not entirely sure if this is possible, so I've escalated it to the developer for further investigation.

We'll let you know as soon as we have any developments.
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: Cutout shadow caster

Post by Amplify_Borba »

Hello!

Apologies for the delay in our response, upon further investigation we've concluded that there's no issue present.

We're sharing a solution in which we force the shadowcaster to have its opacity set to one, so that the shadows persist:

Image

Also, here's the tweaked shader, for your convenience:
VisibilityZone_Tree.zip
(3.11 KiB) Downloaded 4249 times
Please let us know if this helps, thanks!
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!
Post Reply