# GAM670/DPS905 Weekly Schedule 20111

GAM670/DPS905 | Weekly Schedule | Student List | Project Requirements | Teams and their Projects | Student Resources

## Contents

# GAM670/DPS905 -- Weekly Schedule 20111

## Week 1 - Jan 9

### This Week

- Suggested Enhancements
- Assignment Discussion
- Review of base code
- camera, sound, and light attachments now made at the Frame class
- textures still attach at the object level
- texture connection uncoupled from drawing
- time tracking now within HUD class completely
- introduction of relative reference frames
- very simple collision detection

- Relative Reference Frames
- Recursive calls
- Vector Frame::position()
- Matrix Frame::rotation()
- Matrix Frame::world()

- Detaching from and attaching to a parent frame
- Frame::attachTo()

- Recursive calls
- Visibility Determination
- Plane
- normal + constant - examples
- equation of a plane: dot(n, x) + D = 0
- positive side of a plane dot(n, x) + D > 0
- test a point for presence within a set of planes
- normal calculations - general rotation matrix - vector and angle

- ViewingFrustum
- parameters
- near-clipping plane
- far-clipping plane
- field of view angle
- aspect ratio

- 6 planes
- near and far planes
- left and right planes
- top and bottom planes

- coding
- constructor
- ViewingFrustum::contains()

- parameters

- Plane
- Finite Size of Objects
- Expansion of the Viewing Frustum
- Bounded Volume
- BoundedVolume : Frame
- BoundedVolume::setRadius()
- BoundedVolume::getRadius()

### To Do

### Resources

## Week 2 - Jan 16

### This Week

- Collision Detection
- types of colliders
- spheres
- planes
- axis-aligned bounding boxes
- oriented bounding boxes

- types of colliders
- Comprehensive Camerawork
- rotation about an axis
- order of rotation matters
- Euler angles
- gimble lock
- quaternions
- geometric algebra (more abstract)

- Billboards
- definition, purpose of a billboard
- types of billboards

- SkyBox
- definition of a skybox
- other forms

- Index Buffers
- amount of storage needed for vertex data
- duplication of vertex data
- indexing
- indexed primitives

- Meshes
- Stock Objects
- Sphere
- Cylinder
- Torus
- Utah Teapot

- Simple Mesh COM object
- What is a mesh?
- Create a Mesh
- DrawSubset
- FVF settings

- Stock Objects

### To Do

- Form Teams, Identify Members (2-5 members) and add your team and members to Teams 20111
**Before Thursday 20th**. - Confirm your name and information at Student List 20111

### Resources

## Week 3 - Jan 23

### This Week

### To Do

### Resources

## Week 4 - Jan 30

### This Week

- Mathematics of Lighting
- Vertex Shaders
- Lighting in Vertex Shaders
- Notation
- G
_{a}- global ambient color - C
_{a}- material ambient color - C
_{d}- material diffuse color - C
_{s}- material specular color - L
_{ai}- ambient color of light i - L
_{di}- diffuse color of light i - L
_{si}- specular color of light i - L
_{diri}- direction vector of light i - N - normal to the surface at the vertex

- Attenuation and Spotlight Factors
- Atten
_{i}- attenuation of light i

- d
_{i}- distance from light i- d
_{i}= |L_{diri}|

- d
- a
_{0}- constant attenuation factor - a
_{1}- linear attenuation factor - a
_{2}- quadratic attenuation factor - Atten
_{i}= 1/(a_{0}+ a_{1}d_{i}+ a_{2}d_{i}^{2}) - Atten
_{i}= [0, 1]

- Spot
_{i}- spot factor of light i

- Spot
_{i}= {[r_{i}- cos(phi_{i}/2)]/[cos(theta_{i}/2) - cos(phi_{i}/2)]}^{fi} - r
_{i}- cosine of angle from axis of spotlight_{i}- r
_{i}= norm(- light direction in camera space) . norm(L_{diri})

- r
- phi
_{i}- penumbra (exterior cone) angle of spotlight_{i} - theta
_{i}- umbra (interior cone) angle of spotlight_{i} - f
_{i}- falloff factor of spotlight_{i}

- Atten

- G
- Blinn-Phong and Phong
- V - viewpoint vector
- V = norm(Camera
_{position}- Vertex_{position})

- V = norm(Camera

- V - viewpoint vector
- Phong - account accurately for position of viewer
- Specular reflectance = (R
_{i}. V)^{pi} - R
_{i}- reflection vector- R
_{i}= 2 * (N . L_{diri}) N - L_{diri}

- R
- p
_{i}- true specular power of light i

- Specular reflectance = (R
- Blinn-Phong - use halfway vector instead of reflection vector - adjust power to compensate
- Specular reflectance = (N . H
_{i})^{p'i} - H
_{i}- halfway vector- H
_{i}= norm(V + L_{diri}) - H
_{i}= norm([0,0,1] + L_{diri}) - less computationally intensive - assumes that camera is at infinity along z axis

- H
- p'
_{i}- adjusted specular power of light i

- Specular reflectance = (N . H
- Ambient
- C
_{a}* ( G_{a}+ sum [L_{ai}* Atten_{i}* Spot_{i}] )

- C
- Diffuse
- C
_{d}* sum [ L_{di}* (N . L_{diri}) * Atten_{i}* Spot_{i}]

- C
- Specular
- C
_{s}* sum [ L_{si}* (N . H_{i})^{p'i}* Atten_{i}* Spot_{i}] - Blinn-Phong - C
_{s}* sum [ L_{si}* (R_{i}. V)^{pi}* Atten_{i}* Spot_{i}] - Phong

- C
- HLSL Intrinsic Functions
- normalize() - normalize a vector
- dot(,) - dot product of two vectors of any size
- length() - length of a vector
- saturate() - clamp scalar, vector, or matrix to [0, 1]

- Notation

### To Do

- reorganize framework code so that vertex shader receives product of world, view, and projection matrices
- store viewProjection matrix as an instance variable in Display
- add viewProjection query to Display to extract product of view and projection matrices
- retrieve viewProjection in *::draw() method
- pre-multiply viewProjection by world to obtain composite matrix to pass to vertex shader
- add composite matrix to the constant table in the vertex shader

- reorganize framework code to minimize duplication of heading normalization
- perform normalization of heading in Display::beginDraw()