Iray Programmer's Manual

Custom tonemapper

This topic describes parameters of the the custom tonemapper.

  • struct Tm_custom_tonemapper

    The structure of type Tm_custom_curve describes a mapping curve controlled by the following members:

    • mi::Float32 exposure = 0.0

    • mi::Color3 whitepoint = (0.0, 0.0, 0.0)

    • struct[] red

    • struct[] green

    • struct[] blue

    • mi::Float32 gamma = 0.0

    The components of the tonemapper are applied in the order of the struct members: first exposure control and whitepoint correction are done, then a mapping of the individual color channels, and finally a gamma correction to match the display (a good default is usually 2.2).

    The struct members red , green , and blue are dynamic arrays of structures of type Tm_custom_curve_control_point . This structure has the following members:

    • mi::Float32 in

      The input value that is mapped to the corresponding out value.

    • mi::Float32 out

      The output value in is mapped onto.

    The represented curve is a piecewise linear interpolation of the given control points. The in and out arrays need to be monotonically increasing. Note that one should disable the built-in gamma correction by setting it to 1, if the mapping curve already handles the display correction.