Вы находитесь на странице: 1из 43

Computer Graphics

An Introduction

What s this course all about?


We will cover Graphics programming and algorithms Graphics data structures Colour Applied geometry, modelling and rendering

13/02/2012

Lecture 1

What is Computer Graphics? (1/2)


Definition
Producing pictures or images using a computer

Example
Starship Troopers: Tango-Urilla, Death From Above
The Final Stage: Burning the bugs

Courtesy of Tippet Studio


cgvr.korea.ac.kr 3

What is Computer Graphics? (1/2)


Definition
Producing pictures or images using a computer

Example
Starship Troopers: Tango-Urilla, Death From Above Batman & Robin: The Love Dust

Courtesy of Buf Compagnie


cgvr.korea.ac.kr 4

What is Computer Graphics? (1/2)


Definition
Producing pictures or images using a computer

Example
Starship Troopers: Tango-Urilla, Death From Above Batman & Robin: The Love Dust

Courtesy of Buf Compagnie


cgvr.korea.ac.kr 5

What is Computer Graphics? (1/2)


Definition
Producing pictures or images using a computer

Example
Starship Troopers: Tango-Urilla, Death From Above Batman & Robin: The Love Dust

Courtesy of Buf Compagnie


cgvr.korea.ac.kr 6

What is Computer Graphics? (1/2)


Definition
Producing pictures or images using a computer

Example
Starship Troopers: Tango-Urilla, Death From Above Batman & Robin: The Love Dust

Courtesy of Buf Compagnie


cgvr.korea.ac.kr 7

What is Computer Graphics? (1/2)


Definition
Producing pictures or images using a computer

Example
Starship Troopers: Tango-Urilla, Death From Above Batman & Robin: The Love Dust

Courtesy of Buf Compagnie


cgvr.korea.ac.kr 8

What is Computer Graphics? (1/2)


Definition
Producing pictures or images using a computer

Example
Starship Troopers: Tango-Urilla, Death From Above Batman & Robin: The Love Dust

Courtesy of Buf Compagnie


cgvr.korea.ac.kr 9

What is Computer Graphics? (2/2)


Imaging
Representing 2D images

Modeling
Representing 3D objects

Rendering
Constructing 2D images from 3D models

Animation
Simulating changes over time
cgvr.korea.ac.kr 10

Applications
Display of Information Design Simulation Computer Art Entertainment

cgvr.korea.ac.kr

11

Computer Graphics is about animation (films)

Major driving force now


13/02/2012 Lecture 1 12

Games are very important in Computer Graphics

13/02/2012

Lecture 1

13

Medical Imaging is another driving force

13/02/2012

Lecture 1

14

Computer Aided Design too

13/02/2012

Lecture 1

15

Scientific Visualisation
To view below and above our visual range

13/02/2012

Lecture 1

16

First Lecture
The graphics processes
What we will cover on this course

Some definitions
Fundamental units we use in these processes

13/02/2012

Lecture 1

17

Overview of the Course


Graphics Pipeline (Today) Modelling
Surface / Curve modelling

(Local lighting effects) Illumination, lighting, shading, mirroring, shadowing Rasterization (is the task of taking an image described in a vector graphics format
(shapes) and converting it into a raster image (pixels or dots) for output on a video display or printer, or for storage in a bitmap file format.)

Global illumination Curves and Surfaces


13/02/2012 Lecture 1 18

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

13/02/2012

Lecture 1

19

Graphics / Rendering Pipeline


There are three stages
Application Stage Geometry Stage Rasterization Stage

13/02/2012

Lecture 1

20

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

13/02/2012

Lecture 1

21

Geometry Stage
Modeling: shapes Model Transformation Transformation: viewing Hidden Surface Elimination Shading: reflection and lighting
13/02/2012 Lecture 1

Rasterization Stage
22

Rasterization Stage
Geometry Stage

Rasterization and Sampling Texture Mapping Image Composition Intensity and Colour Quantization Framebuffer/Display

13/02/2012

Lecture 1

23

An example thro the pipeline


The scene we are trying to represent:

Images courtesy of Picture Inc.


13/02/2012 Lecture 1 24

Geometry Pipeline
Loaded 3D Models Model Transformation Transformation: viewing Hidden Surface Elimination Shading: reflection and lighting
13/02/2012 Lecture 1

Imaging Pipeline
25

Preparing Shape Models


Designed by polygons, parametric curves/surfaces, implicit surfaces and etc. Defined in its own coordinate system

13/02/2012

Lecture 1

26

Model Transformation
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

13/02/2012

Lecture 1

27

Perspective Projection
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

13/02/2012

Lecture 1

28

Hidden Surface Removal


Also known as hidden surface removal (HSR), occlusion culling (OC) or visible surface determination (VSD)) is the process used to determine which surfaces and parts of surfaces are not visible from a certain viewpoint. A hidden surface determination algorithm is a solution to the visibility problem, which was one of the first major problems in the field of 3D computer graphics. The process of hidden surface determination is sometimes called hiding, and such an algorithm is sometimes called a hider

13/02/2012

Lecture 1

29

Shading
Shading is a process used in drawing for depicting levels of darkness on paper by applying media more densely or with a darker shade for darker areas, and less densely or with a lighter shade for lighter areas. There are various techniques of shading including cross hatching where perpendicular lines of varying closeness are drawn in a grid pattern to shade an area. The closer the lines are together, the darker the area appears. Likewise, the farther apart the lines are, the lighter the area appears. Light patterns, such as objects having light and shaded areas, help when creating the illusion of depth on paper.

13/02/2012

Lecture 1

30

Next, the Imaging Pipeline


Geometry Pipeline

Rasterization and Sampling Texture Mapping Image Composition Intensity and Colour Quantization Framebuffer/Display

13/02/2012

Lecture 1

31

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

13/02/2012

Lecture 1

32

Anti-aliasing

Aliased polygons (jagged edges)


13/02/2012 Lecture 1

Anti-aliased polygons
33

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

13/02/2012

Lecture 1

34

Texture mapping

13/02/2012

Lecture 1

35

Other covered topics: Reflections, shadows & Bump mapping


Bump mapping is very much like Texture Mapping. However, where Texture Mapping added color to a polygon, Bump Mapping adds, what appears to be surface roughness. This can have a dramatic effect on the look of a polygonal object. Bump Mapping can add minute detail to an object which would otherwise require a large number of polygons. Note that the polygon is still physically flat, but appears to a be bumpy.

Other covered topics: Global Illumination

13/02/2012

Lecture 1

37

Polynomial Curves, Surfaces

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
13/02/2012 Lecture 1 39

Vertex Edge

Graphics Definitions

point in 3D 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)
13/02/2012 Lecture 1 40

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

13/02/2012

Lecture 1

41

Term Projects
What?
Create your own graphics art Not still images but moving pictures

When?
Proposal after midterm exam Demonstration BEFORE final exam

How?
1 or 2 person(s) / 1 team Using your assignments
42

Contact
Dept. Of Computing and Technology, Iqra University Islamabad Voice: +92-333-9171029 Email: awais.ahmad@live.com Skype: awais.research

Mobile Adhoc Network Research Group, Iqra University Islamabad Wireless Sensor Network Image Processing

Practical/Industrial Experience:
IT Engineer (TELENOR, ISLAMABAD) IT SUPERVISOR (NEXUS TECHNOLOGIES)

Visiting: International Islamic University Islamabad (IIUI) Fatima Jinnah Women University Rawalpindi University of Peshawar
43

Вам также может понравиться