1,360
edits
Line 698: | Line 698: | ||
=== Irradiance maps === | === Irradiance maps === | ||
Note: This effect requires higher than minimum model shader quality setting. | |||
In the simplest rendering schemes, diffuse and specular light are assumed to be highly directional (i.e. it illuminates lit surfaces only) while ambient light is taken to be omnidirectional. | |||
In reality, that is hardly ever true. In a typical outside location, ambient light is mainly coming from the sky above (which is why the ground underneath a car is dark even in the absence of directional light when the sky is overcast and the sun is not visible). In an enclosed space (like a room, or an aircraft cockpit), ambient light has to fall through the windows, i.e. is mainly not coming above but falling in horizontally. | |||
The directional dependence is not very strong though, yet it leaves measurable effects. In rendering, this can be accounted for by irradiance maps. In the following, the interior of the C-172p is rendered in the first case using omnidirectional ambient light, in the second case using an irradiance map giving the ambient light the directionality of the cabin windows, i.e. the light falls in predominantly horizontally (in addition, a grain map is superimposed to provide structure). Note how the spatial structure of the roof, looking bland when rendered in omnidirectional light is brought out by the irradiance map. | |||
[[File:Als-interior-irradiance01.jpg|400px|C-172p cabin interior rendered without irradiance and grain map]] | [[File:Als-interior-irradiance01.jpg|400px|C-172p cabin interior rendered without irradiance and grain map]] | ||
[[File:Als-interior-irradiance02.jpg|400px|C-172p cabin interior rendered | [[File:Als-interior-irradiance02.jpg|400px|C-172p cabin interior rendered with irradiance and grain map]] | ||
Irradiance mapping is configured by the following parameters: | |||
<syntaxhighlight lang="xml"> | |||
<irradiance-map-type type="int">2</irradiance-map-type> | |||
<irradiance-map-strength type="float">0.5</irradiance-map-strength> | |||
</syntaxhighlight> | |||
There are several pre-configured irradiance map functions which can be chosen by map type. | |||
0: (default) omndirectional light | |||
1: light predominantly coming from above (most appropriate for fighter cockpits) | |||
2: light predominantly coming from the horizon (most appropriate for GA aircraft) | |||
The strength of the irradiance map regulates how pronounced the asymmetry of the map will be. A strength of zero always makes the light omnidirectional, whereas a strength of 1 implies that no light is coming from any direction 90 degree to the main direction (i.e. for the option 2, a strength of 1.0 means that no ambient light will fall in from above or below and that hence horizontal surfaces will appear pitch black unless direct light falls on them). | |||
== ALS fuselage shadow effect == | == ALS fuselage shadow effect == |
edits