Directional volumetric glow

Hi!

I want to do something in my game, but I have no idea if it’s actually possible in Unity.
I have an entrance to a hallway that is completely black, and I would like to have some kind of black glow/halo coming from the door opening. In that way the black hallway would look like it emits a black light, or is casting some kind of shadow.

I couldn’t find a good image to illustrate what I want, the best I found is this:


The 2 cylinders on the left emit a color that only goes in one direction (up) and becomes transparent overtime. I don’t want the fog or anything, just the directional glow like in the picture, but in black. Would that be possible?

Thanks in advance!

Bump?

Did you say black glow? :face_with_spiral_eyes:

I’m pretty sure this is not the best way - but you can always fake it with 3 plane objects with a solid to transparent texture with alpha outlining the doorway.

Crappy rough example
3080118--231863--upload_2017-5-23_0-49-39.png

I think the OP is looking for something like sun shafts. There are many online tutorials about Unity’s default sun shafts on YouTube.

I remember long ago I attempted to implement it in a mobile game but frame rate dropped severely, in such case, you may try theANIMATOR2b’s solution.

1 Like

I don’t think that’s going to look good once you walk around it and come closer and stuff like that. But yeah, I meant something like that.

Is it possible to have black sun shafts?

You can. After importing the official “Effects” package to your project (Assets-Import Packages-Effects), find “SunShaftsComposite” in the asset project folder, open it in any text or script editor and replace line 80 with this:
half4 depthMask = colorB * _SunColor * -1;

I don’t really think the sun shafts will give me the effect I want. I’d like to be able to have several of these “shafts” in one scene, and with different angles. The sun shafts effect from the standard assets seems like it is global.