Lecture 07: Ray intersection. Closest hit
Computer graphics in Game development
Ivan Belyavtsev
6.11.2020
Sphere intersection algorithm
From:
[1]
Plane intersection algorithm
From:
[1]
Möller-Trumbore algorithm
From:
[1]
[2]
Möller-Trumbore algorithm
find vectors for two edges sharing vert
calculate determinant
\(edge1 \cdot (dir \times edge2)\)
if determinant is near zero, ray lies in plane of triangle - no intersection
calculate barycentrics
[2]
“Möller-Trumbore algorithm” experiment
TODO
Implement sphere intersection
Implement MT algorithm
“Möller-Trumbore algorithm” experiment
Reference
From:
https://github.com/djbelyak/basic-of-ray-tracing\
“Möller-Trumbore algorithm” experiment
What is the new knowledge?
How to implement intersection function for primitives
How to implement closes hit function
References
1.
McGuire M. The graphics codex. 2.14 ed. Casual Effects, 2018.
2.
Möller T., Trumbore B. Fast, minimum storage ray-triangle intersection // J. Graph. Tools. USA: A. K. Peters, Ltd., 1997. Vol. 2, № 1. P. 21–28.
// reveal.js plugins