DwaColorCorrectMaterial

Overview


The DwaColorCorrectMaterial provides common color-correction controls for making “global” adjustments to an existing material.

local metal = DwaMetalMaterial("metal") {
    ["roughness"] = 0.1,
    ["specular_model"] = 0,
    ["metallic_color"] = Rgb(0.966, 0.829, 0.438),
    ["metallic_edge_color"] = Rgb(0.366, 0.429, 0.938),
}

DwaColorCorrectMaterial("colorCorrectMtl") {
    ["input_material"] = metal,
    ["hue_shift"] = 0.5,
    ["saturation"] = 0.1,
    ["gain"] = 0.2
}

Attribute Reference

Hue/Sat/Gain attributes

gain

Float bindable
default: 1.0

multiplies the input channels by the specified value

gain: 0.0 -> 2.0

hue_shift

Float bindable
default: 0.0

shifts the hue of the input (spectrum range is 0-1)

hue_shift: 0.0 -> 1.0

saturation

Float bindable
default: 1.0

desaturates the input below 1.0 and adds saturation above 1.0

saturation: 0.0 -> 2.0

TMI attributes

TMI

Rgb
default: [ 0, 0, 0 ]

T = Temperature where positive values push towards blue and negative towards red. M = Magenta where positive values push towards magenta and negative towards green. I = Intensity where negative values remove and positive values add energy

TMI: (-1, 0, 0) -> (1, 0, 0)
TMI: (0, -1, 0) -> (0, 1, 0)
TMI: (0, 0, -1) -> (0, 0, 1)

TMI_enabled

Bool
default: False

enables the TMI parameters

General attributes

extra_aovs

Map
default: None

Bind this attribute to a 'ListMap' that contains references to ExtraAovMaps that specify additional outputs that can be assigned to a RenderOutput "light aov" result

input_material

DwaBaseLayerable
default: None

Material to modify

label

String
default:

label used in material and light aovs

mix

Float bindable
default: 1.0

how much of the overall color correct to mix in

on

Bool
default: True

Enable/disable all color corrections

priority

Int
default: 0

The material's place in an order of precedence for overlapping dielectrics. A value of 0 means the priority should be ignored. Materials with lower numbers (higher priority) "override" materials with higher numbers (lower priority). To enable automatic removal of self-overlapping geometry, a non-zero priority must be set on the geometry's material.

record_reflected_cryptomatte

Bool
default: False

Indicates whether the next reflected surface should appear in the reflected cryptomatte layers

record_refracted_cryptomatte

Bool
default: False

Indicates whether the next refracted surface should appear in the refracted cryptomatte layers