![Page 1: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/1.jpg)
Mike BaileyOregon State [email protected]
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 2: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/2.jpg)
Seminar Goals
• Provide a background for everything else you will see at SIGGRAPH 2014
• Create a common understanding of computer graphics vocabulary
• Help appreciate the images you will see
• Get more from the Exhibition
• Provide pointers for further study
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 3: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/3.jpg)
Mike Bailey
• Professor of Computer Science, Oregon State University
• Has worked at Sandia Labs, Purdue University, Megatek,Has worked at Sandia Labs, Purdue University, Megatek,San Diego Supercomputer Center (UC San Diego), and OSU
• Has taught over 5,500 students in his classes
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 4: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/4.jpg)
Specific Topics
• The Graphics Process
• How to Attend SIGGRAPH
• Graphics Hardware
• Modeling
• Rendering
• Animation
• Finding More Information
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 5: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/5.jpg)
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 6: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/6.jpg)
You can’t see it all, so …Think Strategically -- Make a Plan, Make a Schedule, Set Priorities !
Your time is valuable.
In general, rank your top 3 things you want to see for eachthings you want to see for each timeslot. Then, if one session is not as useful as you’d thought it would be, quickly move to your next prioritynext priority.
Remember to give priority points to the things you can’tpoints to the things you can t “re-live” after it has happened !
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 7: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/7.jpg)
OMG – Where do I Start in the Exhibition?
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 8: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/8.jpg)
Exhibition Strategy
• Look at the list of vendors in the Conference Locator
• Make a list of the ones you really must see and sort the list by booth number
• Booth numbers are XXYY, where XX is the Aisle # and
YY is (1/5)*the number of feet from the front
• For example, AMD = booth 1023, which is Aisle 10; 5*23 = 115 feet from the front
• Start at one end of the floor and work your way across
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 9: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/9.jpg)
Sorted by name
Sorted by boothby name by booth number
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 10: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/10.jpg)
Exhibition Strategy
sle
10
sle
11
sle
9
Ais AisAis
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 11: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/11.jpg)
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 12: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/12.jpg)
The Basic Computer Graphics PipelineMC
ModelTransform
ViewTransform
ProjectionTransform
HomogeneousDivision
Per-vertexLighting
ECWC CCEC
NDC
ViewportTransform
NDC
FragmentProcessing, Texturing,Raster
O
RasterizationFramebuffer
SC
SCTexturing,Per-fragment
Lighting
OpsFramebuffer
MC = Model CoordinatesWC = World CoordinatesEC = Eye Coordinates
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
EC Eye CoordinatesCC = Clip CoordinatesNDC = Normalized Device CoordinatesSC = Screen Coordinates
![Page 13: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/13.jpg)
The Graphics Process
Li htiLightingInformation
3DGeometric Rendering Image
Storage andModels
Texture
Storage andDisplay
3DAnimationD fi iti
TextureInformation
Definition
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 14: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/14.jpg)
The Graphics Process: Geometric Modeling
3D Scanning
Interactive
3DGeometric
Models
GeometricModeling
RenderingModels
ModelLibrariesLibraries
DisplacementMapping
Material
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
Mapping Properties
![Page 15: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/15.jpg)
The Graphics Process: 3D Animation
MotionDesignDesign
3DAnimationDefinition
MotionComputation
(physics) RenderingDefinition(physics)
MotionCapturep
DynamicDeformations
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
Deformations
![Page 16: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/16.jpg)
The Graphics Process: Texturing
ScannedImage
Textures
TextureInformation
Procedural(computed) Rendering(computed)
Textures
g
PaintedTextures
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 17: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/17.jpg)
The Graphics Process: Lighting
LightingTypesTypes
(point, directional, spot)
Light Positions Rendering
LightingInformationPositions g
LightColors
LightIntensities
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 18: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/18.jpg)
The Graphics Process: Rendering
3DGeometric
Models LightingInformation
ImageStorage
andRenderingDisplay
Texture3DAnimationDefinition
TextureInformation
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 19: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/19.jpg)
The Graphics Process:Image Storage and Display
HardwareFramebufferFramebuffer
Rendering
DiskFil
Recording
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
File Editing
![Page 20: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/20.jpg)
The Graphics Process; Summary
Li htiLightingInformation
3DGeometric Rendering Image
Storage andModels
Texture
Storage andDisplay
3DAnimationD fi iti
TextureInformation
Definition
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 21: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/21.jpg)
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 22: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/22.jpg)
MC Vertices
Generic Computer Graphics System
CPU
InputDevices
VertexProcessor
RasterizerBus
NetworkFragment
SC Vertices
Pixel Parameters
Variables to interpolate
Interpolated variables
Z B ff
FragmentProcessor
MC = Model CoordinatesSC = Screen CoordinatesTC = Texture Coordinates TC
Video
Z-Buffer
Back
RGBAZPixels
RGBATexels
VideoDriver
Double-bufferedF b ffTexture Memory
Front
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
FramebuffersTexture Memory
![Page 23: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/23.jpg)
The Framebuffer
FragmentProcessor
Z-Buffer
VideoDriverFront
Back
Double-bufferedFramebuffers
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 24: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/24.jpg)
The Framebuffer Uses Additive Colors (RGB)
Red
Red, Green, and Blue are provided. The rest are combinations of those three.
Yellow
Green
WhiteMagenta
G ee
Blue
Cyan
Cyan = Green + BlueBlue y
Magenta = Red + Blue
Yellow = Red + Green
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
White = Red + Green + Blue
![Page 25: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/25.jpg)
The Framebuffer:Integer Color Storage
8 28 = 25610
# Bits/color # Intensities per colorB
10 210 = 1024 12 212 = 4096G
R
Total colors:24 224 = 16.7 M
# Bits/pixel
30 230 = 1 B36 236 = 69 B
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 26: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/26.jpg)
The Framebuffer:Floating Point Color Storage
• 16- or 32-bit floating point for each color component
g g
B
Why so much?
G Many modern algorithms do arithmetic on the framebuffer color components, or treat the framebuffer color components as data. They need the extra precision during the arithmetic
R
the extra precision during the arithmetic.
However, the display system cannot display all of those possible colors.
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 27: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/27.jpg)
The Framebuffer
• Alpha values• Alpha values
– Transparency per pixel= 0. is invisible 1 i= 1. is opaque
– Represented in 8-32 bits(integer or floating point)
– Alpha blending equation:
Color 1C (1 ) 2COregon State University
Computer Graphicsmjb – June 12. 2014
0.0 1.0
![Page 28: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/28.jpg)
The Framebuffer
•• ZZ--bufferbuffer–– Used for hidden surface removalUsed for hidden surface removal
Z
B
–– Holds pixel depthHolds pixel depth
–– Typically Typically 3232 bits bits deepdeep
–– Integer or floating pointInteger or floating point
G
Total Z Values:# Bits / Z
R32 232 = 4 B
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 29: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/29.jpg)
The Framebuffer
Double-buffering: Don't let the viewer see any of the scene until the entire scene is drawn
U d tUpdate
Refresh
VideoDriverFront
Back
Double-bufferedFramebuffers
Video
“swap buffers”
Update RefreshDriver
Back
Front
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
Double-bufferedFramebuffers
![Page 30: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/30.jpg)
The Video Driver
Z-Buffer
VideoBack
DriverFront
Double-bufferedFramebuffers
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 31: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/31.jpg)
The Video Driver
•• N N refreshesrefreshes/second/second (N is usually between (N is usually between 50 50 and and 100100))
•• Framebuffer contains the R,G,B that define the color Framebuffer contains the R,G,B that define the color at each at each pixelpixel, ,, , pp
•• CursorCursor-- Appearance is stored near the video Appearance is stored near the video driverdriver in in a “minia “mini--framebuffer”framebuffer”-- x,yx,y is given by the CPUis given by the CPUyy g yg y
•• Video inputVideo input
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 32: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/32.jpg)
The Computer Graphics Monitor(s)
VideoDriver
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 33: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/33.jpg)
Displaying Color on aComputer Graphics LCD Monitor
•• Grid of electrodesGrid of electrodesG d o e ec odesG d o e ec odes
•• Color filtersColor filters
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
Source: http://electronics.howstuffworks.com
![Page 34: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/34.jpg)
Displaying Color on a Plasma Monitor
• Gas cell
• Phosphor
• Grid of electrodes
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
http://electronics.howstuffworks.com
![Page 35: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/35.jpg)
Display Resolution
•• PixelPixel resolutions resolutions (1280x1024, 1600x1200, 1920x1152 (1280x1024, 1600x1200, 1920x1152 are are common on the desktop)common on the desktop)
•• “4096” is 4096 x 2160“4096” is 4096 x 2160
•• LG’s new Ultra Widescreen is 3440 x 1440, 34”LG’s new Ultra Widescreen is 3440 x 1440, 34”
•• Human acuity: 1 arcHuman acuity: 1 arc--minute is achieved by viewingminute is achieved by viewing aa 19"19" monitormonitorHuman acuity: 1 arcHuman acuity: 1 arc minute is achieved by viewing minute is achieved by viewing a a 19 19 monitormonitorwith with 1280x1024 resolution from a 1280x1024 resolution from a distance distance of ~40 inchesof ~40 inches
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
http://en.wikipedia.org/wiki/File:Pixel_geometry_01_Pengo.jpg
![Page 36: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/36.jpg)
The Fragment Processor
Rasterizer
FragmentProcessor
Z-Buffer
Double-buffered
Texture MemoryFramebuffers
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 37: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/37.jpg)
The Fragment Processor
• Takes in all information that describes this pixel
• Produces the RGBA for that pixel’s location in the framebufferProduces the RGBA for that pixel s location in the framebuffer
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 38: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/38.jpg)
The Rasterizer
VertexProcessor
Rasterizer
FragmentgProcessor
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 39: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/39.jpg)
Rasterization
• Turn screen space vertex coordinates into pixels that make up linesand polygons
• A great place for custom electronicsg p
• Anti-aliasing is often built-in
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 40: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/40.jpg)
Anti-aliasing is Implemented by Oversampling within Each Pixel
No AA 4x 16x
NVIDIA
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 41: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/41.jpg)
Anti-aliasing is Implemented by Oversampling within Each Pixel
4x 16x
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
NVIDIA
![Page 42: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/42.jpg)
Rasterizers Can Interpolate:
• X and YX and Y
• Red-green-blue values
• Alpha values
• Z values
• Intensities
• Surface normals• Surface normals
• Texture coordinates
• Custom values given by the shaders
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 43: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/43.jpg)
Texture Mapping
F t
Bus Fragment
Processors
Texture Memory
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
Texture Memory
![Page 44: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/44.jpg)
Texture Mapping
• “Stretch” an image onto a piece of geometry• Stretch an image onto a piece of geometry
• Image can be generated by a program or scanned in
• Useful for realistic scene generation
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
http://2ols.com
![Page 45: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/45.jpg)
Something Cool:Write-Your-Own Fragment-Processor Code
Rasterizer
Fragment
Bump Mapping
FragmentProcessor
Z-Buffer
Line Integral Convolution
Texture Memory
Double-bufferedFramebuffers
Referred to as: Pixel Shaders or Fragment Shaders
Texture Memory
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
Pixel Shaders or Fragment Shaders
![Page 46: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/46.jpg)
Procedural Texture MappingCreate a texture from data. In this case, the fragment shaderg
takes a grid of heights and produces surface normals for lighting.
While this is “procedural”, the amount of height data is finite,so you can still run out of resolution
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 47: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/47.jpg)
“Mandelzoom”:
Procedural Texture Mapping
Mandelzoom :In this case, the texture is a pure equation, so you never run out of resolution.
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 48: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/48.jpg)
“M d l ”
Procedural Texture Mapping
“Mandelzoom”:You can, however, run out of floating point precision:
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 49: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/49.jpg)
Procedural Texture Mapping
And, of course, once you have an , , yequation, think of all the other things you can do with it.
Josie Hunter
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
Josie Hunter
![Page 50: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/50.jpg)
The Vertex Processor
CPU
VertexProcessorB
us
Rasterizer
s
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 51: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/51.jpg)
Vertex Processor
• Coordinates enter in model units
• Coordinates leave in screen (pixel) units(p )
• Another great place for custom electronics
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 52: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/52.jpg)
Vertex Processor: Transformations
• Used to correctly place objects in the scene
• Translation
• Rotation
• Scaling
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 53: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/53.jpg)
Vertex Processor:Windowing and Clipping
• Declare which portion of the 3D universe you are interested in viewing
• This is called the view volume
• Clip away everything that is outside the viewing volume
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 54: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/54.jpg)
Vertex Processor: Projection
• Turn 3D coordinates into 2D
– Parallel projectionParallel lines remain parallel
“vanishing point”
– Perspective projectionPerspective projection
Some parallel lines appear to converge
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 55: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/55.jpg)
Vertex Processor: Projection
Parallel
Perspective
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
Perspective
![Page 56: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/56.jpg)
Something Cool:Write-Your-Own Vertex Code
Vertex
Wireframe Teapot Dome P j i
CPU
VertexProcessor
Projection
Bus
Rasterizers
Referred to as:Vertex Shaders
Mars Panorama Dome P j ti
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
Projection
![Page 57: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/57.jpg)
The CPU and Bus
InputVertex
Processor
CPU
InputDevices
Bu
Type of Board
Speed to Board
Speed from
Board
Network s
BoardPCI 132
Mb/sec132
Mb/secAGP 8X 2 Gb/ 264AGP 8X 2 Gb/sec 264
Mb/secPCI
Express4 Gb/sec 4 Gb/sec
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
Express
![Page 58: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/58.jpg)
All Together Now !
MC Vertices
CPU
InputDevices
VertexProcessor
RasterizerBus
NetworkFragment
SC Vertices
Pixel Parameters
Variables
Variables
Z B ff
FragmentProcessor
MC = Model CoordinatesSC = Screen CoordinatesTC = Texture Coordinates TC
Video
Z-Buffer
Back
RGBAZPixels
RGBATexels
VideoDriver
Double-bufferedF b ffTexture Memory
Front
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
FramebuffersTexture Memory
![Page 59: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/59.jpg)
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 60: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/60.jpg)
What is a Model?
A is a model of B if A can be used to ask questions about B.
In computer graphics applications, what do we want to ask about B?
Wh t d B l k lik ?• What does B look like?
• How do I want to interact with (shape) B?
• Does B need to be a legal solid?g
• How does B interact with its environment?
• What is B’s surface area and volume?
These questions, and answers, control what type of t i d li d t d
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
geometric modeling you need to do
![Page 61: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/61.jpg)
Explicitly Listing Geometry and Topology
M d l i t f th d f ti d f dModels can consist of thousands of vertices and faces – we need some way to list them efficiently
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
http://graphics.stanford.edu/data/3Dscanrep
![Page 62: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/62.jpg)
static GLfloat CubeVertices[ ][3] =
Explicitly Listing Geometry and Topology32
static GLfloat CubeVertices[ ][3] ={
{ -1., -1., -1. },{ 1., -1., -1. },{ 1 1 1 }
76
{ -1., 1., -1. },{ 1., 1., -1. },{ -1., -1., 1. },{ 1., -1., 1. },{ 1 1 1 }
0 1
{ -1., 1., 1. },{ 1., 1., 1. }
};
t ti GLfl t C b C l [ ][3]
4 5
static GLfloat CubeColors[ ][3] ={
{ 0., 0., 0. },{ 1., 0., 0. },{ 0 1 0 }
static GLuint CubeIndices[ ][4] ={
{ 0, 2, 3, 1 },{ 4 5 7 6 }{ 0., 1., 0. },
{ 1., 1., 0. },{ 0., 0., 1. },{ 1., 0., 1. },{ 0 1 1 }
{ 4, 5, 7, 6 },{ 1, 3, 7, 5 },{ 0, 4, 6, 2 },{ 2, 6, 7, 3 },{ 0 1 5 4 }
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
{ 0., 1., 1. },{ 1., 1., 1. },
};
{ 0, 1, 5, 4 }};
![Page 63: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/63.jpg)
Cube Example
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 64: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/64.jpg)
Solid Modeling Using Boolean Operators
Two Overlapping Solids Union
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
Intersection Difference
![Page 65: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/65.jpg)
Curve Sculpting – Bezier Curve Sculpting
P1P2
P0
1
P3
3 2 2 3( ) (1 ) 3 (1 ) 3 (1 )P t t P t t P t t P t P 0 1 2 3( ) (1 ) 3 (1 ) 3 (1 )P t t P t t P t t P t P
0. 1.t
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 66: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/66.jpg)
Curve Sculpting – Bezier Curve Sculpting Example
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 67: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/67.jpg)
Curve Sculpting – Bezier Curve Sculpting Example
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 68: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/68.jpg)
Surface Sculpting
Wireframe SurfaceWireframe Surface
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 69: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/69.jpg)
Surface Equations can also be used for Analysis
With Contour Lines Showing CurvatureWith Contour Lines Showing Curvature
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 70: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/70.jpg)
Volume Sculpting
Sederberg and Parry
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 71: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/71.jpg)
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 72: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/72.jpg)
Rendering
Rendering is the process of creating an image of a geometric model Again there are questions you need to ask:model. Again, there are questions you need to ask:
H li ti d I t thi i t b ?• How realistic do I want this image to be?
• How much compute time do I have to create this image?
• Do I need to take into account lighting?g g
• Does the illumination need to be global or will local do?
• Do I need to take into account shadows?
• Do I need to take into account reflection and refraction?
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 73: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/73.jpg)
Fundamentals of Computer Graphics Lighting
LR
LG
LBWhite Light
What the light can produce
EREGE
can produce
G Li ht
MRMGMEB
What the eye sees
Green LightMBWhat the material can reflect
ER = LR * MREG = LG * MGEB = LB * MB
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 74: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/74.jpg)
The Computer Graphics Lighting Environment
n R
I
L E
I
PP Point being illuminatedI Light intensityI Light intensityL Unit vector from point to lightn Unit vector surface normalR Perfect reflection unit vectorE Unit vector to eye position
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
E Unit vector to eye position
![Page 75: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/75.jpg)
Three Elements ofComputer Graphics Lighting
1. Ambient = a constant Accounts for light bouncing “everywhere”
2. Diffuse = I*cosΘ Accounts for the angle between the incoming light and the surface normalincoming light and the surface normal
Accounts for the angle between the “perfect 3. Specular = I*cosS
Accounts for the angle between the perfect reflector” and the eye; also the exponent, S, accounts for surface shininess
Note that cosΘ is just the dot product between unit vectors L and n
Note that cos is just the dot product between unit vectors R and E
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 76: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/76.jpg)
+Ambient
+ Three Elements ofComputer Graphics Lighting
+Diffuse
+
S lSpecular
=
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 77: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/77.jpg)
Lighting Examples
Spot Lights
Omnidirectional Point Light at the Eye
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 78: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/78.jpg)
Two Types of Rendering
1. Starts at the object
2. Starts at the eye
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 79: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/79.jpg)
Starts at the Object
This is the typical kind of rendering you get on a graphics card. Start with the geometry and project it onto the pixels.
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 80: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/80.jpg)
How do things in front look like they are really in front?
Your application might draw the polygons in 1-2-3-4-5-6 order, but 1, 3, and 4 still need to look like they were drawn last:
35
61
3
42
Either the polygons need to be re-arranged to be drawn in a back-to-front order, or we need to have a Z-buffer
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 81: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/81.jpg)
Another From-the-Object Method -- Radiosity
Based on the idea that all surfaces gather light intensity from all other surfaceslight intensity from all other surfaces
Th f d t l di it ti iThe fundamental radiosity equation is an energy balance that says:
“The light energy leaving surface i equals the t f li ht t d b f iamount of light energy generated by surface i
plus surface i’s reflectivity times the amount of light energy arriving from all other surfaces”
i i i i i j j j ij
B A E A B A F
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 82: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/82.jpg)
The Radiosity Equation
i i i i i j j j ij
B A E A B A F is the light energy intensity shining from surface element i
is the area of surface element i
iBA is the area of surface element i
is the internally-generated light energy intensity for surface element i
iA
iE
is surface element i’s reflectivity
is referred to as the Form Factor, or Shape Factor, and describes what percent of the energy leaving surface element j that arrives at
i
j iF what percent of the energy leaving surface element j that arrives at surface element i
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 83: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/83.jpg)
The Radiosity Shape Factor
2
cos cos( , )
( , )j
i jj i j i
Ai A
F visibility di dj dA dADist di dj
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 84: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/84.jpg)
The Radiosity Matrix Equation
i i i i i j j j ij
B A E A B A F Expand
For each surface element, and re-arrange to solve for the surface intensities, the B’s:
1 1 1 1 1 2 1 1 1 1
2 2 1 2 2 2 2 2 2 2
11
N
N
F F F B EF F F B E
1 2 1N N N N N N N N NF F F B E
This is a lot of equations!
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 85: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/85.jpg)
Radiosity Examples
Cornell University
Oregon State UniversityComputer Graphics
mjb – June 12. 2014Cornell University
![Page 86: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/86.jpg)
Starts at the Eye
The most common approach in this category is ray-tracing:
Splat!Splat!
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
The pixel is painted the color of the nearest object that is hit.
![Page 87: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/87.jpg)
Starts at the Eye
It’s also easy to see if this point lies in a shadow:
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
Fire another ray towards each light source. If the ray hits anything, then the point does not receive that light.
![Page 88: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/88.jpg)
Starts at the Eye
It’s also easy to handle reflection
normal
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
Fire another ray that represents the bounce from the reflection. Paint the pixel the color that this ray sees.
![Page 89: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/89.jpg)
Starts at the Eye
It’s also easy to handle refraction
normal
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
Fire another ray that represents the bend from the refraction. Paint the pixel the color that this ray sees.
![Page 90: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/90.jpg)
Ray Tracing Examples
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 91: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/91.jpg)
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 92: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/92.jpg)
Forward Kinematics:Change Parameters – Things Move
(All Children Understand This)( )
3
2
1
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 93: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/93.jpg)
Forward Kinematics: Transformation Hierarchies
Locations?
33
2
1
2
1
2
Ground
1
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 94: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/94.jpg)
Inverse Kinematics (IK):Things Need to Move – What Parameters Will Make Them Do That?
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 95: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/95.jpg)
Inverse Kinematics
Forward Kinematics solves the problem “if I know the link transformation parametersForward Kinematics solves the problem “if I know the link transformation parameters, where are the links?”.
Inverse Kinematics (IK) solves the problem “If I know where I want the end of the chain to be (X*,Y*), what transformation parameters will put it there?” ( , ), p p
(X*,Y*)3?
1?
2?
Ground
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 96: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/96.jpg)
Particle Systems:A Cross Between Modeling and Animation?
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 97: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/97.jpg)
Particle Systems:A Cross Between Modeling and Animation?
The basic process is:
RandomEmit
Random Number
Generator
DisplayDisplay
DisplayUpdate
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 98: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/98.jpg)
Particle Systems Examples
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
Chuck Evans
![Page 99: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/99.jpg)
Animating using Physics
D0 = unloaded spring length
0( ) FD D
D0
D0 = unloaded spring length
D
k = spring stiffness in Newtons/meter or
0( )k
D-D0Newtons/meter or pounds/inch
Or, if you know the di l t th f displacement, the force exerted by the spring is:
0 F k D DOregon State University
Computer Graphicsmjb – June 12. 2014
Force = F
0F k D DThis is known as Hooke’s law
![Page 100: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/100.jpg)
Animating using the Physics of a Mesh of Springs
+Y
“Lumped Masses”
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 101: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/101.jpg)
Simulating a Bouncy String
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 102: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/102.jpg)
Placing a Physical Barrier in the Scene
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 103: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/103.jpg)
Animating Cloth
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 104: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/104.jpg)
Cloth Examples
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 105: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/105.jpg)
Cloth Examples
David Breen, Donald House, Michael Wozny: Predicting the Drape of Woven Cloth Using Interacting Particles
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 106: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/106.jpg)
Cloth Examples
MiraLab, University of Geneva
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 107: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/107.jpg)
Functional Animation:Make the Object Want to Move Towards a Goal Position
k
c
0mx cx kx m
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 108: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/108.jpg)
Functional Animation:While Making it Want to Move Away from all other Objects
repulsivemx F
Repulsion Coefficient
repulserepulsive Power
CF
d
m
Distance between the boundaries of the 2 bodies
Repulsion Exponent
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 109: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/109.jpg)
Total Goal – Make the Free Body Move Towards its Final PositionWhile Being Repelled by the Other Bodies
k
c
m
mx cx kx F
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 110: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/110.jpg)
Increasing the Stiffness
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
Stiffness = 3, 6, 9
![Page 111: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/111.jpg)
Increasing the Repulsion Coefficient
Repulse = 10, 30, 50
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
![Page 112: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/112.jpg)
NaturalPoint Motion Capture as an Input for AnimationPolhemus
Oregon State UniversityComputer Graphics
mjb – June 12. 2014
Polhemus MocapLab
![Page 113: Mike Bailey Oregon State University - ACM SIGGRAPHs2016.siggraph.org/imgs/bailey-fundamentals.pdf · Mike Bailey • Professor of Computer Science, Oregon State University • Has](https://reader034.vdocument.in/reader034/viewer/2022042208/5eabb7ca29716342840397e5/html5/thumbnails/113.jpg)
Oregon State UniversityComputer Graphics
mjb – June 12. 2014