SlideShare a Scribd company logo
1 of 18
May 2012 1
Back-Face Detection
( )A point , , is behind a polygon surface if 0,
where , , and are the plane parameters of the polygon. Test is
simplified by considering normal of face and viewing direction.
x y z Ax By Cz D
A B C D
+ + + <
( ), ,A B C=N
viewV
( )
view
view
A polygon is back face if 0. In a right-handed
viewing system viewing direction is along negative axis,
0,0, 1 . Then, a polygon is a back face if 0.
z
C
× >
= − ≤
V N
V
May 2012 2
Depth-Buffer Methods
Three surfaces overlapping pixel position (x,y) on the view plane.
The visible surface, S1, has the smallest depth value.
vx
vy
vz
3S
2S
1S
( ),x y
view plane
May 2012 3
( )
( )
Initialize each pixel ( , ) of depth buffer and frame buffer (color):
, 1. // Z is normalized to [0,1.0]
//
0;
, background color; initialize
for ea
to backgroun
h
d
c p
x y
depthBuf x y
frameBuf x y
=
=
Z - Buffer Algorithm
( )
( ) ( )
( )
olygon {
for each pixel , polygon {
if
// traverse all polygons
// rasterization
//( , , ) {
get (compute) , ;
check closer pixel
// compute color of pixel
x y
z x y depthBuf x y
color x y
d
∈
>
( ) ( ) ( ) ( ), , ; , , ;
}}}
epthBuf x y z x y frameBuf x y color x y= =
May 2012 4
Efficient Depth Calculation
Given the depth value in a vertex of a polygon, the depth of any
other point in the plane containing the polygon can be
calculated efficiently (additions only).
( )
( ) ( )
Depth is calculated from plane equatuion .
At rasterization along scan-line changes by 1. Therefore,
1 1 , and the ratio
is constant for the entire polygon.
z Ax By D C
x
z x A x By D C z A C A C
= − − −
±
+ = − + − − = − −  
May 2012 5
A-Buffer Method
It is named so since z-buffer is used for depth semantics and in
some sense a-buffer has the nature of the other end of alphabet. It
is an extension using antialiasing, area-averaging visibility
detection method, supporting transparency.
background opaque
surface
foreground
transparent surface
08/04/15©Zachary Wartell
Scan-Line Method
• Unlike z-buffer or A-buffer, scan-line method has depth info only for
a single scan-line.
• In order to require one scan-line of depth values, we must group
and process all polygons intersecting a given scan-line at the same
time before process the next scan-line
• Build table of edges of all polygons in scene. Maintain active-edge-
table as we visit each scan-line in scene. AET now contains edges
for all polygons at that scanline. Must maintain flag for each
surface to determine whether pixel on scan-line is inside that
surface.
scan-line
08/04/15©Zachary Wartell
Scan-Line Method Basic Example
• Scan Line 1:
– (A,B) to (B,C) only inside S1, so color from S1
– (E,H) to (F,G) only inside S2, so color from S2
• Scan Line 2:
– (A,D) to (E,H) only inside S1, so color from S1
– (E,H) to (B,C) inside S1 and S2 , so compute & test depth
In this example we color from S1
– (B,C) to (F,G) only inside S2, so color from S2
B
A
D
C
G
F
E
H
S1 S2
Scan Line 1
Scan Line 2
Scan Line 3
08/04/15©Zachary Wartell
Scan-Line Method Generalization
• This basic approach fails when surfaces cut-
through each other or overlap. To generalize
we must divide surfaces to eliminate overlaps
08/04/15©Zachary Wartell
Depth-Sorting Method
• Painter’s Algorithm
• Approach:
– sorted surfaces by increasing depth
• may require surface splitting
– scan-convert surfaces in sorted order (back to
front)
• Use a sequence of sorting steps and tests of
increasing computational complexity to
handle all possible cases of polygon depth
orderings
08/04/15©Zachary Wartell
• Sort surfaces by each surface’s smallest z into
list:
(S1,S2,… Si… SN)
• For all Si ,i∈[2, N]
• If farthest surface SF has no z overlap render it.
(easy case)
• If there is z overlap with SF, we can still avoid
reordering if one of four conditions holds. So
we test these conditions…
Depth Sorting Details
z
SF=S1
Si
zmin2
zmax2
zmin1
zmax1
z
SF=S1
Si
zmin2
zmax2
zmin1
zmax1
farther from
PRP !
08/04/15©Zachary Wartell
Depth Sorting: Reorder Avoidance Tests
• We can avoid reorder if:
1) Bounding rectangles in xy don’t overlap
2) Sf is completely behind overlapping surface
relative to view position
3) Overlapping surface is completely in front of
Sf relative to view position
4) Boundary edges of projections of two
surfaces on projection plane don’t overlap
z
Sf
S2
xmin1 xmax1 xmin2 xmax2
1)
Sf
S2
2) 3)
z z
Sf
S2
08/04/15©Zachary Wartell
BSP-trees
Binary Space Partition is a relatively easy way to sort the polygons relative to the eyepoint
To Build a BSP Tree
1. Choose a polygon, T, and compute the equation of the plane it defines.
2. Test all the vertices of all the other polygons to determine if they are in front of, behind, or in
the same plane as T. If the plane intersects a polygon, divide the polygon at the plane.
3. Polygons are placed into a binary search tree with T as the root.
4. Call the procedure recursively on the left and right subtree.
Larry F. Hodges, Drew Kessler
08/04/15©Zachary Wartell
Traversing BSP-Tree
• Traverse the BSP tree such that the
branch descended first is the side that is
away from the eyepoint. This can be
determined by substituting the eye point
into the plane equation for the polygon at
the root.
• When there is no first branch to descend,
or that branch has been completed then
render the polygon at this node.
• After the current node's polygon has been
rendered, descend the branch that is
closer to the eyepoint.Larry F. Hodges, Drew Kessler
08/04/15©Zachary Wartell
Area-Subdivision Method
• Recursively subdivide viewplane into quadrants until:
– rectangle contains part of 1 projected surface
– rectangle contains part of no surface
– rectangle is size of pixel
08/04/15©Zachary Wartell
Area-Subdivision Method
• We need tests that can quickly determine tell if current area is part
of one surface or if further subdivision is needed.
• Four cases for relation between surface and rectangular area:
surrounding
surface
overlapping
surface
inside
surface
outside
surface
08/04/15©Zachary Wartell
Area-Subdivision: Stopping Conditions
• Recursive subdivision can stop when either:
1) a rectangle has all surfaces outside
2) a rectangle has exactly one inside, overlapping, or
surrounding surface
3) a rectangle has one surrounding surface and the
surface occludes all other surfaces in the area
• For efficiency:
– compare rectangle to projected surface bounding
rectangle first. Only perform exact interaction
test if necessary. If single bounding rect.
intersects rectangle, test for exact intersection
and color the framebuffer for the intersection of
08/04/15©Zachary Wartell
Octrees
• Octree:
– partitions 3-space by a regular, recursive subdivision of 3-space into
axis-aligned boxes
– 3D objects are stored in the octree node that contains them.
Recursively subdivide until each octree node is either empty, a
homogeneous volume, or contains single object that’s “easy” to
compute visibility (example can use back-face culling alone).
3 2
0 1
4 5
6
7
0 1 2 3 4 5 6 7
Any of these octants could then be
recursively subdivide
08/04/15©Zachary Wartell
Ray-Casting Method
• based geometric optics method that trace rays of light
• “backwards” light path tracing
• compare to depth buffer (surfaces to pixels versus pixel to surfaces)
• special case of ray-tracing
COP
pixel
view plane

More Related Content

What's hot

Scan line method
Scan line methodScan line method
Scan line methodPooja Dixit
 
Back face detection
Back face detectionBack face detection
Back face detectionPooja Dixit
 
Visible surface detection in computer graphic
Visible surface detection in computer graphicVisible surface detection in computer graphic
Visible surface detection in computer graphicanku2266
 
Mid-Point Cirle Drawing Algorithm
Mid-Point Cirle Drawing AlgorithmMid-Point Cirle Drawing Algorithm
Mid-Point Cirle Drawing AlgorithmNeha Kaurav
 
scan conversion of point , line and circle
scan conversion of point , line and circlescan conversion of point , line and circle
scan conversion of point , line and circleDivy Kumar Gupta
 
Concept of basic illumination model
Concept of basic illumination modelConcept of basic illumination model
Concept of basic illumination modelAnkit Garg
 
Seed filling algorithm
Seed filling algorithmSeed filling algorithm
Seed filling algorithmMani Kanth
 
Fill area algorithms
Fill area algorithmsFill area algorithms
Fill area algorithmsKumar
 
3D transformation in computer graphics
3D transformation in computer graphics3D transformation in computer graphics
3D transformation in computer graphicsSHIVANI SONI
 
Windowing clipping
Windowing   clippingWindowing   clipping
Windowing clippingShweta Shah
 
Hidden lines & surfaces
Hidden lines & surfacesHidden lines & surfaces
Hidden lines & surfacesAnkur Kumar
 
3 d display-methods-in-computer-graphics(For DIU)
3 d display-methods-in-computer-graphics(For DIU)3 d display-methods-in-computer-graphics(For DIU)
3 d display-methods-in-computer-graphics(For DIU)Rajon rdx
 
Hidden surfaces
Hidden surfacesHidden surfaces
Hidden surfacesMohd Arif
 
Polygon Fill
Polygon FillPolygon Fill
Polygon Fillwahab13
 
2D transformation (Computer Graphics)
2D transformation (Computer Graphics)2D transformation (Computer Graphics)
2D transformation (Computer Graphics)Timbal Mayank
 

What's hot (20)

Graphics a buffer
Graphics a bufferGraphics a buffer
Graphics a buffer
 
Scan line method
Scan line methodScan line method
Scan line method
 
Back face detection
Back face detectionBack face detection
Back face detection
 
Visible surface detection in computer graphic
Visible surface detection in computer graphicVisible surface detection in computer graphic
Visible surface detection in computer graphic
 
Mid-Point Cirle Drawing Algorithm
Mid-Point Cirle Drawing AlgorithmMid-Point Cirle Drawing Algorithm
Mid-Point Cirle Drawing Algorithm
 
scan conversion of point , line and circle
scan conversion of point , line and circlescan conversion of point , line and circle
scan conversion of point , line and circle
 
Concept of basic illumination model
Concept of basic illumination modelConcept of basic illumination model
Concept of basic illumination model
 
3 d display methods
3 d display methods3 d display methods
3 d display methods
 
Seed filling algorithm
Seed filling algorithmSeed filling algorithm
Seed filling algorithm
 
Fill area algorithms
Fill area algorithmsFill area algorithms
Fill area algorithms
 
3D transformation in computer graphics
3D transformation in computer graphics3D transformation in computer graphics
3D transformation in computer graphics
 
Depth Buffer Method
Depth Buffer MethodDepth Buffer Method
Depth Buffer Method
 
Windowing clipping
Windowing   clippingWindowing   clipping
Windowing clipping
 
Spline representations
Spline representationsSpline representations
Spline representations
 
Hidden lines & surfaces
Hidden lines & surfacesHidden lines & surfaces
Hidden lines & surfaces
 
3 d display-methods-in-computer-graphics(For DIU)
3 d display-methods-in-computer-graphics(For DIU)3 d display-methods-in-computer-graphics(For DIU)
3 d display-methods-in-computer-graphics(For DIU)
 
Hidden surfaces
Hidden surfacesHidden surfaces
Hidden surfaces
 
Polygon Fill
Polygon FillPolygon Fill
Polygon Fill
 
2D transformation (Computer Graphics)
2D transformation (Computer Graphics)2D transformation (Computer Graphics)
2D transformation (Computer Graphics)
 
Anti aliasing Computer Graphics
Anti aliasing Computer GraphicsAnti aliasing Computer Graphics
Anti aliasing Computer Graphics
 

Viewers also liked

Z Buffer Optimizations
Z Buffer OptimizationsZ Buffer Optimizations
Z Buffer Optimizationspjcozzi
 
Unity - Internals: memory and performance
Unity - Internals: memory and performanceUnity - Internals: memory and performance
Unity - Internals: memory and performanceCodemotion
 
How we optimized our Game - Jake & Tess' Finding Monsters Adventure
How we optimized our Game - Jake & Tess' Finding Monsters AdventureHow we optimized our Game - Jake & Tess' Finding Monsters Adventure
How we optimized our Game - Jake & Tess' Finding Monsters AdventureFelipe Lira
 
Mobile Performance Tuning: Poor Man's Tips And Tricks
Mobile Performance Tuning: Poor Man's Tips And TricksMobile Performance Tuning: Poor Man's Tips And Tricks
Mobile Performance Tuning: Poor Man's Tips And TricksValentin Simonov
 
Visible surface determination
Visible  surface determinationVisible  surface determination
Visible surface determinationPatel Punit
 
Computer Graphics Part1
Computer Graphics Part1Computer Graphics Part1
Computer Graphics Part1qpqpqp
 
Oit And Indirect Illumination Using Dx11 Linked Lists
Oit And Indirect Illumination Using Dx11 Linked ListsOit And Indirect Illumination Using Dx11 Linked Lists
Oit And Indirect Illumination Using Dx11 Linked ListsHolger Gruen
 
CG OpenGL surface detection+illumination+rendering models-course 9
CG OpenGL surface detection+illumination+rendering models-course 9CG OpenGL surface detection+illumination+rendering models-course 9
CG OpenGL surface detection+illumination+rendering models-course 9fungfung Chen
 
GRPHICS08 - Raytracing and Radiosity
GRPHICS08 - Raytracing and RadiosityGRPHICS08 - Raytracing and Radiosity
GRPHICS08 - Raytracing and RadiosityMichael Heron
 
Unity Internals: Memory and Performance
Unity Internals: Memory and PerformanceUnity Internals: Memory and Performance
Unity Internals: Memory and PerformanceDevGAMM Conference
 
Optimizing Large Scenes in Unity
Optimizing Large Scenes in UnityOptimizing Large Scenes in Unity
Optimizing Large Scenes in UnityNoam Gat
 
Introduction to computer graphics
Introduction to computer graphicsIntroduction to computer graphics
Introduction to computer graphicsPartnered Health
 
Computer Graphics: Visible surface detection methods
Computer Graphics: Visible surface detection methodsComputer Graphics: Visible surface detection methods
Computer Graphics: Visible surface detection methodsJoseph Charles
 
Computer Graphics - Hidden Line Removal Algorithm
Computer Graphics - Hidden Line Removal AlgorithmComputer Graphics - Hidden Line Removal Algorithm
Computer Graphics - Hidden Line Removal AlgorithmJyotiraman De
 
Build Your Own 3D Scanner: Surface Reconstruction
Build Your Own 3D Scanner: Surface ReconstructionBuild Your Own 3D Scanner: Surface Reconstruction
Build Your Own 3D Scanner: Surface ReconstructionDouglas Lanman
 

Viewers also liked (16)

Z Buffer Optimizations
Z Buffer OptimizationsZ Buffer Optimizations
Z Buffer Optimizations
 
Unity - Internals: memory and performance
Unity - Internals: memory and performanceUnity - Internals: memory and performance
Unity - Internals: memory and performance
 
How we optimized our Game - Jake & Tess' Finding Monsters Adventure
How we optimized our Game - Jake & Tess' Finding Monsters AdventureHow we optimized our Game - Jake & Tess' Finding Monsters Adventure
How we optimized our Game - Jake & Tess' Finding Monsters Adventure
 
ijca_publication
ijca_publicationijca_publication
ijca_publication
 
Mobile Performance Tuning: Poor Man's Tips And Tricks
Mobile Performance Tuning: Poor Man's Tips And TricksMobile Performance Tuning: Poor Man's Tips And Tricks
Mobile Performance Tuning: Poor Man's Tips And Tricks
 
Visible surface determination
Visible  surface determinationVisible  surface determination
Visible surface determination
 
Computer Graphics Part1
Computer Graphics Part1Computer Graphics Part1
Computer Graphics Part1
 
Oit And Indirect Illumination Using Dx11 Linked Lists
Oit And Indirect Illumination Using Dx11 Linked ListsOit And Indirect Illumination Using Dx11 Linked Lists
Oit And Indirect Illumination Using Dx11 Linked Lists
 
CG OpenGL surface detection+illumination+rendering models-course 9
CG OpenGL surface detection+illumination+rendering models-course 9CG OpenGL surface detection+illumination+rendering models-course 9
CG OpenGL surface detection+illumination+rendering models-course 9
 
GRPHICS08 - Raytracing and Radiosity
GRPHICS08 - Raytracing and RadiosityGRPHICS08 - Raytracing and Radiosity
GRPHICS08 - Raytracing and Radiosity
 
Unity Internals: Memory and Performance
Unity Internals: Memory and PerformanceUnity Internals: Memory and Performance
Unity Internals: Memory and Performance
 
Optimizing Large Scenes in Unity
Optimizing Large Scenes in UnityOptimizing Large Scenes in Unity
Optimizing Large Scenes in Unity
 
Introduction to computer graphics
Introduction to computer graphicsIntroduction to computer graphics
Introduction to computer graphics
 
Computer Graphics: Visible surface detection methods
Computer Graphics: Visible surface detection methodsComputer Graphics: Visible surface detection methods
Computer Graphics: Visible surface detection methods
 
Computer Graphics - Hidden Line Removal Algorithm
Computer Graphics - Hidden Line Removal AlgorithmComputer Graphics - Hidden Line Removal Algorithm
Computer Graphics - Hidden Line Removal Algorithm
 
Build Your Own 3D Scanner: Surface Reconstruction
Build Your Own 3D Scanner: Surface ReconstructionBuild Your Own 3D Scanner: Surface Reconstruction
Build Your Own 3D Scanner: Surface Reconstruction
 

Similar to Visual surface detection i

Similar to Visual surface detection i (20)

Computer graphics iv unit
Computer graphics iv unitComputer graphics iv unit
Computer graphics iv unit
 
Hidden Surface Removal using Z-buffer
Hidden Surface Removal using Z-bufferHidden Surface Removal using Z-buffer
Hidden Surface Removal using Z-buffer
 
Unit II_Graph.pptxkgjrekjgiojtoiejhgnltegjte
Unit II_Graph.pptxkgjrekjgiojtoiejhgnltegjteUnit II_Graph.pptxkgjrekjgiojtoiejhgnltegjte
Unit II_Graph.pptxkgjrekjgiojtoiejhgnltegjte
 
Clipping & Rasterization
Clipping & RasterizationClipping & Rasterization
Clipping & Rasterization
 
Surface design and visible surfaces
Surface design and visible surfacesSurface design and visible surfaces
Surface design and visible surfaces
 
testpang
testpangtestpang
testpang
 
ImageSegmentation (1).ppt
ImageSegmentation (1).pptImageSegmentation (1).ppt
ImageSegmentation (1).ppt
 
ImageSegmentation.ppt
ImageSegmentation.pptImageSegmentation.ppt
ImageSegmentation.ppt
 
ImageSegmentation.ppt
ImageSegmentation.pptImageSegmentation.ppt
ImageSegmentation.ppt
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
UNIT-V
UNIT-VUNIT-V
UNIT-V
 
Polygon filling
Polygon fillingPolygon filling
Polygon filling
 
image segmentation image segmentation.pptx
image segmentation image segmentation.pptximage segmentation image segmentation.pptx
image segmentation image segmentation.pptx
 
Chapter 4
Chapter 4Chapter 4
Chapter 4
 
Week6.ppt
Week6.pptWeek6.ppt
Week6.ppt
 
Polar area
Polar areaPolar area
Polar area
 
LEC 12-DSALGO-GRAPHS(final12).pdf
LEC 12-DSALGO-GRAPHS(final12).pdfLEC 12-DSALGO-GRAPHS(final12).pdf
LEC 12-DSALGO-GRAPHS(final12).pdf
 
UNIT2.pptx
UNIT2.pptxUNIT2.pptx
UNIT2.pptx
 
Hidden line removal algorithm
Hidden line removal algorithmHidden line removal algorithm
Hidden line removal algorithm
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 

Recently uploaded

"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"mphochane1998
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startQuintin Balsdon
 
Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxchumtiyababu
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Arindam Chakraborty, Ph.D., P.E. (CA, TX)
 
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLEGEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLEselvakumar948
 
Computer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to ComputersComputer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to ComputersMairaAshraf6
 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadhamedmustafa094
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network DevicesChandrakantDivate1
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwaitjaanualu31
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdfKamal Acharya
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxJuliansyahHarahap1
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxSCMS School of Architecture
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxMuhammadAsimMuhammad6
 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesRAJNEESHKUMAR341697
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilVinayVitekari
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
Wadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptxWadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptxNadaHaitham1
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxmaisarahman1
 

Recently uploaded (20)

"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptx
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLEGEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
 
Computer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to ComputersComputer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to Computers
 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal load
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planes
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech Civil
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
Wadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptxWadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptx
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
 

Visual surface detection i

  • 1. May 2012 1 Back-Face Detection ( )A point , , is behind a polygon surface if 0, where , , and are the plane parameters of the polygon. Test is simplified by considering normal of face and viewing direction. x y z Ax By Cz D A B C D + + + < ( ), ,A B C=N viewV ( ) view view A polygon is back face if 0. In a right-handed viewing system viewing direction is along negative axis, 0,0, 1 . Then, a polygon is a back face if 0. z C × > = − ≤ V N V
  • 2. May 2012 2 Depth-Buffer Methods Three surfaces overlapping pixel position (x,y) on the view plane. The visible surface, S1, has the smallest depth value. vx vy vz 3S 2S 1S ( ),x y view plane
  • 3. May 2012 3 ( ) ( ) Initialize each pixel ( , ) of depth buffer and frame buffer (color): , 1. // Z is normalized to [0,1.0] // 0; , background color; initialize for ea to backgroun h d c p x y depthBuf x y frameBuf x y = = Z - Buffer Algorithm ( ) ( ) ( ) ( ) olygon { for each pixel , polygon { if // traverse all polygons // rasterization //( , , ) { get (compute) , ; check closer pixel // compute color of pixel x y z x y depthBuf x y color x y d ∈ > ( ) ( ) ( ) ( ), , ; , , ; }}} epthBuf x y z x y frameBuf x y color x y= =
  • 4. May 2012 4 Efficient Depth Calculation Given the depth value in a vertex of a polygon, the depth of any other point in the plane containing the polygon can be calculated efficiently (additions only). ( ) ( ) ( ) Depth is calculated from plane equatuion . At rasterization along scan-line changes by 1. Therefore, 1 1 , and the ratio is constant for the entire polygon. z Ax By D C x z x A x By D C z A C A C = − − − ± + = − + − − = − −  
  • 5. May 2012 5 A-Buffer Method It is named so since z-buffer is used for depth semantics and in some sense a-buffer has the nature of the other end of alphabet. It is an extension using antialiasing, area-averaging visibility detection method, supporting transparency. background opaque surface foreground transparent surface
  • 6. 08/04/15©Zachary Wartell Scan-Line Method • Unlike z-buffer or A-buffer, scan-line method has depth info only for a single scan-line. • In order to require one scan-line of depth values, we must group and process all polygons intersecting a given scan-line at the same time before process the next scan-line • Build table of edges of all polygons in scene. Maintain active-edge- table as we visit each scan-line in scene. AET now contains edges for all polygons at that scanline. Must maintain flag for each surface to determine whether pixel on scan-line is inside that surface. scan-line
  • 7. 08/04/15©Zachary Wartell Scan-Line Method Basic Example • Scan Line 1: – (A,B) to (B,C) only inside S1, so color from S1 – (E,H) to (F,G) only inside S2, so color from S2 • Scan Line 2: – (A,D) to (E,H) only inside S1, so color from S1 – (E,H) to (B,C) inside S1 and S2 , so compute & test depth In this example we color from S1 – (B,C) to (F,G) only inside S2, so color from S2 B A D C G F E H S1 S2 Scan Line 1 Scan Line 2 Scan Line 3
  • 8. 08/04/15©Zachary Wartell Scan-Line Method Generalization • This basic approach fails when surfaces cut- through each other or overlap. To generalize we must divide surfaces to eliminate overlaps
  • 9. 08/04/15©Zachary Wartell Depth-Sorting Method • Painter’s Algorithm • Approach: – sorted surfaces by increasing depth • may require surface splitting – scan-convert surfaces in sorted order (back to front) • Use a sequence of sorting steps and tests of increasing computational complexity to handle all possible cases of polygon depth orderings
  • 10. 08/04/15©Zachary Wartell • Sort surfaces by each surface’s smallest z into list: (S1,S2,… Si… SN) • For all Si ,i∈[2, N] • If farthest surface SF has no z overlap render it. (easy case) • If there is z overlap with SF, we can still avoid reordering if one of four conditions holds. So we test these conditions… Depth Sorting Details z SF=S1 Si zmin2 zmax2 zmin1 zmax1 z SF=S1 Si zmin2 zmax2 zmin1 zmax1 farther from PRP !
  • 11. 08/04/15©Zachary Wartell Depth Sorting: Reorder Avoidance Tests • We can avoid reorder if: 1) Bounding rectangles in xy don’t overlap 2) Sf is completely behind overlapping surface relative to view position 3) Overlapping surface is completely in front of Sf relative to view position 4) Boundary edges of projections of two surfaces on projection plane don’t overlap z Sf S2 xmin1 xmax1 xmin2 xmax2 1) Sf S2 2) 3) z z Sf S2
  • 12. 08/04/15©Zachary Wartell BSP-trees Binary Space Partition is a relatively easy way to sort the polygons relative to the eyepoint To Build a BSP Tree 1. Choose a polygon, T, and compute the equation of the plane it defines. 2. Test all the vertices of all the other polygons to determine if they are in front of, behind, or in the same plane as T. If the plane intersects a polygon, divide the polygon at the plane. 3. Polygons are placed into a binary search tree with T as the root. 4. Call the procedure recursively on the left and right subtree. Larry F. Hodges, Drew Kessler
  • 13. 08/04/15©Zachary Wartell Traversing BSP-Tree • Traverse the BSP tree such that the branch descended first is the side that is away from the eyepoint. This can be determined by substituting the eye point into the plane equation for the polygon at the root. • When there is no first branch to descend, or that branch has been completed then render the polygon at this node. • After the current node's polygon has been rendered, descend the branch that is closer to the eyepoint.Larry F. Hodges, Drew Kessler
  • 14. 08/04/15©Zachary Wartell Area-Subdivision Method • Recursively subdivide viewplane into quadrants until: – rectangle contains part of 1 projected surface – rectangle contains part of no surface – rectangle is size of pixel
  • 15. 08/04/15©Zachary Wartell Area-Subdivision Method • We need tests that can quickly determine tell if current area is part of one surface or if further subdivision is needed. • Four cases for relation between surface and rectangular area: surrounding surface overlapping surface inside surface outside surface
  • 16. 08/04/15©Zachary Wartell Area-Subdivision: Stopping Conditions • Recursive subdivision can stop when either: 1) a rectangle has all surfaces outside 2) a rectangle has exactly one inside, overlapping, or surrounding surface 3) a rectangle has one surrounding surface and the surface occludes all other surfaces in the area • For efficiency: – compare rectangle to projected surface bounding rectangle first. Only perform exact interaction test if necessary. If single bounding rect. intersects rectangle, test for exact intersection and color the framebuffer for the intersection of
  • 17. 08/04/15©Zachary Wartell Octrees • Octree: – partitions 3-space by a regular, recursive subdivision of 3-space into axis-aligned boxes – 3D objects are stored in the octree node that contains them. Recursively subdivide until each octree node is either empty, a homogeneous volume, or contains single object that’s “easy” to compute visibility (example can use back-face culling alone). 3 2 0 1 4 5 6 7 0 1 2 3 4 5 6 7 Any of these octants could then be recursively subdivide
  • 18. 08/04/15©Zachary Wartell Ray-Casting Method • based geometric optics method that trace rays of light • “backwards” light path tracing • compare to depth buffer (surfaces to pixels versus pixel to surfaces) • special case of ray-tracing COP pixel view plane