{"name":"Arma 3: Improved Fog","title":"Arma 3: Improved Fog","type":"topic","url":"https://community.bistudio.com/wiki/Arma_3:_Improved_Fog","revid":347057,"updated":"2023-08-28T23:00:26Z","aliases":["Arma 3 Improved Fog"],"markdown":"Main improvements are:\n\n- fog density now decays with altitude\n- skybox and clouds are colored by fog\n\n### Computation\n\nMost important values in computation:\n\n- **fogBase** - base altitude for fog (in meters)\n- **beta0** - macroscopic cross-section of atmospheric scatterers at base altitude - determines density of fog based on distance from viewer at base altitude\n- **fogDecay** - how much the fog density decays with altitude. 0 = constant density, 0.0049333 = density halves every 500m\n\n### Config\n\nIn world config following values can be configured:\n\n```cpp\nstartFogBase = 0.0;            // base altitude for fog computations (in meters)\nforecastFogBase = 0.0;\nstartFogDecay = 0.005;        // decay coefficient - decay of fog with altitude\nforecastFogDecay = 0.005;\nfogBeta0Min = 0.0001;        // beta0 (macroscopic cross-section of atmospheric scatterers at base level) for fog value 0\nfogBeta0Max = 0.02;            // beta0 (macroscopic cross-section of atmospheric scatterers at base level) for fog value 1\n```\n\n### Script commands\n\nCommand setFog was extended - now can be used with some optional params.","sections":[{"heading":null,"level":1,"markdown":"Main improvements are:\n\n- fog density now decays with altitude\n- skybox and clouds are colored by fog"},{"heading":"Computation","level":3,"markdown":"Most important values in computation:\n\n- **fogBase** - base altitude for fog (in meters)\n- **beta0** - macroscopic cross-section of atmospheric scatterers at base altitude - determines density of fog based on distance from viewer at base altitude\n- **fogDecay** - how much the fog density decays with altitude. 0 = constant density, 0.0049333 = density halves every 500m"},{"heading":"Config","level":3,"markdown":"In world config following values can be configured:\n\n```cpp\nstartFogBase = 0.0;            // base altitude for fog computations (in meters)\nforecastFogBase = 0.0;\nstartFogDecay = 0.005;        // decay coefficient - decay of fog with altitude\nforecastFogDecay = 0.005;\nfogBeta0Min = 0.0001;        // beta0 (macroscopic cross-section of atmospheric scatterers at base level) for fog value 0\nfogBeta0Max = 0.02;            // beta0 (macroscopic cross-section of atmospheric scatterers at base level) for fog value 1\n```"},{"heading":"Script commands","level":3,"markdown":"Command setFog was extended - now can be used with some optional params."}],"categories":["Arma 3: Editing"],"groups":["General"]}