three-gpu-pathtracer-optics

PBR of Optical Elements with three-gpu-pathtracer

The three-gpu-pathtracer library leverages three-mesh-bvh and WebGL 2 to deliver high-quality, physically based rendering (PBR) on the GPU. Key features include support for the GGX surface model, materials information, textures, normal maps, emission, environment maps, tiled rendering. As a result, path tracing also supports reflection and refraction of optical materials!

This GitHub repository demonstrates three-gpu-pathtracer’s ability to simulate realistic PBR for optical parts. The demonstration focuses on three standard optical prisms: the Dove prism, the right-angle prism, and the Amici roof prism. When combined, these prisms form the core optical system of a panoramic telescope (or 𝕽𝖚𝖓𝖉𝖇𝖑𝖎𝖈𝖐𝖋𝖊𝖗𝖓𝖗𝖔𝖍𝖗 in German).

Additionally, an example featuring a K-Mirror assembly, a mirror-only design, is included as a compelling alternative to the Dove prism.

Examples: PBR with Optical Prisms and Mirrors

Dove Prism

Right-Angle Prism

Amici Roof Prism

Panoramic Telescope

K-Mirror


PBR Illustrations

Dove Prism
PBR of the Dove prism. The original GLB file is animated (rotation of the Dove prism).
3D model: Cartoon octopus takes a tea bath by AzTiZ

Amici Roof vs. Right-Angle Prism
Amici Roof Prism vs. Right-Angle Prism. The image output from a prism is either right-handed or left-handed
(i.e., mirrored), determined by the number of internal reflections within the prism.

Panoramic Telescope
Panoramic Telescope. When the right-angle prism undergoes azimuth rotation by an angle theta (θ),
rotating the Dove prism by half theta (θ/2) ensures the output image remains horizontal.


Resources

three-gpu-pathracer • GitHub repository by Garrett Johnson, providing a GPU-accelerated path tracing library for Three.js to create high-quality, realistic 3D renderings.

Three.js • JavaScript 3D Library use to display animated 3D computer graphics in modern web browsers using WebGL.

🎬 Panoramic telescope • A 3-minute YouTube video providing an overview of the history and working principle of the panoramic telescope (Rundblickfernrohr).

Open in CodeSandbox ⇒ To explore or test this project in your browser, open it in CodeSandbox.


YouTube Sketchfab LinkedIn X Bluesky