SlideShare a Scribd company logo
Visible-Surface Detection
Methods
Outline of Presentation
1. Introduction
2. Classification
3. Depth-Buffer Algorithm
1. Introduction
• A set of 3-D surfaces are to be projected onto
a 2-D screen.
• To identify those parts of a scene that are
visible from a chosen viewing position.
• Correct visibility
– when multiple opaque polygons cover the same
screen space, only the closest one is visible.
Visibility
Computer Graphics: Visible surface detection methods
• There are many algorithms developed and still
being developed for visible surface detection
or Hidden surface removal.
• Characteristics of approaches:
– Require large memory size.
– Require long processing time.
– Applicable to which types of objects?
• Considerations:
– Complexity of the scene
– Type of objects in the scene
– Available equipment
– Static or animated?
• Visible-surface detection methods and
hidden-surface elimination methods are
similar but distinct.
2. Classification
• Visible-surface detection algorithms are
broadly classified into 2 types.
1. Object –space methods
2. Image-space methods
Object-space methods
• Deals with object definitions directly.
• Compare objects and parts of objects to each
other within the scene definition to determine
which surfaces, as a whole, we should label as
visible.
• It is a continuous method.
• Compare each object with all other objects to
determine the visibility of the object parts.
Pros and Cons of Object-space
Methods
• If there are n objects in the scene, complexity
= O(n2)
• Calculations are performed at the resolution
in which the objects are defined (only limited
by the computation hardware).
• Process is unrelated to display resolution or
the individual pixel in the image and the result
of the process is applicable to different display
resolutions.
• Display is more accurate but computationally
more expensive as compared to image space
• methods are typically more complex, due to
the possibility of intersection between
surfaces.
• Suitable for scene with small number of
objects and objects with simple relationship
with each other.
Image Space methods
• Deals with the projected images of the objects
and not directly with objects.
• Visibility is determined point by point at each
pixel position on the projection plane.
• It is a discrete method.
• Accuracy of the calculation is bounded by the
display resolution.
• A change of display resolution requires re-
calculation
Two main strategies
• 1. Sorting
• 2. Coherence
1. Sorting
– Sorting is used to facilitate depth comparisons by
ordering the individual surfaces in a scene
according to their distance from the view plane.
Coherence
• Making use of the results calculated for one
part of the scene or image for other nearby
parts.
• Coherence is the result of local similarity
• As objects have continuous spatial extent,
object properties vary smoothly within a small
local region in the scene.
• Calculations can then be made incremental.
3. Depth-Buffer Method
(Z-Buffer Method)
• It is a commonly used image-space approach to
detecting visible surfaces proposed by Catmull in
1974.
• It compares the surface depths at each pixel
position on the projection plane.
• Object depth is usually measured from the view
plane along the z axis of a viewing system.
• Each surface of a scene is processed separately,
one point at a time across the surface.
• This method requires 2 buffers:
1) Depth buffer or z-buffer:
• To store the depth values for each (X, Y)
position, as surfaces are processed.
• 0 ≤ depth ≤ 1
2) Refresh Buffer or Frame Buffer:
• To store the intensity value or Color value at
each position (X, Y).
Computer Graphics: Visible surface detection methods
Algorithm
1. depthbuffer(x,y) = 0
framebuffer(x,y) = background color
2. Process each polygon one at a time
2.1. For each projected (x,y) pixel position of a
polygon, calculate depth z.
2.2. If z > depthbuffer(x,y)
compute surface color,
set depthbuffer(x,y) = z,
framebuffer(x,y) = surfacecolor(x,y)
Example
• The Final Image
Z = 0.3
Z = 0.5
• Step 1: Initialize the depth buffer
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
• Step 2: Draw the polygon with depth 0.3 (2.2)
0 0 0 0
0 0 0 0
0.3 0.3 0 0
0.3 0.3 0 0
• Step 3: Draw the polygon with depth 0.5
0 0 0 0
0 0.5 0.5 0
0.3 0.5 0.5 0
0.3 0.3 0 0
Calculating Depth
• We know the depth values at the vertices.
• we can calculate the depth at any other point
on the surface of the polygon using the
polygon surface equation:
C
DByAx
z


Computer Graphics: Visible surface detection methods
• For any scan line adjacent horizontal x
positions or vertical y positions differ by 1
unit.
• The depth value of the next position (x+1,y)
on the scan line can be obtained using
C
A
z
C
DByxA
z



)1(
• For adjacent scan-lines we can compute the x
value using the slope of the projected line and
the previous x value.
C
BmA
z
m
xx



/
z
1
Pros and Cons
• Widely used
• Simple to implement
• Needs large amount of memory (uses 2
buffers)
• Aliasing problem.
• Handle only opaque surfaces
• Problem when too many surfaces are there.
Questions
2 marks
• What is the task of visible detection methods?
• What is correct visibility?
• What are the types of visible detection
algorithms?
• Difference between object space methods and
image space methods?
• What are the two strategies used in visible
surface detection algorithms?
• What is coherence in image space methods?
• Mention two advantages of object space
method.
• Mention two disadvantages of object space
method.
• What are the disadvantages of Image space
method?
• What are the buffers used in Depth buffer
method?
• What is the content of Z-buffer?
• What is the content of refresh buffer?
• What are the initial values of depth buffer and
refresh buffer?
• What is the range of depth used in depth
buffer method?
• What is the equation to calculate depth value
z at (x,y) for a polygon surface?
• Mention any two disadvantages of depth
buffer method.
10 marks
• Explain depth buffer method in detail.
Quote
If you have a ‘why’ to live for,
you can cope with any ‘how’.
Thank you!

More Related Content

What's hot (20)

PPT
Hidden surfaces
Mohd Arif
 
PPT
Computer graphics iv unit
aravindangc
 
PPTX
Spline representations
Nikhil krishnan
 
PPT
3 d viewing
Deepak Singh
 
PPTX
Clipping
AMIT VIRAMGAMI
 
PPTX
Cyrus beck line clipping algorithm
Pooja Dixit
 
PPTX
Region based segmentation
Imran Hossain
 
PPT
Morphological Image Processing
kumari36
 
PPT
Z buffer
AmitBiswas99
 
PPTX
Parallel projection
Prince Shahu
 
PPT
Shading
Amit Kapoor
 
PPT
hidden surface elimination using z buffer algorithm
rajivagarwal23dei
 
PPTX
raycasting. ppt
Rashun Kumar R
 
PPT
visible surface detection
Balakumaran Arunachalam
 
PPTX
Color Models Computer Graphics
dhruv141293
 
PPTX
Cohen sutherland line clipping
Mani Kanth
 
PPTX
Attributes of output primitive(line attributes)
shalinikarunakaran1
 
PPTX
Back face detection
Pooja Dixit
 
PPTX
3 d viewing projection
Pooja Dixit
 
PPTX
Ray Tracing in Computer Graphics
KABILESH RAMAR
 
Hidden surfaces
Mohd Arif
 
Computer graphics iv unit
aravindangc
 
Spline representations
Nikhil krishnan
 
3 d viewing
Deepak Singh
 
Clipping
AMIT VIRAMGAMI
 
Cyrus beck line clipping algorithm
Pooja Dixit
 
Region based segmentation
Imran Hossain
 
Morphological Image Processing
kumari36
 
Z buffer
AmitBiswas99
 
Parallel projection
Prince Shahu
 
Shading
Amit Kapoor
 
hidden surface elimination using z buffer algorithm
rajivagarwal23dei
 
raycasting. ppt
Rashun Kumar R
 
visible surface detection
Balakumaran Arunachalam
 
Color Models Computer Graphics
dhruv141293
 
Cohen sutherland line clipping
Mani Kanth
 
Attributes of output primitive(line attributes)
shalinikarunakaran1
 
Back face detection
Pooja Dixit
 
3 d viewing projection
Pooja Dixit
 
Ray Tracing in Computer Graphics
KABILESH RAMAR
 

Similar to Computer Graphics: Visible surface detection methods (20)

PDF
Hidden Surface Removal using Z-buffer
Raj Sikarwar
 
PPTX
Visible surface identification
Pooja Dixit
 
PPTX
Visible surface determination
Patel Punit
 
PPTX
UNIT-V
VarthiniRamesh
 
PPTX
B. SC CSIT Computer Graphics Unit 4 By Tekendra Nath Yogi
Tekendra Nath Yogi
 
PPTX
unit 4.pptx
PrabinNeupane8
 
PPT
Hidden lines & surfaces
Ankur Kumar
 
PPT
Visible Surface Detection
AmitBiswas99
 
PPTX
Visible Surfacte Detection Methods - Z-Buffer and Scanline methods.pptx
JeoJoyA
 
PPT
7-Surface Detection Methods.ppt
MarkHark1
 
PPTX
UNIT 2hidden surface elimination in graphics.pptx
Vinod Deenathayalan
 
PPTX
Computer Graphics - Hidden Line Removal Algorithm
Jyotiraman De
 
PPT
hidden surface removal in computer graphics
srinivasan779644
 
PPT
2IV60_11_hidden_surfaces (6).ppt
ssuser024cb2
 
PPTX
Hidden Surface Removal.pptx
bcanawakadalcollege
 
PPTX
3 d display-methods-in-computer-graphics(For DIU)
Rajon rdx
 
PPTX
Visible surface detection methods
KABILESH RAMAR
 
PDF
CG OpenGL surface detection+illumination+rendering models-course 9
fungfung Chen
 
PPTX
Hidden Surface Removal methods.pptx
bcanawakadalcollege
 
Hidden Surface Removal using Z-buffer
Raj Sikarwar
 
Visible surface identification
Pooja Dixit
 
Visible surface determination
Patel Punit
 
B. SC CSIT Computer Graphics Unit 4 By Tekendra Nath Yogi
Tekendra Nath Yogi
 
unit 4.pptx
PrabinNeupane8
 
Hidden lines & surfaces
Ankur Kumar
 
Visible Surface Detection
AmitBiswas99
 
Visible Surfacte Detection Methods - Z-Buffer and Scanline methods.pptx
JeoJoyA
 
7-Surface Detection Methods.ppt
MarkHark1
 
UNIT 2hidden surface elimination in graphics.pptx
Vinod Deenathayalan
 
Computer Graphics - Hidden Line Removal Algorithm
Jyotiraman De
 
hidden surface removal in computer graphics
srinivasan779644
 
2IV60_11_hidden_surfaces (6).ppt
ssuser024cb2
 
Hidden Surface Removal.pptx
bcanawakadalcollege
 
3 d display-methods-in-computer-graphics(For DIU)
Rajon rdx
 
Visible surface detection methods
KABILESH RAMAR
 
CG OpenGL surface detection+illumination+rendering models-course 9
fungfung Chen
 
Hidden Surface Removal methods.pptx
bcanawakadalcollege
 
Ad

Recently uploaded (20)

PDF
Public Health For The 21st Century 1st Edition Judy Orme Jane Powell
trjnesjnqg7801
 
PDF
COM and NET Component Services 1st Edition Juval Löwy
kboqcyuw976
 
PDF
Andreas Schleicher_Teaching Compass_Education 2040.pdf
EduSkills OECD
 
PDF
VCE Literature Section A Exam Response Guide
jpinnuck
 
PDF
Lesson 1 : Science and the Art of Geography Ecosystem
marvinnbustamante1
 
PPTX
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
mprpgcwa2024
 
PPTX
How to use _name_search() method in Odoo 18
Celine George
 
PPTX
Aerobic and Anaerobic respiration and CPR.pptx
Olivier Rochester
 
PPTX
ENGLISH -PPT- Week1 Quarter1 -day-1.pptx
garcialhavz
 
PPTX
How to use grouped() method in Odoo 18 - Odoo Slides
Celine George
 
PPTX
How to Configure Taxes in Company Currency in Odoo 18 Accounting
Celine George
 
PPTX
Elo the Hero is an story about a young boy who became hero.
TeacherEmily1
 
PDF
Free eBook ~100 Common English Proverbs (ebook) pdf.pdf
OH TEIK BIN
 
PPTX
Peer Teaching Observations During School Internship
AjayaMohanty7
 
PPTX
SYMPATHOMIMETICS[ADRENERGIC AGONISTS] pptx
saip95568
 
PPTX
How to Setup Automatic Reordering Rule in Odoo 18 Inventory
Celine George
 
PPTX
Martyrs of Ireland - who kept the faith of St. Patrick.pptx
Martin M Flynn
 
PDF
Rapid Mathematics Assessment Score sheet for all Grade levels
DessaCletSantos
 
PDF
The Power of Compound Interest (Stanford Initiative for Financial Decision-Ma...
Stanford IFDM
 
PDF
Nanotechnology and Functional Foods Effective Delivery of Bioactive Ingredien...
rmswlwcxai8321
 
Public Health For The 21st Century 1st Edition Judy Orme Jane Powell
trjnesjnqg7801
 
COM and NET Component Services 1st Edition Juval Löwy
kboqcyuw976
 
Andreas Schleicher_Teaching Compass_Education 2040.pdf
EduSkills OECD
 
VCE Literature Section A Exam Response Guide
jpinnuck
 
Lesson 1 : Science and the Art of Geography Ecosystem
marvinnbustamante1
 
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
mprpgcwa2024
 
How to use _name_search() method in Odoo 18
Celine George
 
Aerobic and Anaerobic respiration and CPR.pptx
Olivier Rochester
 
ENGLISH -PPT- Week1 Quarter1 -day-1.pptx
garcialhavz
 
How to use grouped() method in Odoo 18 - Odoo Slides
Celine George
 
How to Configure Taxes in Company Currency in Odoo 18 Accounting
Celine George
 
Elo the Hero is an story about a young boy who became hero.
TeacherEmily1
 
Free eBook ~100 Common English Proverbs (ebook) pdf.pdf
OH TEIK BIN
 
Peer Teaching Observations During School Internship
AjayaMohanty7
 
SYMPATHOMIMETICS[ADRENERGIC AGONISTS] pptx
saip95568
 
How to Setup Automatic Reordering Rule in Odoo 18 Inventory
Celine George
 
Martyrs of Ireland - who kept the faith of St. Patrick.pptx
Martin M Flynn
 
Rapid Mathematics Assessment Score sheet for all Grade levels
DessaCletSantos
 
The Power of Compound Interest (Stanford Initiative for Financial Decision-Ma...
Stanford IFDM
 
Nanotechnology and Functional Foods Effective Delivery of Bioactive Ingredien...
rmswlwcxai8321
 
Ad

Computer Graphics: Visible surface detection methods

  • 2. Outline of Presentation 1. Introduction 2. Classification 3. Depth-Buffer Algorithm
  • 3. 1. Introduction • A set of 3-D surfaces are to be projected onto a 2-D screen. • To identify those parts of a scene that are visible from a chosen viewing position. • Correct visibility – when multiple opaque polygons cover the same screen space, only the closest one is visible.
  • 6. • There are many algorithms developed and still being developed for visible surface detection or Hidden surface removal. • Characteristics of approaches: – Require large memory size. – Require long processing time. – Applicable to which types of objects?
  • 7. • Considerations: – Complexity of the scene – Type of objects in the scene – Available equipment – Static or animated? • Visible-surface detection methods and hidden-surface elimination methods are similar but distinct.
  • 8. 2. Classification • Visible-surface detection algorithms are broadly classified into 2 types. 1. Object –space methods 2. Image-space methods
  • 9. Object-space methods • Deals with object definitions directly. • Compare objects and parts of objects to each other within the scene definition to determine which surfaces, as a whole, we should label as visible. • It is a continuous method. • Compare each object with all other objects to determine the visibility of the object parts.
  • 10. Pros and Cons of Object-space Methods • If there are n objects in the scene, complexity = O(n2) • Calculations are performed at the resolution in which the objects are defined (only limited by the computation hardware). • Process is unrelated to display resolution or the individual pixel in the image and the result of the process is applicable to different display resolutions.
  • 11. • Display is more accurate but computationally more expensive as compared to image space • methods are typically more complex, due to the possibility of intersection between surfaces. • Suitable for scene with small number of objects and objects with simple relationship with each other.
  • 12. Image Space methods • Deals with the projected images of the objects and not directly with objects. • Visibility is determined point by point at each pixel position on the projection plane. • It is a discrete method. • Accuracy of the calculation is bounded by the display resolution. • A change of display resolution requires re- calculation
  • 13. Two main strategies • 1. Sorting • 2. Coherence 1. Sorting – Sorting is used to facilitate depth comparisons by ordering the individual surfaces in a scene according to their distance from the view plane.
  • 14. Coherence • Making use of the results calculated for one part of the scene or image for other nearby parts. • Coherence is the result of local similarity • As objects have continuous spatial extent, object properties vary smoothly within a small local region in the scene. • Calculations can then be made incremental.
  • 15. 3. Depth-Buffer Method (Z-Buffer Method) • It is a commonly used image-space approach to detecting visible surfaces proposed by Catmull in 1974. • It compares the surface depths at each pixel position on the projection plane. • Object depth is usually measured from the view plane along the z axis of a viewing system. • Each surface of a scene is processed separately, one point at a time across the surface.
  • 16. • This method requires 2 buffers: 1) Depth buffer or z-buffer: • To store the depth values for each (X, Y) position, as surfaces are processed. • 0 ≤ depth ≤ 1 2) Refresh Buffer or Frame Buffer: • To store the intensity value or Color value at each position (X, Y).
  • 18. Algorithm 1. depthbuffer(x,y) = 0 framebuffer(x,y) = background color 2. Process each polygon one at a time 2.1. For each projected (x,y) pixel position of a polygon, calculate depth z. 2.2. If z > depthbuffer(x,y) compute surface color, set depthbuffer(x,y) = z, framebuffer(x,y) = surfacecolor(x,y)
  • 19. Example • The Final Image Z = 0.3 Z = 0.5
  • 20. • Step 1: Initialize the depth buffer 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  • 21. • Step 2: Draw the polygon with depth 0.3 (2.2) 0 0 0 0 0 0 0 0 0.3 0.3 0 0 0.3 0.3 0 0
  • 22. • Step 3: Draw the polygon with depth 0.5 0 0 0 0 0 0.5 0.5 0 0.3 0.5 0.5 0 0.3 0.3 0 0
  • 23. Calculating Depth • We know the depth values at the vertices. • we can calculate the depth at any other point on the surface of the polygon using the polygon surface equation: C DByAx z  
  • 25. • For any scan line adjacent horizontal x positions or vertical y positions differ by 1 unit. • The depth value of the next position (x+1,y) on the scan line can be obtained using C A z C DByxA z    )1(
  • 26. • For adjacent scan-lines we can compute the x value using the slope of the projected line and the previous x value. C BmA z m xx    / z 1
  • 27. Pros and Cons • Widely used • Simple to implement • Needs large amount of memory (uses 2 buffers) • Aliasing problem. • Handle only opaque surfaces • Problem when too many surfaces are there.
  • 28. Questions 2 marks • What is the task of visible detection methods? • What is correct visibility? • What are the types of visible detection algorithms? • Difference between object space methods and image space methods?
  • 29. • What are the two strategies used in visible surface detection algorithms? • What is coherence in image space methods? • Mention two advantages of object space method. • Mention two disadvantages of object space method. • What are the disadvantages of Image space method?
  • 30. • What are the buffers used in Depth buffer method? • What is the content of Z-buffer? • What is the content of refresh buffer? • What are the initial values of depth buffer and refresh buffer? • What is the range of depth used in depth buffer method?
  • 31. • What is the equation to calculate depth value z at (x,y) for a polygon surface? • Mention any two disadvantages of depth buffer method. 10 marks • Explain depth buffer method in detail.
  • 32. Quote If you have a ‘why’ to live for, you can cope with any ‘how’.