Eye Adaptation

Eye Adaptation, or automatic exposure, causes the exposure of the scene to automatically adjust to recreate the effect experienced as human eyes adjust when going from a bright environment into a dark environment or vice versa.

Eye Adaption

Property Description
Low Percent The eye adaptation will adapt to a value extracted from the luminance histogram of the scene color. The value defines the lower percentage of the histogram that is used to find the average scene luminance. We want to avoid clamping of the bright image parts so it is best to ignore most of the dark areas. e.g. 80 avoid 80% of the darks. Values should be in the range [0, 100]. Values in the range 70-80 give the best results.
High Percent The eye adaptation will adapt to a value extracted from the luminance histogram of the scene color. The value defines the upper percentage of the histogram that is used to find the average scene luminance. We want to clip off a few percent as it is ok to have some bright pixels (usually sun). Values should be in the range [0, 100]. Values in the range 80-98 give the best results.
Min Brightness This value limits the lower brightness that the eye adapts within. Value must be greater than 0 and should be <= EyeAdaptationMaxBrightness. Actual values depend on the HDR range the content is using.
Max Brightness This value limits the upper brightness that the eye adapts within. Value must be greater than 0 and should be >= EyeAdaptationMinBrightness. Actual values depend on the HDR range the content is using.
Speed Up The speed at which the adaptation occurs from a dark environment to a bright environment.
Speed Down The speed at which the adaptation occurs from a bright environment to a dark environment.
Auto Exposure Bias Controls biasing of the exposure settings. The value is logarithmic meaning:
Value Effect
0 no change
-1 half as bright
-2 quarter as bright
1 twice as bright
2 four times as bright
Fractional values like 1.5 or values outside of the shown examples work as well. If eye adaptation is active, the value is added to the automatic exposure.

Eye adaptation is histogram based and uses the following method:

  • Let's say EyeAdaptationLowPercent is 80% and EyeAdaptationHighPercent is 95%.

  • Now we search the histogram for two values:

    • 80% of the screen pixels are darker than luminance value A.

    • 95% of the screen pixels are darker than luminance value B.

    • The average between A and B is the current scene luminance (C).

  • Over time, the eye will adapt to this value. Adapting to a dark environment is usually perceived slower so we have two values to adjust that: EyeAdaptionSpeedUp and EyeAdaptionSpeedDown.

  • In order to not adapt completely to very dark or very bright environments, we clamp the adaptation within a defined range: EyeAdaptationMinBrightness and EyeAdaptationMaxBrightness.

Histogram

The Histogram properties are used by the automatic eye adaptation feature which looks at a histogram of the scene colors to adapt the camera or the eye to a scene. This histogram can be seen by using the console command ShowFlag.VisualizeHDR 1.

Histogram

Property Description
Histogram Log Min Defines the lower bounds for the brightness range of the generated histogram.
Histogram Log Max Defines the upper bounds for the brightness range of the generated histogram.