RemapDisplayFilter

Overview

The RemapDisplayFilter maps the colors of an input from a specified range [input_min, input_max] to a desired output range [output_min, output_max]. This process can be performed either uniformly (across all color channels) or against each individual RGB channel.


Attribute Reference

Advanced attributes

invert_mask

Bool
default: False

Invert the value of the mask

mix

Float
default: 1.0

Blend [0,1] between input and output

Channel attributes

clamp_max_RGB

Rgb
default: [ 1, 1, 1 ]

The maximum RGB value output by this map when 'clamp' is enabled

clamp_min_RGB

Rgb
default: [ 0, 0, 0 ]

The minimum RGB value output by this map when 'clamp' is enabled

input_max_RGB

Rgb
default: [ 1, 1, 1 ]

The input RGB value that will be remapped to the 'output max RGB' value

input_min_RGB

Rgb
default: [ 0, 0, 0 ]

The input RGB value that will be remapped to the 'output min RGB' value

midpoint_bias_RGB

Rgb
default: [ 0.5, 0.5, 0.5 ]

Biases the in-between values toward 'output min RGB' or 'output max RGB'. Default = 0.5

output_max_RGB

Rgb
default: [ 1, 1, 1 ]

The RGB value that 'input max RGB' is remapped to

output_min_RGB

Rgb
default: [ 0, 0, 0 ]

The RGB value that 'input min RGB' is remapped to

General attributes

clamp

Bool
default: True

Enables/disables clamping of the output values. This is useful to prevent out-of-range values when expanding the input values.

clamp_RGB

Bool
default: True

Enables/disables clamping of the RGB output values. This useful prevent out-of-range values when expanding the input values.

clamp_max

Float
default: 1.0

The maximum value output by this map when 'clamp' is enabled

clamp_min

Float
default: 0.0

The minimum value output by this map when 'clamp' is enabled

input

RenderOutput
default: None

RenderOutput to remap

input_max

Float
default: 1.0

The input float that will be remapped to the 'output max' value

input_min = 0.0, input_max = 1.0 --> 0.0, output_min = 0.0, output_max = 1.0

input_min

Float
default: 0.0

The input float that will be remapped to the 'output min' value

input_min = 0.0 --> 1.0, input_max = 1.0, output_min = 0.0, output_max = 1.0

mask

RenderOutput
default: None

RenderOutput used to mask the output, revealing input1

midpoint_bias

Float
default: 0.5

Biases the in-between values toward 'output min' or 'output max'. Default = 0.5

output_max

Float
default: 1.0

The value that 'input max' will be remapped to

input_min = 0.0, input_max = 1.0, output_min = 0.0, output_max = 1.0 --> 0.0

output_min

Float
default: 0.0

The float that 'input min' will be remapped to

input_min = 0.0, input_max = 1.0, output_min = 0.0 --> 1.0, output_max = 1.0

remap_method

Int enum
  0 = “uniform” (default)
  1 = “RGB”

Choose whether you are remapping using single values (uniform) or with separate RGB channels


Examples

local beauty = RenderOutput("/output/beauty") {
    ["file_name"] = "result_tmp.exr",
    ["result"] = "beauty",
}

local remap_uniform = RemapDisplayFilter("/display/remap_uniform") {
    ["remap_method"] = "uniform",
    ["input_min"] = 0.1,
    ["input_max"] = 0.3,
    ["output_min"] = 0.2,
    ["output_max"] = 0.9,
    ["input"] = beauty
}

RenderOutput("/output/remap_uniform") {
    ["file_name"] = "result0.exr",
    ["result"] = "display filter",
    ["display_filter"] = remap_uniform,
    ["channel_name"] = "remap_uniform"
}

local remap_RGB = RemapDisplayFilter("/display/remap_RGB") {
    ["remap_method"] = "RGB",
    ["input_min_RGB"] = Rgb(0.5, 0.4, 0.2),
    ["input_max_RGB"] = Rgb(0.9, 0.8, 1.0),
    ["output_min_RGB"] = Rgb(0.4, 0.3, 0.1),
    ["output_max_RGB"] = Rgb(0.8, 0.9, 1.0),
    ["input"] = beauty
}

RenderOutput("/output/remap_RGB") {
    ["file_name"] = "result0.exr",
    ["result"] = "display filter",
    ["display_filter"] = remap_RGB,
    ["channel_name"] = "remap_RGB"
}