DiscretizeDisplayFilter

Overview

The DiscretizeDisplayFilter bins the r, g, and b values of the input buffer separately, into a specified num_bins. This feature is probably mostly useful for grayscale images.


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

General attributes

input

RenderOutput
default: None

RenderOutput to discretize

mask

RenderOutput
default: None

RenderOutput used to mask the output, revealing input1

num_bins

Int
default: 8

Number of discrete color bins

num_bins = 1 --> 20


Examples

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

local discretize = DiscretizeDisplayFilter("/display/discretize") {
    ["input"] = beauty,
    ["num_bins"] = 3,
}

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