Minecraft Bedrock Custom Fogs | DIY Minecraft

< Back to "Videos, Tutorials, & Assets"

This page is a WIP. You can download the example pack hereopen in new window.

Fogs Schema

Format: type name // comment. If item is optional, opt will be placed in front.. Although Minecraft is fine with it, Normal JSON does not support // comments, and as such, files with them will be invalidated, and so I recommend you remove the comments. Commas are important, don't forget them. Schemas do not contain commas however, you'll need to add it yourself. Sticking with only the distance object is typically enough, and volumetric is much more advanced. I've done my best to add comments in a comprehendible way. An example is provided below using everything in the schema, as an example to help comprehend more.

Schema

{
	version "format_version" // The format version of the fog file, string. Latest is 1.16.100, use that
	object "minecraft:fog_settings" // Contains all the fog settings
	{
		object "description"
		{
			string "identifier" // A unique namespaced identifier, in the form namespace:identifier. Must include namespace
		}
		opt object "distance" // Fog settings based on distance, for different camera locations
		{
			opt object "air" // Fog settings when camera is in the air
			{
				color "fog_color" // The color the fog will take on, hexadecimal code
				float "fog_start" // The place where the fog starts
				float "fog_end" // The place where the fog ends
				string "render_distance_type" // Determines how the fog_start and fog_end types are used, can either be render or fixed. Render will cause the fog start and end to be multiplied by the current user's render distance to determine start and end. Fixed is a set number of blocks
			}
			opt object "weather" // Fog settings when camera is in active precipitation, like rain or snow
			{
				color "fog_color" // The color the fog will take on, hexadecimal code
				float "fog_start"// The place where the fog starts
				float "fog_end" // The place where the fog ends
				string "render_distance_type" // Determines how the fog_start and fog_end types are used, can either be render or fixed. Render will cause the fog start and end to be multiplied by the current user's render distance to determine start and end. Fixed is a set number of blocks
			}
			opt object "water" // Fog settings when camera is in water
			{
				color "fog_color" // The color the fog will take on, hexadecimal code
				float "fog_start" // The place where the fog starts
				float "fog_end" // The place where the fog ends
				string "render_distance_type" // Determines how the fog_start and fog_end types are used, can either be render or fixed. Render will cause the fog start and end to be multiplied by the current user's render distance to determine start and end. Fixed is a set number of blocks
			}
			opt object "lava" // Fog settings when camera is in lava
			{
				color "fog_color" // The color the fog will take on, hexadecimal code
				float "fog_start" // The place where the fog starts
				float "fog_end" // The place where the fog ends
				string "render_distance_type" // Determines how the fog_start and fog_end types are used, can either be render or fixed. Render will cause the fog start and end to be multiplied by the current user's render distance to determine start and end. Fixed is a set number of blocks
			}
			opt object "lava_resistance" // Fog settings when camera is in lava and the player has a lava resistance effect applied, like Fire Resistance
			{
				color "fog_color" // The color the fog will take on, hexadecimal code
				float "fog_start" // The place where the fog starts
				float "fog_end" // The place where the fog ends
				string "render_distance_type" // Determines how the fog_start and fog_end types are used, can either be render or fixed. Render will cause the fog start and end to be multiplied by the current user's render distance to determine start and end. Fixed is a set number of blocks
			}
			opt object "powder_snow" // Fog settings when camera is in a powder snow block
			{
				color "fog_color" // The color the fog will take on, hexadecimal code
				float "fog_start" // The place where the fog starts
				float "fog_end" // The place where the fog ends
				string "render_distance_type" // Determines how the fog_start and fog_end types are used, can either be render or fixed. Render will cause the fog start and end to be multiplied by the current user's render distance to determine start and end. Fixed is a set number of blocks
			}
		}
		opt object "volumetric" // Volumetric fog settings, currently requires Ray-Tracing enabled, more info can be found at https:// www.game-debate.com/news/28294/what-do-volumetric-lighting-and-volumetric-fog-do-graphics-settings-explained. You may need to set a raytraced capability (I am unable to test due to lack of raytracing enabled gpus) in the manifest.json
		{
			opt object "density" // How dense the fog is
			{
				opt object "air" // Fog density values as light passes through air
				{
					float "max_density" // The maximum amount of density that the fog will have, range from 0.000000 to 1.000000, inclusive
					float "max_density_height" // The height in blocks above the ground at which the fog will have reached maximum density, range from 0.000000 to 128.000000, inclusive
					float "zero_density_height" // The height in blocks above the ground at which the fog will be completely transparent, must be at least 1 block higher than the "max_density_height" value, range from 0.000000 to 128.000000, inclusive
					opt boolean "uniform" // If this is set to true, the density will be the same across all heights
				}
				opt object "water" // Fog density values as light passes through water
				{
					float "max_density" // The maximum amount of density that the fog will have, range from 0.000000 to 1.000000, inclusive
					float "max_density_height" // The height in blocks above the ground at which the fog will have reached maximum density, range from 0.000000 to 128.000000, inclusive
					float "zero_density_height" // The height in blocks above the ground at which the fog will be completely transparent, must be at least 1 block higher than the "max_density_height" value, range from 0.000000 to 128.000000, inclusive
					opt boolean "uniform" // If this is set to true, the density will be the same across all heights
				}
				opt object "lava" // Fog density values as light passes through lava
				{
					float "max_density" // The maximum amount of density that the fog will have, range from 0.000000 to 1.000000, inclusive
					float "max_density_height" // The height in blocks above the ground at which the fog will have reached maximum density, range from 0.000000 to 128.000000, inclusive
					float "zero_density_height" // The height in blocks above the ground at which the fog will be completely transparent, must be at least 1 block higher than the "max_density_height" value, range from 0.000000 to 128.000000, inclusive
					opt boolean "uniform" // If this is set to true, the density will be the same across all heights
				}
				opt object "lava_resistance" // Fog density values as light passes through lava and the player has a lava resistance effect applied, like Fire Resistance
				{
					float "max_density" // The maximum amount of density that the fog will have, range from 0.000000 to 1.000000, inclusive
					float "max_density_height" // The height in blocks above the ground at which the fog will have reached maximum density, range from 0.000000 to 128.000000, inclusive
					float "zero_density_height" // The height in blocks above the ground at which the fog will be completely transparent, must be at least 1 block higher than the "max_density_height" value, range from 0.000000 to 128.000000, inclusive
					opt boolean "uniform" // If this is set to true, the density will be the same across all heights
				}
			}
			opt object "media_coefficients" // Used to determine how light is dispersed and refracted through different blocks
			{
				opt object "air" // Light dispersing/refraction through air
				{
					color "scattering" // How much of, will the RGB be scattered per block. Can either be an array of 3 multipliers, range 0.000000 to 1.000000 inclusive, or a hexadecimal code. See example for more information
					color "absorption" // How much of, will the RGB be absorbed per block, can either be an array of 3 multipliers, range 0.000000 to 1.000000 inclusive, or a hexadecimal code. See example for more information
				}
				opt object "water" // Light dispersing/refraction through water
				{
					color "scattering" // How much of, will the RGB be scattered per block. Can either be an array of 3 multipliers, range 0.000000 to 1.000000 inclusive, or a hexadecimal code. See example for more information
					color "absorption" // How much of, will the RGB be absorbed per block, can either be an array of 3 multipliers, range 0.000000 to 1.000000 inclusive, or a hexadecimal code. See example for more information
				}
				opt object "cloud" // Light dispersing/refraction through clouds
				{
					color "scattering" // How much of, will the RGB be scattered per block. Can either be an array of 3 multipliers, range 0.000000 to 1.000000 inclusive, or a hexadecimal code. See example for more information
					color "absorption" // How much of, will the RGB be absorbed per block, can either be an array of 3 multipliers, range 0.000000 to 1.000000 inclusive, or a hexadecimal code. See example for more information
				}
			}
		}
	}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107

Fogs Example

{
	"format_version": "1.16.100",
	"minecraft:fog_settings": {
		"description": {
			"identifier": "cdaexample:fog_example"
		},
		"distance": {
			"air": {
				"fog_color": "#ff00ff", // Magenta color
				"fog_start": 0.5, // Halfway to the edge of the render distance
				"fog_end": 1, // Edge of render distance, anything multiplied by 1 is itself
				"render_distance_type": "render"
			},
			"weather": {
				"fog_color": "#ffff00", // Yellow color
				"fog_start": 23.000001, // Starts ~23 blocks away
				"fog_end": 100, // Ends 100 blocks away
				"render_distance_type": "fixed"
			},
			"water": {
				"fog_color": "#00ffff", // Cyan
				"fog_start": 0.23415,
				"fog_end": 0.99,
				"render_distance_type": "render"
			},
			"lava": {
				"fog_color": "#ff0000", // Red
				"fog_start": 3,
				"fog_end": 518.295,
				"render_distance_type": "fixed"
			},
			"lava_resistance": {
				"fog_color": "#00ff00", // Green
				"fog_start": 10.2,
				"fog_end": 23.98,
				"render_distance_type": "fixed"
			},
			"powder_snow": {
				"fog_color": "#0000ff", // Blue
				"fog_start": 0.0005,
				"fog_end": 1,
				"render_distance_type": "render"
			}
		},
		"volumetric": { // Disclaimer: I do not have a raytracing capable GPU, so I cannot test and verify anything I post past this point, this is just my educated assumption
			"density": {
				"air": {
					"max_density": 1, // 1x opacity, basically
					"max_density_height": 100.5, // Reaches max density 100.5 blocks above the ground
					"zero_density_height": 105, // At 105 blocks above the ground, will be completely transparent
					"uniform": false // Do not need to add this if the value is false, this means that density will not be the same across heights
				},
				"water": {
					"max_density": 0.5, // Halfway transparent and halfway opaque
					"max_density_height": 52,
					"zero_density_height": 70,
					"uniform": true // Will be same across heights
				},
				"lava": {
					"max_density": 0.982175,
					"max_density_height": 127, // Essentially max value, as zero_density_height must be at least 1 block higher
					"zero_density_height": 128, // Max value
				},
				"lava_resistance": {
					"max_density": 0.123,
					"max_density_height": 0, // Min value
					"zero_density_height": 1, // Essentially min value, as max_density_height must be at least 1 block lower
					"uniform": true
				}
			},

			"media_coefficients": {
				"air": {
					"scattering": [ 0.5, 1, 0.2 ], // 50% of red, 100% of green, and 20% of blue light, will be scattered, each block, can also use hexadecimal, as shown below
					"absorption": "#7f64c8" // 127/255 of red, 100/255 of green, and 200/255 of blue light, will be absorbed, each block. Can also use multipliers as shown above
				},
				"water": {
					"scattering": [ 0.234, 0.123, 0.59821 ],
					"absorption": [ 0.2135, 0.681, 0.829 ]
				},
				"cloud": {
					"scattering": "#f8aad0",
					"absorption": "#98afad"
				}
			}
		}
	}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88

Definitely did not spam my keyboard to get the random numbers, no idea where I'm getting that thought from

Jump to Top