How do you setup a Depth Fade to work on objects with translucent materials?


I’m trying to make an effect of a light beams comming through the window.

Im using Depth Fade to fade the light on the gorund and on the window. But as long as I use transluent material on the window the Depth Fade node seam not to work.

How can I make it work or achieve a similar effect near transluent object?

Hi MegaJuzwa,

Can you post an image of what exactly you’re trying to achieve. Can you also post a screenshot of your Material that you’ve got setup thus far that is working on the object in your scene?

If I can see what you’re trying to do I can see if I can replicate and possibly provide some pointers.

Thank you!


Hi Tim, thx for answer.

What I’m trying to achieve is a light blow that comes trough the window.

Now that you asked for some reference images I can see that the light is dispersing some different way I wanted. but even if I make some shiny and bloomy particles just by the window, they would still have this hard egde withoutr depth fading into the glass.

I guess its a post proces of the whole image. How can I achieve this using cascade?

Hi MegaJuzwa,

I don’t believe you can use Particles in the way you’re trying to within a material to get this kind of result. At least from what I’m aware of. A lot of times when you see light beams like the two window images to the right they are faked. The beams would be a static mesh with a translucent material on it with the opacity set to a level that you would want. The light coming through the window would be from whatever lightsource you would like.

I’ve set up a rudimentary image below showing this effect to give you an idea. I’ve set up a wall with a window then placed a spot light on the outside of the window and lined up to where I wanted the light to hit the floor. I’ve created a simple mesh (pictured below) that my translucent material will be applied to.

This method is a relatively cheap way to have this kind of effect. Using particles systems and such to do this would probably be more complicated and as I said I’m not entirely sure it could be done or how much of a performance hit it may cause.

Let me know if this helps!

Thank you!


Please forgive the harshness of the material as the mesh has not been UVd and is looking pretty rough.


Hi Tim,

Thank you for your help, I will try to make the effect this way

You need to consider the UVs of your sprites, and the screen align method, your rays should run down the Y axis for a rectangle/square/velocity aligned sprite…placing them @ the angle of your window won’t quite work…you can put your particles in local space, and then rotate the emitter to align them.

There may be good reasons to use particles for this, easy to get camera facing etc. working…but in terms of GameThread time etc. etc. you will spend less update time using static meshes.

There are a few basic material tricks here…

Lesson_03 goes into near camera fading, you can combine this with Depth Fade and other techniques to fade the mesh at differing view angles.