GAMES101 15 Ray Tracing 3 BRDF
15 Ray Tracing 3 BRDFBasic Radiometry 辐射度量学基础Irradiance
Definition: Power pur unit area.
$ E(x) \equiv \frac{d\Phi_{\perp}(x)}{dA}=\frac{\Phi}{A}cos\theta $
单位面积上接收到的能量
Radiance
Definition: Power pur unit solid angle pur unit area
$L(p,\omega)\equiv \frac{d^2\Phi(p,\omega)}{d\omega dAcos\theta}$
单位立体角单位面积上接收到的能量
Radiance 对单位立体角积分,就是Irradiance:
$E_i(\omega_i)=L_i(\omega_i)cos\theta_i d\omega_i$
Bidirectional Reflectance Distribution Function (BRDF)Reflection at a Point 光在一个点的反射
可以理解成, ...
GAMES101 14 Ray Tracing 2 Accelerate
14 Ray Tracing 2 AccelerateAcceleration: Bounding Volumes
Ray-Intersection With a Box
Understanding : box is the intersection of 3 pairs of slabs.
Axis-Aligned Bounding Box: AABB 轴对齐包围盒
光线进入所有包围面,进入盒子。出去其中一个包围面,出去包围盒。
$t_{enter}=max{t_{min}}, t_{exit}=min{t_{max}}$
If $t_{enter}<t_{exit}$, ray stay a while in the box.
$t_{enter}<t_{exit} and t_{exit}>=0$, ray and AABB intersection.
Grid Solution: 在bounding box 里面再弄一堆格子
Spatial Partitioning Examples
Oct-Tree
KD-Tree
BSP- ...
GAMES101 13 Ray Tracing 1 Whitted-Style
13 Ray Tracing 1 Whitted-StyleShadow Mapping before we move onTBD
Whitted-Style Ray TracingTBD
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 th ...