Presentation is loading. Please wait.

Presentation is loading. Please wait.

Inside-Outside & Culling

Similar presentations


Presentation on theme: "Inside-Outside & Culling"— Presentation transcript:

1 Inside-Outside & Culling
Introduction to Computer Graphics CSE 470/598 Arizona State University Dianne Hansford

2 Rendering Polygons A polygon has two sides
front & back front is outward normal side Can render front & back differently Great for cutaways Figure from Diepstraten et. al. “Interactive Cutaway Illustrations”

3 Polygons: Front & Back Convention: front facing polygon vertices appear counterclockwise (ccw) on the screen 3 back facing 3 2 1 front facing 1 2 outward facing normals

4 Front Facing Polygon Eye coordinates v2 n v1 e3 Eye at origin
Looking at geometry down –z axis 3 v2 e3 ¢ n >= 0  outward facing n v1 1 2 e3

5 Solids Closed geometry called a solid
Reasonable solids* can be constructed from polygons of consistent orientation sphere, torus, ... Opaque closed surface: no back facing polygons visible Moebius strip/Klein bottle – not orientable Escher’s Moebius strip: Klein bottle: * also called orientable manifold

6 Culling Culling is another form of clipping
removing polygons from the pipeline speed up rendering Culling removes back facing polygons makes sense for solids example: back facing polygons of a sphere Happens in NDC coordinates

7 Culling of Solids cos(theta) = n . e_3

8 Culling for non-closed surfaces
no culling culling used inappropriately

9 OpenGL & Culling glEnable(GL_CULL_FACE) glDisable(GL_CULL_FACE)
glCullFace(GL_BACK) Also: GL_FRONT, GL_FRONT_AND_BACK glFrontFace(GL_CCW) (default) Also: GL_CW


Download ppt "Inside-Outside & Culling"

Similar presentations


Ads by Google