HDR

From The DarkMod Wiki
Revision as of 05:29, 31 August 2010 by Tels (talk | contribs) (add)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

In image processing, computer graphics, and photography, high dynamic range imaging (HDRI or just HDR) is a set of techniques that allow a greater dynamic range of luminances between the lightest and darkest areas of an image than standard digital imaging techniques or photographic methods. This wider dynamic range allows HDR images to more accurately represent the wide range of intensity levels found in real scenes, ranging from direct sunlight to faint starlight.

From Wikipedia.

In The Dark Mod, HDR was incorporated into the D3 engine by J.C. Denton in 2010.

List of newly added CVARS:

r_HDR_enableDebugMode (Integer)

default value 0

Shows all the textures generated for HDR postprocess.

1: Shows all textures (Endecoded), namely: 64x Downscaled scene image, 64x64 luminance texture (stores averaged scene luminance), 4x4 luminance texture, 1x1 adapted luminance texture, bloom result texture. 2: Decodes and shows all textures

r_HDR_debugTextureIndex (Integer)

default value 0

Show intermediate textures used for HDR postprocess 0: Off. 1: scene Image(64x Scaled down) 2: Result of first bloom pass. 3: Result of second bloom pass. 4: Contains of cooked math data texture.

r_HDR_postProcess (Bool)

default value 1

Activates HDR tone mapping and bloom

r_HDR_brightPassThreshold (Float)

default value 5.0

brightness threshold for Bright-pass. E.g. color intensities beyond 5.0 will be bloomed and hence only very bright areas would qualify for blooming.

r_HDR_brightPassOffset (Float)

default value 10.0

Brightness offset for bright pass. E.g. Color intensities beyond r_HDR_brightPassThreshold will receive a nice gradually faded bloom from dark to bright giving color intensity of 10.0 the brightest bloom. To get a good understanding, set r_debugTextureIndex to 2 or 3 and then change this value to visualize the bloom image.

r_HDR_middleGray (Float)

default value 0.1

(Note: Works only when automatic eye adjustment is on. i.e. when r_HDR_eyeAdjustmentBias is set to a value greater than 0.0 ) Middle gray value for overall scene ( Range 0 - 1) . Higher the value, brighter the scene.

r_HDR_min_luminance (Float)

default value 0.045

(Note: Works only when automatic eye adjustment is on. i.e. when r_HDR_eyeAdjustmentBias is set to a value greater than 0.0 ) Measured luminance of the scene is restricted to this value to control how bright a lit area should get when standing in complete dark areas.

r_HDR_max_luminance (Float)

default value 0.12

(Note: Works only when automatic eye adjustment is on. i.e. when r_HDR_eyeAdjustmentBias is set to a value greater than 0.0 )

Luminance is restricted to this value to control darkness when in super-bright areas. E.g. If you are looking at a very bright sky everything else around will get darker. This variable lets you control how much darker the surrounding should get when looking at full bright areas.

r_HDR_eyeAdjustmentDelay (Float)

default value 2.2

(Note: Works only when automatic eye adjustment is on. i.e. when r_HDR_eyeAdjustmentBias is set to a value greater than 0.0 ) Total time in second taken to adjust eye exposure.

r_HDR_colorCurveBias (Float)

default value 0.24

Applies an exponential S-Shaped color curve to final pass (range 0 to 1), E.g. 1.0 = color curve fully applied , 0.0 = No color curve See following 2d graph to grasp the working of color-curve bias.

Attached Image

r_HDR_maxColorIntensity (Float)

default value 3.0

Adjusting this value will cause color burnout of high dynamic range values going beyond 255 in a controllable fashion (range 0.0 - 256.0). This step is performed while bringing the HDR values into displayable range (0-255), also known as tone mapping. Higher values reduces the contrast, lower values increases the contrast.

Posted Image

See Example Images: Posted Image Posted Image Posted Image


r_HDR_bloomIntensity (Float)

default value 1.0

Adjusts the Bloom intensity. 0 turns off the bloom+halo passes altogether. Set it to 0 when having issues with performance.

r_HDR_haloIntensity (Float)

default value 1.0

Adjusts the halo intensity. 0 turns off only halo (a round glow effect around fire and other bright surfaces) pass, does not affect bloom. Set it to 0 when having issues with performance.

r_HDR_lumUpdateRate (Integer)

default value 11

(Note: Works only when automatic eye adjustment is on. i.e. when r_HDR_eyeAdjustmentBias is set to a value greater than 0.0 ) This is a performance related variable. Its value represents number frames after which scene luminance measurement is to be performed. To measure luminance of scene it takes three passes of postprocessing . If the eye-adjustment delay is greater than 1 second, this process does not have to be performed every frame.

r_HDR_eyeAdjustmentBias (Float)

default value 0.4

Now, automatic eye adjustment can be completely turned off or can be set to partially blend with the non-automatic eye adjusted result. E.g. 0.0 - turns automatic eye adjustment off. 0.4 - 40% automatic eye adjustment. 1.0 - Full automatic eye adjustment.


r_HDR_vignetteBias (Float)

default value 0.45

This variable lets you control the newly added vignette effect, which in essence just darkens the corners of your screen. Set 1.0 to fully darken the edges or 0.0 to completely disable it.

r_HDR_sceneExposure (Float)

default value 1.0

This value is used to scale up the final result image linearly. Setting it to 1.0 wont change anything.

r_HDR_gammaCorrection (Float)

default value 1.0

Adjusts the gamma curve as postprocess. Setting it to 1.0 wont change anything.

See also