Why Ray Tracing?
光栅化不太好去表示一些全局的效果。
地图大,整个地图渲染非常耗,质量较低。
Ray tracing is accurate, but is very slow
- Rasterization: real-time, ray tracing: offline
- ~10K CPU core hours to render one frame in production
Basic Ray-Tracing Algorithm
Light Rays
Three ideas about light rays
- Light travels in straight lines (though this is wrong)
- Light rays do not “collide” with each other if they cross (though this is still wrong)
- Light rays travel from the light sources to the eye (but the physics is invariant under path reversal - reciprocity). 光线的可逆性,可以认为眼镜发出感知的光线,最后打到光源。
“And if you gaze long into an abyss, the abyss also gazes into you.” — Friedrich Wilhelm Nietzsche (translated)
虽然是错的,但可以这么理解。从相机(我们的眼镜)出发,往世界中投放光线,光线在弹来弹去之后到达光源。(光追中“追踪”的意思)
Ray Casting