Tonemap

Classes

Tonemap : NativeComponent

This component is used to setup tonemaping post process for result image. Tonemapping is a technique used to map one set of colors to another to approximate the appearance of high dynamic range images in a medium that has a more limited dynamic range. It also performs color correction and white balance. This render feature is disabled by default.

To use this component, add the following line to your project file:

require engine.core_components.tonemap_component // or require engine.core

Usage example:

let setting = create_render_settings()
get_component(renderSettings) $(var tonemap : Tonemap?) {
    tonemap.active = true
}
Properties:

Tonemap.active: bool
Tonemap.active =(value: bool)

Active flag. If set to true, tonemaping will be applied to the result image. Default is false.

Arguments:
  • value : bool

Tonemap.tonemapContrast: float
Tonemap.tonemapContrast =(value: float)

Varies the steepness around the toe of the curve. Default is 1.28.

Arguments:
  • value : float

Tonemap.tonemapShoulder: float
Tonemap.tonemapShoulder =(value: float)

Controls the steepness of the falloff at the top of the curve, use values in the [0;1] range. Default is 0.85.

Arguments:
  • value : float

Tonemap.tonemapMidIn: float
Tonemap.tonemapMidIn =(value: float)

Mid-level of the input, used for midOut to create an anchor point. Default is 0.18.

Arguments:
  • value : float

Tonemap.tonemapMidOut: float
Tonemap.tonemapMidOut =(value: float)

Mid level of the output. Default is 0.18.

Arguments:
  • value : float

Tonemap.tonemapHdrMax: float
Tonemap.tonemapHdrMax =(value: float)

maximum HDR brightness (1.0 = 100 nits). Default is 4.0.

Arguments:
  • value : float

Tonemap.colorSaturation: float4
Tonemap.colorSaturation =(value: float4)

adjusts the intensity of the colors that are being represented. Default is (1, 1, 1, 1).

Arguments:
  • value : float4

Tonemap.colorContrast: float4
Tonemap.colorContrast =(value: float4)

adjusts the tonal range of light and dark color values. Default is (1, 1, 1, 1).

Arguments:
  • value : float4

Tonemap.colorGamma: float4
Tonemap.colorGamma =(value: float4)

adjusts the luminance intensity of the image to accurately reproduce colors, mostly affects midtones. Default is (1, 1, 1, 1).

Arguments:
  • value : float4

Tonemap.colorGain: float4
Tonemap.colorGain =(value: float4)

a multiplication factor for the image, mostly used to boost/reduce highlights. Default is (1, 1, 1, 1).

Arguments:
  • value : float4

Tonemap.colorOffset: float4
Tonemap.colorOffset =(value: float4)

an addition factor for the image, can be used to make shadows lighter. Default is (0, 0, 0, 0).

Arguments:
  • value : float4

Tonemap.colorCorrectionShadowsMax: float
Tonemap.colorCorrectionShadowsMax =(value: float)

defines where shadows end and where midtones start in luma (before tonemapping). Default is 0.1.

Arguments:
  • value : float

Tonemap.colorCorrectionHighlightsMin: float
Tonemap.colorCorrectionHighlightsMin =(value: float)

defines where midtones end and where highlights start in luma (before tonemapping). Default is 0.8.

Arguments:
  • value : float

Tonemap.shadows_colorSaturation: float4
Tonemap.shadows_colorSaturation =(value: float4)

The below pack are the same values as the above, except they are only affecting different luma ranges. For example if you only want to lighten shadows without having any effect on the entire image you can use shadows_colorOffset instead of colorOffset. The general advice is to use the global values first and then do finetuning on the values below after. See colorSaturation.

Arguments:
  • value : float4

Tonemap.shadows_colorContrast: float4
Tonemap.shadows_colorContrast =(value: float4)

See colorContrast.

Arguments:
  • value : float4

Tonemap.shadows_colorGamma: float4
Tonemap.shadows_colorGamma =(value: float4)

See colorGamma.

Arguments:
  • value : float4

Tonemap.shadows_colorGain: float4
Tonemap.shadows_colorGain =(value: float4)

See colorGain.

Arguments:
  • value : float4

Tonemap.shadows_colorOffset: float4
Tonemap.shadows_colorOffset =(value: float4)

See colorOffset.

Arguments:
  • value : float4

Tonemap.midtones_colorSaturation: float4
Tonemap.midtones_colorSaturation =(value: float4)

See colorSaturation.

Arguments:
  • value : float4

Tonemap.midtones_colorContrast: float4
Tonemap.midtones_colorContrast =(value: float4)

See colorContrast.

Arguments:
  • value : float4

Tonemap.midtones_colorGamma: float4
Tonemap.midtones_colorGamma =(value: float4)

See colorGamma.

Arguments:
  • value : float4

Tonemap.midtones_colorGain: float4
Tonemap.midtones_colorGain =(value: float4)

See colorGain.

Arguments:
  • value : float4

Tonemap.midtones_colorOffset: float4
Tonemap.midtones_colorOffset =(value: float4)

See colorOffset.

Arguments:
  • value : float4

Tonemap.highlights_colorSaturation: float4
Tonemap.highlights_colorSaturation =(value: float4)

See colorSaturation.

Arguments:
  • value : float4

Tonemap.highlights_colorContrast: float4
Tonemap.highlights_colorContrast =(value: float4)

See colorContrast.

Arguments:
  • value : float4

Tonemap.highlights_colorGamma: float4
Tonemap.highlights_colorGamma =(value: float4)

See colorGamma.

Arguments:
  • value : float4

Tonemap.highlights_colorGain: float4
Tonemap.highlights_colorGain =(value: float4)

See colorGain.

Arguments:
  • value : float4

Tonemap.highlights_colorOffset: float4
Tonemap.highlights_colorOffset =(value: float4)

See colorOffset.

Arguments:
  • value : float4

Tonemap.whiteTemp: float
Tonemap.whiteTemp =(value: float)

color temperature (in C) of the white point used, for example: ~3000 is warm (orange), ~6000 is white, ~9000 is cold (blue). Default is 6400.

Arguments:
  • value : float

Tonemap.whiteTint: float
Tonemap.whiteTint =(value: float)

the perpendicular component of the selected temperature. Use it in the case when the temperature alone doesn’t quite give the look you’d like. Default is 0.

Arguments:
  • value : float