GAMES101 13 Ray Tracing 1 Whitted-Style
13 Ray Tracing 1 Whitted-Style
Shadow Mapping before we move on
TBD
Whitted-Style Ray Tracing
TBD
Why Ray Tracing?
- Rasterization couldn’t handle global effects well
- Soft shadow
 - Light bounces more than once
 
 - Ray Tracing is accurate, but is very slow
- Rasterization: real-time, ray tracing: offline
 - ~10k CPU core hours to render one frame in production.
 
 
Definition:
- Light Rays:
- Light travels in straight lines 直线传播
 - Light rays do not collide with each other if they cross 不相互影响
 - Light rays travel from the light sources to the eye (but the physics is invariant under the path reversal - reciprocity) 光路可逆
 
 - Ray Casting
- Generate an image by casting one ray per pixel.
 - Check forshadows by sending a ray to the light.
 
 - Recursive (Whitted-Style) Ray Tracing
- 从像素出发,折射再反射,每个点看一下是否有光,每次都着色。
 - 过曝?每次都用一定的百分比衰减
 - 术语:primary ray, secondary ray, shadow ray …
 
 - 技术问题:
- Ray-surface intersection 光线和物体表面怎么求
- Ray Equation:
- Ray is defined by its origin and a dierction vector.$Ray:R(t)=O+td$
 
 - Ray Intersection With Sphere
 - Ray Intersection with Triangle Mesh
- Rendering: visibility shadows lighting
 - Geometry: inside/outside
 - Method: Triangle is in a plane.
- Plane: a normal vector and a point in the plane
 - if a point p in the plane: $(p-p’)\cdot \vec{N} = 0$
 - MT Algorithm: t,b1,b2 的线性方程组
 
 
 - Ray Tracing - Performance Challenges
- Too Slow
 
 
 - Ray Equation:
 
 - Ray-surface intersection 光线和物体表面怎么求
 
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 Chuan 川 Charles!
 评论
Va





