1 / 9

Inside-Outside & Culling

Inside-Outside & Culling. Introduction to Computer Graphics CSE 470/598 Arizona State University Dianne Hansford. Rendering Polygons. A polygon has two sides front & back front is outward normal side Can render front & back differently Great for cutaways.

hart
Télécharger la présentation

Inside-Outside & Culling

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Inside-Outside & Culling Introduction to Computer Graphics CSE 470/598Arizona 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”http://www.vis.uni-stuttgart.de/ger/research/pub/pub2003/eg2003-diepstraten.pdf

  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 • 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: http://worldofescher.com • Klein bottle: http://alem3d.obidos.org/i/kbottle/kbc1.jpg * 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

More Related