CS 445: Introduction to Computer Graphics - PowerPoint PPT Presentation

Loading...

PPT – CS 445: Introduction to Computer Graphics PowerPoint presentation | free to download - id: b663b-ZDc1Z



Loading


The Adobe Flash plugin is needed to view this content

Get the plugin now

View by Category
About This Presentation
Title:

CS 445: Introduction to Computer Graphics

Description:

Slow refresh, very high resolution. Over 200 dpi eBook devices available now in Japan ... Hi-color images can exhibit worse quantization artifacts than a well ... – PowerPoint PPT presentation

Number of Views:37
Avg rating:3.0/5.0
Slides: 40
Provided by: davidp93
Category:

less

Write a Comment
User Comments (0)
Transcript and Presenter's Notes

Title: CS 445: Introduction to Computer Graphics


1
The Rendering Pipeline
  • CS 445 Introduction to Computer Graphics
  • David Luebke
  • University of Virginia

2
Admin
  • Call roll
  • Forums signup

3
Demo
  • Ogre

4
Recap Display Technology DMDs
  • Digital Micromirror Devices (projectors)
  • Microelectromechanical (MEM) devices, fabricated
    with VLSI techniques

5
Recap Display Technology DMDs
  • DMDs are truly digital pixels
  • Vary grey levels by modulating pulse length
  • Color multiple chips, or color-wheel
  • Great resolution
  • Very bright
  • Flicker problems

6
Display Technologies Organic LED Arrays
  • Organic Light-Emitting Diode (OLED) Arrays
  • The display of the future? Many think so.
  • OLEDs function like regular semiconductor LEDs
  • But with thin-film polymer construction
  • Thin-film deposition of organic, light-emitting
    molecules through vapor sublimation in a vacuum.
  • Dope emissive layers with fluorescent molecules
    to create color.
  • Not grown like a crystal, no high-temperature
    doping
  • Thus, easier to create large-area OLEDs

7
Display Technologies Organic LED Arrays
  • OLED pros
  • Transparent
  • Flexible
  • Light-emitting, and quite bright (daylight
    visible)
  • Large viewing angle
  • Fast (lt 1 microsecond off-on-off)
  • Can be made large or small

8
Display Technologies Organic LED Arrays
  • OLED cons
  • Not quite there yet (96x64 displays) except niche
    markets
  • Cell phones (especially back display)
  • Car stereos
  • Not very robust, display lifetime a key issue
  • Currently only passive matrix displays
  • Passive matrix Pixels are illuminated in
    scanline order (like a raster display), but the
    lack of phosphorescence causes flicker
  • Active matrix A polysilicate layer provides thin
    film transistors at each pixel, allowing direct
    pixel access and constant illumination
  • See http//www.howstuffworks.com/lcd4.htm for
    more info
  • Hard to compete with LCDs, a moving target

9
Display Technologies Other
  • Liquid Crystal On Silicon (LCOS)
  • Next big thing for projectors
  • Dont know much about this one
  • E-Ink
  • Tiny black-and-white spheres embedded in matrix
  • Slow refresh, very high resolution
  • Over 200 dpi eBook devices available now in Japan
  • Others

10
Framebuffers
  • So far weve talked about the physical display
    device
  • How does the interface between the device and the
    computers notion of an image look?
  • Framebuffer A memory array in which the computer
    stores an image
  • On most computers, separate memory bank from main
    memory (why?)
  • Many different variations, motivated by cost of
    memory

11
Framebuffers
  • So far weve talked about the physical display
    device
  • How does the interface between the device and the
    computers notion of an image look?
  • Framebuffer A memory array in which the computer
    stores an image
  • On most computers, separate memory bank from main
    memory (why?)
  • Many different variations, motivated by cost of
    memory

12
Framebuffers True-Color
  • A true-color (aka 24-bit or 32-bit) framebuffer
    stores one byte each for red, green, and blue
  • Each pixel can thus be one of 224 colors
  • Pay attention to Endian-ness
  • How can 24-bit and 32-bit mean the same thing
    here?

13
Framebuffers Indexed-Color
  • An indexed-color (8-bit or PseudoColor)
    framebuffer stores one byte per pixel (also GIF
    image format)
  • This byte indexes into a color map
  • How many colors can a pixel be?
  • Still common on low-end displays (cell phones,
    PDAs, GameBoys)
  • Cute trick color-map animation

14
Framebuffers Hi-Color
  • Hi-Color was a popular PC SVGA standard
  • Packs pixels into 16 bits
  • 5 Red, 6 Green, 5 Blue (why would green get
    more?)
  • Sometimes just 5,5,5
  • Each pixel can be one of 216 colors
  • Hi-color images can exhibit worse quantization
    artifacts than a well-mapped 8-bit image

15
The Rendering Pipeline A Whirlwind Tour
Model Camera Parameters
Rendering Pipeline
Framebuffer
Display
16
The Display You Know
Model Camera Parameters
Rendering Pipeline
Framebuffer
Display
17
The Framebuffer You Know
Model Camera Parameters
Rendering Pipeline
Framebuffer
Display
18
The Rendering Pipeline
Model Camera Parameters
Rendering Pipeline
Framebuffer
Display
19
2-D Rendering Rasterization (Coming Soon)
Model Camera Parameters
Rendering Pipeline
Framebuffer
Display
20
The Rendering Pipeline 3-D
Model Camera Parameters
Rendering Pipeline
Framebuffer
Display
21
The Rendering Pipeline 3-D
Scene graph Object geometry
  • Result
  • All vertices of scene in shared 3-D world
    coordinate system
  • Vertices shaded according to lighting model
  • Scene vertices in 3-D view or camera
    coordinate system
  • Exactly those vertices portions of polygons in
    view frustum
  • 2-D screen coordinates of clipped vertices

Modeling Transforms
Lighting Calculations
Viewing Transform
Clipping
Projection Transform
22
The Rendering Pipeline 3-D
Scene graph Object geometry
  • Result
  • All vertices of scene in shared 3-D world
    coordinate system
  • Vertices shaded according to lighting model
  • Scene vertices in 3-D view or camera
    coordinate system
  • Exactly those vertices portions of polygons in
    view frustum
  • 2-D screen coordinates of clipped vertices

Modeling Transforms
Lighting Calculations
Viewing Transform
Clipping
Projection Transform
23
Rendering Transformations
  • So far, discussion has been in screen space
  • But model is stored in model space (a.k.a. object
    space or world space)
  • Three sets of geometric transformations
  • Modeling transforms
  • Viewing transforms
  • Projection transforms

24
Rendering Transformations
  • Modeling transforms
  • Size, place, scale, and rotate objects parts of
    the model w.r.t. each other
  • Object coordinates ? world coordinates

Y
Z
X
25
Rendering Transformations
  • Viewing transform
  • Rotate translate the world to lie directly in
    front of the camera
  • Typically place camera at origin
  • Typically looking down -Z axis
  • World coordinates ? view coordinates

26
Rendering Transformations
  • Projection transform
  • Apply perspective foreshortening
  • Distant small the pinhole camera model
  • View coordinates ? screen coordinates

27
Rendering Transformations
  • All these transformations involve shifting
    coordinate systems (i.e., basis sets)
  • Oh yeah, thats what matrices do
  • Represent coordinates as vectors, transforms as
    matrices
  • Multiply matrices concatenate transforms!

28
Rendering Transformations
  • Homogeneous coordinates represent coordinates in
    3 dimensions with a 4-vector
  • Denoted x, y, z, wT
  • Note that w 1 in model coordinates
  • To get 3-D coordinates, divide by w x, y,
    zT x/w, y/w, z/wT
  • Transformations are 4x4 matrices
  • Why? To handle translation and projection

29
The Rendering Pipeline 3-D
Scene graph Object geometry
  • Result
  • All vertices of scene in shared 3-D world
    coordinate system
  • Vertices shaded according to lighting model
  • Scene vertices in 3-D view or camera
    coordinate system
  • Exactly those vertices portions of polygons in
    view frustum
  • 2-D screen coordinates of clipped vertices

Modeling Transforms
Lighting Calculations
Viewing Transform
Clipping
Projection Transform
30
Rendering Lighting
  • Illuminating a scene coloring pixels according
    to some approximation of lighting
  • Global illumination solves for lighting of the
    whole scene at once
  • Local illumination local approximation,
    typically lighting each polygon separately
  • Interactive graphics (e.g., hardware) does only
    local illumination at run time

31
The Rendering Pipeline 3-D
Scene graph Object geometry
  • Result
  • All vertices of scene in shared 3-D world
    coordinate system
  • Vertices shaded according to lighting model
  • Scene vertices in 3-D view or camera
    coordinate system
  • Exactly those vertices portions of polygons in
    view frustum
  • 2-D screen coordinates of clipped vertices

Modeling Transforms
Lighting Calculations
Viewing Transform
Clipping
Projection Transform
32
Rendering Clipping
  • Clipping a 3-D primitive returns its intersection
    with the view frustum

33
Rendering Clipping
  • Clipping is tricky!
  • We will have a whole assignment on clipping

In 3 vertices Out 6 vertices
Clip
In 1 polygon Out 2 polygons
Clip
34
The Rendering Pipeline 3-D
Model Camera Parameters
Rendering Pipeline
Framebuffer
Display
35
Modeling The Basics
  • Common interactive 3-D primitives points, lines,
    polygons (i.e., triangles)
  • Organized into objects
  • Collection of primitives, other objects
  • Associated matrix for transformations
  • Instancing using same geometry for multiple
    objects
  • 4 wheels on a car, 2 arms on a robot

36
Modeling The Scene Graph
  • The scene graph captures transformations and
    object-object relationships in a DAG
  • Nodes are objects
  • Arcs indicate instancing
  • Each has a matrix

Robot
Body
Head
Arm
Trunk
Leg
Eye
Mouth
37
Modeling The Scene Graph
  • Traverse the scene graph in depth-first order,
    concatenating transformations
  • Maintain a matrix stack of transformations

Robot
Visited
Head
Body
Unvisited
Leg
Arm
Trunk
Eye
Mouth
Matrix Stack
Active
Foot
38
Modeling The Camera
  • Finally need a model of the virtual camera
  • Can be very sophisticated
  • Field of view, depth of field, distortion,
    chromatic aberration
  • Interactive graphics (OpenGL)
  • Camera pose position orientation
  • Captured in viewing transform (i.e., modelview
    matrix)
  • Pinhole camera model
  • Field of view
  • Aspect ratio
  • Near far clipping planes

39
Modeling The Camera
  • Camera parameters (FOV, etc) are encapsulated in
    a projection matrix
  • Homogeneous coordinates ? 4x4 matrix!
  • See OpenGL Appendix F for the matrix
  • The projection matrix premultiplies the viewing
    matrix, which premultiplies the modeling matrices
  • Actually, OpenGL lumps viewing and modeling
    transforms into modelview matrix
About PowerShow.com