comp 102 computer graphics and...
TRANSCRIPT
![Page 1: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/1.jpg)
COMP 102Computer Graphics
and Animation
Paul Kry
4 November, 2013
![Page 2: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/2.jpg)
“There is no reason anyone would want a computer in their home.”Ken Olson, founder and president of DEC, 1977
“640K ought to be enough for anybody.”Bill Gates, cofounder of Microsoft, 1981
![Page 3: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/3.jpg)
“Computers are useless. They can only give you answers”
Pablo Picasso
![Page 4: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/4.jpg)
Meats Meier
Art
Kenneth A. Huff
![Page 5: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/5.jpg)
Games
![Page 6: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/6.jpg)
Movies
![Page 7: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/7.jpg)
Visualization
NASA[Li et al., 2007]
![Page 8: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/8.jpg)
CM Labs, crane simulator
Training
Boeing 747 flight simulator
Microsoft flight simulator
![Page 9: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/9.jpg)
What is Computer Graphics?
• A vast field that encompasses pretty much anything related to computer generated images– Modeling, rendering, animation,
image processing, visualization, interactive techniques, etc.
[example assignments and projects from 557 and 559]
![Page 10: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/10.jpg)
Computer Graphics
Mathematics made visible
![Page 11: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/11.jpg)
Evolution of computing environments
• Graphics has been a key to technology growth – Graphical user interfaces– Desktop publishing – Visualization– Gaming consoles
• Hardware revolution drives everything– price/performance
improving exponentially (Moore’s Law)
– Graphics processors oneven faster exponentials
[van Dam]
![Page 12: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/12.jpg)
Date
Price
CPU
Memory
Storage
Monitor
Devices
GUI
1984 2012
$2500 $2000
8 MHz 3.1 GHz (Quad)
128KB RAM 4.0GB DDR2 SDRAM
(1 GB on GPU)
400KB Floppy 1TB Hard Disk
9” Black&White 27” Color512 x 342
68 dpi2560 x 1440
108 dpi
MouseKeyboard
MouseKeyboard
Desktop WIMP Desktop WIMP
+28
x .8
x 387(x 1550)
x 31250
x 2500000
x 3
x 21
x 1.6
samesame
same
Original Macintosh New iMac 27”
[van Dam]
![Page 13: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/13.jpg)
Graphics Processing Unit (GPU)Not part of the previous comparison
GPUs now part of every machine,
arguably more powerful than CPUs
and programmable
2012
4,000,000,00010-Core Xeon
GTX680
![Page 14: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/14.jpg)
Outline
• Geometry representation
• Rendering techniques
• Animation introduction
![Page 15: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/15.jpg)
Representing Geometry
• Parametric / Explicit
– Points
– Line segments (2 points)p(t) = a t + b (1-t) t=[0,1]
– Triangles (3 points)
– Quadrilaterals (4 points)
– Parametric surfaces(x,y,z) = f(u,v)
• Implicit
– Geometry defined by the 3D points that satisfy
F(x,y,z) = 0
– Example: a planeF(x,y,z) = ax + by + cz + d
– Example: a sphereF(x,y,z) = x2 + y2 + z2 - 1
b
a
What is the best representation?
![Page 16: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/16.jpg)
Where does geometry come from?
![Page 17: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/17.jpg)
Where does geometry come from?
Artists
CAD models
[ES3DStudios][Mudbox]
![Page 18: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/18.jpg)
Where does geometry come from?
Measurement• Multi camera stereo
• Laser scans
• Medical scans
[Beeler et al 2010]
![Page 19: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/19.jpg)
Where does geometry come from?Procedural• Noise
• Fractals
• L-systems
• Scripts
![Page 20: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/20.jpg)
Where does geometry come from?
Physically Based Modeling• Shapes produced through physics simulation
[Thürey et al. 2010] [Bridson et al. 2002]
![Page 21: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/21.jpg)
![Page 22: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/22.jpg)
Drawing Geometry
• Object Order Rendering
– Uses points, lines, and triangles(other geometry is converted to these primitives)
– Points defining primitives are projected onto the viewing plane, and rasterized (filled in)
• Image Order Rendering
– Called ray tracing (or ray casting) as a ray is generated for each pixel in the image
– Find intersections between rays and scene geometry
![Page 23: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/23.jpg)
Object Order Rendering• Points, lines, and triangles
– All are defined by points
[Durand]
![Page 24: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/24.jpg)
Object Order Rendering
Points are projected onto the image plane (left)
Triangle is rasterized (right)
[Durand]
![Page 25: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/25.jpg)
Rasterization / Scan Conversion
• Drawing a line– For horizontal, vertical and
diagonal lines all pixels lie on ideal line
– For lines at arbitrary angle, pick pixels closest to ideal line
– Aliasing “Jaggies” fixed by adjusting intensity
![Page 26: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/26.jpg)
Visibility • Painter’s algorithm
– Sort back to front
– Draw!
– Doesn’t always work...
[Durand]
![Page 27: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/27.jpg)
Visibility • Binary space partition
– Linear time back to front sort
– Key to 3D games before consumer level GPUs (Doom 1993)
– Still important in modern games for culling geometry
[Durand]
![Page 28: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/28.jpg)
Visibility • Z-buffer
– Store depth at every pixel
– Compare when rasterizing
![Page 29: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/29.jpg)
Texture Mapping
![Page 30: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/30.jpg)
Lighting / Shading
• How much light reflected to the eye?
• Depends on angles, materials
• What if light is occluded?
![Page 31: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/31.jpg)
Object Order Rendering Summary
• FAST! Used for most interactive applications
• Also used for most movie production (e.g., Renderman used for Pixar films)
• Consumer graphics cards can render millions of triangles per frame
• Tricky to render realistic light transport (soft shadows, glossy reflections)
![Page 32: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/32.jpg)
Image Order Rendering
• Follow light path in reverse, back toward the light
– Ray tracing finds the intersection of scene geometry with a ray starting at the eye and going through each pixel of the image plane.
![Page 33: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/33.jpg)
Ray Tracing
• Cast rays from viewpoint through each pixel
• Lots of rays to cast... Expensive!
[Durand]
![Page 34: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/34.jpg)
Ray Tracing
• Deal with shadows by casting more rays
– Cast rays from visible point towards lights
[Durand]
![Page 35: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/35.jpg)
Reflection and Refraction
Relatively easy, just cast more rays
NV
IDIA
Op
tix
![Page 36: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/36.jpg)
Motion Blur
Relatively easy, just cast more rays
Co
ok e
t a
l. 1
98
4 (
Lu
ca
sfilm
)
![Page 37: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/37.jpg)
Depth of Field
Relatively easy, just cast more rays
Lu
is A
lma
za
n(V
-Ra
y)
![Page 38: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/38.jpg)
Lighting / Shading
• The full problem is actually much more complex!!!
– Light is everywhere and can even be scattered beneath the surface of materials
– Global illumination (holy grail of rendering)
[spin99, GELATO]
![Page 39: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/39.jpg)
Ray Tracing Global Illumination• Even more rays to cast!
Super Expensive!
• Possible through careful sampling (e.g., Monte Carlo methods) and path tracing (working both from lights and viewer)[Durand]
![Page 40: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/40.jpg)
“If you were plowing a field, which would you rather use: Two strong oxen or 1024 chickens?”
Seymour Cray
![Page 41: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/41.jpg)
![Page 42: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/42.jpg)
• NVIDIA GTX680 (2012)
• 3.5 billion transistors
• 1536 unified shaders
• IBM Cell processor
• PS3 (2005)
• 1 PPE + 8 SPE
![Page 43: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/43.jpg)
Real time ray tracing
• 2007 - IBM
300000 triangles, 60 fps, 1080p, 14 Cell processors (PS3)http://www.youtube.com/watch?v=zKqZKXwop5E
• Today – NVIDIA
OPTIX / CUDA
2496 processors in TESLA K20
Design Garage Demo (2010)http://www.youtube.com/watch?v=kcP1NzB49zU
![Page 44: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/44.jpg)
Image Order Rendering Summary
• Typically slower but easily parallelizable
• Smart data structures necessary to speed up ray scene intersections
• Easy to generate a variety of light transport effects, such as reflections on smooth surfaces
• Sampling provides a straightforward approach to many rendering issues
– depth of field, motion blur, area lights, BRDFs, antialiasing, etc.
![Page 45: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/45.jpg)
2D Images of 3D scenes
• The goal of rendering is typically to create images that provide information about a 3D world, much in the same way a camera can be used to take a picture
– Why does this work?
– What influences our perception of depth?
![Page 46: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/46.jpg)
reflection
stereopsisdefocus
fog / atmospheric
shading
texture gradient
occlusion
vergenceaccommodation
shadows
perspective size familiarityheight in image
![Page 47: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/47.jpg)
Computer Animation
![Page 48: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/48.jpg)
Where does motion come from?
• Artist based
– Key frames
• Physically based
– Simulation / Control
• Phenomenological
– Procedural animation
• Reality based
– Motion capture
![Page 49: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/49.jpg)
Artists / Animators
Key frames
![Page 50: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/50.jpg)
Artists / Animators
Inverse kinematics [Nakamura]
Blend Shapes
![Page 51: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/51.jpg)
Physically based simulation
![Page 52: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/52.jpg)
Physically based simulation
[Fedkiw et al.]
![Page 53: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/53.jpg)
Procedural Animation
• Flocking behaviour and crowds
Boids [Reynolds 1987] Aggregate Dynamics [Narain et al. 2009]
![Page 54: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/54.jpg)
Procedural Animation
Curl noise for procedural fluid flow, Bridson
![Page 55: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/55.jpg)
Motion Capture
• Directly captures subtleties of human motion
![Page 56: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/56.jpg)
Motion Capture
Andy SerkisGollum
![Page 57: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/57.jpg)
Motion Capture
Brian Carpenter
![Page 58: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/58.jpg)
Motion Capture
[Softimage Facerobot]
![Page 59: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/59.jpg)
Motion Capture
[Park, Hodgins, 2006]
![Page 60: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/60.jpg)
Where does motion come from?
• Artist based– Key frames, blend shapes, inverse kinematics,
other tools
• Physically based– Simulation of equations of motion,
– Simulation of motor control
• Phenomenological– Procedural animation
• Reality based – Motion capture
![Page 61: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/61.jpg)
Time Permitting
A quick introduction to physically based animation
![Page 62: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/62.jpg)
Physically Based Computer Animation
• Differences from engineering and physics– Computer animation
• High visual detail
• High performance
• Low memory consumption
– Engineering and Numerical Physics
• Momentary visual details not needed
• Predict long term behaviour and or high precision
• High computation time and memory consumption
![Page 63: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/63.jpg)
It Came From Beneath The Sea (1955)“Fed up with traffic noise, Ray Harryhausen's giant six-tentacledoctopoid (cut back from eight to reduce stop-motion animation time),demolishes the Golden Gate Bridge.”
![Page 64: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/64.jpg)
Motivation for physically based animation
• Physics in games?
– Add reality things move as you would expect
– Add variety different things happen
– Add fun
• Secondary animation
• Physics in training simulations?
• Physics in special effects?
• Why not? Hard?
![Page 65: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/65.jpg)
Physically Based Animation
M x = f(x,x).. .
x(t)
Example forces:
gravity, f = m g
wind / drag, f = b x
springs, f = k x
user interaction, etc...
.
hard to compute exactly
x(0)
![Page 66: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/66.jpg)
Discrete time steps
M x = f(x,x).. .
x(t) hard to compute exactly
x(0)
![Page 67: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/67.jpg)
Discrete time steps
M x = f(x,x).. .
x0 = x(0)
x1 = x(h)
x2 = x(2h)
x(t) hard to compute exactly
![Page 68: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/68.jpg)
Discrete time steps
M x = f(x,x).. .
x0
x1
x2
![Page 69: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/69.jpg)
Numerical IntegrationForward Euler
x1 = x0 + h x0
..x = M-1 f(x,x).. . .
x0
x1
x2
.
![Page 70: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/70.jpg)
Numerical IntegrationForward Euler
.x1 = x0 + h x0
x = M-1 f(x,x).. .
M-1 f(x0,x0).
x1 = x0 + h.
x0
x1
x2
.
![Page 71: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/71.jpg)
Numerical IntegrationSymplectic Euler
.x1 = x0 + h x1
M-1 f(x0,x0).
x1 = x0 + h.
x0
x1
x2
.
![Page 72: COMP 102 Computer Graphics and Animationcrypto.cs.mcgill.ca/~crepeau/COMP102/Comp1xx-GraphicsOverview … · COMP 102 Computer Graphics and Animation Paul Kry ... • Also used for](https://reader033.vdocument.in/reader033/viewer/2022053009/5f0d31f07e708231d43923be/html5/thumbnails/72.jpg)
Numerical IntegrationBackwards Euler
.x1 = x0 + h x1
M-1 f(x1,x1).
x1 = x0 + h.
x0
x1
x2
.