HRLW Path Tracer TOP
Docs / Chapter 2 · TOP

HRLW Path Tracer TOP

Replaces The Render TOP. It takes the place of the Render TOP and of the Phong/PBR shading, shadow maps and post-processing you would build around it. It still reads your Camera COMP, Light COMPs, Ambient Light COMPs and Environment TOP, so lighting and camera setups carry over. The HRLW Geometry POP takes the place of the Geometry COMP (Chapter 1).

Operator type Hrlwpathtracer, label HRLW Path Tracer. The Geometry, Volume Solver, Liquid, Whitewater, Bodies and Fracture operators share its GPU data, so keep all HRLW plugin files together in one folder.

What it does#

Renders POP geometry, grid volumes and the Volume Solver's smoke and fire using NVIDIA OptiX 9.1, with:

  • real-time lighting through ReSTIR (Direct, and optionally Direct + Indirect "path reuse"),
  • DLSS Ray Reconstruction (fast) or the OptiX denoiser,
  • glass with exact Fresnel and dispersion, caustics, subsurface scattering, clear coat, sheen, iridescence,
  • fire, smoke and plasma volumes, depth of field, motion blur, bloom and lens effects,
  • an optional fast Stylized engine (ramps, outlines).

Quick start (beginner)#

  1. Put an HRLW Path Tracer TOP next to one or more HRLW Geometry POPs (Chapter 1).

  2. Add a Camera COMP. The TOP's Camera COMP field and Use Camera's View Settings (on) read its field of view, projection and window, so nothing needs to be referenced by hand.

  3. Light it, in any combination:

    • one or more Light COMPs (point, cone, distant; Light COMPs field * takes every light next to the TOP);
    • an Environment TOP (a lat-long HDRI) in Environment TOP on the Lighting page; turn on Sample Environment as Light for HDRIs with a small bright sun;
    • or just the built-in Sun (Lighting page).
  4. Pick a Quality Preset (Render page):

    Samples Edge Bounces Glass Volume Scale Max samples History Path reuse Clamp
    Draft 1 0 2 4 2 Half 256 16 off 5
    Realtime 1 0 3 6 2 Quality (67%), DLSS-RR 1024 16 off 10
    Interactive 1 2 4 8 4 Full 1024 16 off 10
    Final 4 4 8 16 8 Full 4096 32 on 20

    The default is Interactive with the DLSS-RR denoiser. A preset sets all of those once, a frame after you pick it; change any of them afterwards and the menu goes back to Custom, which touches nothing. Realtime is for liquid, smoke and fire together at frame rate.

  5. First start after an update: the renderer compiles a pipeline in the background (a minute or two the first time). The TOP is black and says so in a warning; TouchDesigner stays responsive. Later starts take a second.

When the camera is still, the image accumulates and gets cleaner; moving anything restarts or reprojects it. This is normal path tracer behaviour, not a bug.

What is on each page#

Page What is on it
Render HRLW Geometry POPs (which streams to render), Engine (Path Tracer / Stylized), Quality Preset, Camera COMP, Use Camera's View Settings, FOV and FOV Axis (without camera view), Samples per Frame, Extra Samples on Edges, Accumulate, Max Samples, Reproject While Moving, History Length, Render Scale, Dynamic Resolution (GPU Budget, Min Render Scale), Max Bounces, Max Glass Bounces, Caustics, Reset Accumulation, Units per Metre (scene scale, used by depth of field and by the HRLW Geometry POPs' material presets)
Output Denoiser, DLSS-RR Mode / Preset, DLSS-RR Current Frame Bias, Motion Vectors on Moving Liquid Surfaces, Exposure, Auto Exposure (AE Speed / Min / Max), Debug View, Tonemap, Show Solver Bounds
Lighting Environment TOP, Background, Background Color, Light COMPs, Light Falloff, Light Intensity Scale, Light Size, Sky Color, Environment Intensity / Rotate, Sun (direction, colour, intensity, angular radius), Sample Environment as Light, Sample Emissive Triangles, ReSTIR (Light Candidates, Spatial Reuse), ReSTIR Path Reuse, Path Guiding
Camera Depth of Field (Aperture as diameter or F-stop, Focus Distance or Focus COMP or Autofocus), Motion Blur (Shutter)
Volume Density Scale, Volume Emission Scale, Max Volume Bounces, Sample Volume Glow as Light
Fire Look Preset, Volume TOP (the Volume Solver, or any 3D texture), smoke and fire colour, detail noise, filtering, shadow ray mode, plasma glow, DLSS-RR smoke settings. Greyed out while no Volume TOP is found.
Stylized ramps, bands, specular, rim, AO, bounce light, outlines
Post bloom, lens flare, lens dirt, chromatic aberration, distortion, vignette, sharpen, grading, film grain
Advanced History Clamp, Clamp Indirect, Changing Mesh BVH, Specialize Pipelines, Auto-tune Registers, Max Registers, Cluster BVH for Large Changing Meshes, OptiX Temporal Denoise, OptiX Denoise Every N Frames, OptiX Denoise Blend, Majorant Blocks

Materials, texture maps, line style and point settings are per scene, on each HRLW Geometry POP (Chapter 1).

Things you will want to know (beginner)#

Scenes. HRLW Geometry POPs takes names/paths separated by spaces: * (default; every one next to the TOP), hair* body, /project1/geo/*, * ^debug*. All named streams merge into one scene on the GPU. Anything named that is not an HRLW Geometry POP is skipped with a warning.

Lights. TD Light and Ambient Light COMPs are read directly: point, cone and distant lights use colour × dimmer, cone angle/delta/roll and attenuation; ambient adds uniform light to bounces. A new light shows up within half a second. Light Intensity Scale and Light Size (soft shadows) apply to all. The sun gets its own shadow ray at every bounce.

Camera. With Use Camera's View Settings on, the Camera COMP's View page drives the render (Horizontal / Vertical FOV or Focal Length + Aperture, orthographic or perspective, window pan/zoom/roll). Off, or when the object isn't a Camera COMP, the TOP's own FOV and FOV Axis apply.

Exposure. Exposure (EV) is a plain gain. Auto Exposure meters the image and eases toward mid grey, with Exposure acting as compensation. It is applied after rendering, so it never restarts accumulation.

Denoising. DLSS-RR (Ray Reconstruction) is the fast path and the recommended choice at interactive rates. DLSS-RR Mode picks the render resolution (DLAA 100%, Ultra Quality 77%, Quality 67%, Balanced 58%, Performance 50%, Ultra Performance 33%); Preset picks the model (Default, D, E, F). The OptiX denoiser is the alternative; with a still view it denoises every frame for the first 16 samples, then every N frames.

Dynamic Resolution. Keeps GPU time near GPU Budget ms by changing the render scale in 5% steps; each step restarts accumulation. Render Scale is greyed out while it is on.

Debug views (Output page): Albedo, Normals, Motion, GPU Cost per Pixel (blue cheap, red expensive) and more. Debug views skip the Post page.

Fire and smoke page#

The Volume TOP field takes a 3D texture: R smoke density, G temperature, B flame, A optional plasma (all 0..1). Use the HRLW Volume Solver TOP (Chapter 5), or any 3D texture from a GLSL TOP. It takes names, paths and patterns like HRLW Geometry POPs; the default * finds the Volume Solver next to the TOP. One volume renders: with several matches the first is used and the TOP warns. Volume Center / Size and Volume Transform COMP place the box (greyed when the Volume Solver supplies it).

Look Preset (top of the page) defaults to From Volume Solver, which follows the look of the solver's own preset (a candle solver renders as a candle). The others set the look once and go back to Custom when you edit a value: Fire, Candle, Oil Fire, Smoke Only, Dark Smoke Only, Steam / White Smoke, and flame-colour gradients: Blue Gas Flame, Green (copper, boron), Red (strontium, lithium), Purple (potassium), Yellow (sodium), White (magnesium), Magic.

Key controls: Smoke Density / Color / Anisotropy, Fire Intensity, Fire Color (Blackbody between Coldest and Hottest Temperature in kelvin, Fire Ramp TOP, or Gradient), Glow Falloff, Fire Brightness From (Temperature or Flame Channel), Smoke Inside Flames, Detail / Detail Size / Detail Speed, Volume Filtering (Smooth or Linear), Majorant Blocks (Fine/Coarse), Shadow Rays in Smoke (Fast / Low Noise), Plasma Glow / Color, Alpha Is Plasma, Motion Blur Amount, DLSS-RR Current Frame Bias, DLSS-RR Smoke Normals.

Cleaner fire, cheapest first: DLSS-RR Current Frame Bias 0.2 to 0.3 for slow gas; Detail 0.3 to 0.6 with Detail Size about two voxels; Render Scale Full; Volume Filtering Smooth; more Vorticity or Sharp Velocity in the solver; higher solver Resolution; Samples per Frame 2.

Stylized engine (non-photoreal)#

Engine: Stylized swaps the path tracer for a fast, ray-traced toon renderer on the same scenes, attributes and lights: one camera ray per sample, no bounces, exact crisp shadows.

  • Ramps: each light's N·L (half-Lambert or Lambert), minus its shadow, looks up the Ramp TOP's middle row (left = unlit). A Ramp TOP set to Horizontal works directly. Each texture set can have its own ramp (Ramp TOP on the HRLW Geometry POP's Maps pages). Without a ramp, Bands tone from Shadow Color to white (Band Softness). Ramp Offset moves the terminator; Shadow Strength sets how far shadows go.
  • Specular and rim: flat highlight (Specular Color, Size, Softness) and a rim along silhouettes (Rim Color, Rim Width).
  • Ambient and AO: Ambient Color, the environment, and AO Rays per Sample out to AO Distance with AO Strength.
  • Bounce Light (0 = off): colour bleeding and emissive surfaces lighting their surroundings.
  • Outlines: Outline Width, Outline Color, Outline Depth Threshold, Outline Crease Angle; the Outline and OutlineGroup attributes scale and group them.
  • Not applied in Stylized: volumes, subsurface, layers, ReSTIR, path reuse, bounces.

Debug overlay#

Debug Overlay (Output page) draws the Harlow version, fps, the render's timings, the cook's CPU time against the GPU frame time (a CPU number close to the frame time means TouchDesigner's main thread, not the GPU, is the limit), samples, rays per pixel, points, triangles, free GPU memory and DLSS over the top-left of the image, then every channel of Overlay CHOP (point it at an Info CHOP, or several merged), up to 64 lines. Overlay Size scales it. It's drawn into the output, so recordings keep it.

Post page#

Works on the final HDR image, before the tonemap, at output resolution; none of it restarts accumulation and each effect is off at 0.

Effect Controls TouchDesigner equivalent
Bloom Bloom Threshold, Knee, Bloom Size, Bloom Tint Bloom TOP
Lens flare Flare Ghosts, Spacing, Halo Radius, Color Separation (no direct equivalent)
Lens dirt a TOP × Lens Dirt Intensity
Chromatic aberration, lens distortion % at corners; barrel > 0, pincushion < 0 Lens Distort TOP
Vignette, sharpen natural cos⁴ falloff; sharpen on luminance
Grading Temperature, Tint, Saturation, Contrast in linear before the tonemap Level TOP / HSV Adjust TOP
Film grain after the tonemap, strongest in mid tones Noise TOP overlay

Advanced#

Glass and caustics. Refraction uses exact Fresnel and Snell's law. Dispersion follows one wavelength per path, taken from a rotated golden-ratio sequence. Caustics (Render page, off) adds manifold next-event estimation: light focused through smooth glass or water (Roughness below 0.1, not thin-walled, at most two surfaces between the point and the light) onto rough surfaces. It costs a light sample and about 3 to 15 rays at each rough surface.

Lighting algorithms. Sun: own shadow ray per bounce. Other lights share one light sample per bounce, picked by a rough brightness estimate, combined with BSDF sampling (MIS). Sample Emissive Triangles builds a GPU light tree over emissive geometry. ReSTIR Direct Lighting resamples Light Candidates down to one per pixel with temporal and Spatial Reuse; visibility is never reused. ReSTIR Path Reuse (off by default) adds Direct + Indirect reuse at about 410 bytes per rendered pixel (about 850 MB at 1080p), only in scenes without volumes, for the first 64 samples of accumulation. Path Guiding from Reused Paths needs it.

Pipeline specialisation. Every combination of features a frame uses gets its own compiled pipeline with everything else removed. New combinations compile in the background while the generic pipeline keeps rendering. The Info CHOP's pipeline is 2 when specialised, 1 while compiling, 0 for the generic one. Path reuse, path guiding and cluster BVHs exist only in specialised pipelines: with Specialize Pipelines off they are off. Auto-tune Registers tries register limits 128/112/96/80/OptiX default and keeps the fastest.

Frame budget. Info CHOP: scene_ms (BVH builds, uploads), trace_ms, post_ms (denoiser, resolve), prep_ms. Look at which dominates before changing settings. Windows resets the GPU driver after about 2 seconds of one GPU program (TDR), so slow frames are traced in shorter launches. Samples per Frame is capped at 64 and Extra Samples on Edges at 16 for the same reason. Costly options: Depth of Field, Motion Blur, Extra Samples on Edges, ReSTIR Light Candidates, Path Reuse, OptiX 2x upscaling (DLSS-RR is much cheaper).

Logging and crashes. The renderer writes a log file to %TEMP% (the previous session's log is kept beside it with .prev in its name). It records GPU and driver, scene sizes, pipeline compiles, errors, EXCEPTION, FATAL: and HANG: lines with call stacks, and a watchdog message when a frame runs past 0.5, 1 and 1.5 s. A .compiling marker file next to the log exists while a risky pipeline compiles; if the compiler took TouchDesigner down, the next start leaves cluster BVHs, then path reuse and guiding, off for that session. For a crash that keeps coming back, set HRLW_OPTIX_VALIDATION=1 before starting TouchDesigner (much slower; device-side errors go to the log).

Memory. With very large scenes keep a few GB of VRAM free; Windows spills to system memory and frames slow to a crawl. Info CHOP: gpu_free_mb.

Motion and edges. Reprojection follows the nearest surface's motion at edges; behind mirrors and clear glass, motion vectors follow what is seen through them. History is resampled with a Catmull-Rom filter. For solver output, Pprev supplies motion vectors. Motion blur uses a second, slightly slower pipeline only while geometry moves.

DLSS-RR and gas. Smoke and fire are in the DLSS guides (albedo, normals, depth, motion), so RR denoises the gas as what the pixel shows. DLSS-RR Smoke Normals From the Smoke's Shape gives crisp, sculpted billows. Liquids and smooth absorbing glass add their Beer-Lambert colour to the guides. DLSS-RR Current Frame Bias (moving glass, liquids) (Output page, 0.25) controls trails behind moving liquid.