Presented by: Bhavna Agarwal
Given a bunch of 3D objects predefined in x,y,z; order them in geometry
Back faces (Back-face Culling) Hidden faces (Hidden Surface Removal) VNIf V.N>0 =>back-face Surface normal
Ray Casting Looks through the stack of pixels lying on the ray O(p logn) p = # pixels; n = # polygons Z-Buffer (Catmull, 1975) For a point (x,y) holds the smallest z scanned so far Space = O(X.Y) X = frame width; Y = frame height
The color value is stored in the rendering surface Depth-buffer (same dimensions as the rendering surface) The depth value is stored in the depth-buffer. (x,y) Too much Memory!!
Warnock(PL in vp1, vp1) Warnock(PL in vp2, vp2) Warnock(PL in vp3, vp3) Warnock(PL in vp4, vp4) Runtime = Ɵ (p.n) vp1 vp3vp4 vp2
Paint the farthest objects 1 st Overlap the occluded regions with paint Sort polygons in depth = O(nlgn) Order from largest z to smallest z 1 2 3
Piercing polygons Cyclic chain XX YY SOLUTION Split and Sort
Binary Space Partitioning tree
1. Select a partition plane. 2. Partition the set of polygons with the plane. 3. Recurse with each of the two new sets. X
Classify the eye-point wrt the plane at the root If (eye-point lies in left-sub) Render the polygons in the right-sub Render the polygons on the root plane Render the polygons in the left-sub If (eye-point lies in right-sub) Vice-versa If (eye-point lies on the splitting plane) Render the polygons in the right/left sub Render the polygons on the left/right sub
A bad splitting plane cuts too many polygons This means expensive rendering A bad splitting plane gives an unbalanced tree This means expensive tree traversal Measure of success: # poly in left-subtree # poly in right-subtree <= Accepted threshold
T(n) = 2.T(n/2) + O(time to find the best dividing polygon) % each polygon tried against others = 2.T(n/2) + O(n 2 lgn) = O(n 2 lgn)
The good Draws the polygons precisely No undershoot/overshoot problems DesiredUndershootOvershoot The bad Draws the same pixel many times Inefficient if used for the whole image
Reverse of Painters Front to back! Uses a BSP tree to resolve conflicts. Saves a mask that stores the span not written to for each scan line. Advantage Never writes the same pixel again! Disadvantage What about transparent polygons?
THANK YOU! * easy ones please