1. Wiki
  2. /Visuals & Lighting
  3. /Fog

Fog

Make custom fog for Minecraft Bedrock: the fog settings file, distance and underwater fog, volumetric fog, and how to apply it to a biome or player.

Fog is the haze that hides the edge of the world and turns everything blue underwater. A fog file in the resource pack sets its color and how close it starts. You can then use it in a biome, or give it to a player with a command.

In this page you will make a warm pink ruby fog for the Ruby Grove biome.

The files

Resource pack
RP/
  fogs/
    ruby_fog.json
  biomes/
    ruby_grove.client_biome.json

The fog file

RP/fogs/ruby_fog.json
{
  "format_version": "1.21.90",
  "minecraft:fog_settings": {
    "description": {
      "identifier": "wiki:ruby_fog"
    },
    "distance": {
      "air": {
        "fog_start": 0.6,
        "fog_end": 1.0,
        "fog_color": "#e8a0a8",
        "render_distance_type": "render"
      },
      "water": {
        "fog_start": 0,
        "fog_end": 40,
        "fog_color": "#8a2e4a",
        "render_distance_type": "fixed"
      },
      "weather": {
        "fog_start": 0.2,
        "fog_end": 0.6,
        "fog_color": "#7a5a60",
        "render_distance_type": "render"
      }
    }
  }
}

The identifier needs a namespace. One fog per file.

Where the fog applies

Inside distance, each key is a situation. You only need to list the ones you want to change.

KeyUsed when
airNormal play, out in the open.
weatherIt is raining or snowing.
waterYour head is underwater.
lavaYour head is in lava.
lava_resistanceIn lava with Fire Resistance.
powder_snowStuck inside powder snow.

The fields

FieldWhat it does
fog_colorThe fog color, as a hex string like "#e8a0a8".
fog_startWhere the fog begins.
fog_endWhere the fog is fully thick and you cannot see past it.
render_distance_typeHow to read the two numbers above. See below.
transition_fogOptional. Makes the fog fade in over time, like when you first dive into water.

render_distance_type changes what fog_start and fog_end mean:

  • "render": the numbers are a share of the player's render distance. 0.6 means 60 percent of the way out. Good for air, so it works with any render distance setting.
  • "fixed": the numbers are in blocks. 40 means 40 blocks away. Good for underwater, where you want the same look for everyone.

Thick, spooky fog

Use "fixed" with small numbers, like fog_start 2 and fog_end 24, for a swamp or haunted biome where you can barely see.

Fading fog with transition_fog

Vanilla water uses this so your view clears up slowly after you dive in:

Inside distance.water
"transition_fog": {
  "init_fog": {
    "fog_start": 0,
    "fog_end": 0.01,
    "fog_color": "#8a2e4a",
    "render_distance_type": "fixed"
  },
  "min_percent": 0.25,
  "mid_seconds": 5,
  "mid_percent": 0.6,
  "max_seconds": 30
}

init_fog is the fog right when you enter. Then it moves toward the normal settings: min_percent of the way at the start, mid_percent after mid_seconds, and all the way after max_seconds.

Volumetric fog

With Vibrant Visuals turned on, fog can also be a real 3D haze that light shines through. Add a volumetric block next to distance:

Inside minecraft:fog_settings
"volumetric": {
  "density": {
    "air": {
      "max_density": 0.08,
      "max_density_height": 64,
      "zero_density_height": 120
    }
  },
  "media_coefficients": {
    "air": {
      "scattering": [0.05, 0.03, 0.03],
      "absorption": [0.0, 0.0, 0.0]
    }
  },
  "henyey_greenstein_g": {
    "air": {
      "henyey_greenstein_g": 0.6
    }
  }
}
FieldWhat it does
max_densityHow thick the haze gets at its thickest. Vanilla biomes use small values, around 0.05.
max_density_heightThe height (Y) where it is thickest.
zero_density_heightThe height where it fades to nothing. Set it above max_density_height for ground fog.
scatteringHow much red, green and blue light bounces off the haze. Higher red makes a warm glow.
absorptionHow much red, green and blue light the haze swallows.
henyey_greenstein_gLight direction, from -1 to 1. Near 1, the haze glows brightly when you look toward the sun.

Players without Vibrant Visuals only see the distance fog, so always set that too.

Using your fog

In a biome

Point the client biome at it with minecraft:fog_appearance:

RP/biomes/ruby_grove.client_biome.json (inside components)
"minecraft:fog_appearance": {
  "fog_identifier": "wiki:ruby_fog"
}

You can also give a vanilla biome new fog this way. Make a client biome file with the vanilla identifier, like minecraft:plains.

Near the edge of two biomes, the game blends their fogs together, so the change is smooth.

With a command

/fog puts a fog on top of everything else for chosen players, and it stays after the world reloads:

Chat or command block
/fog @a push wiki:ruby_fog ruby_event
/fog @a pop ruby_event

The last word is a name you make up. pop takes off the newest fog with that name, remove takes off every fog with that name.

How the game picks a setting

Fog works in layers. For each setting, the game checks from the top layer down and uses the first one that has it:

  1. Fogs added with /fog (newest first).
  2. The fog of the biomes around the player.
  3. The default fog.
  4. Built-in values, if nothing else sets it.

So a /fog file that only sets water keeps the biome's air fog.

Fog not changing?

Check that fog_identifier matches the identifier in your fog file exactly, namespace included. Then check the file is in RP/fogs/ and that the resource pack is on in the world.

Visuals & Lighting: Reference

We use cookies to improve your experience and analyse site traffic. Learn more