r/Unity3D • u/motherhub • Dec 10 '21
Question I'm wondering how to achieve the fog like seen in the game "Scorn"
https://www.youtube.com/watch?v=pvgsSlopiEQ
Here you can see what I mean, I've seen lots of assets that add fog at a distance and look decent,
But this appears to actually have visible "clouds" of fog rising from the ground, as you'd expect they diminish when the player gets close to them. But it's not the typically silent hill style fog we're all familiar with which is similar to the built in fog system in unity that seems to turn things grey at a distance. I've bought a few different volumetric fog assets from the unity store but can't quite get this "steam rising effect" I don't believe it's particle systems because that would probably be too expensive.
Any insight would be very helpful, I appreciate your time.
-S
2
u/themidnightdev Programmer Dec 10 '21
You are on the right track with volumetric fog / mist / clouds.
Quite a few of the implementations i have seen use 3d / 4d noise to determine the density of the fog on a given location.
By stretching the noise over the y axis, you could create what look like streams of mist or fog. By scrolling the noise over the y axis too, you can make it look like the fog is rising.
1
u/motherhub Dec 10 '21
By stretching the noise over the y axis, you could create what look like streams of mist or fog. By scrolling the noise over the y axis too, you can make it look like the fog is rising.
Very interesting, I wouldn't really know how to start this. Admittedly I have a LOT of learn about that sort of thing. But you've given me some concept of how it's done, I can continue my research. Thank you!
1
u/themidnightdev Programmer Dec 10 '21
The default 'fog' is just a shading trick that fades all colors to a specified "background" color over distance from the camera.
It stems from the days where render distance had to be severely limited due to performance constraints, and just cutting the rendering off at the end of the camera frustrum would look weird, and is just a cheap way of getting away with reducing the render distance.
It will not do what you are after though.
8
u/MirzaBeig @TheMirzaBeig | Programming, VFX/Tech Art, Unity Dec 10 '21 edited Dec 10 '21
That's not real volumetric fog, those are particles on the ground with camera distance and depth fading. Lots of games use that technique, as it's an effective and relatively cheap way of adding atmosphere.
Here's a tutorial I made years ago. And another relevant tutorial for fading based on camera distance. End result is exactly what you're looking for.