Perspective Projection

Untitled

<aside> 🧑‍🏫 Camera transformation : World → View(Camera) Projection Transformation : View(Camera) → Clip(NDC) Viewport Transformation : Clip(NDC) → Normalized

</aside>

Example

‼️ Camera Coordinates에서는 항상 z-axis는 반대방향이다!!! 그러므로 -z를 바라보게 해야함.

Untitled

❓ Camera transformation은 어떻게 해야할까?

✅ (-4,-2,0) translation후, rotate $\pi/2$ about $y$

Untitled

❓ rotation도 한번 고려해보자

✅ $\bold{w}$와 orthonormal한 두개의 vector $\bold{u,v}$를 구하고 rotation matrix를 구하면 다음과 같다.

$$ R = \begin{bmatrix} u_x & v_x & -w_x\\ u_y & v_y & -w_y \\u_z & v_z & -w_z \end{bmatrix} $$

이는 x-axis를 $\bold{u}$ 로, y-axis를 $\bold{v}$로, z-axis를 $\bold{-w}$로 mapping한다.

world ⇒ Camera 를 구했으니 Camera ⇒

<aside> ❓ 왜 inverse?

</aside>

View Frustum

→ 카메라가 볼 수 있는 space

Untitled

❓왜 near하고 far을 잡을까???