Download presentation
Presentation is loading. Please wait.
Published byBriana Rice Modified over 9 years ago
1
UW EXTENSION CERTIFICATE PROGRAM IN GAME DEVELOPMENT 2 ND QUARTER: ADVANCED GRAPHICS The Geometry Pipeline
2
Goals 1. Understand geometry transformations 2. Understand the various spaces involved
3
Basic geometry pipeline spaces Frames of reference, actually Model (local) space Different for each object rendered World matrix (linear transformation) World space View matrix View (camera) space X, Y aligned to horizontal-vertical Z goes into the screen
4
The projection matrix View (camera) space Projection matrix Clip space – reach it by applying projection matrix X, Y, Z, W – the W defined in terms of Z -W <= X, Y <= W 0 <= Z <= W (used for the z-buffer) Clip space makes some math much simpler The screen is a square The frustum (limits) is all 90 degree angles
5
Clipping Clipping of some kind is necessary Avoids math imprecision around the camera plane Camera plane is when clip-W is very small Clip space is linear transformation from view space Clipping can be done using simple arithmetic Typically, clipping around some frustum Either the view frustum or a wider one (the guard band) When using the guard band, the rasterizer also clips A common strategy is to generate more triangles
6
Projection space Clip space X, Y and Z are divided by W Not a linear transformation! Projection space -1 <= X, Y <= 1 0 <= Z <= 1 1/W also kept around for perspective correction Anything linear in world/view/clip space, when divided by the W becomes linear in projection/screen space
7
Screen space Projection space Adjust X, Y for the screen dimensions Screen space 0 <= X, Y <= Width, Height
8
Implementation notes World, view and projection matrices normally combined into one for performance Other combinations also useful, in various situations Lighting performed in some uniform space Model space if possible View space if necessary If the model is non-uniformly modified Normals transformed by the inverse-transpose of the 3x3 matrix (and don’t apply the translation!)
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.