Graphics Pipeline (Slides courtesy of Tamar Shinar) Graphics - - PowerPoint PPT Presentation

graphics pipeline
SMART_READER_LITE
LIVE PREVIEW

Graphics Pipeline (Slides courtesy of Tamar Shinar) Graphics - - PowerPoint PPT Presentation

Graphics Pipeline (Slides courtesy of Tamar Shinar) Graphics Pipeline ff Transform ff Modelview Transformation Object World Eye coordinates coordinates coordinates Model View Project ff Projection: map 3D scene to 2D image


slide-1
SLIDE 1

Graphics Pipeline

(Slides courtesy of Tamar Shinar)

slide-2
SLIDE 2

Graphics Pipeline

ff

slide-3
SLIDE 3

ff

Transform

slide-4
SLIDE 4

Eye coordinates

“Modelview” Transformation

Object coordinates World coordinates

View Model

slide-5
SLIDE 5

ff

Project

slide-6
SLIDE 6

OpenGL Super Bible, 5th Ed.

Projection: map 3D scene to 2D image

slide-7
SLIDE 7

Orthographic projection

vector.tutsplus.com

slide-8
SLIDE 8

8

OpenGL Orthogonal Viewing

glOrtho(left,right,bottom,top,near,far)

View volume for an orthographic projection

slide-9
SLIDE 9

Perspective projection

www.artyfactory.com

slide-10
SLIDE 10

10

OpenGL Perspective Viewing

glFrustum(xmin,xmax,ymin,ymax,near,far)

View volume (frustrum) for a perspective projection

slide-11
SLIDE 11

ff

Clip

slide-12
SLIDE 12

Clip against view volume

slide-13
SLIDE 13

ff

Hidden Surface Removal

slide-14
SLIDE 14

Occlusion

“painter’s algorithm” draw primitives in back-to-front order

[Wikimedia Commons]

slide-15
SLIDE 15

Occlusion

“painter’s algorithm” draw primitives in back-to- front order problem: triangle intersection

slide-16
SLIDE 16

Occlusion

“painter’s algorithm” draw primitives in back-to- front order problem:

  • cclusion cycle
slide-17
SLIDE 17

Use a z-buffer for hidden surface removal

test depth on a pixel by pixel basis

with z-buffer without z-buffer

red drawn last

slide-18
SLIDE 18

Use a z-buffer for hidden surface removal

at each pixel, record distance to the closest

  • bject that has been drawn in a depth buffer

with z-buffer without z-buffer

slide-19
SLIDE 19

Use a z-buffer for hidden surface removal

http://www.beyond3d.com/content/articles/41/

slide-20
SLIDE 20

Backface culling: another way to eliminate hidden geometry

slide-21
SLIDE 21

Hidden Surface Removal in OpenGL

glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH); glEnable(GL_DEPTH_TEST); glEnable(GL_CULL_FACE);

For a perspective transformation, there is more precision in the depth buffer for z-values closer to the near plane