Nodes/WAS Node Suite v3/Three Path Trace Render
ComfyUI Node Runs on cloud

Three Path Trace Render

Physically-correct renders, one bouncing photon at a time

By WASasquatch·Created 3 years ago·Updated 4 days ago· 1,844
Three Path Trace Render
  • app
  • images
  • depth
  • normal
  • frame_count
  • fps
width512
height512
transparentfalse
samples64
bounces5
num_frames1
start0.00
fps24
timeout300
transmissive_bounces10
filter_glossy0.00
tiles3
texture_size1024
depth_near0.0
depth_far0.0

Three Render rasterizes: it draws triangles fast and fakes the hard stuff. That's why soft shadows, color bleeding between surfaces, mirror reflections and refracting glass all look a bit "game engine." WASThreePathTraceRender takes the same scene and traces actual light paths - every pixel averages samples rays that bounce around the scene, and the effects come out of the geometry itself rather than being approximated. It's the difference between "good enough" and "product render."

How it works

Each pixel fires rays into the scene and averages what they hit. More samples per pixel means less noise: 16 is a rough look, 64 is a clean still-life, 512 gets clean through glass and caustics. Noise falls roughly for every four times the samples, so it's a classic time-vs-cleanliness trade. bounces sets how many surfaces one path may hit - 1 is direct light only, 5 suits most scenes, 12 for a room lit through a doorway.

This is a real GPU path tracer (three-gpu-pathtracer) running in your browser tab, and the outputs are the same as Three Render's - images, depth, normal - so a traced frame can still feed a ControlNet or a video saver. You also get frame_count and fps out for the video side. Set num_frames to 1 and it captures a still from start.

The inputs that matter

  • samples - traced paths per pixel. Where your time goes.
  • bounces and transmissive_bounces - the second lets light travel through glass (extra bounces inside it); 10 carries a path through a few panes, 0 turns glass black inside.
  • filter_glossy - roughens sharp reflections to settle the bright speckle they leave. 0.0 exact, 0.05 clears most speckle.
  • width / height - every pixel is traced samples times, so 512 costs a quarter of 1024. Start small.
  • tiles - splits each pass into tiles so no single chunk of work stalls the browser. Raise it when a run makes your UI freeze.

Where people get burned

Two gotchas, both spelled out in the node's own description. First, the path tracer only sees Three Environment, emissive materials, and directional/point/spot lights. Ambient and hemisphere lights are not traced - a scene lit only by those renders black. Second, this rendering happens in an open ComfyUI tab, so a tab has to be open and the graph queued from it; a headless run fails with a message rather than hanging. The effect chain, antialias and supersample settings from Three App are ignored here.

There's also the timeout to respect - a traced frame takes far longer than a drawn one, so 300 seconds suits a still, and a long animated run at high samples wants thousands. When in doubt, use Three Path Trace Viewer to nail the framing and light first, then commit to this node for the actual frames.

Install

WASThreePathTraceRender is one of the 43 Three nodes in WAS Node Suite v3. Install via ComfyUI Manager (search WAS Node Suite v3) or:

cd ComfyUI/custom_nodes
git clone https://github.com/WASasquatch/was-node-suite-comfyui.git

Restart after. ComfyUI 0.14.0+ and Python 3.10+ required; the three.js and pathtracer libraries ship inside the pack, so nothing downloads. Missing from Add Node? Set features.threejs: true in <ComfyUI user dir>/was-node-suite/config.yaml.

CategoryWAS Suite/Three

Inputs (16)

NameTypeDefaultDescription
appTHREE_APPThe scene, camera and renderer settings, from Three App.
widthINT51216–8192Frame width in pixels. Every pixel is traced `samples` times, so 512 costs a quarter of what 1024 does.
heightINT51216–8192Frame height in pixels. 512 with a 512 width is square; the camera fits its view to this shape.
transparentBOOLEANfalse`true` leaves the background clear and returns alpha; `false` fills it with the scene's background colour.
samplesINT641–10000Traced paths averaged per pixel. 16 is a rough look, 64 a clean still-life, 512 clean through glass and caustics. Noise halves for every four times this number.
bouncesINT51–30How many surfaces one path may hit. 1 is direct light only, 5 suits most scenes, 12 for a room lit through a doorway.
num_framesINT11–512How many frames to trace. 1 captures `start` alone as a still. `fps` times Three App's loop_seconds is one whole loop, so 96 at 24 a second covers a 4 second loop, at 96 times the cost of a still.
startFLOAT0.000–3600Seconds into the animation the first frame is taken at. 0.0 is the pose the scene starts in.
fpsFLOAT240.01–1000Frames a second. It sets how densely the animation is sampled, never how fast it moves. 24.0 over 96 frames is four seconds. Give the same number to a video saver, or wire the fps output straight into it.
timeoutFLOAT3001–86400Seconds to wait for the whole run before giving up. A traced frame takes far longer than a drawn one, so 300.0 suits a still and a long run of frames wants thousands.
transmissive_bouncesINT100–60Extra bounces allowed inside glass, on top of `bounces`. 10 carries a path through a few panes; 0 turns glass black inside.
filter_glossyFLOAT0.000–1Roughens sharp reflections to settle the bright speckle they leave. 0.0 is exact, 0.05 clears most speckle, 0.5 visibly blurs highlights.
tilesINT31–16Splits each pass into this many tiles across and down, so one piece of work is short enough not to stall the browser. 3 gives nine tiles. Raise it where a frame is large enough to time the tab out.
texture_sizeINT102416–8192Size every texture in the scene is fitted to for tracing. 1024 suits most work; 2048 keeps fine detail in a close-up, at more memory.
depth_nearFLOAT0.00–100000Distance the depth pass calls white. 0.0 fits it to what is in shot.
depth_farFLOAT0.00–100000Distance the depth pass calls black. 0.0 fits it to what is in shot.

Outputs (5)

NameTypeDescription
imagesIMAGEThe traced frames, as one batch in time order. RGBA where transparent was on, RGB otherwise.
depthIMAGEThe same frames as distance from the camera, white for near. Drawn rather than traced, and feeds a depth ControlNet.
normalIMAGEThe same frames as the direction each surface faces, in the tangent-space layout a normal ControlNet reads.
frame_countINTHow many frames each batch holds, which is num_frames.
fpsFLOATThe frame rate the frames were taken at, for a video saver's own fps so the two cannot disagree.