GAMES101 19,20,21,22 (完结)
19 Cameras, Lenses and Light Fields 相机棱镜和光场Camera Structure
shutter 快门
sensor 传感器,感知Irradiance
针孔相机 Pinhole Image Formation没有模糊
Feild of view (FOV) 视场取决于Lens和Sensor(宽度是h)的距离(f)。 $Fov=2 arctan(\frac{h}{2f})$
Exposure 曝光
$ H=T\times E$
exposure=time*irradiance
Aperture size 光圈(E)f数(F-Number F-STop)直径分之一,越大光圈越小。光圈大远景模糊,浅景深(景深是光像清晰的一段范围)
Shutter speed 快门曝光时间(T)Motion Blur 运动模糊
ISO Gain 感光度。太大放大噪声
F-Stop和Shutter时间要Trade off
Gauss Ray Tracing Construction / Thin lens equation$\fr ...
GAMES101 16 Ray Tracing 4 Path Tracing
Ray Tracing 4 Path TracingMonte Carlo Integration
Definite intergral: $\int_{a}^{b}{f(x)dx}$
Random variable: $X_i\sim pdf(x)$ , pdf is the Probability Distribution Function
Monte Carlo estimator: $F_N=\frac{1}{N}\sum_{i=1}^{N}{\frac{f(x_i)}{pdf(x_i)}}$
我自己证明一下:中心极限定理,当 $ N\rightarrow \infty $
$\frac{1}{N}\sum_{i=1}^{N}{\frac{f(x_i)}{pdf(x_i)}}\rightarrow E(\frac{f(x_i)}{pdf(x_i)})$
$= \int_{a}^{b}{pdf(x_i)\times \frac{f(x_i)}{pdf(x_i)}}dx$
$=\int_{a}^{b}{f(x_i)}dx$
$& ...
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 ...