Post on 06-Aug-2020
transcript
1
6.837 Introduction to Computer Graphics
6.837 Fall 04 – Durand & Cutler 2
Luxo Jr.• Pixar Animation Studios, 1986• Director: John Lasseter
6.837 Fall 04 – Durand & Cutler 3
Plan• Introduction
• Overview of the Semester
• Administrivia
• Iterated Function Systems (Fractals)6.837 Fall 04 – Durand & Cutler 4
Team• Lecturers
– Frédo Durand– Barb Cutler
• TA– Rob Jagnow
• Course secretary– Bryt Bradley
• 6.837-staff@graphics.csail.mit.edu• 6.837-ta@graphics.csail.mit.edu
6.837 Fall 04 – Durand & Cutler 5
Why Computer Graphics?• Movies• Games• Simulation• CAD-CAM• Architecture• Virtual Reality• Visualization• Medical Imaging
6.837 Fall 04 – Durand & Cutler 6
Movies
2
6.837 Fall 04 – Durand & Cutler 7
Games
6.837 Fall 04 – Durand & Cutler 8
Simulation
6.837 Fall 04 – Durand & Cutler 9
CAD-CAM & Design
6.837 Fall 04 – Durand & Cutler 10
Architecture
6.837 Fall 04 – Durand & Cutler 11
Virtual Reality
6.837 Fall 04 – Durand & Cutler 12
Visualization
3
6.837 Fall 04 – Durand & Cutler 13
Medical Imaging
6.837 Fall 04 – Durand & Cutler 14
What you will learn in 6.837
• Fundamentals of computer graphics algorithms
• How to implement most of theapplications just shown
• How graphics APIs and the graphics hardware work
6.837 Fall 04 – Durand & Cutler 15
What you will NOT learn in 6.837
• Software packages– CAD-CAM– Photoshop and other painting tools
• Artistic skills• Game design• Graphics API
– Although you will be exposed to OpenGL
6.837 Fall 04 – Durand & Cutler 16
Questions?
6.837 Fall 04 – Durand & Cutler 17
Plan• Introduction
• Overview of the Semester
• Administrivia
• Iterated Function Systems (Fractals)6.837 Fall 04 – Durand & Cutler 18
Overview of the Semester• Ray Casting / Ray Tracing• The Graphics Pipeline• Textures, Shadows• Sampling, Global Illumination• Modeling, Animation, Color• Advanced Topics
4
6.837 Fall 04 – Durand & Cutler 19
Ray Casting• For every pixel
construct a ray from the eye – For every object in the scene
• Find intersection with the ray • Keep if closest
6.837 Fall 04 – Durand & Cutler 20
Ray Tracing• Shade (interaction of light and material)• Secondary rays (shadows, reflection, refraction
6.837 Fall 04 – Durand & Cutler 21
Ray Tracing• Original Ray-traced
image by Whitted
• Image computed using the Dali ray tracer by Henrik Wann Jensen
• Environment map by Paul Debevec
6.837 Fall 04 – Durand & Cutler 22
The Graphics PipelineRay Casting
For each pixel
For each object
Send pixels to scene
Rendering Pipeline
For each triangle
For each projected pixel
Project scene to pixels
6.837 Fall 04 – Durand & Cutler 23
The Graphics Pipeline• Transformations
• Clipping
• Rasterization
• Visibility
6.837 Fall 04 – Durand & Cutler 24
Textures and Shading
5
6.837 Fall 04 – Durand & Cutler 25
Shadows
6.837 Fall 04 – Durand & Cutler 26
Sampling & Antialiasing
6.837 Fall 04 – Durand & Cutler 27
Traditional Ray Tracing
6.837 Fall 04 – Durand & Cutler 28
Ray Tracing + Soft Shadows
6.837 Fall 04 – Durand & Cutler 29
Ray Tracing + Caustics
6.837 Fall 04 – Durand & Cutler 30
Global Illumination
6
6.837 Fall 04 – Durand & Cutler 31
Modeling• Curved surfaces• Subdivision surfaces
6.837 Fall 04 – Durand & Cutler 32
Animation: Keyframing
ACM © 1987 “Principles of traditional animation applied to 3D computer
animation”
6.837 Fall 04 – Durand & Cutler 33
Particle system (PDE)
6.837 Fall 04 – Durand & Cutler 34
Rigid Body Dynamics• Simulate all external
forces and torques
( )tx
( )tv( )1
b tp
( )3b tp
( )2b tp
( )2 tf
( )3 tf
( )1 tf
6.837 Fall 04 – Durand & Cutler 35
Color
wavelength
0.75
1.00
0.50
0.25
0.00400 500 600 700
S M L
saturationhue
6.837 Fall 04 – Durand & Cutler 36
Image-Based Rendering• Use images as inputs and representation• E.g. Image-based modeling and photo editing
Oh, Chen, Dorsey and Durand 2001
7
6.837 Fall 04 – Durand & Cutler 37
Questions?
6.837 Fall 04 – Durand & Cutler 38
Plan• Introduction
• Overview of the Semester
• Administrivia
• Iterated Function Systems (Fractals)
6.837 Fall 04 – Durand & Cutler 39
Administrivia: Prerequisites• Not enforced• All assignments are in C++
– Optional review/introductory sessionMonday Sept 13, 7:30-9pm, 4-231
• Linear Algebra (18.06)– vectors, matrices, basis, solving systems of equations– Optional review/introductory session
Monday Sept 20, 7:30-9pm, 2-105• Algorithms (6.046)
– Orders of growth, bounds, sorting, trees
6.837 Fall 04 – Durand & Cutler 40
Administrivia: Grading Policy• Assignments: 75%
– Weekly programming assignments– Must be completed individually– No final project this year
• Quiz: 10%– Tuesday, Oct 26 (in class)
• Final Exam: 10%– TBA during finals week
• Participation: 5%
6.837 Fall 04 – Durand & Cutler 41
Administrivia: Assignments• Turn in code and executable (Linux or Windows)• Coding style important
– Many assignments are cumulative
• Collaboration policy:– You can chat, but code on your own– Acknowledge your collaboration!
• Late policy:– Due Wednesday @ 11:59pm– Penalized 25% per day late– Extensions only considered if requested 1 week before due date
6.837 Fall 04 – Durand & Cutler 42
"Create Your Own Assignment"• Last assignment, ~ 1 week effort• Extension of previous assignment OR
Exploration of other topic discussed in class• Suggestions throughout the semester• We'll review your proposal to make sure
the scope is appropriate
8
6.837 Fall 04 – Durand & Cutler 43
Administrivia: Lab & Office Hours• http://graphics.csail.mit.edu/classes/6.837/F04/• Fredo
– Tuesday 6- 7pm in W20- 575• Barb
– Wednesdays 6- 8pm in W20- 575 • Rob
– Wednesday 8- 11pm in W20- 575• Send email to make an appointment
for some other time6.837 Fall 04 – Durand & Cutler 44
Questions
6.837 Fall 04 – Durand & Cutler 45
Plan• Introduction
• Overview of the Semester
• Administrivia
• Iterated Function Systems (Fractals)6.837 Fall 04 – Durand & Cutler 46
Iterated Function Systems (IFS)
• Capture self-similarity• Contraction
(reduce distances)• An attractor is a
fixed point
Υ )(AfA i=
6.837 Fall 04 – Durand & Cutler 47
Example: Sierpinski Triangle• Described by a set of n affine transformations • In this case, n = 3
– translate & scale by 0.5
6.837 Fall 04 – Durand & Cutler 48
Example: Sierpinski Trianglefor “lots” of random input points (x0, y0)
for j=0 to num_iters
randomly pick transformation i
(xk+1, yk+1) = fi (xk, yk)
display (xk, yk)
9
6.837 Fall 04 – Durand & Cutler 49
Example: Sierpinski Trianglefor “lots” of random input points (x0, y0)
for j=0 to num_iters
randomly pick transformation i
(xk+1, yk+1) = fi (xk, yk)
display (xk, yk)
6.837 Fall 04 – Durand & Cutler 50
Example: Sierpinski Trianglefor “lots” of random input points (x0, y0)
for j=0 to num_iters
randomly pick transformation i
(xk+1, yk+1) = fi (xk, yk)
display (xk, yk)
6.837 Fall 04 – Durand & Cutler 51
Example: Sierpinski Trianglefor “lots” of random input points (x0, y0)
for j=0 to num_iters
randomly pick transformation i
(xk+1, yk+1) = fi (xk, yk)
display (xk, yk)
6.837 Fall 04 – Durand & Cutler 52
Example: Sierpinski Trianglefor “lots” of random input points (x0, y0)
for j=0 to num_iters
randomly pick transformation i
(xk+1, yk+1) = fi (xk, yk)
display (xk, yk)
6.837 Fall 04 – Durand & Cutler 53
for “lots” of random input points (x0, y0)
for j=0 to num_iters
randomly pick transformation i
(xk+1, yk+1) = fi (xk, yk)
display (xk, yk)
Example: Sierpinski Triangle
6.837 Fall 04 – Durand & Cutler 54
for “lots” of random input points (x0, y0)
for j=0 to num_iters
randomly pick transformation i
(xk+1, yk+1) = fi (xk, yk)
display (xk, yk)
Example: Sierpinski Triangle
10
6.837 Fall 04 – Durand & Cutler 55
Example: Sierpinski Trianglefor “lots” of random input points (x0, y0)
for j=0 to num_iters
randomly pick transformation i
(xk+1, yk+1) = fi (xk, yk)
display (xk, yk)
6.837 Fall 04 – Durand & Cutler 56
Example: Sierpinski Trianglefor “lots” of random input points (x0, y0)
for j=0 to num_iters
randomly pick transformation i
(xk+1, yk+1) = fi (xk, yk)
display (xk, yk)
Increasing the number of iterations
6.837 Fall 04 – Durand & Cutler 57
Another IFS: The Dragon
6.837 Fall 04 – Durand & Cutler 58
Application: Fractal Compression• Exploit the self-similarity in an image
Compressed using Fractal Photo Lab
6.837 Fall 04 – Durand & Cutler 59
Assignment 0: IFS • Get familiar with:
– C++ environment– Vector, Matrix & Image classes
• Due Wednesday Sept 15 at 11:59pm• Optional C++ review/introductory session
Monday Sept 13, 7:30-9pm, 4-231• http://graphics.lcs.mit.edu/classes/6.837/F03/
6.837 Fall 04 – Durand & Cutler 60
Questions?