university of calgary introduction to computer graphics...
Post on 20-May-2018
274 Views
Preview:
TRANSCRIPT
1
UNIVERSITY OF
CALGARY
Introduction to Computer Graphics
CPSC 453
Faramarz Samavati
Graphics IFaramarz Samavati
UNIVERSITY OF
CALGARY Overview of today
Course information Course information What is computer graphics? Why study graphics? Applications
Graphics IFaramarz Samavati
2
UNIVERSITY OF
CALGARY CPSC453
Instructor :Faramarz Samavatio Office: Math Sciences (MS 630)o Office hours: MWF, 11:00 – 12:00o Phone: 210-9454o Email: samavati@ucalgary.cao Home Page: www.cpsc.ucalgary.ca/~samavatio Course web page:o www.cpsc.ucalgary.ca/~samavati/cpsc453
TAs:o Erika Harisono Troy Alderson
Graphics IFaramarz Samavati
o Troy Aldersono Sean Lynch
UNIVERSITY OF
CALGARY Subjects Introduction and overview of graphics system Brief introduction to OpenGL Geometric objects and transformations Polygonal models and their data structures Viewing and projection Modeling curves and surfaces
Sh di d ill i ti
Graphics IFaramarz Samavati
Shading and illumination Hidden line removal Ray tracing One selected lecture: either texture mapping or
Quaternions
3
UNIVERSITY OF
CALGARY Text
Main : o E. Angels “Interactive Computer Graphics, A Top-Down Approach Using
OpenGL”, fifth Ed, 2009.o CPSC453 Course notes, Faramarz Samavati and Luke Olsen, 2006.o Shreiner, Neider, Woo, Davis, “Open GL Programming Guide: The Official
Guide to Learning Open GL(5/e)(recommended). Online: http://fly.cc.fer.hr/~unreal/theredbook/
Other Good texts:o P. Shirley, Fundamentals of Computer Graphics, 2009o F.S. Hill, Jr “Computer Graphics Using OpenGL”, second Ed, 2001.
Graphics IFaramarz Samavati
o F.S. Hill, Jr Computer Graphics Using OpenGL , second Ed, 2001.o D. Hearn and M.P. Baker “Computer Graphics”, third Ed, 2004.o A. Watt “3D Computer Graphics”, third Ed, 2003 o Theoharis, et. al , Graphics & Visualization, 2008.
UNIVERSITY OF
CALGARY Presentation style Important materials will be written on the board Slides: images + movies + highlights (it is note course note!) Slides: images + movies + highlights (it is note course note!) For each lecture the corresponding section of the text and the
course notes will be provides through the course page All slides and note are downloadable through the course page
(weekly based)
Graphics IFaramarz Samavati
4
UNIVERSITY OF
CALGARY Grading
Assignments 40%
Midterm Exam 20%
Final Exam 40%
Graphics IFaramarz Samavati
UNIVERSITY OF
CALGARY Computer Graphics?
Graphics IFaramarz Samavati
5
UNIVERSITY OF
CALGARYForm, Appearance, Behavior
ModelingModeling (form):(form):o How to represent objectsp j
RenderingRendering (appearance): (appearance): o How to add reality
AnimationAnimation (behavior):(behavior):
CPSC 453 FocusCPSC 453 Focus
Brief CoverageBrief Coverage
Graphics IFaramarz Samavati
AnimationAnimation (behavior):(behavior):o How to move objects
Brief CoverageBrief Coverage
UNIVERSITY OF
CALGARYAfter CPSC 453…
ModelingModeling (form):(form): CPSC 589CPSC 589
RenderingRendering (appearance): (appearance):
AnimationAnimation (behavior):(behavior):
CPSC 591CPSC 591
CPSC 587CPSC 587
Graphics IFaramarz Samavati
AnimationAnimation (behavior):(behavior): CPSC 587CPSC 587
6
UNIVERSITY OF
CALGARY Other CPSC Graphics Courses453 453 –– Introduction to Computer GraphicsIntroduction to Computer Graphics
587 / 687 Fundamentals of Computer Animation
589 / 689 Modelling for Computer Graphics
Graphics IFaramarz Samavati
589 / 689 Modelling for Computer Graphics
591 / 691 Rendering
UNIVERSITY OF
CALGARYwhat is this course really about?
Not ! How to use Paint and Imaging packages (Adobe Photoshop) How to use Paint and Imaging packages (Adobe Photoshop) How to use CAD packages (AutoCAD) How to use Graphics packages (3D Studio MAX, MAYA) Graphics Hardware Design Directly about API (DirectX, OpenGL, PHIGS,…)(OpenGL will
be covered in Labs) Directly about GUI (QT will be covered in Labs) We will cover:
Graphics IFaramarz Samavati
We will cover: How to make graphics software and programs:
o Graphics programming and algorithmo Graphics objects, models and conceptso Graphics data structureso Applied geometry and modelingo Graphics fundamentals
7
UNIVERSITY OF
CALGARY A fun course but…
Prerequisites are serious Prerequisites are serious
Programming
Data structure
Linear algebra
Graphics IFaramarz Samavati
•Computer Science 331 or 319
•Mathematics 221
•one of Mathematics 253 or
Applied Mathematics 219
Introductory calculusand geometry
Computer Graphics
Do not worry too much about your difficulties in mathematics, I can assure you that mine are still greater.
UNIVERSITY OF
CALGARY Lectures and Labs
LECTURESGraphics objects, models and conceptsGraphics programming and algorithm
Graphics data structuresApplied geometry and modeling
Graphics fundamentals
Tutorials (LABS)OpenGL
QTReviews
Helps for assignments
Graphics IFaramarz Samavati
8
UNIVERSITY OF
CALGARY Why study graphics?
Wide range of applications Wide range of applications Cool pictures and outputs! (aesthetic appeals)
o A picture is worth a thousand words! Umm, for me also because of the blender!
Graphics IFaramarz Samavati
UNIVERSITY OF
CALGARY Application
Computer Graphics
Entertainment Industry
CAD/CAM Virtual Reality
Visualization
GUI Art
Graphics IFaramarz Samavati
Publication Media
y
9
UNIVERSITY OF
CALGARY CAD (Computer aided design) Computer graphics has had a drastic impact on the
design and engineering process. o Product designo Product designo Architectural design
Starting Point of Computer Graphics (SketchPad)
Graphics IFaramarz Samavati
UNIVERSITY OF
CALGARY CAD : Product designVirtual vehicle
Input: 3D digitizer 3D scanner
Output: monitor + CNC + 3D printer
Graphics IFaramarz Samavati
10
UNIVERSITY OF
CALGARY
Graphics IFaramarz Samavati
UNIVERSITY OF
CALGARY
photorealistic buildings next-generation games
CAD : Architectural Design
next generation games.
Design Reel Autodesk
Graphics IFaramarz Samavati
11
UNIVERSITY OF
CALGARY Overview of the last lecture
Course information Course information What is computer graphics? Why study graphics? Applications
o CAD
Graphics IFaramarz Samavati
UNIVERSITY OF
CALGARY This lecture
Finishing the application/motivation Finishing the application/motivation A brief introduction to graphics’ output system
o Raster displayo Frame buffero True and index coloro CRT monitor
Fl t l
Graphics IFaramarz Samavati
o Flat panelso Stereo viewo 3D displays
12
UNIVERSITY OF
CALGARYEntertainment Industry: Film and Game More than 50 billion dollars
annual revenue
Graphics IFaramarz Samavati
UNIVERSITY OF
CALGARY
Graphics IFaramarz Samavati
13
UNIVERSITY OF
CALGARYPerformance Capture
Graphics IFaramarz Samavati
UNIVERSITY OF
CALGARY
Screen clipping taken: 11/09/2009, 1:14 AM
Graphics IFaramarz Samavati
14
UNIVERSITY OF
CALGARY
Graphics Output System
Graphics IFaramarz Samavati
UNIVERSITY OF
CALGARY
Graphics
Application Program Interface
(API)Application
talks to talks to
Modern Graphic Systems
pHardware
(API):Graphics Library
ApplicationProgram
Raster Image
Graphics IFaramarz Samavati
raster display device
15
UNIVERSITY OF
CALGARYRaster Display (discrete)
Raster display Raster displayo CRT monitorso Flat panelso Others (printers)
Graphics IFaramarz Samavati
UNIVERSITY OF
CALGARY Raster Display Surface
Display surface Display surface Pixel Resolution Connected to a frame buffer
1280
Graphics IFaramarz Samavati
1024
16
UNIVERSITY OF
CALGARY Frame Buffer
A region of memoryFrame buffer
A region of memory Hold all pixel values Usually on graphics card for PC Depth of frame buffer
Graphics IFaramarz Samavati
The number of bits that are used for each pixel, determines how many colors can be represented.
UNIVERSITY OF
CALGARY Color Channels The description of each color in frame buffer is known
as a channel RGB Colors 6 bit frame buffer 32 bit frame buffer
Graphics IFaramarz Samavati
17
UNIVERSITY OF
CALGARY Resolution Examples:Examples:
oo Bitmapped display Bitmapped display 960 x 1152 x 1b 960 x 1152 x 1b 1/8 MB1/8 MBpp p ypp p yoo NTSC TV NTSC TV 640 x 480 x 16b 640 x 480 x 16b 1/2 MB1/2 MBoo HDTVHDTV 1280 x 720 x 16b1280 x 720 x 16b 1.8 MB1.8 MBoo Color workstation Color workstation 1280 x 800 x 32b 1280 x 800 x 32b 4 MB4 MB
Graphics IFaramarz Samavati
UNIVERSITY OF
CALGARY
Graphics IFaramarz Samavati
18
UNIVERSITY OF
CALGARY
Graphics IFaramarz Samavati
UNIVERSITY OF
CALGARY Indexed Color SystemIs it possible to have a broader color spectrum witha small frame buffer?a small frame buffer?
Graphics IFaramarz Samavati
19
UNIVERSITY OF
CALGARY Indexed Color System
Alternative method of associating pixel values with Alternative method of associating pixel values with colors
Color Lookup table (LUT)
Graphics IFaramarz Samavati
Example: set color (color-index, red-value, blue-value, green-value)
Palette The set of possible colors that the system is capable of displaying
UNIVERSITY OF
CALGARY Number of Palettes
k: number of planes in frame buffer (bit) k: number of planes in frame buffer (bit) n: width of each row of LUT (bit) 2n possible colors (palettes) 2k colors at one time Advantages
Graphics IFaramarz Samavati
Less cost of memory more flexibility
20
UNIVERSITY OF
CALGARY Graphics’ output System
Raster displayRaster display Frame buffer True and index colorCRT monitor Flat panels
Graphics IFaramarz Samavati
3D displays
UNIVERSITY OF
CALGARY CRT (Video) Monitors cathode-ray tube (CRT) In this illustration, frame buffer has 6 planes Digital-to-analog converts digital values to
actual voltages Electron gun Deflection coils divert the beams to the
proper place(x,y)
Graphics IFaramarz Samavati
21
UNIVERSITY OF
CALGARY CRT Color Monitors
Different colors are obtained by use of different phosphor coatings
Graphics IFaramarz Samavati
UNIVERSITY OF
CALGARY Refreshing
The glow of a phosphor dot quickly fades
CRT image must be refreshed
Typically more than 60 times per second (60 Hz)
Graphics IFaramarz Samavati
In each refresh interval, the entire image from frame
buffer is sent to the display surface
22
UNIVERSITY OF
CALGARY Flat–panel Display Two types of Flat-panel Liquid Crystal Display (LCD) Liquid Crystal Display (LCD) Non-emissive Needs refreshing
Graphics IFaramarz Samavati
UNIVERSITY OF
CALGARY Active Matrix Panel (LCD)
A net of transistors A net of transistors Brighter / no flickering
Graphics IFaramarz Samavati
23
UNIVERSITY OF
CALGARY Active Matrix Panel (Plasma)
Millions of tiny plasma (Neon, fluorescent) Bulbs (pixels)y ( ) ( ) Plasma: a gas with charged particles two panes of glass, coated with a special phosphor
material. A net of transistors to control bulbs
Graphics IFaramarz Samavati
Screen clipping taken: 13/09/2009, 5:35 PM
UNIVERSITY OF
CALGARY MIKE!!!
What does looklike the world from Mike’s view point!?
Graphics IFaramarz Samavati
24
UNIVERSITY OF
CALGARY Stereo View Mike! (Cyclopse) can not have a good sense of depth
Stereo pictures for more depth sense Stereo pictures for more depth sense
a left and a right eye views
Slightly different views
Graphics IFaramarz Samavati
UNIVERSITY OF
CALGARY Examples
Animated left and right picturesg p
Graphics IFaramarz Samavati
25
UNIVERSITY OF
CALGARY Creating left/right images in CG
In CG we don’t need such a complex cameras In CG, we don t need such a complex cameras Put the camera in any place (including left/right eyes) Define any path as the camera’s trajectory
Graphics IFaramarz Samavati
UNIVERSITY OF
CALGARY3D Displays: Head mounted display
Stereoscopic ViewsT diff t i f (l ft d Two different views of a scene (left and right eyes)
Single viewer
Graphics IFaramarz Samavati
26
UNIVERSITY OF
CALGARY 3D Glasses Several techniques for mixing the left and right images Anaglyph imageg yp g
Graphics IFaramarz Samavati
UNIVERSITY OF
CALGARY
Graphics IFaramarz Samavati
27
UNIVERSITY OF
CALGARY Advanced stereo 3D
Wireless glass for filtering left/right images Wireless glass for filtering left/right images 2 image (left/right) per frame 120HZ display:
60 HZ for refreshing left and 6o fro right
Graphics IFaramarz Samavati
UNIVERSITY OF
CALGARY
Graphics IFaramarz Samavati
top related