You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
I want to add fog to a specific area, or to a specific map.
What is the issue? Include screenshots / videos if possible!
What is the best way to create fog in one area, besides particle emitters (they start glitching when they intersect)
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I’ve used particle emitters, but when there’s multiple emitters, they start glitching/disappearing
A new ROBLOX release went out late last night. It contained a lot of important performance improvements, but it also included a secret feature that some ROBLOXians have already discovered… atmospheric fog!
How to Add Fog to Your Place
Currently our default is that fog is turned off in your place until you turn it on. Luckily, enabling fog in your place is super easy.
Adjust the fog properties (there are 3 – to see something all you need to do is set FogEnd to 100 . Now you have a ton of fog.)
What the properties do:
FogColor – This is the color of the fog. For best results, use light grey or the background color of your skybox.
FogEnd – This is the distance at which the scene is 100% fogged.
FogStart – This is the distance at which the fog begins. Inside this distance you will not see fog.
Fog Settings: Getting Technical
A lot of ROBLOXians out there are programmers, so for those of you who are curious, let’s get technical for a second. To remain compatible with older graphics cards that use a fixed-function rendering pipeline, ROBLOX’s fog uses linear interpolation between FogStart and FogEnd . Other fog falloff functions are possible if you are using shaders; some of these are show in the graph below. ROBLOX is using GL_LINEAR – the red line. FogStart on this graph is 10 and FogEnd is 20. At a distance of 15, fog is at 50%. This means that a pixel in your scene that is 15 distance from the camera will be 50% it’s normal color blended with 50% of the fog color.
Fog Settings: Getting Artistic
Builderman, the ROBLOX client team, and I decided to expose the lowest level fog properties to users, allowing them maximum customizability in their places. We hope place builders will get really creative. Here’s one effect you can achieve if you make it night time in your place and set the fog color to black…
Not sure if this is entirely what you’re going for, but you could perhaps insert an atmosphere into your lighting and change its settings depending on your player’s location.
Use some variables to tell a script what map it is (1 = Map A… 2 = Map B…) and then make the script change the lighting settings based on the value of the variable.