Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to...
Transcript of Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to...
![Page 1: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/1.jpg)
Computer Graphics CMU 15-462/15-662, Fall 2016
Lecture 1:
Course Intro: Welcome to Computer Graphics!
![Page 2: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/2.jpg)
CMU 15-462/662, Fall 2015
Hi!Se-Joon Chung
Joey Jia
Zachary Shearer
Stelian Coros
Keenan Crane
![Page 3: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/3.jpg)
CMU 15-462/662, Fall 2015
What is computer graphics?
com•put•er graph•ics /kəmˈpyoodər ˈɡrafiks/ n. The use of computers to synthesize and manipulate visual information.
![Page 4: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/4.jpg)
CMU 15-462/662, Fall 2015
Why visual information?
(Allan Ajifo)(Petar Milošević)
About 30% of brain dedicated to visual processing...
...eyes are highest-bandwidth port into the head!
![Page 5: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/5.jpg)
CMU 15-462/662, Fall 2015
Humans are visual creatures!
![Page 6: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/6.jpg)
CMU 15-462/662, Fall 2015
History of visual depictionHumans have always been visual creatures!
Indonesian cave painting (~38,000 BCE)
![Page 7: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/7.jpg)
CMU 15-462/662, Fall 2015
Visual technology: painting / illustrationNot purely representational: ideas, feelings, data, ...
![Page 8: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/8.jpg)
CMU 15-462/662, Fall 2015
Visual technology: carving / sculpture
![Page 9: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/9.jpg)
CMU 15-462/662, Fall 2015
Visual technology: photography / imagingProcessing of visual data no longer happening in the head!
Joseph Niépce, “View from the Window at Le Gras” (1826)
![Page 10: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/10.jpg)
CMU 15-462/662, Fall 2015
Visual technology: photography / imaging
![Page 11: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/11.jpg)
CMU 15-462/662, Fall 2015
Visual technology: digital imageryIntersection of visual depiction & computation
Ivan Sutherland, “Sketchpad” (1963)
![Page 12: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/12.jpg)
CMU 15-462/662, Fall 2015
Visual technology: digital imagery
![Page 13: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/13.jpg)
CMU 15-462/662, Fall 2015
Visual technology: 3D fabricationCreate physical realization of digital shape
A.J. Herbert / 3M (1979)
![Page 14: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/14.jpg)
CMU 15-462/662, Fall 2015
Visual technology: 3D fabrication
![Page 15: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/15.jpg)
CMU 15-462/662, Fall 2015
Technologies for visual depictionDrawing/painting/illustration (~40,000 BCE) Sculpture (~40,000 BCE) Photography (~1826) Digital Imagery (~1963) 3D Fabrication (~1979)
![Page 16: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/16.jpg)
CMU 15-462/662, Fall 2015
Definition of Graphics, Revisited
com•put•er graph•ics /kəmˈpyoodər ˈɡrafiks/ n. The use of computers to synthesize and manipulate visual information.
Why only visual?
![Page 17: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/17.jpg)
CMU 15-462/662, Fall 2015
Graphics as Synthesis of Sensory Stimuli
com•put•er graph•ics /kəmˈpyoodər ˈɡrafiks/ n. The use of computers to synthesize and manipulate sensory information.
(sound) (touch)
(…What about taste? Smell?!)
![Page 18: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/18.jpg)
CMU 15-462/662, Fall 2015
Computer graphics is everywhere!
![Page 19: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/19.jpg)
CMU 15-462/662, Fall 2015
Entertainment (movies, games)
![Page 20: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/20.jpg)
CMU 15-462/662, Fall 2015
EntertainmentNot just cartoons!
![Page 21: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/21.jpg)
CMU 15-462/662, Fall 2015
Art and design
![Page 22: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/22.jpg)
CMU 15-462/662, Fall 2015
Industrial design
![Page 23: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/23.jpg)
CMU 15-462/662, Fall 2015
Computer aided engineering (CAE)
![Page 24: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/24.jpg)
CMU 15-462/662, Fall 2015
Architecture
![Page 25: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/25.jpg)
CMU 15-462/662, Fall 2015
Scientific/mathematical visualization
![Page 26: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/26.jpg)
CMU 15-462/662, Fall 2015
Medical/anatomical visualization
![Page 27: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/27.jpg)
CMU 15-462/662, Fall 2015
Navigation
![Page 28: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/28.jpg)
CMU 15-462/662, Fall 2015
Communication
![Page 29: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/29.jpg)
CMU 15-462/662, Fall 2015
Foundations of computer graphicsAll these applications demand sophisticated theory & systems Theory - geometric representations - sampling theory - integration and optimization - radiometry - perception and color Systems - parallel, heterogeneous processing - graphics-specific programming languages
![Page 30: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/30.jpg)
CMU 15-462/662, Fall 2015
ACTIVITY: modeling and drawing a cubeGoal: generate a realistic drawing of a cube Key questions: - Modeling: how do we describe the cube? - Rendering: how do we then visualize this model?
![Page 31: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/31.jpg)
CMU 15-462/662, Fall 2015
ACTIVITY: modeling the cubeSuppose our cube is... - centered at the origin (0,0,0) - has dimensions 2x2x2 - edges are aligned with x/y/z axes QUESTION: What are the coordinates of the cube vertices?
A: ( 1, 1, 1 ) E: ( 1, 1,-1 )B: (-1, 1, 1 ) F: (-1, 1,-1 )C: ( 1,-1, 1 ) G: ( 1,-1,-1 )D: (-1,-1, 1 ) H: (-1,-1,-1 )
QUESTION: What about the edges?AB, CD, EF, GH,AC, BD, EG, FH,AE, CG, BF, DH
![Page 32: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/32.jpg)
CMU 15-462/662, Fall 2015
ACTIVITY: drawing the cubeNow have a digital description of the cube:VERTICESA: ( 1, 1, 1 ) E: ( 1, 1,-1 )B: (-1, 1, 1 ) F: (-1, 1,-1 )C: ( 1,-1, 1 ) G: ( 1,-1,-1 )D: (-1,-1, 1 ) H: (-1,-1,-1 )
How do we draw this 3D cube as a 2D (flat) image? Basic strategy: 1. map 3D vertices to 2D points in the image 2. connect 2D points with straight lines ...Ok, but how?
EDGES
AB, CD, EF, GH,AC, BD, EG, FH,AE, CG, BF, DH
![Page 33: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/33.jpg)
CMU 15-462/662, Fall 2015
Perspective projectionObjects look smaller as they get further away (“perspective”) Why does this happen? Consider simple (“pinhole”) model of a camera:
2D image
3D object
camera
![Page 34: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/34.jpg)
CMU 15-462/662, Fall 2015
Perspective projection: side viewWhere exactly does a point p = (x,y,z) end up on the image? Let’s call the image point q=(u,v)
p=(x,y,z)
q=(u,v) 3D object
imag
e
![Page 35: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/35.jpg)
CMU 15-462/662, Fall 2015
Perspective projection: side viewWhere exactly does a point p = (x,y,z) end up on the image? Let’s call the image point q=(u,v) Notice two similar triangles: p=(x,y,z)
q=(u,v)
1z
y
v 3D object
imag
e
Assume camera has unit size, origin is at pinhole c Then v/1 = y/z, i.e., vertical coordinate is just the slope y/z Likewise, horizontal coordinate is u=x/z
c
![Page 36: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/36.jpg)
CMU 15-462/662, Fall 2015
ACTIVITY: now draw it!Need 12 volunteers - each person will draw one cube edge - assume camera is at c=(2,3,5) - convert (X,Y,Z) of both endpoints to (u,v):
1. subtract camera c from vertex (X,Y,Z) to get (x,y,z) 2. divide (x,y) by z to get (u,v)—write as a fraction
- draw line between (u1,v1) and (u2,v2)
VERTICESA: ( 1, 1, 1 ) E: ( 1, 1,-1 )B: (-1, 1, 1 ) F: (-1, 1,-1 )C: ( 1,-1, 1 ) G: ( 1,-1,-1 )D: (-1,-1, 1 ) H: (-1,-1,-1 )
EDGES
AB, CD, EF, GH,AC, BD, EG, FH,AE, CG, BF, DH
![Page 37: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/37.jpg)
CMU 15-462/662, Fall 2015
ACTIVITY: output on graph paper
0 112
16
14
13
512
12
712
23
34
56
1112
10
112
16
14
13
512
12
712
23
34
56
1112
1
![Page 38: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/38.jpg)
CMU 15-462/662, Fall 2015
ACTIVITY: How did we do?
0 112
16
14
13
512
12
712
23
34
56
1112
10
112
16
14
13
512
12
712
23
34
56
1112
1
A: 1/4, 1/2B: 3/4, 1/2C: 1/4, 1D: 3/4, 1E: 1/6, 1/3F: 1/2, 1/3G: 1/6, 2/3H: 1/2, 2/3
2D coordinates:
![Page 39: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/39.jpg)
CMU 15-462/662, Fall 2015
ACTIVITY: Last year’s result
![Page 40: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/40.jpg)
CMU 15-462/662, Fall 2015
But wait… How do we draw lines on a computer?
![Page 41: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/41.jpg)
CMU 15-462/662, Fall 2015
Output for a raster displayCommon abstraction of a raster display: - Image represented as a 2D grid of “pixels” (picture elements) ** - Each pixel can can take on a unique color value
** We will strongly challenge this notion of a pixel “as a little square” soon enough. But let’s go with it for now. ;-)
![Page 42: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/42.jpg)
CMU 15-462/662, Fall 2015
Close up photo of pixels on a modern display
![Page 43: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/43.jpg)
CMU 15-462/662, Fall 2015
What pixels should we color in to depict a line?“Rasterization”: process of converting a continuous object to a discrete representation on a raster grid (pixel grid)
![Page 44: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/44.jpg)
CMU 15-462/662, Fall 2015
What pixels should we color in to depict a line?
Light up all pixels intersected by the line?
![Page 45: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/45.jpg)
CMU 15-462/662, Fall 2015
What pixels should we color in to depict a line?Diamond rule (used by modern GPUs):
light up pixel if line passes through associated diamond
![Page 46: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/46.jpg)
CMU 15-462/662, Fall 2015
What pixels should we color in to depict a line?Is there a right answer?
(consider a drawing a “line” with thickness)
![Page 47: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/47.jpg)
CMU 15-462/662, Fall 2015
How do we find the pixels satisfying a chosen rasterization rule?
Could check every single pixel in the image to see if it meets the condition...
- O(n2) pixels in image vs. at most O(n) “lit up” pixels
- must be able to do better! (e.g., work proportional to number of pixels in the drawing of the line)
![Page 48: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/48.jpg)
CMU 15-462/662, Fall 2015
Incremental line rasterizationLet’s say a line is represented with integer endpoints: (u1,v1), (u2,v2) Slope of line: s = (v2-v1) / (u2-u1) Consider a very easy special case: - u1 < u2, v1 < v2 (line points toward upper-right) - 0 < s < 1 (more change in x than y)
v = v1;for( u=u1; u<=u2; u++ ){ v += s; draw( u, round(v) )}
Common optimization: rewrite algorithm to use only integer arithmetic (Bresenham algorithm)
u1 u2
v1
v2
Assume integer coordinates are at pixel centers
(u1,v1)
(u2,v2)
![Page 49: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/49.jpg)
CMU 15-462/662, Fall 2015
Our line drawing!
0 112
16
14
13
512
12
712
23
34
56
1112
10
112
16
14
13
512
12
712
23
34
56
1112
1
A: 1/4, 1/2B: 3/4, 1/2C: 1/4, 1D: 3/4, 1E: 1/6, 1/3F: 1/2, 1/3G: 1/6, 2/3H: 1/2, 2/3
2D coordinates:
![Page 50: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/50.jpg)
CMU 15-462/662, Fall 2015
We just rendered a simple line drawing of a cube.
But to render more realistic pictures (or animations) we need a much richer model
of the world.
surfaces motion
materials lights
cameras
![Page 51: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/51.jpg)
CMU 15-462/662, Fall 2015
2D shapes
patches may overlap a color sample so depth samples from differ-ent patches always compare with the latter patch in render order“winning”.
Prior to rendering any set of patches, a depth clear to zero is neces-sary to reset the depth buffer. This could be done with a “cover” op-eration that simply zeros the depth buffer (without modifying otherbuffers) or with a scissored depth buffer clear.
Once the render order issues are resolved, color shading is a matterof bicubic interpolation [Sun et al. 2007] in the TES.
This is a lot of complexity to match the PDF specification’s patchrendering order. Certainly if the hardware’s tessellation generatorsimply guaranteed an order consistent with the PDF specification,even at the cost of some less optimal hardware efficiency, renderingPDF gradient meshes would be much more straightforward.
Another option is detecting via CPU preprocessing of the patchmesh whether or not actual mesh overlaps are present [Randria-narivony and Brunnett 2004]. When not present, gradient meshrendering could be much more straightforward and efficient. Inpractice, we know overlaps are rare in real gradient mesh content.
Coarse Level-of-detail Control Graphics hardware tessellationhas a limited maximum level-of-detail for tessellation. When thelevel-of-detail is clamped to a hardware limit for tessellation, tes-sellation artifacts may arise. We monitor the relative size of tes-sellated patches such that their maximum level-of-detail does notgrossly exceed the scale of two or three pixels in window space.If this happens, patches need to be subdivided manually to ensurethe patch mesh avoids objectionable tessellation artifacts. Care isnecessary to maintain a water-tight subdivided patch mesh. This isdone by ensuring exactly matching level-of-detail computations onmutual edges of adjacent patches.
8 Comparing GPU versus CPU Rendering
Our contributions for GPU-acceleration are best understood in con-trast with Illustrator’s pre-existing CPU rendering approach. Allbut a cursory description of Illustrator’s CPU rendering approach isbeyond the scope of this paper. Illustrator’s CPU rendering closelyfollows the PDF standard [Adobe Systems 2008]. AGM’s CPUrenderer relies on a robust, expertly-tuned, but reasonably conven-tional active edge list algorithm [Foley et al. 1990] for rasterizingarbitrary paths including Bezier segments [Turner 2007]. Table 1lists the differences between the CPU and GPU approaches in orga-nizing the framebuffer storage for rendering. Table 2 lists the waysrendering is different between the CPU and GPU approaches.
9 Performance
We benchmarked our GPU-accelerated rendering mode againstAGM’s CPU-based renderer on six Illustrator documents picturedin Figure 10. We selected these scenes for their availability, artisticcontent, and complexity. Table 3 quantitatively summarizes eachscene’s complexity. We consider these scenes representative of thekind of complex artwork we wish to encourage by making its au-thoring more interactive.
9.1 Benchmarking RGB Artwork
Table 4 presents our benchmarking results for RGB color modelrendering. Our benchmarking method executes a script that zoomsand pans over the content to mimic the kind of fast view changes an
(a) WF BambooScene.ai
(b) archerfish.ai (c) Blue Mirror.ai
(d) whale2.ai
(e) Tropical Reef.ai
(f) bigBlend2.ai
Figure 10: Challenging Illustrator artwork for benchmarking.
146:10 • V. Batra et al.
ACM Transactions on Graphics, Vol. 34, No. 4, Article 146, Publication Date: August 2015
[Source: Batra 2015]
![Page 52: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/52.jpg)
CMU 15-462/662, Fall 2015
(Stanislav Orekhov)
Complex 3D surfaces
Platonic noid
[Kaldor 2008]
![Page 53: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/53.jpg)
CMU 15-462/662, Fall 2015
Modeling material properties
[Jakob 2014]
[Wann Jensen 2001]
[Zhao 2013]
![Page 54: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/54.jpg)
CMU 15-462/662, Fall 2015
Realistic lighting environments Up, (Pixar 2009)
![Page 55: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/55.jpg)
CMU 15-462/662, Fall 2015
Realistic lighting environments Toy Story 3 (Pixar 2010)
![Page 56: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/56.jpg)
CMU 15-462/662, Fall 2015
Realistic lighting environments Big Hero 6 (Disney 2014)
![Page 57: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/57.jpg)
CMU 15-462/662, Fall 2015
This image is rendered in real-time on a modern GPU
Unreal Engine Kite Demo (Epic Games 2015)
![Page 58: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/58.jpg)
CMU 15-462/662, Fall 2015
[Mirror’s Edge 2008]
So is this.
![Page 59: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/59.jpg)
CMU 15-462/662, Fall 2015
Animation: modeling motion
https://www.youtube.com/watch?v=wYfYtV_2ezs
Luxo Jr. (Pixar 1986)
![Page 60: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/60.jpg)
CMU 15-462/662, Fall 2015
Physically-based simulation of motion
https://www.youtube.com/watch?v=tT81VPk_ukU [James 2004]
![Page 61: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/61.jpg)
CMU 15-462/662, Fall 2015
Course Logistics
![Page 62: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/62.jpg)
CMU 15-462/662, Fall 2015
About this courseA broad overview of major topics and techniques in computer graphics: geometry, rendering, animation, imaging
Outline: - Focus on fundamental data structures and algorithms that
are reused across all areas of graphics - Assignments on:
- Rasterization - Geometric Modeling - Photorealistic Rendering - Animation - Choose Your Own Adventure!
![Page 63: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/63.jpg)
CMU 15-462/662, Fall 2015
Assignment 0: Math (P)Review
![Page 64: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/64.jpg)
CMU 15-462/662, Fall 2015
Assignment 1: Rasterization
![Page 65: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/65.jpg)
CMU 15-462/662, Fall 2015
Assignment 2: Geometric Modeling
![Page 66: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/66.jpg)
CMU 15-462/662, Fall 2015
Assignment 3: Photorealistic Rendering
![Page 67: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/67.jpg)
CMU 15-462/662, Fall 2015
Assignment 4: Animation
(cribbed from Alec Jacobson)
![Page 68: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/68.jpg)
CMU 15-462/662, Fall 2015
Assignment 5: Choose Your Own Adventure
![Page 69: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/69.jpg)
CMU 15-462/662, Fall 2015
Getting started
Create an account on the course web site: - http://15462.courses.cs.cmu.edu
Sign up for the course on Piazza - http://piazza.com/cmu/fall2016/15462
There is no textbook for this course, but please see the course website for references (there are some excellent graphics textbooks)
![Page 70: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/70.jpg)
CMU 15-462/662, Fall 2015
Assignments / Grading(5%) Warm-up Math (P)Review - Written exercises on basic linear algebra and vector calc. (individually) (60%) Five programming assignments - Four programming assignments (individually) - One “go further” final assignment (in pairs)
(7%) Take-home quizzes - One per lecture, graded on effort - Must be turned in BY YOU at the beginning of the next lecture
(25%) Midterm / final - Both cover cumulative material seen so far
(3%) Class participation - In-class/website comments, other contributions to class
![Page 71: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/71.jpg)
CMU 15-462/662, Fall 2015
Late hand-in policyProgramming assignments - Five late day points for the semester - First four programming assignments only - No more late points? 10% penalty per day - No assignments will be accepted more than 3 days past the deadline
Daily Quizzes - You can skip up to 6 with no penalty
![Page 72: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/72.jpg)
CMU 15-462/662, Fall 2015
Cheating Policy
Let’s keep it simple: if you are caught cheating, you will get a zero for the entire course (not just the assignment).
![Page 73: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/73.jpg)
CMU 15-462/662, Fall 2015
The course web siteWe have no textbook for this class —the lecture slides and instructor/TA/student discussions on the web are the primary course reference
Slide comments and discussion
“Add private note” button: You can add notes to yourself about this slide here.
![Page 74: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/74.jpg)
CMU 15-462/662, Fall 2015
Our philosophyWe want a very active class: come to class, participate in the class, contribute to the web site
Challenging assignments (with tons of “going further” opportunities: see what you can do!)
Challenging exams (see what you can do!)
Very reasonable grading (at least the instructors think so)
![Page 75: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/75.jpg)
CMU 15-462/662, Fall 2015
QUIZ[0]This one is easy: write one thing you want to learn from this course and/or one reason you decided to take the course. Write answer on physical paper. Must be turned in BY YOU in-class at the START of the next lecture.
![Page 76: Lecture 1: Course Intro15462.courses.cs.cmu.edu/.../01_intro_slides.pdf · Course Intro: Welcome to Computer Graphics! CMU 15-462/662, Fall 2015 Hi! Se-Joon Chung Joey Jia Zachary](https://reader034.fdocuments.us/reader034/viewer/2022052019/6032ffc0fef3810ca34c2c83/html5/thumbnails/76.jpg)
CMU 15-462/662, Fall 2015
Next time, we’ll do a math review & preview - Linear algebra, vector calculus - Help make the rest of the course easier!
See you next time!