Atmospheric light scattering: Difference between revisions

Jump to navigation Jump to search
Line 61: Line 61:
In reality, in a fog of constant density, the fraction of the original light (pixel color) left after a distance ''d'' is  exp[-''d''/λ] - this is exponential fogging. Since the visibility range is about 3λ, this implies for 3d rendering that the majority of scenery loaded will be more than 80% fogged and badly visible. Since this is very inefficient, the pure exponential fogging is not always used.
In reality, in a fog of constant density, the fraction of the original light (pixel color) left after a distance ''d'' is  exp[-''d''/λ] - this is exponential fogging. Since the visibility range is about 3λ, this implies for 3d rendering that the majority of scenery loaded will be more than 80% fogged and badly visible. Since this is very inefficient, the pure exponential fogging is not always used.


An alternative is quadratic exponential fogging, i.e. a function ~exp[-''d^2''/λ^2]. This leads to less fogging for ''d''<λ but much more fogging for ''d'>λ and thus the visible terrain is less fogged whereas the faraway terrain is rapidly becoming so strongly fogged that it doesn't need to be loaded - in essence it tends to makes terrain either visible or not.
An alternative is quadratic exponential fogging, i.e. a function ~exp[-''d^2''/λ^2]. This leads to less fogging for ''d''<λ but much more fogging for ''d''>λ and thus the visible terrain is less fogged whereas the faraway terrain is rapidly becoming so strongly fogged that it doesn't need to be loaded - in essence it tends to makes terrain either visible or not.


A different strategy is exponential fading with a cutoff, i.e. a function ~exp[-''d''/λ - ''d^4''/λ^4] - this fogs with a physically correct attenuation within the visibility range but cuts off everything beyond that range rapidly to that it doesn't have to be loaded. The choice of fog function is hence a balance between fast rendering and realism.
A different strategy is exponential fading with a cutoff, i.e. a function ~exp[-''d''/λ - ''d^4''/λ^4] - this fogs with a physically correct attenuation within the visibility range but cuts off everything beyond that range rapidly to that it doesn't have to be loaded. The choice of fog function is hence a balance between fast rendering and realism.
1,360

edits

Navigation menu