Speed Tree Shader - How to Fade?

Hi - we’re making a top down game, and one of the issues with that is you occasionally get stuff that blocks your character. Some games put a shader on characters to make them glow behind objects (TorchLight2) while others like Grim Dawn, (game I worked on) did fading of the occluding object when it got between you and the camera.

I have a system like this working for objects using the standard shader (I switch the render mode to Fade and set the alpha on material instance).

I want to do the same thing for the SpeedTree shader, but it obviously doesn’t have a built in “Fade” mode, like the standard shader does. The shader-fu is pretty weak in me, I’m wondering if some friendly guru might be able to give me some pointers or if this has already even been done somewhere.

Below you can see 2 pics of the tree, one is opaque and one is mostly transparent ( a bit too transparent for my tastes, but thats just an alpha value I’ll play with :slight_smile:

Thanks!

polite bump

Are these terrain trees? Or manually placed out? curious

My games trees are manually placed (well non terrain based). The screenshots are examples from Grim Dawn which uses a different engine.

I’m dealing with this right now. Did you find a solution?

Has anyone found a good solution?

Hi, did you get an answer for this? I think you might need to use raycast then set the alpha value, but it depends if the shader supports transparency… hope you won’t mind sharing if you have a solution.

I mentioned in a similar thread my own solution for this, if you want to check it out.

Cool! many thanks!