Three-gpu-pathtracer: A modular shader-based path tracing extension for three.js!

Wow, just this specific feature opens up so many possibilities!! Amazing work as always :clap:

1 Like

Thanks! Yeah the HDR rendering is neat - there’s no requirement to do it with path tracing, either. Any floating point render target can be encoded to an HDR gainmap. The downside is that it’s a bit slow so it can’t happen in real time. We’ll have to wait for some canvas and WebGL upgrades for that.

its amazing how threejs bvh can render photorealistic like these on a browser, few years from now these renderings will be the norm on openworld threejs verse games or virtual exploration for showcasing architectural or real estate projects, looking forward to that future.

This helps me a lot, ease to use. :smiling_face_with_three_hearts:

2 Likes

Awesome! Here is a use case for optics/optomechanics (i.e., 3D animated optics).

I’ve used three-gpu-pathtracer v0.0.23 to create an online demonstration featuring optical prisms. The result is mindblowing, accurately capturing the multiple reflections and refractions of real-world optical elements. For example, below is the rendering for a panoramic telescope, an optical instrument with a right-angle prism, a Dove prism, and an Amici roof prism. The output is similar to what KeyShot 9 can achieve. I’ve published this project on GitHub, using three-gpu-pathtracer v0.0.23 renderer.

I generated an animated glTF file in Blender and adapted the script to handle automated rendering after each frame update.

Panoramic Telescope

4 Likes

The rendering is amazing, but is extremely taxing on hardware resource. when I run the demo, my macbook pro goes into 80-90 degree celcius territory.

it would be great if you can do some optimization shortcut so hat regular folk can run on their old computer or mobile phone. Maybe use some techniques, screen space, texture mapping, to achieve similar result with less demand on hardware.

thank you. great work

Pathtracing is an inherently GPU intensive process.

The “optimizations” you described are basically what webGL is without path tracing.

2 Likes

well that is not completely true. There must be techniques and/or short-cuts to simulate near path tracing result. Otherwise Unreal and Unity would not exists. Stuff use in these real time engine is lacking in WebGL and Threejs. They can make scene look better but require very advance shader most 3d programmers cannot do.

Please google: “Does unreal use path tracing” and “Does unity use pathtracing”.

Specifically the parts about:
Yes, Unreal Engine does use path tracing, but it's not a real-time feature.

and:

Real-time Considerations:
While path tracing (in Unity) produces high-quality results, it is generally not a real-time rendering technique and may require significant rendering time, especially for complex scenes.
4 Likes