volumetric light/fog

Is there any shaders, or does unity support any kind of volumetric objects and such?

or do i have to do it with old fashion alpha planes?

you do it through the “old fashioned” alpha plane. put it in “” because only few games do it differently

hehe :slight_smile: the “old fashioned” way, is the way. i know.
i guess i have to do it good and seamless if i want it to look volumetric. wich is hard. when you pass trugh it…
you gotta do several layers, and unity engine
did not like that.
i did not want the “fog” effect but i wanted haze. so i made my own 30 planes of transparacy locked to the camera, wich really killed the fps.

seems like i hit a soft spot. or my computer lacks performance

right now i’m simulating it with a transparent lightcone and a set of particle systems for fog. someone was planning to alter the fur shader to give things a more hazy volumetric-ish look a while back. would be interested to see examples of other approaches.

Here’s another approach from an unfinished project of mine:

It needs Unity Pro, because it uses the full-screen glow effect to achieve it, plus some shader trickery.

–Eric

ah nice.

the glow effect was smart. but i encountered problems with that since it makes a fuzzy outline on other sharp edges then what you want. even for meshes that are not that bright, or those that should not be affected.
its like Depth of field - it works on the ground. but all objects are sharp to the sky because of distance i guess…

im not so good at shaders. but is it possible to script a Glow Shader per object?
i guess that would be useful and give a less fuzzy screen, for this kind of use.

I’d be really interested to know just what this “shader trickery” is, if you wouldn’t mind sharing. This is really beautiful, some of the best lighting I’ve seen done real-time. Just using Glow doesn’t get me anything near this smooth.

Since glow is done using alpha values, you write into the alpha channel and nothing else.

–Eric

well, i figured out how to get that kind of effect with the “alpha override” shader, and it is very nice for what it is, but it only works when there’s something other than black behind the object rendered with that shader. what i need is to get that soft glow in a potentially otherwise pitch-dark environment. but now i realize this goes entirely contrary to how the stock Glow effect works. i’m guessing i should look into how replacement shaders work? thanks for putting me closer to the right track anyway.