https://github.com/cyamahat/three-gpu-pathtracer-optics
PBR of optical elements using three-gpu-pathtracer
https://github.com/cyamahat/three-gpu-pathtracer-optics
optics path-tracing pbr raytracing reflection refraction rendering three-gpu-pathtracer three-js webgl
Last synced: 17 days ago
JSON representation
PBR of optical elements using three-gpu-pathtracer
- Host: GitHub
- URL: https://github.com/cyamahat/three-gpu-pathtracer-optics
- Owner: cyamahat
- License: mit
- Created: 2025-05-27T21:31:09.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-09T17:10:03.000Z (12 months ago)
- Last Synced: 2025-07-28T05:12:42.522Z (10 months ago)
- Topics: optics, path-tracing, pbr, raytracing, reflection, refraction, rendering, three-gpu-pathtracer, three-js, webgl
- Language: JavaScript
- Homepage: https://cyamahat.github.io/three-gpu-pathtracer-optics/
- Size: 31.2 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PBR of Optical Elements with *three-gpu-pathtracer*
The *[three-gpu-pathtracer](https://github.com/gkjohnson/three-gpu-pathtracer)* library
leverages [three-mesh-bvh](https://github.com/gkjohnson/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](https://en.wikipedia.org/wiki/K-Mirror_(optics)) assembly, a mirror-only design, is included as a compelling alternative to the Dove prism.
## Examples: PBR with Optical Prisms and Mirrors
[Dove Prism](https://cyamahat.github.io/three-gpu-pathtracer-optics/examples/bundle/index.html#Dove%20Prism)
[Right-Angle Prism](https://cyamahat.github.io/three-gpu-pathtracer-optics/examples/bundle/index.html#Right-Angle%20Prism)
[Amici Roof Prism](https://cyamahat.github.io/three-gpu-pathtracer-optics/examples/bundle/index.html#Amici%20Roof%20Prism)
[Panoramic Telescope](https://cyamahat.github.io/three-gpu-pathtracer-optics/examples/bundle/index.html)
[K-Mirror](https://cyamahat.github.io/three-gpu-pathtracer-optics/examples/bundle/index.html#K-Mirror)
---
### PBR Illustrations
[](https://cyamahat.github.io/three-gpu-pathtracer-optics/examples/bundle/index.html#Dove%20Prism)
***PBR of the Dove prism***. *The original GLB file is animated (rotation of the Dove prism).*
*3D model: [Cartoon octopus takes a tea bath](https://skfb.ly/oqIRG) by [AzTiZ](https://sketchfab.com/aztiz)*
[](https://cyamahat.github.io/three-gpu-pathtracer-optics/examples/bundle/index.html#Amici%20Roof%20Prism)
***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.*
[](https://cyamahat.github.io/three-gpu-pathtracer-optics/examples/bundle/index.html)
***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](https://github.com/gkjohnson/three-gpu-pathtracer) • GitHub repository by Garrett Johnson, providing a GPU-accelerated path tracing library for Three.js to create high-quality, realistic 3D renderings.
[Three.js](https://threejs.org) • JavaScript 3D Library use to display animated 3D computer graphics in modern web browsers using [WebGL](https://en.wikipedia.org/wiki/WebGL).
🎬 [Panoramic telescope](https://youtu.be/fu5VCT6Hh1A?si=yMeeUyAWUAuUQ-1i) • A 3-minute YouTube video providing an overview of the history and working principle of the panoramic telescope (Rundblickfernrohr).
[](https://codesandbox.io/p/github/cyamahat/three-gpu-pathtracer-optics) ⇒ To explore or test this project in your browser, open it in CodeSandbox.
[](https://www.youtube.com/@cyamahat)
[](https://sketchfab.com/cyamahat)
[](https://www.linkedin.com/in/yamahata/)
[](https://x.com/CYamahata)
[](https://bsky.app/profile/cyamahata.bsky.social)