UW-Madison CS 559 - CS 559 Lecture Notes (34 pages)

Previewing pages 1, 2, 16, 17, 18, 33, 34 of 34 page document View the full content.
View Full Document

CS 559 Lecture Notes



Previewing pages 1, 2, 16, 17, 18, 33, 34 of actual document.

View the full content.
View Full Document
View Full Document

CS 559 Lecture Notes

82 views

Lecture Notes


Pages:
34
School:
University of Wisconsin, Madison
Course:
Cs 559 - Computer Graphics
Computer Graphics Documents

Unformatted text preview:

Last Time Filling polygons Anti aliasing Visibility Painter s algorithm Z Buffer 11 02 04 University of Wisconsin CS559 Fall 2004 Today Hidden Surface Removal More Z buffer A buffer BSP Tree algorithms Project 2 11 02 04 University of Wisconsin CS559 Fall 2004 Visibility Recap You are given a set of polygons to draw and you need to figure out which one is visible at every pixel Issues include Efficiency it is slow to overwrite pixels or scan convert things that cannot be seen Accuracy answer should be right and behave well when the viewpoint moves Complexity object precision visibility may generate many small pieces of polygon 11 02 04 University of Wisconsin CS559 Fall 2004 Z Buffer and Transparency Say you want to render transparent surfaces alpha not 1 with a z buffer Must render in back to front order Otherwise would have to store at least the first opaque polygon behind transparent one Front Partially transparent 3rd Opaque 2nd Opaque 1st 1st or 2nd 3rd Need depth of 1st and 2nd 1st or 2nd Must recall this color and depth 11 02 04 University of Wisconsin CS559 Fall 2004 OpenGL Depth Buffer OpenGL defines a depth buffer as its visibility algorithm The enable depth testing glEnable GL DEPTH TEST To clear the depth buffer glClear GL DEPTH BUFFER BIT To clear color and depth glClear GL COLOR BUFFER BIT GL DEPTH BUFFER BIT The number of bits used for the depth values can be specified windowing system dependent and hardware may impose limits based on available memory The comparison function can be specified glDepthFunc Sometimes want to draw furthest thing or equal to depth in buffer 11 02 04 University of Wisconsin CS559 Fall 2004 The A buffer Image Precision Handles transparent surfaces and filter anti aliasing At each pixel maintain a pointer to a list of polygons sorted by depth and a sub pixel coverage mask for each polygon Coverage mask Matrix of bits saying which parts of the pixel are covered Algorithm Drawing pass do not directly display the result if



View Full Document

Access the best Study Guides, Lecture Notes and Practice Exams

Loading Unlocking...
Login

Join to view CS 559 Lecture Notes and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view CS 559 Lecture Notes and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?