We do not draw polygons facing the other direction

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: vertices are mapped to pixels ○ Painter’s algorithm, BSP trees, portal culling ● Image space techniques: applied while the vertices are rasterized ○ Z-buffering * Back Face Culling. •We do not draw polygons facing the other direction •Test z component of surface normals. If negative – cull, since normal points away from viewer. •Or if N.V > 0 we are viewing the back face so polygon is obscured. * Summary for Hidden Surface Removal ● Z-buffer is easy to implement on hardware and is a standard technique for hidden surface removal ● We need to combine it with an object-based method especially when there are too many polygons BSP trees, portal culling ● Need to do the front-to-back traversal to reduce the cost Overview Hidden Surface Removal ●Painter’s algorithm ●Z-buffer ●BSP tree ●Portal culling ●Back face culling ●Transparency ●Alpha blending ●Screen door transparency * Transparency Sometimes we want to render transparent objects We blend the colour of the objects along the same ray •Alpha blending •Screen door transparency * Alpha Blending Another variable called alpha is defined here This describes the opacity Alpha = 1.0 means fully opaque Alpha = 0.0 means fully transparent α=1 α = 0.5 α = 0.2 * Sorting by the depth First, you need to save the depth and colour of all the fragments that will be projected onto the same pixel in a list Then blend the colour from back towards the front * Colour Blending The colours of overlapping fragments are blended as follows: Co = α Cs + (1-α) Cd Cs : colour of the transparent object, Cd is the pixel colour before blending, Co is the new colour as a result of blending Co becomes Cd for the next round Sorting is expensive ● Need to use BSP Tree ○ Soring per-pixel is very expensive ● Any faster solution ? –Screen-door transparency Screen-door Transparency ● The object is solid bu...
View Full Document

Ask a homework question - tutors are online