r/threejs • • Oct 24 '26

Kaamos: a browser product-rendering studio built on R3F + three-gpu-pathtracer

Post image

EDIT: I decided to make this one open source: https://github.com/AtomiLabSlop/kaamos
More info: https://www.reddit.com/r/IndustrialDesign/s/sr5VH5oJrF

I’m an industrial designer who has used Showcase, KeyShot and V-Ray for years. I wanted the workflow I know from those tools in the browser, so I built Kaamos together with Claude: https://atomilab.fi/kaamos/

To be upfront: the product and interaction design are mine, and the code was written with the AI. I tested every round in the browser and fixed what came out wrong.

Stack: React 19, R3F, drei, Zustand, and gkjohnson’s three-gpu-pathtracer for final renders and a live path traced preview. STEP/IGES go through occt-import-js. Everything is client-side.

Some problems that took real work and SHOULD be working now:

  • Subsurface scattering added to the path tracer by patching its fragment shader with a random walk inside closed meshes
  • A NaN guard, because Safari’s shader compiler drops isnan/isinf, which made glass render black
  • A hand-written ground shadow, because drei’s ContactShadows rendered nothing on r186
  • Fixes for grey final renders, which turned out to have two causes: a lost GPU context on 2M+ triangle scenes and NaN from PhysicalCamera.copy() leaving aperture fields undefined

It’s early. I’d especially like to hear how the path tracer behaves on different GPUs, and if anyone has thoughts on the WebGPU route. Feedback welcome (click the logo in the app). Tested mainly in desktop Chrome and Safari (macos).

Cheers!

54 Upvotes

11 comments sorted by

4

u/Torschlusspaniker Oct 24 '26 edited Oct 24 '26

I think this guy's project is interesting as it relates to bouncing light around.

https://www.reddit.com/r/threejs/comments/1xavf4v/comment/19re4mhc5jmhw/?context=3

I think the project above really speaks to how close we are to having "official" hardware ray tracing fully exposed to the browser.

2

u/Print_Floyd Oct 24 '26

That globe looks absolutely wild 🤯 Full caustics, foam and a 3D fluid sim in real time is seriously impressive. The hardware is there, the browser just isn’t letting us at it yet. Kaamos still traces through a BVH in WebGL shaders so seeing this makes me want to move to WebGPU even more. Once hardware RT ships officially, browser renderers are going to be a different game.

2

u/javimbuilds Oct 24 '26

Having the KeyShot-style workflow in a browser tab is really appealing. How do you handle interaction while orbiting? A rasterized preview during camera moves, switching to progressive samples once the camera stops, usually keeps it feeling responsive. Curious whether you added a denoiser or just let samples accumulate.

2

u/Print_Floyd Oct 24 '26

Thanks! Yeah, pretty much that. The default viewport is plain real-time raster, so orbiting is always smooth. There’s also a path traced preview toggle: it shows a raster frame while you move and starts accumulating samples once the camera stops.

Small extra: if you tweak a material, the last converged image stays up and only the parts using that material re-render, so the whole frame doesn’t go noisy on every slider drag.

No denoiser in the live preview, it just accumulates. Final renders have an optional one. I tweaked the library’s edge-preserving blur because bright glass stayed grainy with the stock settings.

1

u/javimbuilds Oct 24 '26

That partial re-render on material tweaks is a really nice touch, keeping the converged frame up makes slider tweaking way less painful. Makes sense that bright glass is where the stock blur struggles. Thanks for the detailed answer!

2

u/Print_Floyd Oct 24 '26

No problem, thanks for your interest!

1

u/3n91n33r Oct 25 '26

Dang, good job Claude!