computer graphics · 2016-09-25 · •scene graph libraries •game engines phics cha pter 1 - 3 ....
TRANSCRIPT
![Page 1: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/1.jpg)
Computer Graphics
![Page 2: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/2.jpg)
Aspects of Graphics
• Design vs. Programming
• Interactive vs. Photorealistic
• 2D vs. 3D
• Graphics vs. image processing vs. user interfaces
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 2
![Page 3: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/3.jpg)
Graphics Software
• Photoshop, Illustrator, etc.
• 3D Modeling (CAD, animation)
• Rendering (ray tracing, radiosity)
• Animation tools
• Graphics programming APIs (OpenGL, DirectX)
• Scene graph libraries
• Game engines
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 3
![Page 4: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/4.jpg)
Comet Simulation COMET CRASH - Sandia supercomputer
simulations of a one-kilometer comet entering Earth's atmosphere, approaching the ocean's surface, and impacting the ocean, deforming the ocean floor and creating a giant high-pressure steam explosion rising into the stratosphere. The explosion ejects comet vapor and water vapor into ballistic trajectories that spread around the globe. The New York City skyline is shown for scale.
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 4
![Page 5: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/5.jpg)
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 5
Ray-traced Image
![Page 6: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/6.jpg)
OpenGL
• OpenGL: )Open Graphics Library)
• a widely-used, open API for 3D graphics • Old, originally from Silicon Graphics (SGI)
• Low-level, procedural (vs. scene graph retained mode)
• Designed for speed, control over hardware
• Need hardware support for top performance
• Widely used for CAD, VR, visualization, flight simulators
• Managed by non-profit “Khronos Group” consortium
• Support • All major graphics cards, platforms have support
• Mobile devices (iOS, Android) use an embedded version
• HTML5 has experimental WebGL support
• Bindings for JavaScript, Java, C#, Perl, Python, Ruby, Scheme, Visual Basic, Ada, …
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 7
![Page 7: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/7.jpg)
Graphics Only
• OpenGL does not support windowing, interaction, UI, etc
• It must be used with another windowing system/library such as
• MS Windows—various
• Cocoa
• X11
• Qt
• GLUT, GLFW
• HTML5 JavaScript?
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 8
![Page 8: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/8.jpg)
Refraction using vertex shaders
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 9
![Page 9: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/9.jpg)
OpenGL vs. Direct3D
• Direct3D:
• MS only
• Used more for games
• Latest versions are good
• OpenGL
• Used more for professional applications
• Not much development until a few years ago
• Mobile gaming mostly on OpenGL ES (Embedded System)
• Unreal, Unity, other game engines on OpenGL ES
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 10
![Page 10: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/10.jpg)
WebGL
• WebGL (Web Graphics Library) is a JavaScript API for rendering interactive 3D graphics and 2D graphics within any compatible web browser without the use of plug-ins.
• OpenGL 2.0 ES in your Web browser, no plugins needed!
• Supported by all major browsers except Internet Explorer (Microsoft hates Web standards, OpenGL)
• Working group: Apple, Google, Mozilla, Opera (not Microsoft)
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 11
![Page 11: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/11.jpg)
Other software
• POV ray-tracer( Persistence of Vision Raytracer) is a ray tracing program which generates images from a text-based scene description, and is available for a variety of computer platforms.
• ImageMagick image manipulation library
• 3D Modeling: Google's SketchUp or Blender
• HTML5 Canvas element for 2D graphics
• The only cross-platform environment nowadays…
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 12
![Page 12: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/12.jpg)
Chapter 1: Graphics Systems and Models
• A Graphics System
• Processor
• Memory
• Frame Buffer
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 13
Display
Input Devices
Output Devices
![Page 13: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/13.jpg)
Graphics Architecture
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 14
![Page 14: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/14.jpg)
Images
• Array of pixels
• Red, Green, Blue
• May also have an alpha value (opacity)
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 15
![Page 15: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/15.jpg)
Pixels and the Frame Buffer
• Pixels:
• picture elements
• 3 values: RGB, 0-255 or 0-65536 or 0.0-1.0
• 4 values: RGBA (Alpha = opacity)
• Frame buffer
• Depth: bits per pixel
• May have 24, 32, 64, or flexible depth
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 16
![Page 16: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/16.jpg)
Display terms
• Scan line
• Resolution
• Horizontal and vertical re-trace
• Refresh, refresh rate
• Interlace
• NTSC, PAL, S-video, Composite
• HDTV
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 17
![Page 17: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/17.jpg)
LCD Display
• An unpowered LCD layer changes polarization of light
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 18
![Page 18: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/18.jpg)
The Human Visual System
• Rods: night vision
• Cones: day vision
• Three types of cones, with different color sensitivity
• We model and render for its capabilities
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 19
![Page 19: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/19.jpg)
Graphics Paradigms
• Modeling
• Rendering
• Photo-realistic:
• Ray tracing
• Radiosity
• Interactive:
• Projection – camera model
• Transformations, clipping
• Shading
• Texture mapping
• Rasterization
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 20
![Page 20: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/20.jpg)
Ray Tracing
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 21
Ray Tracing
![Page 21: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/21.jpg)
Ray-traced blob
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 22
![Page 22: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/22.jpg)
How does Ray-Tracing work?
• Modeling
• Build a 3D model of the world
• Geometric primitives
• Light sources
• Material properties
• Simulate the bouncing of light rays
• Trace ray from eye through image pixel to see what it hits
• From there, bounce ray in reflection direction, towards light source, etc.
• Thus, model physics of emission, reflection, transmission, etc. (backwards)
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 23
![Page 23: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/23.jpg)
Modeling the World
camera {
location <0, 5, -5>
look_at <0, 0, 0>
angle 58
}
light_source { <-20, 30, -25>
color red 0.6 green 0.6 blue 0.6 }
blob {
threshold 0.5
sphere { <-2, 0, 0>, 1, 2 }
cylinder { <-2, 0, 0>, <2, 0, 0>, 0.5, 1 }
cylinder { <0, 0, -2>, <0, 0, 2>, 0.5, 1 }
cylinder { <0, -2, 0>, <0, 2, 0>, 0.5, 1 }
pigment { color red 1 green 0 blue 0 }
finish { ambient 0.2 diffuse 0.8 phong 1 }
rotate <0, 20, 0>
}
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 24
![Page 24: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/24.jpg)
Ray thru pixel
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 25
![Page 25: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/25.jpg)
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 26
Flat blob
![Page 26: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/26.jpg)
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 27
Bounce toward lights
![Page 27: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/27.jpg)
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 28
Shadows
![Page 28: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/28.jpg)
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 29
Shaded blob
![Page 29: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/29.jpg)
Blob with Highlights
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 30
![Page 30: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/30.jpg)
Blob with ground plane
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 31
![Page 31: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/31.jpg)
Blob with transparency
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 32
![Page 32: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/32.jpg)
Blob with refraction
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 33
![Page 33: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/33.jpg)
Types of illumination
• Ambient – "light soup" that affects every point equally
• Diffuse – shading that depends on the angle of the surface to the light source
• Specular – 'highlights.' Falls off sharply away from the reflection direction
• Example: lighting applet
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 34
![Page 34: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/34.jpg)
What are these made of?
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 35
![Page 35: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/35.jpg)
Material types
• Dielectrics (non-conductors):
• In body reflection, light penetrates the surface and is affected by material pigment
• Highlights are the color of the light source
• Examples: paint, plastic, wood, …
• Conductors (metals)
• No light penetrates the surface
• Highlight and "body" reflection are affected equally by the material
• Same color for diffuse and specular reflection
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 36
![Page 36: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/36.jpg)
Finishes
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 37
![Page 37: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/37.jpg)
Textures
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 38
![Page 38: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/38.jpg)
Surface (Ripples)
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 39
![Page 39: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/39.jpg)
POV-Ray Primitives
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 40
![Page 40: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/40.jpg)
Constructive Solid Geometry
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 41
![Page 41: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/41.jpg)
Sunsethf
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 42
![Page 42: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/42.jpg)
How to ray-trace…
• Transparency?
• Refraction?
• Reflection?
• Fog?
• Anti-aliasing?
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 43
![Page 43: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/43.jpg)
Drawbacks of ray tracing?
• Time: many rays are needed per pixel…
• Up to 25 rays through each pixel
• Each ray may bounce and split many times
• Each ray tested for intersection with many objects
• E.g. 1M pixels * 25 rays per pixel * 40 rays per ray tree * 1000 objects = 1 trillion object intersection tests…
• Too slow for real time?
• Hard lighting
• No soft shadows, inter-object diffusion, etc
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 44
![Page 44: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/44.jpg)
POV-Ray
• An excellent, free ray tracer: POV-Ray
• We'll use for a brief intro to ray tracing
• Runs on PC, Unix, Mac, Beowolf clusters, …
• Installed on the computers in the Unix lab
• You may wish to install on your own computer
• First "lab": make a ray-traced image of four different types of primitives, one each plastic, glass, metal, and mirrored, over checked floor
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 45
![Page 45: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/45.jpg)
Beyond Ray Tracing
• Problems with ray tracing:
• hard shadows
• no color bleeding
• slow Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 46
![Page 46: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/46.jpg)
Radiosity in POV-Ray
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 47
![Page 47: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/47.jpg)
Radiosity
• Treat each patch as reflector and emitter of light
• Each patch affects every other patch depending on distance, orientation, occlusion etc.
• Let light "bounce around" for a few iterations to compute the amount of light reaching a patch
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 48
![Page 48: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/48.jpg)
Radiosity image
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 49
![Page 49: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/49.jpg)
Radiosity - table
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 50
![Page 50: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/50.jpg)
Image: Wikipedia
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 51
![Page 51: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/51.jpg)
Radiosity example
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 52
![Page 52: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/52.jpg)
Source: ACM
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 53
![Page 53: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/53.jpg)
Radiosity summary
• Radiosity gives wonderful soft shading
• But even slower than ray tracing…
• Can't do reflection, refraction, specular highlights with radiosity
• Can combine ray tracing and radiosity for best of both worlds (and twice the time)
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 54
![Page 54: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/54.jpg)
Interactive techniques
• Ray tracing and radiosity are too slow
• We'll concentrate on interactive techniques
• What kind of rendering can be done quickly?
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 55
![Page 55: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/55.jpg)
Shutterbug - Orthographic
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 56
![Page 56: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/56.jpg)
- Perspective
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 57
![Page 57: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/57.jpg)
- Depth Cueing
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 58
![Page 58: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/58.jpg)
- Depth Clipping
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 59
![Page 59: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/59.jpg)
- Colored Edges
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 60
![Page 60: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/60.jpg)
- Hidden line removal
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 61
![Page 61: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/61.jpg)
- Hidden surface removal
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 62
![Page 62: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/62.jpg)
- Flat shading
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 63
![Page 63: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/63.jpg)
- Gouraud shading
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 64
![Page 64: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/64.jpg)
- Gouraud/specular
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 65
![Page 65: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/65.jpg)
- Gouraud/phong
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 66
![Page 66: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/66.jpg)
- Curved surfaces
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 67
![Page 67: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/67.jpg)
- Improved illumination
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 68
![Page 68: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/68.jpg)
- Texture mapping
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 69
![Page 69: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/69.jpg)
- Displacements, shadows
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 70
![Page 70: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/70.jpg)
- Reflections
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 71
![Page 71: Computer Graphics · 2016-09-25 · •Scene graph libraries •Game engines phics Cha pter 1 - 3 . Comet Simulation COMET CRASH - Sandia supercomputer simulations of a one-kilometer](https://reader036.vdocuments.us/reader036/viewer/2022063006/5fb6106b8b506d2d2b452785/html5/thumbnails/71.jpg)
Rendering pipeline
• Transformations
• Clipping
• Projection
• Rasterization
• (what is done where?)
Inte
ract
ive C
om
pute
r G
raphic
s
Chapter 1 - 72