Best way to add fog?

You can write your topic however you want, but you need to answer these questions:

  1. 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.

  2. 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)

  3. 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

Thanks :slight_smile:

8 Likes

i have a simple way
is to place a huge part set cancollid to false and transparency to 0.5 and anchored

2 Likes

I’m trying to get a realistic type though

did you try to search in YouTube?

2 Likes

That wouldn’t work because when you enter the part it will become fully transparent and there would be no effect.

1 Like

RobloxApp 2011-12-09 14-03-21-24

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.

  1. Open you place in ROBLOX Studio (ROBLOX Studio Help)
  2. Select the Lighting service in the Explorer Pane
  3. 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.)

FogSettings

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.

graph

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…

RobloxApp 2011-12-09 14-05-28-08

Dark levels can be really fun.

14 Likes

Woah, thanks!
However, I need the fog only in a specific region.

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.

Yeah but as I said, I need it only for one area not the whole game

1 Like

particles should work but in your case you have go look in yt

1 Like

maybe try to search in library

1 Like

I’ll try working with particle effects, maybe it’s a setting or something
Thanks :slight_smile:

Make the FogEnd smaller and make it black?

I know, maybe change the density of the atmosphere as the player moves away from a certain position? This could look a lot like fog :slight_smile:

But I’m trying to avoid using lighting in itself, so I’ll have to make a script to change the lighting for each map, how would I do that?

1 Like

I know this is already marked as solved but I’d like to say that there is a “Smoke” object that works really well for this.

2 Likes

Ohh, I did that before, I think i’ll try using it now,
Thanks!

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.

Ok I’ll try that too.
Thanks guys!

1 Like

Actually I wanted fog in my whole map withba size of a standard baseplate template