Add Radial and height fog shader

Hello there !
I’m requesting few things here I’ll be explaining why.
So first a “radial fog” shader and then a “height fog” shader.

1◘ I’d say the fog is actually 50% of the lighting quality.
It should not be underrated or forgot ina scene/game or whatever you are doing. Of course sometime you don’t have any use of it like space games.

2◘ As an exemple I screened a scene at the same place with and without the fog:

3◘ As far as I know and remember the fog as never changed this is actually a linear fog which is I think the most basic one you can create. So why not having a new and better one !

But this fog can be really bad, its a linear fog which mean that if you are looking at the Object with the angle1 you won’t have the same fog density as if you look at the Object with the angle2.

4◘ The top if this image is how I guessed it works right now and correct me if i’m wrong, the issue explained above in 3. can simply be solved with a “radial fog”, what ever the camera angle the fog distance on the sides will be the same and the scene would look more natural.

5. secondly the height fog would definitely be an awesome feature !
It can add more color gradients, color control over the lighting and can enhance a scene like nothing else.
From spooky swamp fog to infinite depth ilusion.
Just see it by yourself:
1
8

**6 **◘ To end this long thread, after browsing the internet I’ve found this image:


Having one more property to adjust the density would also be nice, we can keep the start and end static and simply adjust the density to make it stronger.

I hope you understand everything, if I’m wrong at some point tell me.
I think that the roblox’s fog could get a pimp somedays, it does a lot already but feels a bit weak imo.

Thanks!

130 Likes

Great examples. I think this would be a good addition to the lighting aspect of Roblox! More tools for better ambient/atmospheric effects (not just lights on their own) will bring Roblox to a new level visually.

26 Likes

roadblocks give us this plz

24 Likes

Of course we need this!

9 Likes

So clearly all of EBR wants this ^^^

13 Likes

yes,,

p l e a s e.

the fog is one of the oldest lighting elements and it definitely deserves a major facelift. currently it uses a z depth-based approach, and it is and has always been ugly.

18 Likes

This is a necessity.

10 Likes

I just want to point out that linear probably isn’t the word you’re looking for. Linear means that at five feet away from you, the fog is half as thick as ten feet.

They are not using spherical maths to calculate this, that would be the problem. Their fog (and unfortunately render distance) are calculated using a cube rather than the Pythagorean theorem.

8 Likes

i’d love to use this.
fog is outdated, it needs to be refined.

2 Likes

If said new fog could react to lighting, this would be a godsend update.

It would really expand what we can do with the engine. I’d love to see it happen!

4 Likes

Major support, I’ve wanted something like this to make environments look more appealing a realistic.

2 Likes

Hello I BUMP this thread :wave: !

I saw that the circular fog called “Range Fog” is a thing now and it is awesome :slight_smile:
We have atmosphere even if it is a bit weird to use and it kills the fog properties :frowning: , but hey, thats a nice feature to have and it can be improved after all. And it has this “density” feature idea too.

But today I’m back with new ideas and improvement expectations, so hold tight to your chair yeah !

• Lets start talking about the height fog again because this thing a must have if you want to achieve certain type of visuals, look at this tweet by @VitalWinter:

I highlighted that thing that buged me (it made me write this post btw), it is made out of particles, lots of them.

And it looks so cool ! But how are the performances ? And you have to go through that tedious process of copy paste huge emitter parts
Also on the edge of the emitter parts (an example one of my places) you have that weird rupture with the void, everything above the red line should look somewhat similar to the fake height fog below. The main issue is the draw distance I guess.

• Another feature I would love to see to improve the visual effect would be to add a noise map. Let me explain, for example you decide to add a basic perlin noise texture that look like this:
PerlinNoise2d
Then your fog density would get altered, I don’t know the science behind so it might be nonsense, but the volume density isn’t flat anymore and you’d get pockets or less dense fog like these:


This feature could be a built in noise generator with the classic modifiers like frequency, size, etc, or/and a custom made texture that could be animated with a speed control.

• Another feature I’d love to have for the fog would be the light interaction. Just like the tweet by @VitalWinter the fake height fog is emitting light becaus ethe particles interact with light, it leaves a sort of volumetric shadow.

And no the actual sunrays aren’t godrays, you have to look at the sun in order to have those light beams, however, the godrays are volumetric light and shadows caused by a huge contrast and you do not need to be looking directly at the light source:
galiano-island

Right now to have this effect you have to use particle fog, or fake it with decals leading to performances issues or heavy and unprecise work.

• I have another idea that concerns the whole fog system. It could be detached from the lighting parameters, being objects like the atmospehre is. We would have to add them into the lighting, and we could perhaps stack them, height fog + range fog for example.

• The last point I want to talk about is fog color, what about a gradient color ?
it would be quite exerimental for the range fog, but the height fog might benefit from something pretty cool:

• And why not a fun feature that allows you to rotate the height fog plan ?

Well that all for this post, I hope you like it and i hope to get these geature one day :sweat_smile:
Bye !

36 Likes

Dear Engineers,

If this could be possible with the current engine, could we please at least see a little more love for the fog system?
Something like changing the fog height.

Example:


It would be excellent for all types of games. Adds a little bit of life to it.

7 Likes