Skip to content

Nodes · Blacksmith

BS_Relight

Blacksmithv4coreNeeds full inputForge

Overview

Relights a plate from its own passes: screen-space lights (a directional sun by azimuth/elevation, or a point light at a pixel with depth) shaded against the ingested normal/roughness/basecolor, with real Light3Ds usable through lights. Chain several in add mode to build a key/fill/rim. Needs a PBRIngest upstream — it says so when it has nothing to shade.

How to

How-to

  1. Wire the plate; wire normals and depth images (or let the node read the stream's layers). Set the Setup page if the normals are packed 0–1 or flipped.
  2. Add lights on the Multi-Light page: drag on the ground plane, Shift+drag for height, double-click to add; the viewer shows each light as a handle.
  3. Turn on occlusion for depth-map shadows; add a rim; wire an hdri for environment light.
  4. output views isolate each term; dome + plate lines an HDRI up.
  5. mode replace or add, mix to fade, a mask to limit.

Inputs

InputWhat it takes
inthe image this node works on
normals—
depth—
hdri—
masklimits the effect to this matte — the engine's universal mask slot, applied for every node that declares it

Outputs

OutputType
outImage

Parameters

ParameterTypeDefaultWhat it does
slotInt0The live-stream slot this node reads. Slots are process-wide; the same number in two nodes is the same stream.
lightsTextThe NAME of a Light3D node (or a Merge3D combining several). The same lights that shade the 3D viewport shade this plate — move the light, the relight follows.
cameraTextThe render camera's Camera3D node name — speculars need to know where the eye is. Empty = camera at the world origin (fine for camera-at-origin renders, approximate otherwise).
normals_01BoolfalseThe normals pass is packed 0–1 (a PNG-style normal map, most vendor exports): unpack it to −1…1 before shading. Off for a signed float pass. The normals view shows what the shader saw.
flip_xBoolfalseNegate the normals' X — a vendor whose right is our left.
flip_yBoolfalseNegate the normals' Y — DirectX-style normal maps have Y down.
flip_zBoolfalseNegate the normals' Z — a pass whose normals face AWAY from camera lights nothing until this is on.
depth_scaleFloat1.0Multiply the depth pass before use. Depth sets where the surface sits along the light axis (10 units across the short edge per 1.0 of depth), so a pass in metres wants a small scale and a 0–1 pass wants 1.
invert_depthBoolfalseThe depth pass has far = 0 and near = 1 (some kits deliver it that way): flip it so near is small.
depth_nearFloat0.0The ground-plane widget's near edge, in depth units — only the widget's range, nothing in the shading.
depth_farFloat1.0The ground-plane widget's far edge, in depth units — only the widget's range.
actor_depthFloat0.5Where the subject sits on the ground plane — drawn as the box in the widget, a guide for placing lights around it. Nothing in the shading reads it.
show_gridBooltrueDraw the ground-plane widget's grid.
show_trailsBooltrueDraw the selected light's keyed path over the surrounding 48 frames on the widget.
ml_countInt1How many multi-light slots are in use (0–8). Slots past the count are not lights; their knobs are kept. + add light and double-clicking the ground raise it.
ml_weightFloat1.0A gain on every multi-light slot at once — balance the rig against the HDRI or the plate without touching each light.
terminatorFloat0.0Softness of the lit/unlit boundary: the diffuse cosine wraps as (N·L + t)/(1 + t). 0 is the hard lambert terminator (bit-identical to before), 0.5 reads as a large soft source, 1 lights the whole surface evenly. The specular keeps the true cosine.
ml_selectedInt0Which slot the widget's knobs show (click a light).
ml0_enableBooltrueThis slot lights, or sits idle. A disabled slot keeps its knobs.
ml0_posFloat2[672.0, 432.0]Where the light sits on screen, in pixels (x from the left, y from the top). Drag it in the viewer, or on the ground-plane widget (Shift+drag for height).
ml0_depthFloat0.3How far from the camera the light sits, in the depth map's own units — smaller is nearer. A light at 0.3 sits in FRONT of a surface at 0.5 and lights it; behind it, it lights nothing that faces the camera.
ml0_intensityFloat2.0The light's brightness AT its falloff radius, scene-linear, times ml_weight — beyond the radius it falls off by falloff, inside it holds.
ml0_colorColor[1.0, 1.0, 1.0, 1.0]The light's colour.
ml0_falloffFloat2.0How the light fades with distance: 2 is inverse square (the physical law), lower reaches further, higher pools close to the source.
ml0_radiusFloat200.0The distance in pixels at which the light is exactly intensity bright; inside it the light holds, beyond it falls off by falloff. Small is a bulb that burns a hot spot, large is a panel that lights evenly.
ml1_enableBoolfalseThis slot lights, or sits idle. A disabled slot keeps its knobs.
ml1_posFloat2[1248.0, 432.0]Where the light sits on screen, in pixels (x from the left, y from the top). Drag it in the viewer, or on the ground-plane widget (Shift+drag for height).
ml1_depthFloat0.3How far from the camera the light sits, in the depth map's own units — smaller is nearer. A light at 0.3 sits in FRONT of a surface at 0.5 and lights it; behind it, it lights nothing that faces the camera.
ml1_intensityFloat2.0The light's brightness AT its falloff radius, scene-linear, times ml_weight — beyond the radius it falls off by falloff, inside it holds.
ml1_colorColor[1.0, 1.0, 1.0, 1.0]The light's colour.
ml1_falloffFloat2.0How the light fades with distance: 2 is inverse square (the physical law), lower reaches further, higher pools close to the source.
ml1_radiusFloat200.0The distance in pixels at which the light is exactly intensity bright; inside it the light holds, beyond it falls off by falloff. Small is a bulb that burns a hot spot, large is a panel that lights evenly.
ml2_enableBoolfalseThis slot lights, or sits idle. A disabled slot keeps its knobs.
ml2_posFloat2[960.0, 270.0]Where the light sits on screen, in pixels (x from the left, y from the top). Drag it in the viewer, or on the ground-plane widget (Shift+drag for height).
ml2_depthFloat0.3How far from the camera the light sits, in the depth map's own units — smaller is nearer. A light at 0.3 sits in FRONT of a surface at 0.5 and lights it; behind it, it lights nothing that faces the camera.
ml2_intensityFloat2.0The light's brightness AT its falloff radius, scene-linear, times ml_weight — beyond the radius it falls off by falloff, inside it holds.
ml2_colorColor[1.0, 1.0, 1.0, 1.0]The light's colour.
ml2_falloffFloat2.0How the light fades with distance: 2 is inverse square (the physical law), lower reaches further, higher pools close to the source.
ml2_radiusFloat200.0The distance in pixels at which the light is exactly intensity bright; inside it the light holds, beyond it falls off by falloff. Small is a bulb that burns a hot spot, large is a panel that lights evenly.
ml3_enableBoolfalseThis slot lights, or sits idle. A disabled slot keeps its knobs.
ml3_posFloat2[480.0, 648.0]Where the light sits on screen, in pixels (x from the left, y from the top). Drag it in the viewer, or on the ground-plane widget (Shift+drag for height).
ml3_depthFloat0.3How far from the camera the light sits, in the depth map's own units — smaller is nearer. A light at 0.3 sits in FRONT of a surface at 0.5 and lights it; behind it, it lights nothing that faces the camera.
ml3_intensityFloat2.0The light's brightness AT its falloff radius, scene-linear, times ml_weight — beyond the radius it falls off by falloff, inside it holds.
ml3_colorColor[1.0, 1.0, 1.0, 1.0]The light's colour.
ml3_falloffFloat2.0How the light fades with distance: 2 is inverse square (the physical law), lower reaches further, higher pools close to the source.
ml3_radiusFloat200.0The distance in pixels at which the light is exactly intensity bright; inside it the light holds, beyond it falls off by falloff. Small is a bulb that burns a hot spot, large is a panel that lights evenly.
ml4_enableBoolfalseThis slot lights, or sits idle. A disabled slot keeps its knobs.
ml4_posFloat2[1440.0, 648.0]Where the light sits on screen, in pixels (x from the left, y from the top). Drag it in the viewer, or on the ground-plane widget (Shift+drag for height).
ml4_depthFloat0.3How far from the camera the light sits, in the depth map's own units — smaller is nearer. A light at 0.3 sits in FRONT of a surface at 0.5 and lights it; behind it, it lights nothing that faces the camera.
ml4_intensityFloat2.0The light's brightness AT its falloff radius, scene-linear, times ml_weight — beyond the radius it falls off by falloff, inside it holds.
ml4_colorColor[1.0, 1.0, 1.0, 1.0]The light's colour.
ml4_falloffFloat2.0How the light fades with distance: 2 is inverse square (the physical law), lower reaches further, higher pools close to the source.
ml4_radiusFloat200.0The distance in pixels at which the light is exactly intensity bright; inside it the light holds, beyond it falls off by falloff. Small is a bulb that burns a hot spot, large is a panel that lights evenly.
ml5_enableBoolfalseThis slot lights, or sits idle. A disabled slot keeps its knobs.
ml5_posFloat2[960.0, 810.0]Where the light sits on screen, in pixels (x from the left, y from the top). Drag it in the viewer, or on the ground-plane widget (Shift+drag for height).
ml5_depthFloat0.3How far from the camera the light sits, in the depth map's own units — smaller is nearer. A light at 0.3 sits in FRONT of a surface at 0.5 and lights it; behind it, it lights nothing that faces the camera.
ml5_intensityFloat2.0The light's brightness AT its falloff radius, scene-linear, times ml_weight — beyond the radius it falls off by falloff, inside it holds.
ml5_colorColor[1.0, 1.0, 1.0, 1.0]The light's colour.
ml5_falloffFloat2.0How the light fades with distance: 2 is inverse square (the physical law), lower reaches further, higher pools close to the source.
ml5_radiusFloat200.0The distance in pixels at which the light is exactly intensity bright; inside it the light holds, beyond it falls off by falloff. Small is a bulb that burns a hot spot, large is a panel that lights evenly.
ml6_enableBoolfalseThis slot lights, or sits idle. A disabled slot keeps its knobs.
ml6_posFloat2[288.0, 324.0]Where the light sits on screen, in pixels (x from the left, y from the top). Drag it in the viewer, or on the ground-plane widget (Shift+drag for height).
ml6_depthFloat0.3How far from the camera the light sits, in the depth map's own units — smaller is nearer. A light at 0.3 sits in FRONT of a surface at 0.5 and lights it; behind it, it lights nothing that faces the camera.
ml6_intensityFloat2.0The light's brightness AT its falloff radius, scene-linear, times ml_weight — beyond the radius it falls off by falloff, inside it holds.
ml6_colorColor[1.0, 1.0, 1.0, 1.0]The light's colour.
ml6_falloffFloat2.0How the light fades with distance: 2 is inverse square (the physical law), lower reaches further, higher pools close to the source.
ml6_radiusFloat200.0The distance in pixels at which the light is exactly intensity bright; inside it the light holds, beyond it falls off by falloff. Small is a bulb that burns a hot spot, large is a panel that lights evenly.
ml7_enableBoolfalseThis slot lights, or sits idle. A disabled slot keeps its knobs.
ml7_posFloat2[1632.0, 324.0]Where the light sits on screen, in pixels (x from the left, y from the top). Drag it in the viewer, or on the ground-plane widget (Shift+drag for height).
ml7_depthFloat0.3How far from the camera the light sits, in the depth map's own units — smaller is nearer. A light at 0.3 sits in FRONT of a surface at 0.5 and lights it; behind it, it lights nothing that faces the camera.
ml7_intensityFloat2.0The light's brightness AT its falloff radius, scene-linear, times ml_weight — beyond the radius it falls off by falloff, inside it holds.
ml7_colorColor[1.0, 1.0, 1.0, 1.0]The light's colour.
ml7_falloffFloat2.0How the light fades with distance: 2 is inverse square (the physical law), lower reaches further, higher pools close to the source.
ml7_radiusFloat200.0The distance in pixels at which the light is exactly intensity bright; inside it the light holds, beyond it falls off by falloff. Small is a bulb that burns a hot spot, large is a panel that lights evenly.
occlusionBoolfalseCast shadows from the depth map for the screen-space point lights: a march from each pixel toward the light through the depth; a surface nearer the camera than the ray occludes. Off is bit-identical to no shadows. (Light3D rig lights keep their P-buffer march under shadows.)
occ_stepsInt64Samples along each shadow ray. More is smoother and slower; 64 is fine at HD.
occ_strengthFloat1.0How dark full occlusion goes: 1 is black, 0.5 leaves half the light.
occ_softnessFloat0.03Over how much depth (in the map's units) the shadow ramps from nothing to full — a wider ramp is a softer edge and hides depth-map noise.
occ_max_distFloat600.0How far, in pixels, a shadow ray travels toward the light. Shorter is faster and only near occluders count.
occ_biasFloat0.0A surface must be nearer than the ray by more than this (depth units) to occlude — raise it when a surface shadows itself in a speckle.
rim_intensityFloat0.0A rim light: a Fresnel edge — (1 − N·V)^power — on the side the rim comes from, added as light. 0 is off. Its own AOV, relight.rim.
rim_colorColor[1.0, 1.0, 1.0, 1.0]The rim's colour.
rim_powerFloat3.0How tight the rim hugs the silhouette: 1 is a broad wrap, 3 a clear edge, 8 a hairline.
rim_azimuthFloat180.0Where the rim comes from, degrees around the vertical: 180 is straight behind the subject, 90 from screen right.
rim_elevationFloat10.0How high the rim comes from, degrees above the horizon.
outputChoicecombinedWhat the node puts out. combined is the lit picture (every source). lights is the point/directional lights alone, hdri diffuse / hdri specular the environment's two terms, rim the rim. The debug views put one thing in rgb so it can be LOOKED at: occlusion (the shadow term, white = lit), normals (as the shader saw them, 0–1 packed), depth (as read). dome + plate shows the HDRI as seen from the orbit camera with the plate over it by alpha — the view for lining an HDRI up. combinedlightshdri diffusehdri specularrimocclusionnormalsdepthdome + plate
orbit_yFloat0.0Dome view: the orbit camera's heading, degrees around the vertical.
orbit_xFloat0.0Dome view: the orbit camera's tilt, degrees above the horizon.
orbit_distanceFloat1.0Dome view: a zoom — 1 is a 60° vertical field of view, 2 is twice as tight.
normal_layerTextnormalThe layer carrying world-space normals. 'N' in most CG EXRs.
position_layerTextPThe layer carrying world-space positions. 'P' in most CG EXRs.
basecolor_layerTextbasecolorThe un-lit surface colour pass (scene-linear). PBRIngest produces it; missing = albedo, then the beauty.
albedo_layerTextalbedoThe un-lit surface colour pass. Missing = the beauty is relit instead, which double-counts the original lighting — fine for a quick augment, wrong for a true relight.
roughness_layerTextroughnessPer-pixel roughness pass (white = rough). Missing = the roughness knob value everywhere.
specular_layerTextspecularDielectric reflectance pass: F0 = 0.08 × specular. Missing = 0.5.
metallic_layerTextmetallicMetalness pass — metal kills diffuse and tints the specular with the basecolor. Missing = 0.
depth_layerTextdepthThe stream's depth layer (default depth), the 2.5D path's third axis when no P pass exists — or wire depth and the input wins.
roughnessFloat0.4Microfacet roughness for the GGX specular: low = tight hot highlights, high = broad soft sheen.
sl_typeChoicenoneThe built-in screen-space light — needs no 3D scene at all. directional: a sun set by azimuth/elevation. point: a bulb at pixel-XY plus a −5…5 depth. Stack more lights by chaining BS_Relight nodes in add mode, or wire real Light3Ds via lights. nonedirectionalpoint
sl_azimuthFloat0.0Screen light: degrees around the vertical — 0 lights from straight ahead, 90 from screen right.
sl_elevationFloat45.0Screen light: degrees above the horizon — 90 is straight down from above.
sl_colorColor[1.0, 1.0, 1.0, 1.0]The legacy single screen light's colour.
sl_intensityFloat1.0The legacy single screen light's brightness.
sl_xFloat0.5The legacy single point light's X, as a fraction of the frame width (0 left, 1 right). The Multi-Light rig supersedes it.
sl_yFloat0.5The legacy single point light's Y, as a fraction of the frame height (0 bottom, 1 top).
sl_depthFloat2.0Screen point light: how far off the image plane, −5 (behind the scene) to 5 (toward camera). Inverse-square falloff in the same units.
env_fileTextA latlong HDRI to light with — image-based lighting, and often the whole setup on its own. Prefiltered once per file (blurred for diffuse, roughness-blurred for reflections) and cached, so scrubbing costs nothing after the first frame. Its contribution comes out as the relight.environment layer.
env_intensityFloat0.0How bright the environment is. 0 turns it off entirely — no load, no work, no layer.
env_rotationFloat0.0Spin the environment around the vertical, in degrees. The way to line an HDRI's sun up with the plate without re-exporting it.
modeChoicereplacereplace rebuilds lighting from albedo × the new lights; add layers the new lights onto the existing beauty. replaceadd
mixFloat1.0Dissolves the effect back toward the input. 0 = off (bit-identical), 1 = full effect.
shadowsBooltrueScreen-space shadows for the Light3D rig's shadow-flagged lights: a march through the P pass toward each light (needs the camera named). The 2.5D lights use occlusion instead.
disabledBoolfalseBypass: the node passes its first input through untouched (D in the graph). The knobs keep their values for when it comes back.
labelTextA note shown under the node in the graph — what this node is FOR. Never affects the render or the cache.
hide_inputBoolfalseDraw the node without its input wire — a tidy graph for a node whose source is obvious (a Dot, a viewer tap).