Computer Graphics II Autumn 2017-2018
Outline Visible Surface Determination Methods (contd.) 1 Visible Surface Determination Methods (contd.)
Outline Visible Surface Determination Methods (contd.) 1 Visible Surface Determination Methods (contd.)
Area-Subdivision Method Essentially an image-space method but depth ordering of surfaces achieved through object-space operations (just like Depth Sorting / Painter s Alg.)
Area-Subdivision Method Essentially an image-space method but depth ordering of surfaces achieved through object-space operations (just like Depth Sorting / Painter s Alg.) Takes advantage of coherence of scene by locating those projection areas (of frame buffer) that represent part of a single surface
Area-Subdivision Method Essentially an image-space method but depth ordering of surfaces achieved through object-space operations (just like Depth Sorting / Painter s Alg.) Takes advantage of coherence of scene by locating those projection areas (of frame buffer) that represent part of a single surface Method is applied by recursively dividing entire view plane area into smaller rectangles until a sub-division...
Area-Subdivision Method Essentially an image-space method but depth ordering of surfaces achieved through object-space operations (just like Depth Sorting / Painter s Alg.) Takes advantage of coherence of scene by locating those projection areas (of frame buffer) that represent part of a single surface Method is applied by recursively dividing entire view plane area into smaller rectangles until a sub-division... contains projection of part of a single visible surface
Area-Subdivision Method Essentially an image-space method but depth ordering of surfaces achieved through object-space operations (just like Depth Sorting / Painter s Alg.) Takes advantage of coherence of scene by locating those projection areas (of frame buffer) that represent part of a single surface Method is applied by recursively dividing entire view plane area into smaller rectangles until a sub-division... contains projection of part of a single visible surface contains no surface projection
Area-Subdivision Method Essentially an image-space method but depth ordering of surfaces achieved through object-space operations (just like Depth Sorting / Painter s Alg.) Takes advantage of coherence of scene by locating those projection areas (of frame buffer) that represent part of a single surface Method is applied by recursively dividing entire view plane area into smaller rectangles until a sub-division... contains projection of part of a single visible surface contains no surface projection rectangular area is size of single pixel
Area-Subdivision Method (contd.) Method relies crucially on being able to efficiently test when area is covered by a single surface or that we need to divide and conquer to reduce complexity
Area-Subdivision Method (contd.) Method relies crucially on being able to efficiently test when area is covered by a single surface or that we need to divide and conquer to reduce complexity Starting with entire view (= frame buffer) we recurse by splitting scene into smaller areas if scene too complex (A 1024x1024 pixel viewing area would require 10 levels to reach single pixel.)
Area-Subdivision Method (contd.) Method relies crucially on being able to efficiently test when area is covered by a single surface or that we need to divide and conquer to reduce complexity Starting with entire view (= frame buffer) we recurse by splitting scene into smaller areas if scene too complex At a step of recursion, four possibilities for a surface:
Area-Subdivision Method (contd.) Method relies crucially on being able to efficiently test when area is covered by a single surface or that we need to divide and conquer to reduce complexity Starting with entire view (= frame buffer) we recurse by splitting scene into smaller areas if scene too complex At a step of recursion, four possibilities for a surface:
Area-Subdivision Method (contd.) Method relies crucially on being able to efficiently test when area is covered by a single surface or that we need to divide and conquer to reduce complexity Starting with entire view (= frame buffer) we recurse by splitting scene into smaller areas if scene too complex At a step of recursion, four possibilities for a surface: Surrounding and inside cases are simpler to detect than overlapping and outside cases
Area-Subdivision Method (contd.) No need to recurse further if an area has 1 no inside, overlapping or surrounding surfaces (all surfaces outside) 2 only one inside, overlapping or surrounding surface 3 one surrounding surface that obscures all other surfaces within area Once a single inside, overlapping or surrounding surface is identified surface color values are written to frame buffer So trickiest case, then, is testing for case 3 above
Area-Subdivision Method (contd.) Testing for one surrounding surface that obscures all other surfaces within the area, A Approach 1 (requires depth-sorting of surfaces):
Area-Subdivision Method (contd.) Testing for one surrounding surface that obscures all other surfaces within the area, A Approach 1 (requires depth-sorting of surfaces): sort surfaces according to min. depth from view plane
Area-Subdivision Method (contd.) Testing for one surrounding surface that obscures all other surfaces within the area, A Approach 1 (requires depth-sorting of surfaces): sort surfaces according to min. depth from view plane for each surrounding surface if its max. depth is closer than min. depth of all other surfaces then case 3 applies
Area-Subdivision Method (contd.) Testing for one surrounding surface that obscures all other surfaces within the area, A Approach 1 (requires depth-sorting of surfaces): sort surfaces according to min. depth from view plane for each surrounding surface if its max. depth is closer than min. depth of all other surfaces then case 3 applies Approach 2: Alternatively, return to surface plane equations to calculate depth values at the four corners of A for every surface At the corner (x bl, y bl ) of A, depth is z bl = ax bl by bl d c (with a, b, c, d different for every surface)
Area-Subdivision Method (contd.) Testing for one surrounding surface that obscures all other surfaces within the area, A Approach 1 (requires depth-sorting of surfaces): sort surfaces according to min. depth from view plane for each surrounding surface if its max. depth is closer than min. depth of all other surfaces then case 3 applies Approach 2: Alternatively, return to surface plane equations to calculate depth values at the four corners of A for every surface If four largest zs all come from the same surrounding surface then this obscures all others
Area-Subdivision Method (contd.) Testing for one surrounding surface that obscures all other surfaces within the area, A Approach 1 (requires depth-sorting of surfaces): sort surfaces according to min. depth from view plane for each surrounding surface if its max. depth is closer than min. depth of all other surfaces then case 3 applies Approach 2: Alternatively, return to surface plane equations to calculate depth values at the four corners of A for every surface If four largest zs all come from the same surrounding surface then this obscures all others If one obscuring surface write this to region A of framebuffer
Outline Visible Surface Determination Methods (contd.) 1 Visible Surface Determination Methods (contd.)
BSP-Tree Method Efficient method for determining object visibility by painting surfaces into frame buffer from back to front, like painter s alg. Most useful when view reference point changes but objects in scene are at fixed positions Partitioning planes are usually (structural) polygon facets Some polygons will need to be split into two A/B above We process (paint) the BSP by drawing stuff on far side of hyperplane before near side, where far and near is relative to view point
Octree Method When an octree representation is used for the viewing volume we can identify visible surfaces by searching octree nodes in front-to-back order visit nodes 0 3 before processing back half
Octree Method When an octree representation is used for the viewing volume we can identify visible surfaces by searching octree nodes in front-to-back order This search is performed recursively
Octree Method When an octree representation is used for the viewing volume we can identify visible surfaces by searching octree nodes in front-to-back order This search is performed recursively The frame buffer is drawn in (recursive) quadrants
Octree Method When an octree representation is used for the viewing volume we can identify visible surfaces by searching octree nodes in front-to-back order This search is performed recursively The frame buffer is drawn in (recursive) quadrants As view direction changes, octants are renumbered so that (new) front is again processed first
Comparison of Visibility-Detection Methods Effectiveness depends on characteristics of scene to render If surfaces are widely distributed, with little depth overlap along viewing direction then painter s algorithm (depth-sorting) or BSP-tree method works well But these generally work well only if scene has few surfaces Scan-line method also works well when few surfaces in scene Either of these three methods work effectively for scenes containing up to several thousand polygon surfaces Beyond this, depth-buffer or octree (if this was used for representing viewing volume) is best approach
Comparison of Visibility-Detection Methods (contd.) Depth-buffer works well in scenes with large poly counts because size of surface areas decrease as no. of surfaces increase. So D-B method has poor relative performance for low counts and good relative performance for high counts Octrees have advantage that visibility-detection process is fast and simple: no sorting or intersection calculations required