{{for|the command {{in|bedrock}}|Commands/fog}} '''Fog''' is a rendering feature intended for obscuring the player's view distance, usually for atmospheric effect or for seamlessly occluding sharp boundaries such as unloaded [[chunk]]s. While traditionally referring to [[render distance]], there are many other types of fog that can be encountered in-game under specific circumstances. == ''Java Edition'' == === Fog types === There are four fog types, each occurring in four different circumstances. ==== Distance fog ==== {{conjecture|section=1}} This refers to fog that is rendered in normal circumstances, and becomes the most notable with low render distance. The sight distance in the distance fog is equal to the render distance, and the shape is a cylinder. Its color depends mainly on the [[biome]] the camera is in, and is affected by: * the current day-time, and the [[Effect (dimension)|effect]] the dimension uses ** For the Overworld effect, the brightness of the color changes with day time. ** For the Nether effect, the brightness of the color is ''not'' affected by day time. ** For the End effect, the brightness of the color does not change with day time, but is 15% of the biome fog color. * the current sky color, and the render distance ** The smaller the rendering distance, the closer the color of the fog is adjusted to the sky color. ** When the rendering distance is 32, the color of the fog is not affected by the sky color. * the direction the player is facing during a sunrise or sunset if the render distance is not less than 4 * the current [[weather]] ==== Water fog ==== When the camera is in [[water]], a dedicated fog in the shape of a cylinder is applied to simulate this. Underwater fog progressively recedes with time spent underwater. The color depends on the [[biome]] the camera is in. The color of the water fog changes gradually for 5 seconds when the camera traveled in water into another biome. Notably, [[swamp]]s and [[mangrove swamp]]s have a thicker fog than most other biomes, which is controlled by the biome [[tag]] has_closer_water_fog. ==== Lava fog ==== When the camera is in [[lava]], an even thicker fog in the shape of a sphere is applied. Its color is RGB(0.6,0.1,0.0). With this fog, normally the player can see only 1 block away. The [[Fire Resistance]] effect can mitigate the fog so that the sight distance becomes 3 blocks. In [[Spectator]] mode, the fog is even less opaque to reveal objects located within up to half the render distance. ==== Powder snow fog ==== Being beneath [[powder snow]] imparts another fog in the shape of a sphere. Its color is RGB(0.623, 0.734, 0.785). With this fog, normally the player can see only 2 blocks away. In [[Spectator]] mode, the fog becomes thinner so that things within half of the render distance are visible. === Fog modifiers === ==== Height ==== If the world is not a [[superflat]] world, and the camera is not in lava and not in powder snow, the brightness becomes power(clamp((y-minY)*0.03125,0.0,1.0)) of the original, which means that the color changes to pure black gradually from minY+32 to minY. ==== Blindness and darkness ==== [[Blindness]] and [[Darkness]] set the color to pure black. The sight distance with Blindness is 5 blocks, while the sight distance with Darkness is 15 blocks. Also, the shape of the fog becomes a sphere. A difference between the two is that Darkness has fade-in and fade-out, while Blindness has only fade-out. Blindness has a higher priority than Darkness. The two effects do not work if the camera is in lava or powder snow. ==== Wither ==== If there is a [[wither]] boss event, the color becomes darker and slightly redder. ==== Night Vision ==== If the camera is not in water, and the entity has no [[Darkness]] effect, [[Night Vision]] makes the color brighter. ==== Nether and ender dragon ==== If the entity has no Blindness or Darkness, in a dimension with the Nether [[Effect (dimension)|effect]], or a dimension where there's an ender dragon boss event, the sight distance in the distance fog (not water, lava, powder snow fog) is half of the rendering distance, and the maximum sight distance is 96 blocks. The shape becomes a sphere. === Removed === ==== Void fog ==== {{outdated|edition=java|section=1}} [[File:Void fog.png|400px|right]] In prior versions of ''Java Edition'' (specifically [[Java Edition Beta 1.8 Pre-release|Beta 1.8 Pre-release]] through [[14w34b]] inclusive, up to its removal in [[14w34c]]), a thick black fog was introduced. As the player descended below Y=26, this fog would start to appear. As the player traveled deeper, the fog at the edge of the render distance would become closer until the player reached the first layers of [[bedrock]], where visibility was reduced to just a few blocks, beyond which was complete darkness. The gray void particles started appearing below Y=7, as well as in the void. The existence of this fog depended on a lack of sky lighting. If vent holes were opened up to allow skylight to enter an otherwise secluded underground space, void fog would no longer be present, so long as the player kept near this skylight source. Void fog was removed late into 1.8's development for performance reasons and general community distaste.{{tweet|TheMogMiner|501766046681153536|Removed void fog today. Now we don't need to tick air blocks (seriously, WTH?), and honestly, who actually *liked* the void fog?|August 19, 2014}} VoidFog.png|A player's view limit would decrease with depth. {{-}} == ''Bedrock Edition'' == {{IN|bedrock}}, fogs have six types used in six different circumstances: * air: When the camera is in air * water: When the camera is in water * lava: When the camera is in lava, and the player has no [[Fire Resistance]] * lava resistance: When the camera is in lava, and the player has Fire Resistance * weather: When in air and it's raining * powder snow: When the camera is in powder snow In a fog setting file in a resource pack, one or more of above types can be specified. Active fog settings are determined from three aspects: * Custom fog stack (from {{cmd|fog}} command) * Fog settings for the current biome * Default fog setting Whenever the game needs to get the current fog, it checks the fog settings from these three aspects from the top (the newest fog setting in the fog stack from the command) to the bottom (default fog setting) in order, until it finds a fog definition for the current fog type. If it finds no matching setting, the game uses the hardcoded default setting of the Bedrock Engine. In other words, this is equivalent to that all fog settings from the three aspects are applied one by one from the bottom (default fog setting) to the top (the newest fog setting in the fog stack from the command) in order. The fogs in a fog setting applied later overrides that of earlier fog settings. Each fog type works independently. Hardcoded default setting of the game engine is applied before settings from these three aspects. See also [https://learn.microsoft.com/en-us/minecraft/creator/reference/content/fogsreference/examples/fogsintroduction this official document]. === Vanilla fog settings === Here are all the fog setting IDs that are currently in the vanilla game. *minecraft:fog_bamboo_jungle *minecraft:fog_bamboo_jungle_hills *minecraft:fog_basalt_deltas *minecraft:fog_beach *minecraft:fog_birch_forest *minecraft:fog_birch_forest_hills *minecraft:fog_cold_beach *minecraft:fog_freezing_ocean *minecraft:fog_cold_taiga *minecraft:fog_cold_taiga_hills *minecraft:fog_cold_taiga_mutated *minecraft:fog_crimson_forest *minecraft:fog_deep_cold_ocean *minecraft:fog_deep_frozen_ocean *minecraft:fog_deep_lukewarm_ocean *minecraft:fog_deep_cold_ocean *minecraft:fog_deep_warm_ocean *minecraft:fog_default *minecraft:fog_desert *minecraft:fog_desert_hills *minecraft:fog_extreme_hills *minecraft:fog_extreme_hills_edge *minecraft:fog_extreme_hills_mutated *minecraft:fog_extreme_hills_plus_trees *minecraft:fog_extreme_hills_plus_trees_mutated *minecraft:fog_flower_forest *minecraft:fog_forest *minecraft:fog_forest_hills *minecraft:fog_frozen_ocean *minecraft:fog_frozen_river *minecraft:fog_hell *minecraft:fog_ice_mountains *minecraft:fog_ice_plains *minecraft:fog_ice_plains_spikes *minecraft:fog_jungle *minecraft:fog_jungle_edge *minecraft:fog_jungle_hills *minecraft:fog_jungle_mutated *minecraft:fog_lukewarm_ocean *minecraft:fog_mangrove_swamp *minecraft:fog_mega_spruce_taiga *minecraft:fog_mega_spruse_taiga_mutated *minecraft:fog_mega_taiga *minecraft:fog_mega_taiga_hills *minecraft:fog_mega_taiga_mutated *minecraft:fog_mesa *minecraft:fog_mesa_bryce *minecraft:fog_mesa_mutated *minecraft:fog_mesa_plateau *minecraft:fog_mesa_plateau_stone *minecraft:fog_mushroom_island *minecraft:fog_mushroom_island_shore *minecraft:fog_ocean *minecraft:fog_pale_garden *minecraft:fog_plains *minecraft:fog_powder_snow *minecraft:fog_river *minecraft:fog_roofed_forest *minecraft:fog_savanna *minecraft:fog_savanna_mutated *minecraft:fog_savanna_plateau *minecraft:fog_soulsand_valley *minecraft:fog_stone_beach *minecraft:fog_sunflower_plains *minecraft:fog_swampland *minecraft:fog_swampland_mutated *minecraft:fog_taiga *minecraft:fog_taiga_hills *minecraft:fog_taiga_mutated *minecraft:fog_the_end *minecraft:fog_warm_ocean *minecraft:fog_warped_forest == History == {{HistoryTable |{{HistoryLine|java classic}} |{{HistoryLine||0.0.14a|Implemented fog. It appears only for lit surfaces.}} |{{HistoryLine||?|For a period of time, the fog was blue, and did not affect shadows. This was changed afterwards.}} |{{HistoryLine|java indev}} |{{HistoryLine||0.31|dev=?|The color of fog, [[clouds]] and the [[sky]] can now be configured via map editing.}} |{{HistoryLine|java infdev}} |{{HistoryLine||20100227-1414|With the deprecation of indev worlds, fog color is no longer customizable.}} |{{HistoryLine|unknown}} |{{HistoryLine||?|Added water fog.}} |{{HistoryLine||?|Added lava fog.}} |{{HistoryLine||?|Added nether fog.}} |{{HistoryLine||?|Added blindness fog.}} |{{HistoryLine|java beta}} |{{HistoryLine||1.8|dev=Pre-release|Added void fog.}} |{{HistoryLine|||dev=Pre-release 2 ;)|Many of void fog's effects can be circumvented by having sky access.}} |{{HistoryLine|java}} |{{HistoryLine||1.1|dev=11w48a|Players in creative mode can no longer see void fog.}} |{{HistoryLine||1.7.2|dev=13w36a|The distance where fog starts has been doubled.}} |{{HistoryLine|||dev=13w38a|Re-adjusted fog to appear near the render distance limit again, reverting changes made in 13w36a. |Fog now covers 25% of the render distance, compared to 75% before 13w36a.}} |{{HistoryLine||1.8|dev=14w34c|Removed void fog and its associated particles.}} |{{HistoryLine||1.13|dev=18w08b|Water now appears fully fogged when entered, and gradually becomes clearer over time. |The [[Respiration]] enchantment and [[Water Breathing]] effect no longer have an effect on water fog.}} |{{HistoryLine|||dev=18w10a|Water fog now varies per biome. |Water fog no longer takes time to clear in [[Spectator]] mode.}} |{{HistoryLine||1.16|dev=20w09a|Fog color no longer changes abruptly when switching biomes.{{bug|MC-170879}}}} |{{HistoryLine|||dev=Pre-release 3|The [[Fire Resistance]] effect now makes under-lava fog slightly less harsh.}} |{{HistoryLine||?|Fog color is now something that can be changed by custom biomes.}} |{{HistoryLine||1.16.2|dev=Pre-release 1|Added [[Effect (dimension)|dimension effects]], allowing for nether fog to be applied to any custom dimension.}} |{{HistoryLine||1.17|dev=20w46a|Added [[powder snow]], which has its own dedicated fog effect.}} |{{HistoryLine|||dev=20w48a|How submerged the player has to be in lava to see the fog effect has now changed.{{bug|MC-3615}} (did the other listed fix version change anything?)}} |{{HistoryLine|||dev=21w10a|Distance fog is now spherical, and no longer changes based on the view angle.{{bug|MC-32452}}This type of fog was previously available only for users of Nvidia GPUs, as it depended on the
GL_NV_fog_distance
OpenGL extension.
}} |{{HistoryLine|||dev=21w11a|Underwater fog is now far less intense when in Spectator mode.{{verify}} However, it is still present.{{bug|MC-214186}} |Lava fog is now far less intense when in Spectator mode.{{bug|MC-71530}} However, it is still present.{{bug|MC-219893}} |Powder snow fog is now far less intense when in Spectator mode.{{bug|MC-213743}} However, it is still present.{{bug|MC-219894}}}} |{{HistoryLine||1.18.1|dev=Pre-release 1|World fog now starts further away from the player, to make distant terrain more visible. |Instead of applying fog as a spherical volume, it is now applied as a cylindrical volume, making it easier to see into the distance when standing on tall mountains.}} |{{HistoryLine|pocket alpha}} |{{HistoryLine||v0.1.0|Added distance, water, and lava fog. |All fog types are a flat plane based on the camera angle. Distance fog starts at 50% of the render distance and becomes fully opaque at the render distance limit. Water and lava fog both start at the camera and become fully opaque at 32 blocks and 3 blocks, respectively.}} |{{HistoryLine||v0.5.0|Distance fog now covers 10% of the render distance.}} |{{HistoryLine||v0.6.0|Distance fog now covers 40% of the render distance.}} |{{HistoryLine||v0.8.0|dev=build 1|Distance fog now covers 30% of the render distance. |Due to changes made to chunk rendering in this version, fog is now visible only on chunks that are far enough away from the player. This can cause sharp borders between areas with and without distance fog, especially on lower render distance settings. This also means that water and lava fog are no longer visible since this version made it so that far chunks do not render while water or lava fog is active.}} |{{HistoryLine|||dev=build 4|Water and lava fog are once again visible in rendered chunks.}} |{{HistoryLine||v0.9.0|dev=build 1|Distance fog now covers 100[x-(x/2+8)]/x% of the render distance, with x being the player's render distance in blocks. |This version also added a minimum start distance of 72 blocks to distance fog, resulting in glitchy behavior if the player sets their render distance to 4 chunks.|In particular, setting the render distance to 4 chunks would cause water to become colored with the fog color, making it indistinguishable from the fog, and cause mobs to lose their textures and become colored with the fog color as well.}} |{{HistoryLine|||dev=build 2|The glitchy low render distance fog behavior in the previous build was fixed by adding a minimum distance of 4 blocks between the render distance limit and the start of the fog area, preventing render distance values lower than the minimum available through the settings from being used.}} |{{HistoryLine||v0.10.0|dev=build 1|Distance fog now covers 100[x-(x/3.2+30)]/x% of the render distance, with x being the player's render distance in blocks. |Distance fog now becomes fully opaque at 20% of the distance between the player and the render distance limit. |The 72 block minimum start distance for distance fog has been removed. |Water fog now becomes fully opaque 8 blocks away from the camera. |Lava fog now becomes fully opaque 1 block away from the camera. |[[Sky]] coloring is now visible through water and lava fog if the "Beautiful skies" toggle is enabled.}} |{{HistoryLine|||dev=build 2|All fog is now spherical and no longer changes based on the camera angle when [[fancy graphics]] is on. |Distance fog now covers 100[x-(x/2+32)]/x% of the render distance, with x being the player's render distance in blocks. |Distance fog once again becomes fully opaque at the render distance limit.}} |{{HistoryLine||v0.12.1|dev=build 1|Added weather fog.}} |{{HistoryLine||v0.14.2|Distance fog now covers 100[x-(x/2+12)]/x% of the render distance, with x being the player's render distance in blocks. |Distance fog now becomes fully opaque 16 blocks under the render distance limit.}} |{{HistoryLine|bedrock}} |{{HistoryLine||1.16.0|dev=beta 1.16.0.51|Added lava resistance fog.}} |{{HistoryLine||1.16.200|exp=Caves and Cliffs|dev=beta 1.16.200.52|Added powder snow fog.}} }} == Issues == {{issue list}} == Gallery == === Screenshots === Void1.8.png|The void, covered in void fog. Fancyfog.png|Fancy fog setting. Fastfog.png|Fast fog setting. == References == {{reflist}} == Navigation == {{Navbox environment}} [[pt:Neblina]] [[zh:迷雾]]