cs 174a lecture01 introduction
DESCRIPTION
CS174A Design Intro LectureTRANSCRIPT
![Page 1: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/1.jpg)
CS 174A – Winter 2015Introduction to Computer Graphics
Professor Demetri Terzopoulos
TAs: Franklin (Jingyi) Fang, Garett Ridge
Professor Demetri Terzopoulos
TAs: Franklin (Jingyi) Fang, Garett Ridge
Computer Graphics
The Art and Science of creating imagery by computerThe Art and Science of creating imagery by computer
Mathematics
Biomechanics
Engineering
Optics
Art
Physics
Artificial Intelligence
Vision
![Page 2: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/2.jpg)
Applications of CG
Entertainment
• Films
• Computer Games
• Virtual reality
Scientific visualization
• Medical visualization
• Flight simulation
• Architecture
Education
Entertainment
• Films
• Computer Games
• Virtual reality
Scientific visualization
• Medical visualization
• Flight simulation
• Architecture
Education
History
• 2000 B.C.
– orthographic projection
• 1400s
– Perspective: Italian Renaissance
• 1600s
– coordinate systems: Descartes– optics: Huygens– calculus, physics, optics: Newton
• 2000 B.C.
– orthographic projection
• 1400s
– Perspective: Italian Renaissance
• 1600s
– coordinate systems: Descartes– optics: Huygens– calculus, physics, optics: Newton
![Page 3: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/3.jpg)
History
• 1897 oscilloscope: Braun
• 1950-1970
– computers with vector displays
• 1966
– first true raster display
• 1993
– 1200x1200, 500k triangles/sec, 36-bit color, stereo, texture mapping… all at 60Hz
• 1995
– feature-length CG films
• Today…still rapidly evolving
• 1897 oscilloscope: Braun
• 1950-1970
– computers with vector displays
• 1966
– first true raster display
• 1993
– 1200x1200, 500k triangles/sec, 36-bit color, stereo, texture mapping… all at 60Hz
• 1995
– feature-length CG films
• Today…still rapidly evolving
Genesis of Computer Graphics and Interactive Techniques
A PhD project at MIT in the early 1960s
• Ivan E. Sutherland, 1963
– “Sketchpad, a man-machine graphical communication system”
A PhD project at MIT in the early 1960s
• Ivan E. Sutherland, 1963
– “Sketchpad, a man-machine graphical communication system”
![Page 4: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/4.jpg)
Quiz
http://www.accad.ohio-state.edu/~waynec/history/timeline.html
1. When was the term Computer Graphics first stated?
William Fetter of Boeing coins the term "computer graphics" for his human factors cockpit drawings 1960.
2. When was the Graphical User Interface developed?
GUI developed by Xerox (Alan Kay) 1969
3. When was Tron released?
Disney contracts Abel, III, MAGI and DE to create computer graphics for the movie Tron released in 1981.
Quiz
4. Which is the first animated movie to employ CG?
“The Great Mouse Detective” (1986) was the first animated film to be aided by CG.
5. When was the game “Doom” released?
1993
6. Which is the best selling game of all time?
http://en.wikipedia.org/wiki/List_of_best-selling_video_games Tetris (135M copies), Wii Sports (82M), Minecraft (54M), Super Mario Bros. (40M), Mario Kart Wii (35M),Grand Theft Auto V (34M), …
![Page 5: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/5.jpg)
Quiz
7. Which is the newest CG animated movie?
?? (trick question)
8. Which is bigger in terms of gross revenue, the game industry or the (Hollywood) movie industry?
The game industry
9. Which is your favorite animated movie?
The First Computer Game?
Pong, Atari, 1972Spacewars, PDP–1, MIT, 1961
![Page 6: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/6.jpg)
Metal Gear Solid 4
Games
Focus on interactivityFocus on interactivity
![Page 7: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/7.jpg)
Movies
To reality and beyond !To reality and beyond !
Movies
Special effectsSpecial effects
![Page 8: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/8.jpg)
Movies
Digital Compositing
![Page 9: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/9.jpg)
Digital compositing
Digital Compositing
![Page 10: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/10.jpg)
Cartoons
Computer-Aided Design
Precision modeling
Engineering visualization
Precision modeling
Engineering visualization
![Page 11: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/11.jpg)
Modeling Clay
Computer-Aided Design
It’s not just about visualization
• Simulation is also useful
It’s not just about visualization
• Simulation is also useful
![Page 12: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/12.jpg)
Molecular Biology
Visualization: Scientific
Environmental Physics
Visualization: Medical
![Page 13: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/13.jpg)
Visualization: Architectural
http://www.diamondschmitt.com/
Visualization: Info Smith and Fiore
![Page 14: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/14.jpg)
Graphical User Interfaces
Steven Schkolne
Art
Steven Schkolne
![Page 15: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/15.jpg)
Digital Art
Genetically evolvedGenetically evolvedCarl Sims
Digital Art
The Top-Grossing Film of All Time^2nd
“Titanic”
By Jason Salavon
![Page 16: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/16.jpg)
What is an Image / Video?
• Array of pixels (one or more numbers)
• A video is a time sequence of images
• How they are formed:
– Objects in the world (static or dynamic)
– Illumination (light sources)
– Imaging device (eye, camera)
• We want to synthesize images/videos
• Array of pixels (one or more numbers)
• A video is a time sequence of images
• How they are formed:
– Objects in the world (static or dynamic)
– Illumination (light sources)
– Imaging device (eye, camera)
• We want to synthesize images/videos
Illumination
Camera
Objects
Basic Elements
Modeling
Animation
Rendering
Interaction
Modeling
Animation
Rendering
Interaction
![Page 17: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/17.jpg)
Basic Elements
• Modeling
– How do we model (mathematically represent) objects?– How do we construct models of specific objects?
• Animation
– How do we represent the motions of objects?– How do we give animators control of this motion?
• Rendering
– How do we simulate the real-world behavior of light?– How do we simulate the formation of images?
• Interaction
– How do we enable humans and computers to interact?– How do we design human-computer interfaces?
• Modeling
– How do we model (mathematically represent) objects?– How do we construct models of specific objects?
• Animation
– How do we represent the motions of objects?– How do we give animators control of this motion?
• Rendering
– How do we simulate the real-world behavior of light?– How do we simulate the formation of images?
• Interaction
– How do we enable humans and computers to interact?– How do we design human-computer interfaces?
Modeling
Primitives
• 3D points
• 3D lines and curves
• surfaces (BREPs): polygons, patches
• volumetric representations
• image-based representations
Attributes
• Color, texture maps
• Lighting properties
Geometric transformations
Primitives
• 3D points
• 3D lines and curves
• surfaces (BREPs): polygons, patches
• volumetric representations
• image-based representations
Attributes
• Color, texture maps
• Lighting properties
Geometric transformations
![Page 18: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/18.jpg)
Rendering
Visibility
Simulating light propagation
• Reflection
• Asborption
• Scattering
• Emission
• Interference
Visibility
Simulating light propagation
• Reflection
• Asborption
• Scattering
• Emission
• Interference
Animation
Keyframe animation
Motion capture
Procedural animation
• Physics-based animation
• Behavioral animation
Keyframe animation
Motion capture
Procedural animation
• Physics-based animation
• Behavioral animation
![Page 19: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/19.jpg)
Interaction
Input/Output Devices
Tools
• Modeling, rendering, and animation
Input/Output Devices
Tools
• Modeling, rendering, and animation
Elements of CG
The graphics pipelineThe graphics pipeline
Modeling Animation Rendering
![Page 20: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/20.jpg)
Surface patches NURBS
Polygon meshes
Point clouds
Texture maps
Parametric curves
Modeling
Representing objects geometrically on a computer
Representing objects geometrically on a computer
Modeling
Alternative representationsAlternative representations
Blobs
Voxels
Subdivision surfaces
![Page 21: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/21.jpg)
Modeling
Altering geometric modelsAltering geometric models
Affine transform
Ying, Kristjansson, Biermann, Zorin
Scanning Shapes
Digital Michaelangelo Project
![Page 22: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/22.jpg)
Plant Modeling
Plant Modeling
![Page 23: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/23.jpg)
Rendering
Key elementsKey elementsGeometric Shape
Illumination
& ReflectanceCamera
Pixels
Camera Model
![Page 24: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/24.jpg)
Rendering
Draw visible surfaces onto displayDraw visible surfaces onto display
Camera (eye position)
Camera (view direction)
Image Plane
Clipping Scan Conversion
Reflectance Modeling
![Page 25: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/25.jpg)
Complex Reflectance
Subsurface Scattering
Translucency and varied levels of light penetration can be created using subsurface scattering effectsTranslucency and varied levels of light penetration can be created using subsurface scattering effects
![Page 26: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/26.jpg)
Texture
Multilevel texture synthesisMultilevel texture synthesis
Non-Photorealistic Rendering
Aaron Hertzmann
![Page 27: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/27.jpg)
Rendering: Information
Animation
Keyframe animationKeyframe animation
Keyframing
![Page 28: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/28.jpg)
Animation
Pixar: “Luxo Jr.” (1986)Pixar: “Luxo Jr.” (1986)
Animation
Motion captureMotion capture
![Page 29: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/29.jpg)
Animating Golem in LOTR
Animation
The Animatrix –“Final Flight of the Osiris”
The Animatrix –“Final Flight of the Osiris”
![Page 30: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/30.jpg)
Animation
Example: “Geri’s Game” - PixarExample: “Geri’s Game” - Pixar
Cloth Simulation
![Page 31: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/31.jpg)
Animation
Physics-based animationPhysics-based animation
Dynamics
Fluid Simulation
Modeling
• Incompressibility
• Viscocity
Navier-Stokes Equations
Level Sets
Modeling
• Incompressibility
• Viscocity
Navier-Stokes Equations
Level Sets
0
1( ) ( )
: fluid velocity field
: gravity
p: pressure
: viscosity
: density
v pt
v
u
uu u u g
u
g
![Page 32: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/32.jpg)
Smoke Simulation
Assumptions
• No viscosity
Rendering
• Photon maps
• Multiple scattering
Assumptions
• No viscosity
Rendering
• Photon maps
• Multiple scattering0
1( )
: smoke velocity field
: external forces
p: pressure
: density
pt
u
uu u f
u
f
Animation
Behavioral animationBehavioral animationEthology
![Page 33: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/33.jpg)
Reality is *Very* Complex
Reality is *Very* Complex
![Page 34: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/34.jpg)
Great! But what are we going to do?
Learn the mathematical basics of graphics
Apply them in 3 programming assignments
Show that you know them in 2 exams
Learn the mathematical basics of graphics
Apply them in 3 programming assignments
Show that you know them in 2 exams
Summary of the Syllabus
Math
Rendering
Modeling
Animation
(Interaction)
(Hardware)
Math
Rendering
Modeling
Animation
(Interaction)
(Hardware)
![Page 35: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/35.jpg)
Math
Linear (vector/matrix) algebra
Coordinate systems
Geometry
• Points, lines, planes
Affine transformations
Projection transformations
More geometry
• Curves, surfaces
Linear (vector/matrix) algebra
Coordinate systems
Geometry
• Points, lines, planes
Affine transformations
Projection transformations
More geometry
• Curves, surfaces
Comments From Previous Courses
• Lots of (dry) math!
• A lot of material
• Fast pace
• A lot of programming
• Tough third project
• Challenging final exam
• Great animation shows at the start of each lecture!
• Lots of (dry) math!
• A lot of material
• Fast pace
• A lot of programming
• Tough third project
• Challenging final exam
• Great animation shows at the start of each lecture!
![Page 36: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/36.jpg)
Advice
• Attend lectures and discussion sessions!
– You will perform better on this course if you do (trust me)
– The lecture slides are your “bible” for the exams
• Start the assignments EARLY!!
– Get HELP from us with the assignments EARLY!
• Do NOT do more on the assignments than you are required, unless you are done with the required part of the assignment
– You will NOT get more points for additional work
• Refresh your knowledge of linear algebra and geometry, and keep up with the math
• Attend lectures and discussion sessions!
– You will perform better on this course if you do (trust me)
– The lecture slides are your “bible” for the exams
• Start the assignments EARLY!!
– Get HELP from us with the assignments EARLY!
• Do NOT do more on the assignments than you are required, unless you are done with the required part of the assignment
– You will NOT get more points for additional work
• Refresh your knowledge of linear algebra and geometry, and keep up with the math
• Manage your course load
• No plagiarism (of course)
• Do individual work
• Your code must work on HSSEAS systems
• Please send e-mails to us from your UCLA accounts only
• Manage your course load
• No plagiarism (of course)
• Do individual work
• Your code must work on HSSEAS systems
• Please send e-mails to us from your UCLA accounts only
Important Issues to Remember
![Page 37: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/37.jpg)
A Basic Graphics System
Input devices
Output devices
Computing & rendering system
Input devices
Output devices
Computing & rendering system
Input Devices
Keyboard
Mouse
Light Pen
Game controller
Tablet
Data glove
Other sensors
Keyboard
Mouse
Light Pen
Game controller
Tablet
Data glove
Other sensors
![Page 38: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/38.jpg)
Output Devices
Display
• CRT, Plasma, LCD, Micromirror
Printer
• 2D and 3D Printers
Plotter
Display
• CRT, Plasma, LCD, Micromirror
Printer
• 2D and 3D Printers
Plotter
Standard Display Devices
PlasmaLCD
(Liquid Crystal Display)
CRT(Cathode Ray Tube)
![Page 39: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/39.jpg)
Exotic Display Devices
AutostereoscopicAutostereoscopic
ImmersiveImmersive
HolographicHolographic
Head-MountedHead-Mounted
VolumetricVolumetric
CRT Raster Graphics
Virtual raster device
• Grid of m x n phosphors
Real raster device
Virtual raster device
• Grid of m x n phosphors
Real raster device
![Page 40: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/40.jpg)
Analog Video Signal Format
Displaying Intensities
Gamma CorrectionGamma Correction
![Page 41: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/41.jpg)
Basic Analog Display Architecture
Pixels:
• Bitmap: 1bit/pixel
• Grey scale: 8 bits/pixel
• Color map: 8 bits/pixel, indirect
• True color: 24 bits/pixel
• True color + Alpha Channel: 32 bits/pixel
Pixels:
• Bitmap: 1bit/pixel
• Grey scale: 8 bits/pixel
• Color map: 8 bits/pixel, indirect
• True color: 24 bits/pixel
• True color + Alpha Channel: 32 bits/pixel
Images – Monochrome
How many intensities are enough?
Black and White (Bitmaps) Grayscale
How many intensities are enough?
Black and White (Bitmaps) Grayscale
![Page 42: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/42.jpg)
Color
Common format RGB (3x8 = 24 bits per pixel)Common format RGB (3x8 = 24 bits per pixel)
Rendering System
Software
• Interface
• Primitives
• Techniques
Hardware
• Graphics Pipeline
Software
• Interface
• Primitives
• Techniques
Hardware
• Graphics Pipeline
![Page 43: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/43.jpg)
The Graphics Pipeline
Why a pipeline?
• Well defined stages
• Parallelism
• Software and Hardware
Radeon X800 by ATI
• 16 parallel rendering pipelines
• Floating point architecture
• Millions of triangles per second
Why a pipeline?
• Well defined stages
• Parallelism
• Software and Hardware
Radeon X800 by ATI
• 16 parallel rendering pipelines
• Floating point architecture
• Millions of triangles per second
Radeon 9700 by ATI
Graphics Pipeline
Modeling
Illumination
Viewing (Projection)
Clipping
Visibility
Rasterization
Modeling
Illumination
Viewing (Projection)
Clipping
Visibility
Rasterization
![Page 44: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/44.jpg)
Modeling
Geometric Primitives
• Points
• Lines
• Planes
• Polygons
• Parametric surfaces
• Implicit surfaces
• Etc.
Geometric Primitives
• Points
• Lines
• Planes
• Polygons
• Parametric surfaces
• Implicit surfaces
• Etc.
Modeling Transformations
AssemblyAssembly
![Page 45: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/45.jpg)
Viewing
Orthographic PerspectiveOrthographic Perspective
Clipping
Remove what is not visibleRemove what is not visible
![Page 46: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/46.jpg)
Visibility
Resolve occlusions (efficiently)Resolve occlusions (efficiently)
Illumination
Compute normals and color at vertices
Per vertex operations
Compute normals and color at vertices
Per vertex operations
![Page 47: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/47.jpg)
Shading
Rasterization
Convert to colored pixelsConvert to colored pixels
![Page 48: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/48.jpg)
Per Pixel / Fragment Operations
Hardware features
• Vertex shaders
• Fragment shaders
Hardware features
• Vertex shaders
• Fragment shaders
Texture Mapping
![Page 49: CS 174A Lecture01 Introduction](https://reader034.vdocuments.us/reader034/viewer/2022051006/577cc0491a28aba7118f8c0b/html5/thumbnails/49.jpg)
Other Issues
Shadows
Participating media
Subsurface scattering
Motion blur
Camera models
Etc.
Shadows
Participating media
Subsurface scattering
Motion blur
Camera models
Etc.
Final Result