computer graphics an introduction. what’s this course all about? 05/10/2014 lecture 1 2 we will...
TRANSCRIPT
![Page 1: Computer Graphics An Introduction. What’s this course all about? 05/10/2014 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data](https://reader036.vdocument.in/reader036/viewer/2022062511/551b341855034607418b6525/html5/thumbnails/1.jpg)
Computer Graphics
An Introduction
![Page 2: Computer Graphics An Introduction. What’s this course all about? 05/10/2014 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data](https://reader036.vdocument.in/reader036/viewer/2022062511/551b341855034607418b6525/html5/thumbnails/2.jpg)
What’s this course all about?
11/04/23 Lecture 1 2
We will cover…
Graphics programming and algorithms
Graphics data structures
Colour
Applied geometry, modelling and rendering
![Page 3: Computer Graphics An Introduction. What’s this course all about? 05/10/2014 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data](https://reader036.vdocument.in/reader036/viewer/2022062511/551b341855034607418b6525/html5/thumbnails/3.jpg)
Computer Graphics is about animation (films)
11/04/23 Lecture 1 3
Major driving force now
![Page 4: Computer Graphics An Introduction. What’s this course all about? 05/10/2014 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data](https://reader036.vdocument.in/reader036/viewer/2022062511/551b341855034607418b6525/html5/thumbnails/4.jpg)
Games are very important in Computer Graphics
11/04/23 Lecture 1 4
![Page 5: Computer Graphics An Introduction. What’s this course all about? 05/10/2014 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data](https://reader036.vdocument.in/reader036/viewer/2022062511/551b341855034607418b6525/html5/thumbnails/5.jpg)
Medical Imaging is another driving force
11/04/23 Lecture 1 5
![Page 6: Computer Graphics An Introduction. What’s this course all about? 05/10/2014 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data](https://reader036.vdocument.in/reader036/viewer/2022062511/551b341855034607418b6525/html5/thumbnails/6.jpg)
Computer Aided Design too
11/04/23 Lecture 1 6
![Page 7: Computer Graphics An Introduction. What’s this course all about? 05/10/2014 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data](https://reader036.vdocument.in/reader036/viewer/2022062511/551b341855034607418b6525/html5/thumbnails/7.jpg)
Scientific Visualisation
11/04/23 Lecture 1 7
To view below and above our visual range
![Page 8: Computer Graphics An Introduction. What’s this course all about? 05/10/2014 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data](https://reader036.vdocument.in/reader036/viewer/2022062511/551b341855034607418b6525/html5/thumbnails/8.jpg)
First Lecture
• The graphics processes– What we will cover on this course
• Some definitions– Fundamental units we use in these processes
• First Practical
11/04/23 Lecture 1 8
![Page 9: Computer Graphics An Introduction. What’s this course all about? 05/10/2014 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data](https://reader036.vdocument.in/reader036/viewer/2022062511/551b341855034607418b6525/html5/thumbnails/9.jpg)
Overview of the Course• Graphics Pipeline (Today)• Modelling
– Surface / Curve modelling
• (Local lighting effects) Illumination, lighting, shading, mirroring, shadowing
• Rasterization (creating the image using the 3D scene) • Ray tracing • Global illumination • Curves and Surfaces
11/04/23 Lecture 1 9
![Page 10: Computer Graphics An Introduction. What’s this course all about? 05/10/2014 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data](https://reader036.vdocument.in/reader036/viewer/2022062511/551b341855034607418b6525/html5/thumbnails/10.jpg)
Graphics/Rendering Pipeline• Graphics processes generally execute
sequentially• Pipelining the process means dividing it
into stages • Especially when rendering in real-time,
different hardware resources are assigned for each stage
11/04/23 Lecture 1 10
![Page 11: Computer Graphics An Introduction. What’s this course all about? 05/10/2014 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data](https://reader036.vdocument.in/reader036/viewer/2022062511/551b341855034607418b6525/html5/thumbnails/11.jpg)
Graphics / Rendering Pipeline
• There are three stages – Application Stage– Geometry Stage – Rasterization Stage
11/04/23 Lecture 1 11
![Page 12: Computer Graphics An Introduction. What’s this course all about? 05/10/2014 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data](https://reader036.vdocument.in/reader036/viewer/2022062511/551b341855034607418b6525/html5/thumbnails/12.jpg)
Application stage• Entirely done in software by the CPU• Read Data
– the world geometry database,– 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
11/04/23 Lecture 1 12
![Page 13: Computer Graphics An Introduction. What’s this course all about? 05/10/2014 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data](https://reader036.vdocument.in/reader036/viewer/2022062511/551b341855034607418b6525/html5/thumbnails/13.jpg)
Geometry Stage
11/04/23 Lecture 1 13
Model Transformation
Modeling: shapes
Shading: reflection and lighting
Transformation: viewing
Hidden Surface Elimination
Rasterization Stage
![Page 14: Computer Graphics An Introduction. What’s this course all about? 05/10/2014 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data](https://reader036.vdocument.in/reader036/viewer/2022062511/551b341855034607418b6525/html5/thumbnails/14.jpg)
Rasterization Stage
11/04/23 Lecture 1 14
Rasterization and Sampling
Texture Mapping
Image Composition
Intensity and Colour Quantization
Geometry Stage
Framebuffer/Display
![Page 15: Computer Graphics An Introduction. What’s this course all about? 05/10/2014 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data](https://reader036.vdocument.in/reader036/viewer/2022062511/551b341855034607418b6525/html5/thumbnails/15.jpg)
An example thro’ the pipeline…
11/04/23 Lecture 1 15
The scene we are trying to represent:
Images courtesy of Picture Inc.
![Page 16: Computer Graphics An Introduction. What’s this course all about? 05/10/2014 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data](https://reader036.vdocument.in/reader036/viewer/2022062511/551b341855034607418b6525/html5/thumbnails/16.jpg)
Geometry Pipeline
11/04/23 Lecture 1 16
Model Transformation
Loaded 3D Models
Shading: reflection and lighting
Transformation: viewing
Hidden Surface Elimination
Imaging
Pipeline
![Page 17: Computer Graphics An Introduction. What’s this course all about? 05/10/2014 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data](https://reader036.vdocument.in/reader036/viewer/2022062511/551b341855034607418b6525/html5/thumbnails/17.jpg)
Preparing Shape Models
11/04/23 Lecture 1 17
Designed by polygons, parametric curves/surfaces, implicit surfaces and etc.
Defined in its own coordinate system
![Page 18: Computer Graphics An Introduction. What’s this course all about? 05/10/2014 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data](https://reader036.vdocument.in/reader036/viewer/2022062511/551b341855034607418b6525/html5/thumbnails/18.jpg)
Model Transformation
11/04/23 Lecture 1 18
Objects put into the scene by applying translation, scaling and rotation
Linear transformation called homogeneous transformation is used
The location of all the vertices are updated by this transformation
![Page 19: Computer Graphics An Introduction. What’s this course all about? 05/10/2014 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data](https://reader036.vdocument.in/reader036/viewer/2022062511/551b341855034607418b6525/html5/thumbnails/19.jpg)
Perspective Projection
11/04/23 Lecture 1 19
We want to create a picture of the scene viewed from the camera
We apply a perspective transformation to convert the 3D coordinates to 2D coordinates of the screen
Objects far away appear smaller, closer objects appear bigger
![Page 20: Computer Graphics An Introduction. What’s this course all about? 05/10/2014 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data](https://reader036.vdocument.in/reader036/viewer/2022062511/551b341855034607418b6525/html5/thumbnails/20.jpg)
Hidden Surface Removal
11/04/23 Lecture 1 20
Objects occluded by other objects must not be drawn
![Page 21: Computer Graphics An Introduction. What’s this course all about? 05/10/2014 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data](https://reader036.vdocument.in/reader036/viewer/2022062511/551b341855034607418b6525/html5/thumbnails/21.jpg)
Shading
11/04/23 Lecture 1 21
Now we need to decide the colour of each pixels taking into account the object’s colour, lighting condition and the camera position
Object
point light source
![Page 22: Computer Graphics An Introduction. What’s this course all about? 05/10/2014 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data](https://reader036.vdocument.in/reader036/viewer/2022062511/551b341855034607418b6525/html5/thumbnails/22.jpg)
Shading : Constant Shading - Ambient
11/04/23 Lecture 1 22
Objects colours by its own colour
![Page 23: Computer Graphics An Introduction. What’s this course all about? 05/10/2014 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data](https://reader036.vdocument.in/reader036/viewer/2022062511/551b341855034607418b6525/html5/thumbnails/23.jpg)
Shading – Flat Shading
11/04/23 Lecture 1 23
Objects coloured based on its own colour and the lighting condition
One colour for one face
![Page 24: Computer Graphics An Introduction. What’s this course all about? 05/10/2014 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data](https://reader036.vdocument.in/reader036/viewer/2022062511/551b341855034607418b6525/html5/thumbnails/24.jpg)
Gouraud shading, no specular highlights
11/04/23 Lecture 1 24
Lighting calculation per vertex
![Page 25: Computer Graphics An Introduction. What’s this course all about? 05/10/2014 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data](https://reader036.vdocument.in/reader036/viewer/2022062511/551b341855034607418b6525/html5/thumbnails/25.jpg)
Shapes by Polynomial Surfaces
11/04/23 Lecture 1 25
![Page 26: Computer Graphics An Introduction. What’s this course all about? 05/10/2014 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data](https://reader036.vdocument.in/reader036/viewer/2022062511/551b341855034607418b6525/html5/thumbnails/26.jpg)
Specular highlights added
11/04/23 Lecture 1 26
Light perfectly reflected in a mirror-like way
![Page 27: Computer Graphics An Introduction. What’s this course all about? 05/10/2014 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data](https://reader036.vdocument.in/reader036/viewer/2022062511/551b341855034607418b6525/html5/thumbnails/27.jpg)
Phong shading
11/04/23 Lecture 1 27
![Page 28: Computer Graphics An Introduction. What’s this course all about? 05/10/2014 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data](https://reader036.vdocument.in/reader036/viewer/2022062511/551b341855034607418b6525/html5/thumbnails/28.jpg)
Next, the Imaging Pipeline
11/04/23 Lecture 1 28
Rasterization and Sampling
Texture Mapping
Image Composition
Intensity and Colour Quantization
Geometry
Framebuffer/Display
Pipeline
![Page 29: Computer Graphics An Introduction. What’s this course all about? 05/10/2014 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data](https://reader036.vdocument.in/reader036/viewer/2022062511/551b341855034607418b6525/html5/thumbnails/29.jpg)
Rasterization• Converts the vertex information output by
the geometry pipeline into pixel information needed by the video display
• Aliasing: distortion artifacts produced when representing a high-resolution signal at a lower resolution.
• Anti-aliasing : technique to remove aliasing
11/04/23 Lecture 1 29
![Page 30: Computer Graphics An Introduction. What’s this course all about? 05/10/2014 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data](https://reader036.vdocument.in/reader036/viewer/2022062511/551b341855034607418b6525/html5/thumbnails/30.jpg)
Anti-aliasing
11/04/23 Lecture 1 30
Aliased polygons(jagged edges) Anti-aliased polygons
![Page 31: Computer Graphics An Introduction. What’s this course all about? 05/10/2014 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data](https://reader036.vdocument.in/reader036/viewer/2022062511/551b341855034607418b6525/html5/thumbnails/31.jpg)
11/04/23 Lecture 1 31
How is anti-aliasing done? Each pixel is subdivided (sub-sampled) in n regions, and each sub-pixel has a color;Compute the average color value
![Page 32: Computer Graphics An Introduction. What’s this course all about? 05/10/2014 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data](https://reader036.vdocument.in/reader036/viewer/2022062511/551b341855034607418b6525/html5/thumbnails/32.jpg)
Texture mapping
11/04/23 Lecture 1 32
![Page 33: Computer Graphics An Introduction. What’s this course all about? 05/10/2014 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data](https://reader036.vdocument.in/reader036/viewer/2022062511/551b341855034607418b6525/html5/thumbnails/33.jpg)
Other covered topics: Reflections, shadows & Bump mapping
11/04/23 Lecture 1 33
![Page 34: Computer Graphics An Introduction. What’s this course all about? 05/10/2014 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data](https://reader036.vdocument.in/reader036/viewer/2022062511/551b341855034607418b6525/html5/thumbnails/34.jpg)
Other covered topics: Global Illumination
11/04/23 Lecture 1 34
![Page 35: Computer Graphics An Introduction. What’s this course all about? 05/10/2014 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data](https://reader036.vdocument.in/reader036/viewer/2022062511/551b341855034607418b6525/html5/thumbnails/35.jpg)
Polynomial Curves, Surfaces
![Page 36: Computer Graphics An Introduction. What’s this course all about? 05/10/2014 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data](https://reader036.vdocument.in/reader036/viewer/2022062511/551b341855034607418b6525/html5/thumbnails/36.jpg)
Graphics Definitions
• Point– 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
11/04/23 Lecture 1 36
![Page 37: Computer Graphics An Introduction. What’s this course all about? 05/10/2014 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data](https://reader036.vdocument.in/reader036/viewer/2022062511/551b341855034607418b6525/html5/thumbnails/37.jpg)
Graphics Definitions• Vertex– point in 3D
• 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)– : 11/04/23 Lecture 1 37
![Page 38: Computer Graphics An Introduction. What’s this course all about? 05/10/2014 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data](https://reader036.vdocument.in/reader036/viewer/2022062511/551b341855034607418b6525/html5/thumbnails/38.jpg)
Graphics Definitions
• Rendering : process of generating an image from the model
• Framebuffer : a video output device that drives a video display from a memory containing the color for every pixel
11/04/23 Lecture 1 38
![Page 39: Computer Graphics An Introduction. What’s this course all about? 05/10/2014 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data](https://reader036.vdocument.in/reader036/viewer/2022062511/551b341855034607418b6525/html5/thumbnails/39.jpg)
Course support resources
• Graphics course website• http://www.inf.ed.ac.uk/teaching/
courses/cg– lecture material,– lecture log with general summary and
recommended reading,– Links to support material for lectures and
projects,– Practical description and resources
11/04/23 Lecture 1 39
![Page 40: Computer Graphics An Introduction. What’s this course all about? 05/10/2014 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data](https://reader036.vdocument.in/reader036/viewer/2022062511/551b341855034607418b6525/html5/thumbnails/40.jpg)
First Practical• Write a program that renders an image of a teapot
and outputs it into an image file• I prepared a demo program to load a 3D model and
draw the edges• You update it so that the surface appears shaded • See the course website for the details
11/04/23 Lecture 1 40
![Page 41: Computer Graphics An Introduction. What’s this course all about? 05/10/2014 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data](https://reader036.vdocument.in/reader036/viewer/2022062511/551b341855034607418b6525/html5/thumbnails/41.jpg)
Some notifications
• 16 lectures in total • I need to visit Japan in the beginning of
October so no lecture on 5th October• Need to attend conferences on 16th and 26th
of November so no lectures there
![Page 42: Computer Graphics An Introduction. What’s this course all about? 05/10/2014 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data](https://reader036.vdocument.in/reader036/viewer/2022062511/551b341855034607418b6525/html5/thumbnails/42.jpg)
Summary• The course is about algorithms, not
applications• Lots of mathematics
• Graphics execution is a pipelined approach• Basic definitions presented• Some support resources indicated
11/04/23 Lecture 1 42