Skip to content

lokhei/ComputerGraphics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 

Repository files navigation

ComputerGraphics

COMS30020 Computer Graphics Coursework

Building a C++ renderer using a variety of different approaches to 3D rendering

Animation

Animation

Features Implemented

  • OBJ geometry and material file loading
  • Wireframe rendering
  • Flat shaded triangle rasterising
  • Texture Mapping
  • Keyboard control of camera position
  • Changing camera orientation (using orientation matrix)
  • Camera LookAt and Orbit
  • Ambient lighting
  • Diffuse lighting (proximity and angle-of-incidence)
  • Specular lighting
  • Hard Shadow
  • Gouraud shading
  • Phong Shading
  • Realistic soft shadows
  • Reflective materials - Mirrors
  • Refractive materials (e.g. glass, water etc.)
  • Export of image files and creation of animated video

Keyboard Controls

0 1 2 to switch between wireframe, rasterising and raytracing respectively

3 4 5 to switch between normal, gouraud and phong lighting respectively

6 7 8 to switch proximity, incidence and specular lighting on/off respectively

q e w a s d to translate the camera position down, up, forwards, left, back and right respectively

left right arrow keys to rotate the camera position about the X axis anti-clockwise and clockwise respectively

up down arrow keys to rotate the camera position about the Y axis clockwise and anti-clockwise respectively

l j keys to rotate the camera in the X axis (tilting) respectively

i k keys to rotate the camera in the Y axis (panning) respectively

o to start orbiting (about the y axis) around origin

r to reset the camera view

g h to switch hard ad soft shadows on/off respectively

Clicking the mouse inside the SDL window to generate PPM and BMP files of the current content of the window

Usage

Build and run

To build and run this project, use the included Makefile

$ make

or for optimised build rule

$ make speedy

About

C++ graphics renderer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages