Intro
Intro
Lecture 1
Introduction
APPLICATIONS OF COMPUTER
GRAPHICS
15/04/16
Lecture 1
Major driving force now
2
Movie industry
APPLICATIONS OF COMPUTER GRAPHICS
15/04/16
Lecture 1
3
Video Games
MEDICAL IMAGING IS ANOTHER DRIVING
FORCE
15/04/16
Lecture 1
Medical Imaging
4
COMPUTER AIDED DESIGN TOO
15/04/16
Lecture 1
Computer Aided Design too 5
SCIENTIFIC VISUALISATION
15/04/16
To view below and
above our visual range
Lecture 1
6
Scientific Visualisation
GRAPHICS / RENDERING PIPELINE
15/04/16
There are three stages
Application Stage
Lecture 1
Geometry Stage
Rasterization Stage
7
APPLICATION STAGE
Entirely done in software by the CPU
Read Data
15/04/16
the world geometry database,
Lecture 1
User’s input by mice, trackballs, trackers, or
sensing gloves
In response to the user’s input, the
application stage change the view or
scene
8
GEOMETRY STAGE
15/04/16
Modelling:shapes
Lecture 1
Model Transformation
Transformation: viewing
Rasterization Stage
RASTERIZATION STAGE
15/04/16
Geometry Stage
Rasterization and Sampling
Lecture 1
Texture Mapping
Image Composition
Framebuffer/Display
10
EXAMPLE
15/04/16
The scene we are trying to represent:
Lecture 1
Images courtesy of Picture Inc. 11
GEOMETRY PIPELINE
15/04/16
Loaded 3D Models
Lecture 1
Model Transformation
Transformation: viewing
15/04/16
Designed by polygons, parametric curves/surfaces,
implicit surfaces and etc.
Lecture 1
Defined in its own coordinate system
13
MODEL TRANSFORMATION
Objects put into the scene by applying
15/04/16
translation, scaling and rotation
Lecture 1
14
PERSPECTIVE PROJECTION
We want to create a picture of the scene viewed from the camera
15/04/16
We apply a perspective projection to convert the 3D coordinates
to 2D coordinates of the screen
Lecture 1
Objects far away appear smaller, closer objects appear bigger
15
HIDDEN SURFACE REMOVAL
Objects occluded by other objects must not be drawn
15/04/16
Lecture 1
16
SHADING
Now we need to decide the colour of each pixels taking into
15/04/16
account the object’s colour, lighting condition and the camera
Lecture 1
position
point light source
Object
17
SHADING : CONSTANT SHADING -
AMBIENT
Objects colours by its own colour
15/04/16
Lecture 1
18
SHADING – FLAT SHADING
Objects coloured based on its own colour and the lighting condition
15/04/16
One colour for one face
Lecture 1
19
GOURAUD SHADING, NO SPECULAR
HIGHLIGHTS
Lighting calculation per vertex
15/04/16
Lecture 1
20
SHAPES BY POLYNOMIAL
SURFACES
15/04/16
Lecture 1
21
SPECULAR HIGHLIGHTS ADDED
15/04/16
Light perfectly reflected in a mirror-like way
Lecture 1
22
15/04/16 Lecture 1
23
PHONG SHADING
NEXT, THE IMAGING PIPELINE
15/04/16
Geometry
Rasterization and Sampling
Lecture 1
Pipeline
Texture Mapping
Image Composition
Framebuffer/Display
24
RASTERIZATION
Converts the vertex information output by the
geometry pipeline into pixel information
15/04/16
needed by the video display
Lecture 1
Aliasing: distortion artefacts produced when
representing a high-resolution signal at a lower
resolution.
25
ANTI-ALIASING
15/04/16
Lecture 1
Aliased polygons
Anti-aliased polygons
(jagged edges) 26
How is anti-aliasing done? Each pixel is subdivided
(sub-sampled) in n regions, and each sub-pixel has a color;
15/04/16
Compute the average color value
Lecture 1
27
TEXTURE MAPPING
15/04/16
Lecture 1
28
POLYNOMIAL CURVES, SURFACES
GRAPHICS DEFINITIONS
15/04/16
Point
Lecture 1
a location in space, 2D or 3D
sometimes denotes one pixel
Line
straight path connecting two points
infinitesimal width, consistent density
beginning and end on points
30
GRAPHICS DEFINITIONS
15/04/16
Vertex
point in 3D
Lecture 1
Edge
line in 3D connecting two vertices
Polygon/Face/Facet
arbitrary shape formed by connected vertices
fundamental unit of 3D computer graphics
Mesh
set of connected polygons forming a surface (or object)
:
31
GRAPHICS DEFINITIONS
15/04/16
Rendering : process of generating an image
from the model
Lecture 1
Framebuffer : a video output device that
drives a video display from a memory
containing the color for every pixel
32