Spaces and Transformation

18 flashcardsby Nijelous
Study these flashcardsFree · spaced repetition · iPhone, Android, Mac & web

All cards

1
Local Space/Model Space
The space and coordinates relative to the model
2
World Space
The coordinate system for the entire scene, moves models and vertices relative to the world's origin
3
Camera Space
The space defined by the POV of the camera, with vertices moved relative to the camera's origin. Removes vertices behind the camera
4
Projection Transformation
Moves objects relative to their distance from the camera, as well as how detailed they need to be rendered, using Near, Far and Farther planes.
5
Clip Space
Removes vertices that aren't displayed on the screen
6
Perspective Divide
Works out where exactly vertices will be on the screen, dividing by the -z value. The larger an object is, the closer the result of this divide is to (0, 0)
7
Normalised Device Coordinates
Makes sure the objects are displayed relative to the device monitor size, normalises all visible coordinates to be within range -1 to 1 and multiplies that by the screen's size
8
Transformation Matrices in Graphics
4x4 matrices.
Row 1: Left vector (rotation)
Row 2: Up vector (rotation)
Row 3: Facing vector (rotation)
Column 4: Object position

Bottom row is for ease of multiplication
9
Scaling Matrices
Identity matrix with the 1 in the respective column changed.
10
Rotation Matrices
Cos(x) sin(x)
-sin(x) cos(x)
Identity matrix with this pattern taking up the space that's NOT the axis you want to rotate around.
11
Translation Matrices
Final column is changed to be the value to be scaled to
12
Model Matrix
Transforms incoming vertices from their local space to world space.
Scales the object -> rotation -> translation
13
MVP Matrix
The combination of the model, view and projection matrices
14
View Matrix
Transforms vertices from world space to view space. Transforms every object at once with the same matrix, rather than each individual object, and with transformations needing to be inverted.
Matrix = Inverse Camera Matrix (C^-1), multiplying camera by view should give identity matrix.
15
Projection Matrix
Transforms vertices from a view space to clip space, depending on the projection type.
16
Perspective Projection
A typical camera view represented by a frustum.
f = 1/tan(FoV/2)
Aspect = screen width / height
Scales the X and Y values by f/aspect and f respectively, moving them to their correct positions depending on the frustum.
Scales and rotates the Z value using near-far values in order for the value to stay unique, otherwise perspective divide will always mean the z value is behind/on the camera.
Bottom row has -1 in 3rd column and 0 in 4th, in order to facilitate objects getting smaller as they have a smaller z value.
17
Orthographic Projection
A method of projection in which an object is depicted or a surface mapped using parallel lines to project its shape onto a plane.
Commonly used for flat GUIs in games, keeping a uniform scale across the whole screen.
Scales based on right, left, tom, bottom, near and far bounds.
18
Depth Buffer
Allows for proper ordering of rendering based on depth in games.
Aka Z-Buffer

Reset to the maximum value at the start of each frame, and for each fragment in an object run a test.
-If fragment z <= depth z (at those coordinates), fragment is drawn, depth buffer at those coordinates is updated to be that of the fragment.
-If not, fragment is discarded
Study all 18 cards for free