# Module Information

Module Identifier
CS32420
Module Title
Computer Graphics and Games
2018/2019
Co-ordinator
Semester
Semester 1
Pre-Requisite
Other Staff

#### Course Delivery

Delivery Type Delivery length / details
Practical 10 x 2 Hour Practicals
Lecture 30 x 1 Hour Lectures

#### Assessment

Assessment Type Assessment length / details Proportion
Semester Assessment Practical assignment, report & accompanying project material  50%
Semester Exam 2 Hours   50%
Supplementary Assessment Practical assignment, report & accompanying project material  Students should resit failed components  50%
Supplementary Exam 2 Hours   Students should resit failed components  50%

### Learning Outcomes

On successful completion of this module students should be able to:

Select and deploy appropriate algorithms, programming languages and libraries behind 3D computer graphics and games.

Describe and apply the main concepts behind 3 dimensional graphics and games software libraries.

Demonstrate an awareness of the variety of hardware and software technologies that allow the creation of graphics and games applications.

Use vectors and matrices to perform 3-D transformations, including perspective and orthographic projections.

Describe and critique different lighting models and rendering techniques.

Describe and critique alogrithms for modeling a variety of objects/visial phenomena.

Describe and critique the main elements of a 3D games engine, including collisions, physics states and AI.

### Brief description

This module provides students with an understanding of the theoretical foundations of computer graphics, game development concepts and practical 3D graphics and games programming skills.

### Aims

This module provides the basis for programming 3D computer graphics and games. Theoretical concepts are introduced and how they are translated into real-time, interactive applications.

### Content

(Order of topics may vary to support the assignment.)
1. Introduction: Course outline, recommended reading / resources, overview of 3D graphics, overview of WebGL, introduction to three.js. Practical 1 – using graphics library (3 lecture + 1 practical)

2. Core mathematics for 3D graphics: Trigonometry, matrix and vector algebra. Basic 3D transformations, matrix representation and homogeneous coordinates. Composite transformations. Clipping and z-buffer hidden surface removal. Practical 2– introduction & transformations (3 lectures + 1 practical).

3. Lighting and Shading: Reflection models (ambient, diffuse, specular), light types (directional, point, cone), coloured lights, multiple lights, light attenuation, flat shading, Gouaud shading, Phong shading. Practical 3- lighting (3 lectures + 1 practical).

4. Texture mapping: Texture generation, rendering process, wrapping, sampling, interpolation and anti-aliasing. Problems including perspective distortion, orientation dependence, shared vertices. Practical 4- texture mapping (2 lectures + 1 practical).

5. Color and depth: perception of colour, colour spaces, colour display. Alternative hidden surface removal algorithms for e.g. transparency sorting, Painter's algorithm, BSP trees etc. (3 lectures).

6. Buffers in WebGL: input and output buffers (render buffer, depth buffer, stencil buffer, frame buffer), usage and setting for each and example algorithms / applications discussed. Practical 5- using buffers (2 lecture + 1 practical).
7. Advanced modeling: modeling/ rendering of difficult objects such as fur, plants, fire including the use of L-systems and particle systems. Practical 6- using L-systems (3 lectures + 1 practical).

Practical 7 – work on assignment

8. Introduction to game development: Aspects of game development to be covered (collisions, physics, AI, scene generation). Game states finite state machines for games. User input. Game APIs. Practical 8– introduction to game API. (2 lectures)
9. Opponent & character behavior: Simple behaviours (path following, loops), A* search, random and state based behavior, path interpolation. (2 lectures)
10. Collision detection: plane collisions (sphere and plane, box and plane), sphere collisions, sliding, optimisations, GJK algorithm, continuous collision detection. Practical 9 – basic collisions and physics using physics engine (2 lectures + 1 practical)

11. Game physics: physics engines, kinematics, frame rate independence, projective motion, dynamics (Newton’s laws), dynamics simulation (rigid body simulation, non-rigid body simulation), API primitives, applications. Practical 10 – linked object modeling and animation i(4 lectures + 1 practical)

Revision lecture (1 lecture).

### Notes

This module is at CQFW Level 6