06-hidden

06-hidden - Lecture 7 Hidden Surface Removal Reading Hearn...

Info iconThis preview shows pages 1–12. Sign up to view the full content.

View Full Document Right Arrow Icon
Lecture 7 Hidden Surface Removal
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Reading • Hearn Baker (3/E), 9.1-9.3, 9.6-9.7 • Hearn Baker (2/E), 13.1-13.3, 13.6-13.7 Optional •F o l e y et al , Chapter 15
Background image of page 2
Lecture outline: Introduction to Hidden Surface Removal Ray Casting Z Buffer Method BSP (Binary Space Partition) Back face Culling Hidden Surface Removal in OGL
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
What we have so far • Construct a 3D hierarchical geometric model • Affine Transformation of the model in 3D • Define a virtual camera and Project the 3D model accordingly • Map geometries in 3D space to points, lines, or triangles on screen • What’s next?
Background image of page 4
Introduction • Not every part of every 3D object is visible to a particular viewer. We need an algorithm to determine what parts of each object should be drawn. •K n o w n a s hidden surface removal/elimination ” or “ visible surface determination ”. • Hidden surface removal algorithm can be classified in three major ways: – Object space vs. image space – Object order vs. image order – Sort first vs. sort last – Still a very active research area …… • This is very important as our 3D models get more and more complex • Where would we use a hidden surface algorithm?
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Object Space Algorithms Operate on geometric primitives – For each object in the scene, compute the part of it which isn’t occluded by any other object, then draw. – Must perform tests at high precision – Resulting information is resolution-independent Complexity – Must compare every pair of objects, so O(n 2 ) for n objects – Optimizations can reduce this cost, but… – Best for scenes with few polygons or resolution-independent output Implementation – Difficult to implement! – Must carefully control numerical error
Background image of page 6
Image Space Algorithms •O p e r a t e o n p i x e l s – For each pixel in the scene, find the object closest to the COP which intersects the projector through that pixel, then draw. – Perform tests at device resolution, result works only for that resolution Complexity – Must do something for every pixel in the scene, so at least O( R ). – Easiest solution is to test projector against every object, giving O( nR ). – More reasonable version only does work for pixels belonging to objects: O( nr ), r is number of pixels per object – Often, with more objects, each is smaller, we estimate nr = O( R ) in practice Implementation – Usually very simple!
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Object Order vs. Image Order • Object order – Consider each object only once - draw its pixels and move on to the next object – Might draw the same pixel multiple times – E.g. Z-buffer and BSP • Image order – Consider each pixel only once - draw part of an object and move on to the next pixel – Might compute relationships between objects multiple times – E.g. Ray Casting
Background image of page 8
Sort First vs. Sort Last • Sort first – Find some depth-based ordering of the objects relative to the camera, then draw from back to front, e.g. Painter’s algorithm (BSP) – Build an ordered data structure to avoid duplicating work •S o r t l a s t – Sort implicitly as more information becomes available, e.g. Z-buffer
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Important Algorithms •R a y c a s t i n g • Z-buffer • Binary space partitioning • Back face culling
Background image of page 10
1. Ray Casting
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 12
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 38

06-hidden - Lecture 7 Hidden Surface Removal Reading Hearn...

This preview shows document pages 1 - 12. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online