GAMES101 Lecture 04 - Transformation Cont.

GAMES101_Lecture_04.pdf

I. Rodrigues' Rotation Formula

Rotation by angle α around axis n

R(n,α)=cos(α)I+(1cos(α))nnT+sin(α)[0nznynz0nxnynx0]N

II. MVP Transformation

MVP Transformation

Model-Viewing-Projection Transformation.

 

View/Camera Transformation

Let the following attributes be that of the camera:

The target of the view transformation is to transform the coordinates such that:

When deducting the matrix for view transformation, consider the inverse rotation which rotates the x axis to g^×t^, the y axis to t^ and the z axis to g^. (Eases the deduction)

 

Projection Transformation

Orthographic projection:

The purpose of this projection is to transform the selected volume such that it then centers at origin and has a normalized size of [1,1]3.

Mortho=[2rl00002tb00002nf00001][100r+l2010t+b2001n+f20001]
Mortho=[2rl00r+lrl02tb0t+btb002nfn+fnf0001]

Note that zn>zf by convention.

If such an orthographic projection happens after applying a perspective projection, then the matrix can be simplified to:

Mortho=[2rl00002tb00002nfn+fnf0001]

 

Perspective projection:
Mpersp=MorthoMpersportho=[2nrl0r+lrl002ntbt+btb000n+fnf2nfnf0010]

where

Mpersportho=[n0000n0000n+fnf0010]