Improved Fog – Arma 3

From Bohemia Interactive Community
Jump to navigation Jump to search
(Created page with "Category:Arma 3: Editing ==General== Main improvements are: * fog density now decays with altitude * skybox and clouds are colored by fog ==Computation== Most importatnt val...")
 
m (Some wiki formatting)
 
(6 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[Category:Arma 3: Editing]]
{{TOC|none}}
==General==
Main improvements are:
Main improvements are:
* fog density now decays with altitude
* fog density now decays with altitude
* skybox and clouds are colored by fog
* skybox and clouds are colored by fog


==Computation==
 
Most importatnt values in computation:
== Computation ==
 
Most important values in computation:
* '''fogBase''' - base altitude for fog (in meters)
* '''fogBase''' - base altitude for fog (in meters)
* '''beta0''' - macroscopic cross-section of atmospheric scatterers at base altitude - determines density of fog based on distance from viewer at base altitude
* '''beta0''' - macroscopic cross-section of atmospheric scatterers at base altitude - determines density of fog based on distance from viewer at base altitude
* '''fogDecay''' - how much the fog density decays with altitude. 0 = constant density, 0.0049333 = density halves every 500m
* '''fogDecay''' - how much the fog density decays with altitude. 0 = constant density, 0.0049333 = density halves every 500m


==Config==
 
== Config ==
 
In world config following values can be configured:
In world config following values can be configured:
startFogBase = 0.0;         // base altitude for fog computations (in meters)
<syntaxhighlight lang="cpp">
forecastFogBase = 0.0;
startFogBase = 0.0; // base altitude for fog computations (in meters)
startFogDecay = 0.005;       // decay coefficient - decay of fog with altitude
forecastFogBase = 0.0;
forecastFogDecay = 0.005;
startFogDecay = 0.005; // decay coefficient - decay of fog with altitude
fogBeta0Min = 0.0001;       // beta0 (macroscopic cross-section of atmospheric scatterers at base level) for fog value 0
forecastFogDecay = 0.005;
fogBeta0Max = 0.02;         // beta0 (macroscopic cross-section of atmospheric scatterers at base level) for fog value 1
fogBeta0Min = 0.0001; // beta0 (macroscopic cross-section of atmospheric scatterers at base level) for fog value 0
fogBeta0Max = 0.02; // beta0 (macroscopic cross-section of atmospheric scatterers at base level) for fog value 1
</syntaxhighlight>
 
 
== Script commands ==
 
Command [[setFog]] was extended - now can be used with some optional params.
 


==Script commands==
{{GameCategory|arma3|Editing}}
Command '''setFog''' was extended - now can be used in two forms:
* [[setFog]]
* [[setFog array]]

Latest revision as of 01:00, 29 August 2023

Main improvements are:

  • fog density now decays with altitude
  • skybox and clouds are colored by fog


Computation

Most important values in computation:

  • fogBase - base altitude for fog (in meters)
  • beta0 - macroscopic cross-section of atmospheric scatterers at base altitude - determines density of fog based on distance from viewer at base altitude
  • fogDecay - how much the fog density decays with altitude. 0 = constant density, 0.0049333 = density halves every 500m


Config

In world config following values can be configured:

startFogBase = 0.0;			// base altitude for fog computations (in meters)
forecastFogBase = 0.0;
startFogDecay = 0.005;		// decay coefficient - decay of fog with altitude
forecastFogDecay = 0.005;
fogBeta0Min = 0.0001;		// beta0 (macroscopic cross-section of atmospheric scatterers at base level) for fog value 0
fogBeta0Max = 0.02;			// beta0 (macroscopic cross-section of atmospheric scatterers at base level) for fog value 1


Script commands

Command setFog was extended - now can be used with some optional params.