Hello! Over the last several months I’ve been working on a high fidelity, physically based path tracer based on my three-mesh-bvh project and have just released the initial version! It includes material features such as transmission, textures, normal maps, metalness, GGX specularity, environment maps, tiled rendering, and more! There are a few demos to check out in the repo here:
It works by packing the BVH and geometry details into textures and implementing a raycasting algorithm in a shader to path trace the scene. There’s still a lot more to do to improve performance, compatibility with three.js meshes and materials, and generally improve the quality of the project so I welcome anyone who is interested in contributing to come learn with me! I’m happy to offer guidance and point people in the right direction to get something implemented. And of course any feedback is welcome! I’m looking forward to seeing the project grow.
And as always please do share if you wind up building something with it!
All kinds of things, I think. Architecture visualization, product visualization / configuration viewers, real time light map or ao map baking, scene editor rendering, procedural three.js art rendering, among others!
I’ve been watching your posts on Twitter and ran some of the demos… Very impressive! My next thought goes to denoisers. I’ve tried a few that are available in js but haven’t been impressed since I’m a bit spoiled playing with Intel, Nvidia, and AMD denoisers. I was curious if Intel’s open image denoiser could be compiled to wasm, but the response I got was that no one was working on it.
Do you have any thoughts on denoisers in js to compliment your pathtracer?
The next release will include env map importance sampling which should help things resolve more quickly even without a denoiser. Even so a denoiser would be nice. The “SVGF” denoiser is the one I’ve been looking in to. I have an issue here to track it if you’d like to help:
In terms of WASM - I don’t think that’s the way to go. I think we can learn from open source implementations but my impression is that these types of denoising will have to be done with shaders so I’m not sure how much WASM will really afford here.
I’ve just released v0.0.3 of three-gpu-pathtracer! The most significant changes include environment map importance sampling which prioritizes sampling brighter pixels in the environment to enable faster & smoother image convergence with sharp environment maps, support for transparent background rendering, and more! There are some breaking changes in this release so take note.
renders with harsh shadows enabled by environment importance sampling
there’s 1k samples here, and you can see some very suspect pixels around the right leg. One of those (the left-most) popped white around 900 sample count, after having relatively common gradient with the neighbouring pixels.
I’ve just released v0.0.8! There are quite a few memory-related fixes for the project, the ability to provide a separate background image from lighting, other quality of life improvements, and - most importantly - significant quality improvements to specular surface sampling! Specifically the fresnel term for fresnel has been adjust to fix an issue where mid-range rough and metallic materials were being rendered as overly-bright.