SlideShare a Scribd company logo
1 of 7
Visible Surface Detection
• When we view a picture containing non-transparent objects and
surfaces, then we cannot see those objects from view which are
behind from objects closer to eye. We must remove these hidden
surfaces to get a realistic screen image. The identification and
removal of these surfaces is called Hidden-surface problem.
• There are two approaches for removing hidden surface problems
− Object-Space method and Image-space method. The Object-
space method is implemented in physical coordinate system and
image-space method is implemented in screen coordinate system.
• When we want to display a 3D object on a 2D screen, we need to
identify those parts of a screen that are visible from a chosen viewing
position.
Prof. Jeo Joy A, Dept. of Computer Science UG, Kristu jayanti
College(Autonomous) Bengaluru
• This method is developed by Cutmull. It is an image-space approach. The basic idea is to test the Z-
depth of each surface to determine the closest visible surface.
• In this method each surface is processed separately one pixel position at a time across the surface.
The depth values for a pixel are compared and the closest smallest z surface determines the color to
be displayed in the frame buffer.
• It is applied very efficiently on surfaces of polygon. Surfaces can be processed in any order. To
override the closer polygons from the far ones, two buffers named frame buffer and depth buffer,
are used.
• Depth buffer is used to store depth values for x,y position, as surfaces are processed 0≤depth≤1.
• The frame buffer is used to store the intensity value of color value at each position x,y.
• The z-coordinates are usually normalized to the range [0, 1]. The 0 value for z-coordinate indicates
back clipping pane and 1 value for z-coordinates indicates front clipping pane.
Z−Buffer Method
Prof. Jeo Joy A, Dept. of Computer Science UG, Kristu jayanti
College(Autonomous) Bengaluru
Z−Buffer Method
Advantages
•It is easy to implement.
•It reduces the speed problem if implemented in
hardware.
•It processes one object at a time.
Disadvantages
•It requires large memory.
•It is time consuming process.
Prof. Jeo Joy A, Dept. of Computer Science UG, Kristu jayanti
College(Autonomous) Bengaluru
First of all, initialize the depth of each pixel.
i.e, d(i, j) = infinite (max length)
Initialize the color value for each pixel
as c(i, j) = background color
for each polygon, do the following steps :
for (each pixel in polygon's projection)
{
find depth i.e, z of polygon
at (x, y) corresponding to pixel (i, j)
if (z < d(i, j))
{
d(i, j) = z;
c(i, j) = color;
}
}
Scan-Line Method
Prof. Jeo Joy A, Dept. of Computer Science UG, Kristu jayanti
College(Autonomous) Bengaluru
This algorithm is based on the Image-space method and concept of coherence. As its name suggests itself
Scan-line algorithm, so it processes one line at a time rather than processing one pixel(a point on raster
display) at a time. The algorithm works as follows:
Here each point at which the scan- line intersects the polygon surfaces are examined(processed) from left to
right and in this process.
The depth calculation (if there are overlapping surfaces found) is performed to identify the Hidden
region(Visible surface) of the polygons which is nearer to the viewing plane.
As soon as the visible surfaces(Hidden surfaces) are identified then the corresponding color-intensity values
are updated into the refresh buffer(Frame buffer) if and only if the Flag of the corresponding surface is on.
This algorithm works efficiently with one or more than one polygon surface and this algorithm is just an
extension of the Scan line algorithm of Polygon filling.
Scan-Line Method Example
Prof. Jeo Joy A, Dept. of Computer Science UG, Kristu jayanti
College(Autonomous) Bengaluru
Scan-Line Method
Prof. Jeo Joy A, Dept. of Computer Science UG, Kristu jayanti
College(Autonomous) Bengaluru
Here, two overlapped polygons are given which are intersected
by three Scan-lines S1, S2, S3 respectively. So, What happens if
the Scan-line algorithm is applied in order to identify the
Hidden surface(visible surface)?
1. First, examine the scanline(S1), whose,
Active edge table (Aet) contains: [AD,BC,RS,PQ], and
The flag is set to “on” for surface(S1) and surface(S2) and the flag set
“off” for the region between BX and RX as it’s an outer region of the
polygon’s surface and not to be projected at view-port(display
devices), now
Drop the color-intensities of the corresponding surfaces into the
frame buffer(refresh buffer).
Scan-Line Method
Prof. Jeo Joy A, Dept. of Computer Science UG, Kristu jayanti
College(Autonomous) Bengaluru
2. Then, process the scanline(S2), whose,
Active edge table (Aet) contains: [AD,BC,RS,PQ], and
The flag is set to “on” for surface(ABCD) and surface(PQRS),
Both of the polygons surfaces are overlapping each other so for
this overlapped region which of the surface intensity should be
taken into account? So to answer this calculates the
depth(Zmin) of both surface(S1) and surface(S2) of this
overlapped portion, next,
If depth(S1)>depth(S2), then the Flag of surface S1=” on” and
intensity of surface S1 will be considered else S2, now
Drop the color-intensities of the corresponding surfaces whose
flag is set to on into the frame buffer(refresh buffer).

More Related Content

Similar to Visible Surfacte Detection Methods - Z-Buffer and Scanline methods.pptx

Morphological Operations (2).pptx
Morphological Operations (2).pptxMorphological Operations (2).pptx
Morphological Operations (2).pptxRiyaLuThra7
 
An Efficient Algorithm for the Segmentation of Astronomical Images
An Efficient Algorithm for the Segmentation of Astronomical  ImagesAn Efficient Algorithm for the Segmentation of Astronomical  Images
An Efficient Algorithm for the Segmentation of Astronomical ImagesIOSR Journals
 
Computer Graphics: Visible surface detection methods
Computer Graphics: Visible surface detection methodsComputer Graphics: Visible surface detection methods
Computer Graphics: Visible surface detection methodsJoseph Charles
 
IISc Internship Report
IISc Internship ReportIISc Internship Report
IISc Internship ReportHarshilJain26
 
IRJET- Image Feature Extraction using Hough Transformation Principle
IRJET- Image Feature Extraction using Hough Transformation PrincipleIRJET- Image Feature Extraction using Hough Transformation Principle
IRJET- Image Feature Extraction using Hough Transformation PrincipleIRJET Journal
 
Automatic Building detection for satellite Images using IGV and DSM
Automatic Building detection for satellite Images using IGV and DSMAutomatic Building detection for satellite Images using IGV and DSM
Automatic Building detection for satellite Images using IGV and DSMAmit Raikar
 
Hidden surface removal
Hidden surface removalHidden surface removal
Hidden surface removalAnkit Garg
 
An Efficient Algorithm for Edge Detection of Corroded Surface
An Efficient Algorithm for Edge Detection of Corroded SurfaceAn Efficient Algorithm for Edge Detection of Corroded Surface
An Efficient Algorithm for Edge Detection of Corroded SurfaceIJERA Editor
 
An Efficient Algorithm for Edge Detection of Corroded Surface
An Efficient Algorithm for Edge Detection of Corroded SurfaceAn Efficient Algorithm for Edge Detection of Corroded Surface
An Efficient Algorithm for Edge Detection of Corroded SurfaceIJERA Editor
 
Computer Vision: Visual Extent of an Object
Computer Vision: Visual Extent of an ObjectComputer Vision: Visual Extent of an Object
Computer Vision: Visual Extent of an ObjectIOSR Journals
 
Tracking and counting human in visual surveillance system
Tracking and counting human in visual surveillance systemTracking and counting human in visual surveillance system
Tracking and counting human in visual surveillance systemiaemedu
 
Tracking and counting human in visual surveillance system
Tracking and counting human in visual surveillance systemTracking and counting human in visual surveillance system
Tracking and counting human in visual surveillance systemiaemedu
 
Tracking and counting human in visual surveillance system
Tracking and counting human in visual surveillance systemTracking and counting human in visual surveillance system
Tracking and counting human in visual surveillance systemIAEME Publication
 
Tracking and counting human in visual surveillance system
Tracking and counting human in visual surveillance systemTracking and counting human in visual surveillance system
Tracking and counting human in visual surveillance systemiaemedu
 
DEEP LEARNING TECHNIQUES POWER POINT PRESENTATION
DEEP LEARNING TECHNIQUES POWER POINT PRESENTATIONDEEP LEARNING TECHNIQUES POWER POINT PRESENTATION
DEEP LEARNING TECHNIQUES POWER POINT PRESENTATIONSelvaLakshmi63
 
Real time implementation of object tracking through
Real time implementation of object tracking throughReal time implementation of object tracking through
Real time implementation of object tracking througheSAT Publishing House
 

Similar to Visible Surfacte Detection Methods - Z-Buffer and Scanline methods.pptx (20)

Morphological Operations (2).pptx
Morphological Operations (2).pptxMorphological Operations (2).pptx
Morphological Operations (2).pptx
 
An Efficient Algorithm for the Segmentation of Astronomical Images
An Efficient Algorithm for the Segmentation of Astronomical  ImagesAn Efficient Algorithm for the Segmentation of Astronomical  Images
An Efficient Algorithm for the Segmentation of Astronomical Images
 
Computer Graphics: Visible surface detection methods
Computer Graphics: Visible surface detection methodsComputer Graphics: Visible surface detection methods
Computer Graphics: Visible surface detection methods
 
IISc Internship Report
IISc Internship ReportIISc Internship Report
IISc Internship Report
 
J017426467
J017426467J017426467
J017426467
 
IRJET- Image Feature Extraction using Hough Transformation Principle
IRJET- Image Feature Extraction using Hough Transformation PrincipleIRJET- Image Feature Extraction using Hough Transformation Principle
IRJET- Image Feature Extraction using Hough Transformation Principle
 
Automatic Building detection for satellite Images using IGV and DSM
Automatic Building detection for satellite Images using IGV and DSMAutomatic Building detection for satellite Images using IGV and DSM
Automatic Building detection for satellite Images using IGV and DSM
 
Ex4301908912
Ex4301908912Ex4301908912
Ex4301908912
 
Hidden surface removal
Hidden surface removalHidden surface removal
Hidden surface removal
 
Ed34785790
Ed34785790Ed34785790
Ed34785790
 
Poster cs543
Poster cs543Poster cs543
Poster cs543
 
An Efficient Algorithm for Edge Detection of Corroded Surface
An Efficient Algorithm for Edge Detection of Corroded SurfaceAn Efficient Algorithm for Edge Detection of Corroded Surface
An Efficient Algorithm for Edge Detection of Corroded Surface
 
An Efficient Algorithm for Edge Detection of Corroded Surface
An Efficient Algorithm for Edge Detection of Corroded SurfaceAn Efficient Algorithm for Edge Detection of Corroded Surface
An Efficient Algorithm for Edge Detection of Corroded Surface
 
Computer Vision: Visual Extent of an Object
Computer Vision: Visual Extent of an ObjectComputer Vision: Visual Extent of an Object
Computer Vision: Visual Extent of an Object
 
Tracking and counting human in visual surveillance system
Tracking and counting human in visual surveillance systemTracking and counting human in visual surveillance system
Tracking and counting human in visual surveillance system
 
Tracking and counting human in visual surveillance system
Tracking and counting human in visual surveillance systemTracking and counting human in visual surveillance system
Tracking and counting human in visual surveillance system
 
Tracking and counting human in visual surveillance system
Tracking and counting human in visual surveillance systemTracking and counting human in visual surveillance system
Tracking and counting human in visual surveillance system
 
Tracking and counting human in visual surveillance system
Tracking and counting human in visual surveillance systemTracking and counting human in visual surveillance system
Tracking and counting human in visual surveillance system
 
DEEP LEARNING TECHNIQUES POWER POINT PRESENTATION
DEEP LEARNING TECHNIQUES POWER POINT PRESENTATIONDEEP LEARNING TECHNIQUES POWER POINT PRESENTATION
DEEP LEARNING TECHNIQUES POWER POINT PRESENTATION
 
Real time implementation of object tracking through
Real time implementation of object tracking throughReal time implementation of object tracking through
Real time implementation of object tracking through
 

More from JeoJoyA

Tree (1).pptx
Tree (1).pptxTree (1).pptx
Tree (1).pptxJeoJoyA
 
Sutherland Hodgman Polygon Clipping Technique.pptx
Sutherland Hodgman Polygon Clipping Technique.pptxSutherland Hodgman Polygon Clipping Technique.pptx
Sutherland Hodgman Polygon Clipping Technique.pptxJeoJoyA
 
Segment Structure Display List in Computer Graphics.pptx
Segment Structure Display List in Computer Graphics.pptxSegment Structure Display List in Computer Graphics.pptx
Segment Structure Display List in Computer Graphics.pptxJeoJoyA
 
Recursion Merge Sort Quick Sort.pptx
Recursion Merge Sort Quick Sort.pptxRecursion Merge Sort Quick Sort.pptx
Recursion Merge Sort Quick Sort.pptxJeoJoyA
 
Linear Search Swapping Bubble Sort Binary Search.pptx
Linear Search Swapping Bubble Sort Binary Search.pptxLinear Search Swapping Bubble Sort Binary Search.pptx
Linear Search Swapping Bubble Sort Binary Search.pptxJeoJoyA
 
Tree.pptx
Tree.pptxTree.pptx
Tree.pptxJeoJoyA
 
Linear and binary search
Linear and binary searchLinear and binary search
Linear and binary searchJeoJoyA
 
Linked list
Linked listLinked list
Linked listJeoJoyA
 

More from JeoJoyA (10)

Tree (1).pptx
Tree (1).pptxTree (1).pptx
Tree (1).pptx
 
OpenGL
OpenGLOpenGL
OpenGL
 
Sutherland Hodgman Polygon Clipping Technique.pptx
Sutherland Hodgman Polygon Clipping Technique.pptxSutherland Hodgman Polygon Clipping Technique.pptx
Sutherland Hodgman Polygon Clipping Technique.pptx
 
Segment Structure Display List in Computer Graphics.pptx
Segment Structure Display List in Computer Graphics.pptxSegment Structure Display List in Computer Graphics.pptx
Segment Structure Display List in Computer Graphics.pptx
 
Recursion Merge Sort Quick Sort.pptx
Recursion Merge Sort Quick Sort.pptxRecursion Merge Sort Quick Sort.pptx
Recursion Merge Sort Quick Sort.pptx
 
Linear Search Swapping Bubble Sort Binary Search.pptx
Linear Search Swapping Bubble Sort Binary Search.pptxLinear Search Swapping Bubble Sort Binary Search.pptx
Linear Search Swapping Bubble Sort Binary Search.pptx
 
Tree.pptx
Tree.pptxTree.pptx
Tree.pptx
 
Linear and binary search
Linear and binary searchLinear and binary search
Linear and binary search
 
Linked list
Linked listLinked list
Linked list
 
Tree
TreeTree
Tree
 

Recently uploaded

Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxcallscotland1987
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxAmita Gupta
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxAmanpreet Kaur
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
Magic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxMagic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxdhanalakshmis0310
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 

Recently uploaded (20)

Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptx
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Magic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxMagic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 

Visible Surfacte Detection Methods - Z-Buffer and Scanline methods.pptx

  • 1. Visible Surface Detection • When we view a picture containing non-transparent objects and surfaces, then we cannot see those objects from view which are behind from objects closer to eye. We must remove these hidden surfaces to get a realistic screen image. The identification and removal of these surfaces is called Hidden-surface problem. • There are two approaches for removing hidden surface problems − Object-Space method and Image-space method. The Object- space method is implemented in physical coordinate system and image-space method is implemented in screen coordinate system. • When we want to display a 3D object on a 2D screen, we need to identify those parts of a screen that are visible from a chosen viewing position. Prof. Jeo Joy A, Dept. of Computer Science UG, Kristu jayanti College(Autonomous) Bengaluru
  • 2. • This method is developed by Cutmull. It is an image-space approach. The basic idea is to test the Z- depth of each surface to determine the closest visible surface. • In this method each surface is processed separately one pixel position at a time across the surface. The depth values for a pixel are compared and the closest smallest z surface determines the color to be displayed in the frame buffer. • It is applied very efficiently on surfaces of polygon. Surfaces can be processed in any order. To override the closer polygons from the far ones, two buffers named frame buffer and depth buffer, are used. • Depth buffer is used to store depth values for x,y position, as surfaces are processed 0≤depth≤1. • The frame buffer is used to store the intensity value of color value at each position x,y. • The z-coordinates are usually normalized to the range [0, 1]. The 0 value for z-coordinate indicates back clipping pane and 1 value for z-coordinates indicates front clipping pane. Z−Buffer Method Prof. Jeo Joy A, Dept. of Computer Science UG, Kristu jayanti College(Autonomous) Bengaluru
  • 3. Z−Buffer Method Advantages •It is easy to implement. •It reduces the speed problem if implemented in hardware. •It processes one object at a time. Disadvantages •It requires large memory. •It is time consuming process. Prof. Jeo Joy A, Dept. of Computer Science UG, Kristu jayanti College(Autonomous) Bengaluru First of all, initialize the depth of each pixel. i.e, d(i, j) = infinite (max length) Initialize the color value for each pixel as c(i, j) = background color for each polygon, do the following steps : for (each pixel in polygon's projection) { find depth i.e, z of polygon at (x, y) corresponding to pixel (i, j) if (z < d(i, j)) { d(i, j) = z; c(i, j) = color; } }
  • 4. Scan-Line Method Prof. Jeo Joy A, Dept. of Computer Science UG, Kristu jayanti College(Autonomous) Bengaluru This algorithm is based on the Image-space method and concept of coherence. As its name suggests itself Scan-line algorithm, so it processes one line at a time rather than processing one pixel(a point on raster display) at a time. The algorithm works as follows: Here each point at which the scan- line intersects the polygon surfaces are examined(processed) from left to right and in this process. The depth calculation (if there are overlapping surfaces found) is performed to identify the Hidden region(Visible surface) of the polygons which is nearer to the viewing plane. As soon as the visible surfaces(Hidden surfaces) are identified then the corresponding color-intensity values are updated into the refresh buffer(Frame buffer) if and only if the Flag of the corresponding surface is on. This algorithm works efficiently with one or more than one polygon surface and this algorithm is just an extension of the Scan line algorithm of Polygon filling.
  • 5. Scan-Line Method Example Prof. Jeo Joy A, Dept. of Computer Science UG, Kristu jayanti College(Autonomous) Bengaluru
  • 6. Scan-Line Method Prof. Jeo Joy A, Dept. of Computer Science UG, Kristu jayanti College(Autonomous) Bengaluru Here, two overlapped polygons are given which are intersected by three Scan-lines S1, S2, S3 respectively. So, What happens if the Scan-line algorithm is applied in order to identify the Hidden surface(visible surface)? 1. First, examine the scanline(S1), whose, Active edge table (Aet) contains: [AD,BC,RS,PQ], and The flag is set to “on” for surface(S1) and surface(S2) and the flag set “off” for the region between BX and RX as it’s an outer region of the polygon’s surface and not to be projected at view-port(display devices), now Drop the color-intensities of the corresponding surfaces into the frame buffer(refresh buffer).
  • 7. Scan-Line Method Prof. Jeo Joy A, Dept. of Computer Science UG, Kristu jayanti College(Autonomous) Bengaluru 2. Then, process the scanline(S2), whose, Active edge table (Aet) contains: [AD,BC,RS,PQ], and The flag is set to “on” for surface(ABCD) and surface(PQRS), Both of the polygons surfaces are overlapping each other so for this overlapped region which of the surface intensity should be taken into account? So to answer this calculates the depth(Zmin) of both surface(S1) and surface(S2) of this overlapped portion, next, If depth(S1)>depth(S2), then the Flag of surface S1=” on” and intensity of surface S1 will be considered else S2, now Drop the color-intensities of the corresponding surfaces whose flag is set to on into the frame buffer(refresh buffer).