SlideShare ist ein Scribd-Unternehmen logo
1 von 27
HIDDEN SOLID REMOVAL
ALGORITHM
NSK.
TVE23MEMA16
MEMA, College of
Engineering Trivandrum
Hidden Solid Removal (HSR) Algorithms.
• Hidden solid removal (HSR) is a technique used in computer graphics to eliminate
entire solid objects from a scene that are hidden from the viewer.
• In the realm of computer graphics, hidden solid removal (HSR) algorithms play a
pivotal role in generating realistic and accurate images.
• These algorithms are tasked with identifying and eliminating solids in a 3D scene
that are obscured from the viewer's perspective, ensuring that only the visible
objects are rendered.
Need for HSR.
• Picture yourself in a room surrounded by furniture, decorations, and walls.
• You can only see the surfaces directly in your line of sight, while those hidden
behind other objects remain unseen.
• HSR algorithms imitate this natural observation process in virtual environments.
• They ensure that only the surfaces essential for creating the displayed image are
processed and shown, optimizing visual rendering.
Types of HSR Algorithms.
• HSR algorithms can be broadly classified into two categories: object-space
algorithms and image-space algorithms.
• The choice of algorithm depends on the specific requirements of the application,
considering factors such as scene complexity, desired rendering quality, and
performance constraints.
HSR
Image Space
Algorithms
Object Space
Algorithms
Image Space Algorithms.
• Image-space algorithms perform visibility calculations on a pixel-by-pixel basis,
analyzing the scene at each pixel in the image to determine which surfaces are
visible from that particular viewpoint.
• These algorithms are typically faster and more efficient, making them well-suited
for real-time rendering applications.
• However, they can be less accurate than object-space algorithms.
• These methods are originally designed for hidden surface removal but have been
expanded to encompass 3D scenes, facilitating the removal of hidden solids.
Types of Image Space Algorithms.
• The various types of Image Space Algorithms are:
Image Space
Algorithm
Z Buffer
Algorithm
Painters
Algorithm
Scan line
Algorithm
Z-buffer Algorithm.
• The Z-buffer algorithm is a widely used technique in computer graphics for
hidden surface removal (HSR).
• It is an image-space algorithm, meaning it operates on a pixel-by-pixel basis to
determine which surfaces are visible from the viewer's perspective.
• The algorithm maintains a Z-buffer, an array of values that stores the depth of each
pixel in the image.
• As surfaces are rendered, their depth is compared to the corresponding pixel in the
Z-buffer. If the surface is closer, it is rendered over the pixel; otherwise, the pixel
remains unchanged.
Working Principle of Z Buffer Algorithm.
• Initialization: The Z-buffer is initialized with the maximum depth value,
representing the farthest point from the viewer.
• Surface Rendering: For each surface in the scene, its depth is calculated at each
pixel that the surface intersects.
• Z-buffer Comparison: The calculated depth of the surface is compared to the
corresponding depth value in the Z-buffer.
• Depth Update: If the surface's depth is closer than the value in the Z-buffer, the Z-
buffer value is updated with the surface's depth, and the corresponding pixel's
color is set to the surface's color.
• Surface Completion: Once all surfaces have been rendered, the image is complete,
and only the visible surfaces are displayed.
Painters Algorithm.
• The painter's algorithm is a fundamental technique in computer graphics for
hidden surface removal (HSR).
• .The algorithm draws surfaces in the order of their increasing distance from the
viewer, ensuring that only the front-most surfaces are visible.
• This analogy resembles a painter's approach, where they start by painting distant
objects and gradually move towards closer ones, effectively covering the areas
that represent hidden surfaces.
Working Principle of Painters Algorithm.
• Surface Sorting: The algorithm starts by sorting all surfaces in the scene based on
their depth or distance from the viewer.
• Surface Rendering: Once the surfaces are sorted, they are rendered sequentially
from back to front. This ensures that only the front-most surfaces are visible, as
they are rendered over any surfaces behind them.
• Overlapping Surfaces: For overlapping surfaces, the painter's algorithm handles
occlusions by only rendering the visible portions of the overlapping surfaces. This
is achieved by comparing the depth of each surface at each pixel to determine
which surface is closer and should be rendered.
Scan Line Algorithm.
• The scan line algorithm is an image-space algorithm used for hidden surface
removal (HSR) in computer graphics.
• It operates by processing the image one scan line at a time, determining the visible
surfaces for each pixel along that scan line.
• The algorithm efficiently determines the visible surfaces by maintaining an active
edge table (AET) that stores the edges of the surfaces that intersect the current
scan line.
Working Principle of Scan Line Algorithm.
• Scan Line Initialization: For each scan line, the AET is initialized with the edges
of all surfaces that intersect the scan line.
• Edge Sorting: The edges in the AET are sorted based on their x-coordinates at the
current scan line. This ensures that edges are processed in the correct order from
left to right.
• Edge Processing: For each edge in the AET, determine the visible portion of the
surface represented by that edge along the current scan line. This involves
calculating the intersection points of the edge with other edges and the scan line
endpoints.
• AET Updates: As edges are processed, they may be added to or removed from the
AET based on their intersections and the current scan line position.
• Pixel Rendering: For each pixel along the current scan line, determine the visible
surface based on the AET and fill the pixel with the corresponding surface color.
• Scan Line Iteration: Repeat steps 1-5 for each scan line until the entire image has
been processed.
Object Space Algorithms.
• Object-space algorithms operate on an object-by-object basis, analyzing each
object in the scene to determine which of its surfaces are visible from the
viewpoint.
• These algorithms are typically more accurate and produce higher-quality results,
but they can be slower and more computationally expensive due to the
preprocessing of the scene.
Types of Object Space Algorithms.
• The various types of Object Space Algorithms are:
Image Space
Algorithm
Depth Sorting
Algorithm
BSP Tree
Algorithm
Octree
Algorithm
Depth Sorting Algorithm.
• The depth-sorting algorithm is a simple and efficient hidden surface removal
(HSR) technique that operates on an object-space basis.
• It sorts all surfaces in the scene from back to front based on their distance from the
viewer and renders them sequentially, ensuring that only the front-most surfaces
are visible.
• It is similar to Painters Algorithm.
Working Principle of Depth Sorting Algorithm.
• Surface Sorting: The algorithm begins by sorting all surfaces in the scene based on
their depth or distance from the viewer. This sorting can be done using various
techniques, such as bubble sort, quick sort, or specialized depth-sorting
algorithms.
• Surface Rendering: Once the surfaces are sorted, they are rendered sequentially
from back to front. This ensures that only the front-most surfaces are visible, as
they are rendered over any surfaces behind them.
• Overlapping Surfaces: For overlapping surfaces, the depth-sorting algorithm
handles occlusions by only rendering the visible portions of the overlapping
surfaces. This is achieved by comparing the depth of each surface at each pixel to
determine which surface is closer and should be rendered.
BSP Tree Algorithm.
• The BSP tree algorithm is an efficient hidden solid removal (HSR) technique that
operates on an object-space basis.
• It utilizes a Binary Space Partitioning (BSP) tree to divide the scene into a
hierarchy of bounding volumes (BVHs).
• This hierarchical structure allows for rapid determination of visible surfaces,
making it well-suited for handling complex scenes with numerous objects.
Working Principle of Depth Sorting Algorithm.
• Scene Partitioning: The algorithm recursively divides the scene into a BSP tree by
selecting a splitting plane and partitioning the objects based on their relationship
to the plane.
• BVH Creation: Each node in the BSP tree represents a BVH, which encapsulates a
portion of the scene. The BVH stores information about the enclosed objects, such
as their bounding box or center of mass.
• Surface Visibility Determination: To determine the visibility of a surface, the
algorithm traverses the BSP tree, starting at the root node. For each node, it checks
whether the surface intersects the corresponding BVH. If it does, the algorithm
recursively traverses the child nodes until reaching a leaf node.
• Leaf Node Processing: At a leaf node, the algorithm checks whether the surface is
inside or outside the BVH. If inside, the surface is marked as visible. If outside,
the surface is marked as hidden.
Octree Algorithm.
• The octree algorithm is an efficient object-space hidden surface removal (HSR)
technique that utilizes a hierarchical data structure called an octree to partition the
scene into a set of octants.
• Octants are cubes that are recursively subdivided into eight smaller cubes.
• This hierarchical structure allows for rapid determination of visible surfaces,
making it well-suited for handling complex scenes with numerous objects.
Working Principle of Depth Sorting Algorithm.
• Scene Partitioning: The algorithm recursively divides the scene into an octree by
selecting a splitting plane and partitioning the objects based on their relationship
to the plane.
• Octant Creation: Each node in the octree represents an octant, which encapsulates
a portion of the scene. The octant stores information about the enclosed objects,
such as their bounding box or center of mass.
• Surface Visibility Determination: To determine the visibility of a surface, the
algorithm traverses the octree, starting at the root node. For each node, it checks
whether the surface intersects the corresponding octant. If it does, the algorithm
recursively traverses the child nodes until reaching a leaf node.
• Leaf Node Processing: At a leaf node, the algorithm checks whether the surface is
inside or outside the octant. If inside, the surface is marked as visible. If outside,
the surface is marked as hidden.
THANK YOU

Weitere ähnliche Inhalte

Ähnlich wie HIDDEN SOLID REMOVAL ALGORITHM IN COMPUTER GRAPHICS FOR IMAGE PROCESSING THEORETIC SEMINAR.pptx

Hidden surface removal algorithm
Hidden surface removal algorithmHidden surface removal algorithm
Hidden surface removal algorithmKKARUNKARTHIK
 
Real time Canny edge detection
Real time Canny edge detectionReal time Canny edge detection
Real time Canny edge detectionShashank Kapoor
 
Multiple UGV SLAM Map Sharing
Multiple UGV SLAM Map SharingMultiple UGV SLAM Map Sharing
Multiple UGV SLAM Map SharingAkash Borate
 
Lecture 12 localization and navigation
Lecture 12 localization and navigationLecture 12 localization and navigation
Lecture 12 localization and navigationVajira Thambawita
 
Rendering Algorithms.pptx
Rendering Algorithms.pptxRendering Algorithms.pptx
Rendering Algorithms.pptxSherinRappai
 
hidden surface elimination using z buffer algorithm
hidden surface elimination using z buffer algorithmhidden surface elimination using z buffer algorithm
hidden surface elimination using z buffer algorithmrajivagarwal23dei
 
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
 
Image segmentation
Image segmentationImage segmentation
Image segmentationKuppusamy P
 
Hidden line removal algorithm
Hidden line removal algorithmHidden line removal algorithm
Hidden line removal algorithmKKARUNKARTHIK
 
visual realism Unit iii
 visual realism Unit iii visual realism Unit iii
visual realism Unit iiiArun Prakash
 
Unit 3 visual realism
Unit 3 visual realismUnit 3 visual realism
Unit 3 visual realismJavith Saleem
 
Visible surface detection in computer graphic
Visible surface detection in computer graphicVisible surface detection in computer graphic
Visible surface detection in computer graphicanku2266
 
Edge detection by modified otsu method
Edge detection by modified otsu methodEdge detection by modified otsu method
Edge detection by modified otsu methodcsandit
 
EDGE DETECTION BY MODIFIED OTSU METHOD
EDGE DETECTION BY MODIFIED OTSU METHOD EDGE DETECTION BY MODIFIED OTSU METHOD
EDGE DETECTION BY MODIFIED OTSU METHOD cscpconf
 
Computer graphics iv unit
Computer graphics iv unitComputer graphics iv unit
Computer graphics iv unitaravindangc
 
introduction to Reverse Engineering.pptx
introduction to Reverse Engineering.pptxintroduction to Reverse Engineering.pptx
introduction to Reverse Engineering.pptxGRajesh21
 
Visible surface determination
Visible  surface determinationVisible  surface determination
Visible surface determinationPatel Punit
 
PORTABLE CAMERA-BASED ASSISTIVE TEXT AND PRODUCT LABEL READING FROM HAND- H...
PORTABLE CAMERA-BASED  ASSISTIVE TEXT AND PRODUCT  LABEL READING FROM HAND- H...PORTABLE CAMERA-BASED  ASSISTIVE TEXT AND PRODUCT  LABEL READING FROM HAND- H...
PORTABLE CAMERA-BASED ASSISTIVE TEXT AND PRODUCT LABEL READING FROM HAND- H...Sathmica K
 
Hidden surface removal
Hidden surface removalHidden surface removal
Hidden surface removalAnkit Garg
 

Ähnlich wie HIDDEN SOLID REMOVAL ALGORITHM IN COMPUTER GRAPHICS FOR IMAGE PROCESSING THEORETIC SEMINAR.pptx (20)

Hidden surface removal algorithm
Hidden surface removal algorithmHidden surface removal algorithm
Hidden surface removal algorithm
 
Real time Canny edge detection
Real time Canny edge detectionReal time Canny edge detection
Real time Canny edge detection
 
Multiple UGV SLAM Map Sharing
Multiple UGV SLAM Map SharingMultiple UGV SLAM Map Sharing
Multiple UGV SLAM Map Sharing
 
Lecture 12 localization and navigation
Lecture 12 localization and navigationLecture 12 localization and navigation
Lecture 12 localization and navigation
 
Rendering Algorithms.pptx
Rendering Algorithms.pptxRendering Algorithms.pptx
Rendering Algorithms.pptx
 
Graphics a buffer
Graphics a bufferGraphics a buffer
Graphics a buffer
 
hidden surface elimination using z buffer algorithm
hidden surface elimination using z buffer algorithmhidden surface elimination using z buffer algorithm
hidden surface elimination using z buffer algorithm
 
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)
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
Hidden line removal algorithm
Hidden line removal algorithmHidden line removal algorithm
Hidden line removal algorithm
 
visual realism Unit iii
 visual realism Unit iii visual realism Unit iii
visual realism Unit iii
 
Unit 3 visual realism
Unit 3 visual realismUnit 3 visual realism
Unit 3 visual realism
 
Visible surface detection in computer graphic
Visible surface detection in computer graphicVisible surface detection in computer graphic
Visible surface detection in computer graphic
 
Edge detection by modified otsu method
Edge detection by modified otsu methodEdge detection by modified otsu method
Edge detection by modified otsu method
 
EDGE DETECTION BY MODIFIED OTSU METHOD
EDGE DETECTION BY MODIFIED OTSU METHOD EDGE DETECTION BY MODIFIED OTSU METHOD
EDGE DETECTION BY MODIFIED OTSU METHOD
 
Computer graphics iv unit
Computer graphics iv unitComputer graphics iv unit
Computer graphics iv unit
 
introduction to Reverse Engineering.pptx
introduction to Reverse Engineering.pptxintroduction to Reverse Engineering.pptx
introduction to Reverse Engineering.pptx
 
Visible surface determination
Visible  surface determinationVisible  surface determination
Visible surface determination
 
PORTABLE CAMERA-BASED ASSISTIVE TEXT AND PRODUCT LABEL READING FROM HAND- H...
PORTABLE CAMERA-BASED  ASSISTIVE TEXT AND PRODUCT  LABEL READING FROM HAND- H...PORTABLE CAMERA-BASED  ASSISTIVE TEXT AND PRODUCT  LABEL READING FROM HAND- H...
PORTABLE CAMERA-BASED ASSISTIVE TEXT AND PRODUCT LABEL READING FROM HAND- H...
 
Hidden surface removal
Hidden surface removalHidden surface removal
Hidden surface removal
 

Kürzlich hochgeladen

Linux Systems Programming: Semaphores, Shared Memory, and Message Queues
Linux Systems Programming: Semaphores, Shared Memory, and Message QueuesLinux Systems Programming: Semaphores, Shared Memory, and Message Queues
Linux Systems Programming: Semaphores, Shared Memory, and Message QueuesRashidFaridChishti
 
Final DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manualFinal DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manualBalamuruganV28
 
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas SachpazisSeismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas SachpazisDr.Costas Sachpazis
 
Module-III Varried Flow.pptx GVF Definition, Water Surface Profile Dynamic Eq...
Module-III Varried Flow.pptx GVF Definition, Water Surface Profile Dynamic Eq...Module-III Varried Flow.pptx GVF Definition, Water Surface Profile Dynamic Eq...
Module-III Varried Flow.pptx GVF Definition, Water Surface Profile Dynamic Eq...Nitin Sonavane
 
handbook on reinforce concrete and detailing
handbook on reinforce concrete and detailinghandbook on reinforce concrete and detailing
handbook on reinforce concrete and detailingAshishSingh1301
 
Filters for Electromagnetic Compatibility Applications
Filters for Electromagnetic Compatibility ApplicationsFilters for Electromagnetic Compatibility Applications
Filters for Electromagnetic Compatibility ApplicationsMathias Magdowski
 
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...Amil baba
 
Passive Air Cooling System and Solar Water Heater.ppt
Passive Air Cooling System and Solar Water Heater.pptPassive Air Cooling System and Solar Water Heater.ppt
Passive Air Cooling System and Solar Water Heater.pptamrabdallah9
 
Online crime reporting system project.pdf
Online crime reporting system project.pdfOnline crime reporting system project.pdf
Online crime reporting system project.pdfKamal Acharya
 
Geometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdfGeometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdfJNTUA
 
5G and 6G refer to generations of mobile network technology, each representin...
5G and 6G refer to generations of mobile network technology, each representin...5G and 6G refer to generations of mobile network technology, each representin...
5G and 6G refer to generations of mobile network technology, each representin...archanaece3
 
UNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxUNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxkalpana413121
 
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdfInvolute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdfJNTUA
 
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdflitvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdfAlexander Litvinenko
 
Operating System chapter 9 (Virtual Memory)
Operating System chapter 9 (Virtual Memory)Operating System chapter 9 (Virtual Memory)
Operating System chapter 9 (Virtual Memory)NareenAsad
 
Worksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxWorksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxMustafa Ahmed
 
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024EMMANUELLEFRANCEHELI
 
Low Altitude Air Defense (LAAD) Gunner’s Handbook
Low Altitude Air Defense (LAAD) Gunner’s HandbookLow Altitude Air Defense (LAAD) Gunner’s Handbook
Low Altitude Air Defense (LAAD) Gunner’s HandbookPeterJack13
 
Introduction to Artificial Intelligence and History of AI
Introduction to Artificial Intelligence and History of AIIntroduction to Artificial Intelligence and History of AI
Introduction to Artificial Intelligence and History of AISheetal Jain
 
Basics of Relay for Engineering Students
Basics of Relay for Engineering StudentsBasics of Relay for Engineering Students
Basics of Relay for Engineering Studentskannan348865
 

Kürzlich hochgeladen (20)

Linux Systems Programming: Semaphores, Shared Memory, and Message Queues
Linux Systems Programming: Semaphores, Shared Memory, and Message QueuesLinux Systems Programming: Semaphores, Shared Memory, and Message Queues
Linux Systems Programming: Semaphores, Shared Memory, and Message Queues
 
Final DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manualFinal DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manual
 
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas SachpazisSeismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
 
Module-III Varried Flow.pptx GVF Definition, Water Surface Profile Dynamic Eq...
Module-III Varried Flow.pptx GVF Definition, Water Surface Profile Dynamic Eq...Module-III Varried Flow.pptx GVF Definition, Water Surface Profile Dynamic Eq...
Module-III Varried Flow.pptx GVF Definition, Water Surface Profile Dynamic Eq...
 
handbook on reinforce concrete and detailing
handbook on reinforce concrete and detailinghandbook on reinforce concrete and detailing
handbook on reinforce concrete and detailing
 
Filters for Electromagnetic Compatibility Applications
Filters for Electromagnetic Compatibility ApplicationsFilters for Electromagnetic Compatibility Applications
Filters for Electromagnetic Compatibility Applications
 
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...
 
Passive Air Cooling System and Solar Water Heater.ppt
Passive Air Cooling System and Solar Water Heater.pptPassive Air Cooling System and Solar Water Heater.ppt
Passive Air Cooling System and Solar Water Heater.ppt
 
Online crime reporting system project.pdf
Online crime reporting system project.pdfOnline crime reporting system project.pdf
Online crime reporting system project.pdf
 
Geometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdfGeometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdf
 
5G and 6G refer to generations of mobile network technology, each representin...
5G and 6G refer to generations of mobile network technology, each representin...5G and 6G refer to generations of mobile network technology, each representin...
5G and 6G refer to generations of mobile network technology, each representin...
 
UNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxUNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptx
 
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdfInvolute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
 
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdflitvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
 
Operating System chapter 9 (Virtual Memory)
Operating System chapter 9 (Virtual Memory)Operating System chapter 9 (Virtual Memory)
Operating System chapter 9 (Virtual Memory)
 
Worksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxWorksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptx
 
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
 
Low Altitude Air Defense (LAAD) Gunner’s Handbook
Low Altitude Air Defense (LAAD) Gunner’s HandbookLow Altitude Air Defense (LAAD) Gunner’s Handbook
Low Altitude Air Defense (LAAD) Gunner’s Handbook
 
Introduction to Artificial Intelligence and History of AI
Introduction to Artificial Intelligence and History of AIIntroduction to Artificial Intelligence and History of AI
Introduction to Artificial Intelligence and History of AI
 
Basics of Relay for Engineering Students
Basics of Relay for Engineering StudentsBasics of Relay for Engineering Students
Basics of Relay for Engineering Students
 

HIDDEN SOLID REMOVAL ALGORITHM IN COMPUTER GRAPHICS FOR IMAGE PROCESSING THEORETIC SEMINAR.pptx

  • 1. HIDDEN SOLID REMOVAL ALGORITHM NSK. TVE23MEMA16 MEMA, College of Engineering Trivandrum
  • 2. Hidden Solid Removal (HSR) Algorithms. • Hidden solid removal (HSR) is a technique used in computer graphics to eliminate entire solid objects from a scene that are hidden from the viewer. • In the realm of computer graphics, hidden solid removal (HSR) algorithms play a pivotal role in generating realistic and accurate images. • These algorithms are tasked with identifying and eliminating solids in a 3D scene that are obscured from the viewer's perspective, ensuring that only the visible objects are rendered.
  • 3. Need for HSR. • Picture yourself in a room surrounded by furniture, decorations, and walls. • You can only see the surfaces directly in your line of sight, while those hidden behind other objects remain unseen. • HSR algorithms imitate this natural observation process in virtual environments. • They ensure that only the surfaces essential for creating the displayed image are processed and shown, optimizing visual rendering.
  • 4. Types of HSR Algorithms. • HSR algorithms can be broadly classified into two categories: object-space algorithms and image-space algorithms. • The choice of algorithm depends on the specific requirements of the application, considering factors such as scene complexity, desired rendering quality, and performance constraints. HSR Image Space Algorithms Object Space Algorithms
  • 5. Image Space Algorithms. • Image-space algorithms perform visibility calculations on a pixel-by-pixel basis, analyzing the scene at each pixel in the image to determine which surfaces are visible from that particular viewpoint. • These algorithms are typically faster and more efficient, making them well-suited for real-time rendering applications. • However, they can be less accurate than object-space algorithms. • These methods are originally designed for hidden surface removal but have been expanded to encompass 3D scenes, facilitating the removal of hidden solids.
  • 6. Types of Image Space Algorithms. • The various types of Image Space Algorithms are: Image Space Algorithm Z Buffer Algorithm Painters Algorithm Scan line Algorithm
  • 7. Z-buffer Algorithm. • The Z-buffer algorithm is a widely used technique in computer graphics for hidden surface removal (HSR). • It is an image-space algorithm, meaning it operates on a pixel-by-pixel basis to determine which surfaces are visible from the viewer's perspective. • The algorithm maintains a Z-buffer, an array of values that stores the depth of each pixel in the image. • As surfaces are rendered, their depth is compared to the corresponding pixel in the Z-buffer. If the surface is closer, it is rendered over the pixel; otherwise, the pixel remains unchanged.
  • 8. Working Principle of Z Buffer Algorithm. • Initialization: The Z-buffer is initialized with the maximum depth value, representing the farthest point from the viewer. • Surface Rendering: For each surface in the scene, its depth is calculated at each pixel that the surface intersects. • Z-buffer Comparison: The calculated depth of the surface is compared to the corresponding depth value in the Z-buffer.
  • 9. • Depth Update: If the surface's depth is closer than the value in the Z-buffer, the Z- buffer value is updated with the surface's depth, and the corresponding pixel's color is set to the surface's color. • Surface Completion: Once all surfaces have been rendered, the image is complete, and only the visible surfaces are displayed.
  • 10. Painters Algorithm. • The painter's algorithm is a fundamental technique in computer graphics for hidden surface removal (HSR). • .The algorithm draws surfaces in the order of their increasing distance from the viewer, ensuring that only the front-most surfaces are visible. • This analogy resembles a painter's approach, where they start by painting distant objects and gradually move towards closer ones, effectively covering the areas that represent hidden surfaces.
  • 11. Working Principle of Painters Algorithm. • Surface Sorting: The algorithm starts by sorting all surfaces in the scene based on their depth or distance from the viewer. • Surface Rendering: Once the surfaces are sorted, they are rendered sequentially from back to front. This ensures that only the front-most surfaces are visible, as they are rendered over any surfaces behind them.
  • 12. • Overlapping Surfaces: For overlapping surfaces, the painter's algorithm handles occlusions by only rendering the visible portions of the overlapping surfaces. This is achieved by comparing the depth of each surface at each pixel to determine which surface is closer and should be rendered.
  • 13. Scan Line Algorithm. • The scan line algorithm is an image-space algorithm used for hidden surface removal (HSR) in computer graphics. • It operates by processing the image one scan line at a time, determining the visible surfaces for each pixel along that scan line. • The algorithm efficiently determines the visible surfaces by maintaining an active edge table (AET) that stores the edges of the surfaces that intersect the current scan line.
  • 14. Working Principle of Scan Line Algorithm. • Scan Line Initialization: For each scan line, the AET is initialized with the edges of all surfaces that intersect the scan line. • Edge Sorting: The edges in the AET are sorted based on their x-coordinates at the current scan line. This ensures that edges are processed in the correct order from left to right. • Edge Processing: For each edge in the AET, determine the visible portion of the surface represented by that edge along the current scan line. This involves calculating the intersection points of the edge with other edges and the scan line endpoints.
  • 15. • AET Updates: As edges are processed, they may be added to or removed from the AET based on their intersections and the current scan line position. • Pixel Rendering: For each pixel along the current scan line, determine the visible surface based on the AET and fill the pixel with the corresponding surface color. • Scan Line Iteration: Repeat steps 1-5 for each scan line until the entire image has been processed.
  • 16. Object Space Algorithms. • Object-space algorithms operate on an object-by-object basis, analyzing each object in the scene to determine which of its surfaces are visible from the viewpoint. • These algorithms are typically more accurate and produce higher-quality results, but they can be slower and more computationally expensive due to the preprocessing of the scene.
  • 17. Types of Object Space Algorithms. • The various types of Object Space Algorithms are: Image Space Algorithm Depth Sorting Algorithm BSP Tree Algorithm Octree Algorithm
  • 18. Depth Sorting Algorithm. • The depth-sorting algorithm is a simple and efficient hidden surface removal (HSR) technique that operates on an object-space basis. • It sorts all surfaces in the scene from back to front based on their distance from the viewer and renders them sequentially, ensuring that only the front-most surfaces are visible. • It is similar to Painters Algorithm.
  • 19. Working Principle of Depth Sorting Algorithm. • Surface Sorting: The algorithm begins by sorting all surfaces in the scene based on their depth or distance from the viewer. This sorting can be done using various techniques, such as bubble sort, quick sort, or specialized depth-sorting algorithms. • Surface Rendering: Once the surfaces are sorted, they are rendered sequentially from back to front. This ensures that only the front-most surfaces are visible, as they are rendered over any surfaces behind them.
  • 20. • Overlapping Surfaces: For overlapping surfaces, the depth-sorting algorithm handles occlusions by only rendering the visible portions of the overlapping surfaces. This is achieved by comparing the depth of each surface at each pixel to determine which surface is closer and should be rendered.
  • 21. BSP Tree Algorithm. • The BSP tree algorithm is an efficient hidden solid removal (HSR) technique that operates on an object-space basis. • It utilizes a Binary Space Partitioning (BSP) tree to divide the scene into a hierarchy of bounding volumes (BVHs). • This hierarchical structure allows for rapid determination of visible surfaces, making it well-suited for handling complex scenes with numerous objects.
  • 22. Working Principle of Depth Sorting Algorithm. • Scene Partitioning: The algorithm recursively divides the scene into a BSP tree by selecting a splitting plane and partitioning the objects based on their relationship to the plane. • BVH Creation: Each node in the BSP tree represents a BVH, which encapsulates a portion of the scene. The BVH stores information about the enclosed objects, such as their bounding box or center of mass. • Surface Visibility Determination: To determine the visibility of a surface, the algorithm traverses the BSP tree, starting at the root node. For each node, it checks whether the surface intersects the corresponding BVH. If it does, the algorithm recursively traverses the child nodes until reaching a leaf node.
  • 23. • Leaf Node Processing: At a leaf node, the algorithm checks whether the surface is inside or outside the BVH. If inside, the surface is marked as visible. If outside, the surface is marked as hidden.
  • 24. Octree Algorithm. • The octree algorithm is an efficient object-space hidden surface removal (HSR) technique that utilizes a hierarchical data structure called an octree to partition the scene into a set of octants. • Octants are cubes that are recursively subdivided into eight smaller cubes. • This hierarchical structure allows for rapid determination of visible surfaces, making it well-suited for handling complex scenes with numerous objects.
  • 25. Working Principle of Depth Sorting Algorithm. • Scene Partitioning: The algorithm recursively divides the scene into an octree by selecting a splitting plane and partitioning the objects based on their relationship to the plane. • Octant Creation: Each node in the octree represents an octant, which encapsulates a portion of the scene. The octant stores information about the enclosed objects, such as their bounding box or center of mass. • Surface Visibility Determination: To determine the visibility of a surface, the algorithm traverses the octree, starting at the root node. For each node, it checks whether the surface intersects the corresponding octant. If it does, the algorithm recursively traverses the child nodes until reaching a leaf node.
  • 26. • Leaf Node Processing: At a leaf node, the algorithm checks whether the surface is inside or outside the octant. If inside, the surface is marked as visible. If outside, the surface is marked as hidden.