Oink
Nodes

Relight

Relight: adds light to the plate from its N (normals) and depth layers, all on the GPU.

raw .md

Relight: adds light to the plate from its N (normals) and depth layers, all on the GPU. Built-in light (point / spot / area / directional; place in 3D or pick a pixel) plus any lights in the lights input; camera from cam or the focal knobs. Mode add (plate colour as albedo), multiply, light only, materials (AIMaterials albedo x light + GGX specular from roughness / metallic) or generative (Cosmos DiffusionRenderer re-renders the plate under the env HDR map; Generate in the panel). Optional screen-space shadows.

NodeRelight
Type idOC_N_relight
Menu3D › Relight
Nuke classnone: saved in .nk files as an Oink node
Codeopencomp_core/nodes/three_d/relight.py

Relight properties

Inputs and outputs

PortNameType
input 0Imageimage
input 1lightsscene
input 2camscene
input 3envimage
output 0Imageimage

Knobs

Panel tab Relight, in panel order.

KnobLabelTypeDefaultRange / valuesNuke knobDescription
light_typelightmenupointpoint, spot, area, directional, none (none (lights input only))
colorcolorcolour ×31, 1, 10 to 1
intensityintensityfloat10 to 20
position_modeplacemenu3d3d (3D position), image (pick on image)
pickpickvector ×20, 00 to 4096Pixel (Nuke coords) the light sits in front of
pick_offsetpick offsetfloat0.50 to 10Distance from the picked surface towards the camera
positionpositionvector ×30, 1, 0-100 to 100
rotaterotatevector ×30, 0, 0-180 to 180Light direction: -Z rotated (degrees, ZXY like Nuke lights)
falloff_typefalloffmenuquadraticnone, linear, quadratic, cubic
cone_anglecone anglefloat300 to 180
cone_penumbra_anglecone penumbrafloat50 to 90
cone_falloffcone fallofffloat00 to 100
area_sizearea sizevector ×21, 10 to 20
modemodemenuaddadd, multiply, light (light only), materials, generative (generative (AI))
albedoplate albedofloat10 to 1add: how much the plate colour tints the added light
ambientambientcolour ×30, 0, 00 to 1
shadowsshadowsboolfalse
shadow_samplesshadow samplesfloat241 to 128 (integer)
shadow_biasshadow biasfloat0.020 to 1Relative depth tolerance
shadow_strengthshadow strengthfloat10 to 1
shadow_thicknessshadow thicknessfloat10 to 100Occluders are assumed this thick (scene units)
shadow_distanceshadow distancefloat100 to 1000March length for directional lights
normal_layernormals layertextNLayer holding normals (xyz); missing = normals from depth
normal_spacenormal spacemenucameracamera, world
depth_layerdepth layertextdepth
depth_conventiondepth ismenuinvinv (1/Z), z (Z)
default_depthdefault depthfloat50.001 to 1000Z used where there is no depth layer
focalfocalfloat501 to 2000
haperturehoriz aperturefloat24.5760.1 to 100
albedo_layeralbedo layertextalbedoBase colour layer; present = diffuse is albedo x light
roughness_layerroughness layertextroughnessRoughness layer (.r); present = GGX specular
metallic_layermetallic layertextmetallic
specularspecularfloat10 to 4Scale of the GGX specular (0 = diffuse only)
env_rotationenv rotationfloat0-180 to 180
env_strengthenv strengthfloat10 to 10
gen_stepsgen stepsfloat151 to 50 (integer)
gen_precisiongen precisionmenuautoauto, bf16, fp8
mixmixfloat10 to 1

Other knobs (Python, .nk and the assistant; not on the panel)

KnobLabelTypeDefaultRange / valuesNuke knobDescription
gl_colorViewer Controls Colorfloat ×30, 0, 00 to 1
postage_stamp_frameStatic Frameint1-2147483648 to 2147483647
lifetimeStartLifetime Startint0-2147483648 to 2147483647
lifetimeEndLifetime Endint100-2147483648 to 2147483647
useLifetimeUse Lifetimebooleanfalse
cachedCachedbooleanfalse
bookmarkBookmarkbooleanfalse
dope_sheetDope Sheetbooleanfalse
clone_groupClone Groupstring
link_sourceLink Sourcestring
link_overridesLink Overridesstring
split_viewsSplit Viewsstring
gen_depth_layerGen DepthstringdepthAIMaterials relative depth layer for the generative mode
gen_chunkGen Windowint571 to 57
gen_seedGen Seedint1000-2147483648 to 2147483647
gen_resultsGeneratedstring{}

Nuke equivalent

No Nuke class. In a .nk file this node is written as an Oink node that Nuke will not recognise.

Examples

Open these from Help › Examples…, or from the ? menu in this node's Properties panel.

  • Relight from rendered normals and depth (examples/3d/relight_normals.oink): ScanlineRender writes normals (N) and depth; Relight adds a point light using them, the way you relight a CG pass in comp. Move the light's position knob to see the shading follow the shapes.

On this page