Page 1 of 1

Cutout shadow caster

PostPosted: Sat Nov 03, 2018 8:01 am
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?

Re: Cutout shadow caster

PostPosted: Mon Nov 05, 2018 11:51 am
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!

Re: Cutout shadow caster

PostPosted: Fri Nov 09, 2018 9:21 am
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.

Re: Cutout shadow caster

PostPosted: Fri Nov 09, 2018 12:35 pm
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.

Re: Cutout shadow caster

PostPosted: Thu Jan 17, 2019 11:52 am
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.13 KiB) Downloaded 1533 times


Please let us know if this helps, thanks!