Depth Fog/Haze

Hello,
It’s been ages since I last dabbled in making something interactive in Blender. Got back in because of UPBGE. Looks pretty sweet. I hope it keep going and growing.

I’m using v0.3
I was wondering if there was a way to have a depth fog/haze type thing with upbge and eevee?
In the old days there used to be something… where it was I don’t recall. Anyway, if you have any leads, I’d be happy to follow.
Thanks
M

Oh, I think I got it.
This video seemed to work.

I just parented my fog cube to my camera and away we go!
:slight_smile:
M

2 Likes

No matter which mesh I include, the volume always renders as a cube.
Why does this happen?
How to make the volume take the shape of the mesh?

Hi Scifer,
OMG, I forgot that I posted this. It’s been a while… I’ll poke around and see if I can re-create it.
Are you using v0.3? I winder if this worked on an older version of UPBGE.
Hmmmm, I’ll be back.
M

You can try :

  • “mesh to volume” : create the shape you want your fog to have (ex. a simple cone), then in the “add” menu choose add : “volume / empty”. In that “volume” object’s modifiers panel, choose “mesh to volume” and simply select your shape object with the eyedrop tool or from the dropdown list.

  • You can also make your shape/ object (any shape), then in “geometry nodes” panel click on “new”, then just add a " point : points to volume " node between the input and output. This will create a spherical fog/ volume at each vertex position on your object (which will disappear). Cool way to try is to create a single vertex, then do the same trick in “geometry nodes” and you will have a perfect spherical fog.

To attenuate the fog density, hook a math node (multiply) to the points-to-volume node’s density value, and put decimals in both fields /tweak. You can also boost the radius quite a lot…

2 Likes

Excellent solutions!