Cheap Mobile Fog Unity

Hi everyone,
Does anyone have any experience in creating cheap fog for a mobile platform? I’ve considered particle system, but wondering is anyone could share some best practises.

Hey!
So there are a few different approaches that you can do, but it depends on what game perspective and the goal of the look is. Is it fog/smoke from a grenade? Something eerie crawling on the floor? Something to give just the mood or something blocking the vision of the player?
Most importantly: any reference on how it should look?

It would be nice for you to answer this. Then we can help you finding a solution :slight_smile:

Hi there, thanks for your reply :slight_smile:

So it’s basically meant to be atmospheric fog, in a tight alleyway. It’s for a oculus quest VR game so it needs to be efficient. Perhaps it doesn’t have to be everywhere at once and only a couple meters in front of the player as they are walking through… the players line of sight will never pass the 4/5 meter range due to corners etc. I’ve attached an image. Thanks again !!

image

Hey,

thanks for clearing things up, it was a bit of foggy at first.

I haven’t worked for a oculus quest application, so I do not now how performant it exactly is for it but two approaches:

  1. You could use something called “fog cards”. Which is basically a plane with a additive or translucent material. But if you fancy it up a bit, it can create great atmosphere. Here a tutorial on how to do one implementation of it in UE4: https://www.artstation.com/artwork/Yd4OX
    Be aware, that having to much translucent materials stacked on top of each other bring down rendering quite fast, because it renders everything from back to front.
    You could make a big sphere around the player, that travels with the camera. This mitigates the need for multiple cards in certain areas.

  2. Use a post-processing effect to “color in” the projection, the further away something is from the player. You could use the Scene Depth or even just with a distance vector, like in this tut: https://www.youtube.com/watch?v=y7Tq4LsJCsw

If you want, you can use panning noise textures on both versions, to give it a more smoke like look (at the expense of more instruction/lookups).

At the end you have to test it out and maybe reduce the graphical fidelity somewhere else. If the fog is like in the picture (silent hill like), then you could actually make some custom occlusion, disabling everything that is beyond the thickest fog.

Hi again,

Thanks a million for your suggestions, I’m going to try those methods out and profile them to see what works best, I think the custom occlusion idea is definitely worth pursuing, it would go hand in hand with the fog!
Thanks again, really appropriate it :slight_smile:

Hi @Seandellis

Do you mind sharing the results of your tests?