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
- Wire the plate; wire
normalsanddepthimages (or let the node read the stream's layers). Set the Setup page if the normals are packed 0–1 or flipped. - 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.
- Turn on
occlusionfor depth-map shadows; add arim; wire anhdrifor environment light. outputviews isolate each term;dome + platelines an HDRI up.modereplace or add,mixto fade, amaskto limit.
Inputs
| Input | What it takes |
|---|---|
| in | the image this node works on |
| normals | — |
| depth | — |
| hdri | — |
| mask | limits the effect to this matte — the engine's universal mask slot, applied for every node that declares it |
Outputs
| Output | Type |
|---|---|
| out | Image |
Parameters
| Parameter | Type | Default | What it does |
|---|---|---|---|
| slot | Int | 0 | The live-stream slot this node reads. Slots are process-wide; the same number in two nodes is the same stream. |
| lights | Text | The 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. | |
| camera | Text | The 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_01 | Bool | false | The 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_x | Bool | false | Negate the normals' X — a vendor whose right is our left. |
| flip_y | Bool | false | Negate the normals' Y — DirectX-style normal maps have Y down. |
| flip_z | Bool | false | Negate the normals' Z — a pass whose normals face AWAY from camera lights nothing until this is on. |
| depth_scale | Float | 1.0 | Multiply 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_depth | Bool | false | The depth pass has far = 0 and near = 1 (some kits deliver it that way): flip it so near is small. |
| depth_near | Float | 0.0 | The ground-plane widget's near edge, in depth units — only the widget's range, nothing in the shading. |
| depth_far | Float | 1.0 | The ground-plane widget's far edge, in depth units — only the widget's range. |
| actor_depth | Float | 0.5 | Where 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_grid | Bool | true | Draw the ground-plane widget's grid. |
| show_trails | Bool | true | Draw the selected light's keyed path over the surrounding 48 frames on the widget. |
| ml_count | Int | 1 | How 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_weight | Float | 1.0 | A gain on every multi-light slot at once — balance the rig against the HDRI or the plate without touching each light. |
| terminator | Float | 0.0 | Softness 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_selected | Int | 0 | Which slot the widget's knobs show (click a light). |
| ml0_enable | Bool | true | This slot lights, or sits idle. A disabled slot keeps its knobs. |
| ml0_pos | Float2 | [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_depth | Float | 0.3 | How 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_intensity | Float | 2.0 | The light's brightness AT its falloff radius, scene-linear, times ml_weight — beyond the radius it falls off by falloff, inside it holds. |
| ml0_color | Color | [1.0, 1.0, 1.0, 1.0] | The light's colour. |
| ml0_falloff | Float | 2.0 | How the light fades with distance: 2 is inverse square (the physical law), lower reaches further, higher pools close to the source. |
| ml0_radius | Float | 200.0 | The 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_enable | Bool | false | This slot lights, or sits idle. A disabled slot keeps its knobs. |
| ml1_pos | Float2 | [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_depth | Float | 0.3 | How 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_intensity | Float | 2.0 | The light's brightness AT its falloff radius, scene-linear, times ml_weight — beyond the radius it falls off by falloff, inside it holds. |
| ml1_color | Color | [1.0, 1.0, 1.0, 1.0] | The light's colour. |
| ml1_falloff | Float | 2.0 | How the light fades with distance: 2 is inverse square (the physical law), lower reaches further, higher pools close to the source. |
| ml1_radius | Float | 200.0 | The 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_enable | Bool | false | This slot lights, or sits idle. A disabled slot keeps its knobs. |
| ml2_pos | Float2 | [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_depth | Float | 0.3 | How 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_intensity | Float | 2.0 | The light's brightness AT its falloff radius, scene-linear, times ml_weight — beyond the radius it falls off by falloff, inside it holds. |
| ml2_color | Color | [1.0, 1.0, 1.0, 1.0] | The light's colour. |
| ml2_falloff | Float | 2.0 | How the light fades with distance: 2 is inverse square (the physical law), lower reaches further, higher pools close to the source. |
| ml2_radius | Float | 200.0 | The 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_enable | Bool | false | This slot lights, or sits idle. A disabled slot keeps its knobs. |
| ml3_pos | Float2 | [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_depth | Float | 0.3 | How 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_intensity | Float | 2.0 | The light's brightness AT its falloff radius, scene-linear, times ml_weight — beyond the radius it falls off by falloff, inside it holds. |
| ml3_color | Color | [1.0, 1.0, 1.0, 1.0] | The light's colour. |
| ml3_falloff | Float | 2.0 | How the light fades with distance: 2 is inverse square (the physical law), lower reaches further, higher pools close to the source. |
| ml3_radius | Float | 200.0 | The 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_enable | Bool | false | This slot lights, or sits idle. A disabled slot keeps its knobs. |
| ml4_pos | Float2 | [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_depth | Float | 0.3 | How 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_intensity | Float | 2.0 | The light's brightness AT its falloff radius, scene-linear, times ml_weight — beyond the radius it falls off by falloff, inside it holds. |
| ml4_color | Color | [1.0, 1.0, 1.0, 1.0] | The light's colour. |
| ml4_falloff | Float | 2.0 | How the light fades with distance: 2 is inverse square (the physical law), lower reaches further, higher pools close to the source. |
| ml4_radius | Float | 200.0 | The 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_enable | Bool | false | This slot lights, or sits idle. A disabled slot keeps its knobs. |
| ml5_pos | Float2 | [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_depth | Float | 0.3 | How 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_intensity | Float | 2.0 | The light's brightness AT its falloff radius, scene-linear, times ml_weight — beyond the radius it falls off by falloff, inside it holds. |
| ml5_color | Color | [1.0, 1.0, 1.0, 1.0] | The light's colour. |
| ml5_falloff | Float | 2.0 | How the light fades with distance: 2 is inverse square (the physical law), lower reaches further, higher pools close to the source. |
| ml5_radius | Float | 200.0 | The 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_enable | Bool | false | This slot lights, or sits idle. A disabled slot keeps its knobs. |
| ml6_pos | Float2 | [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_depth | Float | 0.3 | How 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_intensity | Float | 2.0 | The light's brightness AT its falloff radius, scene-linear, times ml_weight — beyond the radius it falls off by falloff, inside it holds. |
| ml6_color | Color | [1.0, 1.0, 1.0, 1.0] | The light's colour. |
| ml6_falloff | Float | 2.0 | How the light fades with distance: 2 is inverse square (the physical law), lower reaches further, higher pools close to the source. |
| ml6_radius | Float | 200.0 | The 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_enable | Bool | false | This slot lights, or sits idle. A disabled slot keeps its knobs. |
| ml7_pos | Float2 | [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_depth | Float | 0.3 | How 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_intensity | Float | 2.0 | The light's brightness AT its falloff radius, scene-linear, times ml_weight — beyond the radius it falls off by falloff, inside it holds. |
| ml7_color | Color | [1.0, 1.0, 1.0, 1.0] | The light's colour. |
| ml7_falloff | Float | 2.0 | How the light fades with distance: 2 is inverse square (the physical law), lower reaches further, higher pools close to the source. |
| ml7_radius | Float | 200.0 | The 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. |
| occlusion | Bool | false | Cast 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_steps | Int | 64 | Samples along each shadow ray. More is smoother and slower; 64 is fine at HD. |
| occ_strength | Float | 1.0 | How dark full occlusion goes: 1 is black, 0.5 leaves half the light. |
| occ_softness | Float | 0.03 | Over 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_dist | Float | 600.0 | How far, in pixels, a shadow ray travels toward the light. Shorter is faster and only near occluders count. |
| occ_bias | Float | 0.0 | A 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_intensity | Float | 0.0 | A 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_color | Color | [1.0, 1.0, 1.0, 1.0] | The rim's colour. |
| rim_power | Float | 3.0 | How tight the rim hugs the silhouette: 1 is a broad wrap, 3 a clear edge, 8 a hairline. |
| rim_azimuth | Float | 180.0 | Where the rim comes from, degrees around the vertical: 180 is straight behind the subject, 90 from screen right. |
| rim_elevation | Float | 10.0 | How high the rim comes from, degrees above the horizon. |
| output | Choice | combined | What 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_y | Float | 0.0 | Dome view: the orbit camera's heading, degrees around the vertical. |
| orbit_x | Float | 0.0 | Dome view: the orbit camera's tilt, degrees above the horizon. |
| orbit_distance | Float | 1.0 | Dome view: a zoom — 1 is a 60° vertical field of view, 2 is twice as tight. |
| normal_layer | Text | normal | The layer carrying world-space normals. 'N' in most CG EXRs. |
| position_layer | Text | P | The layer carrying world-space positions. 'P' in most CG EXRs. |
| basecolor_layer | Text | basecolor | The un-lit surface colour pass (scene-linear). PBRIngest produces it; missing = albedo, then the beauty. |
| albedo_layer | Text | albedo | The 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_layer | Text | roughness | Per-pixel roughness pass (white = rough). Missing = the roughness knob value everywhere. |
| specular_layer | Text | specular | Dielectric reflectance pass: F0 = 0.08 × specular. Missing = 0.5. |
| metallic_layer | Text | metallic | Metalness pass — metal kills diffuse and tints the specular with the basecolor. Missing = 0. |
| depth_layer | Text | depth | The 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. |
| roughness | Float | 0.4 | Microfacet roughness for the GGX specular: low = tight hot highlights, high = broad soft sheen. |
| sl_type | Choice | none | The 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_azimuth | Float | 0.0 | Screen light: degrees around the vertical — 0 lights from straight ahead, 90 from screen right. |
| sl_elevation | Float | 45.0 | Screen light: degrees above the horizon — 90 is straight down from above. |
| sl_color | Color | [1.0, 1.0, 1.0, 1.0] | The legacy single screen light's colour. |
| sl_intensity | Float | 1.0 | The legacy single screen light's brightness. |
| sl_x | Float | 0.5 | The legacy single point light's X, as a fraction of the frame width (0 left, 1 right). The Multi-Light rig supersedes it. |
| sl_y | Float | 0.5 | The legacy single point light's Y, as a fraction of the frame height (0 bottom, 1 top). |
| sl_depth | Float | 2.0 | Screen point light: how far off the image plane, −5 (behind the scene) to 5 (toward camera). Inverse-square falloff in the same units. |
| env_file | Text | A 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_intensity | Float | 0.0 | How bright the environment is. 0 turns it off entirely — no load, no work, no layer. |
| env_rotation | Float | 0.0 | Spin the environment around the vertical, in degrees. The way to line an HDRI's sun up with the plate without re-exporting it. |
| mode | Choice | replace | replace rebuilds lighting from albedo × the new lights; add layers the new lights onto the existing beauty. replaceadd |
| mix | Float | 1.0 | Dissolves the effect back toward the input. 0 = off (bit-identical), 1 = full effect. |
| shadows | Bool | true | Screen-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. |
| disabled | Bool | false | Bypass: the node passes its first input through untouched (D in the graph). The knobs keep their values for when it comes back. |
| label | Text | A note shown under the node in the graph — what this node is FOR. Never affects the render or the cache. | |
| hide_input | Bool | false | Draw the node without its input wire — a tidy graph for a node whose source is obvious (a Dot, a viewer tap). |