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

History of Indian Railways - the story of Growth & Modernization
History of Indian Railways - the story of Growth & ModernizationHistory of Indian Railways - the story of Growth & Modernization
History of Indian Railways - the story of Growth & ModernizationEmaan Sharma
 
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
 
Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Ramkumar k
 
Artificial intelligence presentation2-171219131633.pdf
Artificial intelligence presentation2-171219131633.pdfArtificial intelligence presentation2-171219131633.pdf
Artificial intelligence presentation2-171219131633.pdfKira Dess
 
Geometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdfGeometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdfJNTUA
 
Working Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdfWorking Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdfSkNahidulIslamShrabo
 
What is Coordinate Measuring Machine? CMM Types, Features, Functions
What is Coordinate Measuring Machine? CMM Types, Features, FunctionsWhat is Coordinate Measuring Machine? CMM Types, Features, Functions
What is Coordinate Measuring Machine? CMM Types, Features, FunctionsVIEW
 
Maximizing Incident Investigation Efficacy in Oil & Gas: Techniques and Tools
Maximizing Incident Investigation Efficacy in Oil & Gas: Techniques and ToolsMaximizing Incident Investigation Efficacy in Oil & Gas: Techniques and Tools
Maximizing Incident Investigation Efficacy in Oil & Gas: Techniques and Toolssoginsider
 
Filters for Electromagnetic Compatibility Applications
Filters for Electromagnetic Compatibility ApplicationsFilters for Electromagnetic Compatibility Applications
Filters for Electromagnetic Compatibility ApplicationsMathias Magdowski
 
Presentation on Slab, Beam, Column, and Foundation/Footing
Presentation on Slab,  Beam, Column, and Foundation/FootingPresentation on Slab,  Beam, Column, and Foundation/Footing
Presentation on Slab, Beam, Column, and Foundation/FootingEr. Suman Jyoti
 
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
 
Diploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdfDiploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdfJNTUA
 
Databricks Generative AI FoundationCertified.pdf
Databricks Generative AI FoundationCertified.pdfDatabricks Generative AI FoundationCertified.pdf
Databricks Generative AI FoundationCertified.pdfVinayVadlagattu
 
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...ronahami
 
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
 
Independent Solar-Powered Electric Vehicle Charging Station
Independent Solar-Powered Electric Vehicle Charging StationIndependent Solar-Powered Electric Vehicle Charging Station
Independent Solar-Powered Electric Vehicle Charging Stationsiddharthteach18
 
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdfInstruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdfEr.Sonali Nasikkar
 
DBMS-Report on Student management system.pptx
DBMS-Report on Student management system.pptxDBMS-Report on Student management system.pptx
DBMS-Report on Student management system.pptxrajjais1221
 
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...josephjonse
 
Adsorption (mass transfer operations 2) ppt
Adsorption (mass transfer operations 2) pptAdsorption (mass transfer operations 2) ppt
Adsorption (mass transfer operations 2) pptjigup7320
 

Kürzlich hochgeladen (20)

History of Indian Railways - the story of Growth & Modernization
History of Indian Railways - the story of Growth & ModernizationHistory of Indian Railways - the story of Growth & Modernization
History of Indian Railways - the story of Growth & Modernization
 
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...
 
Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)
 
Artificial intelligence presentation2-171219131633.pdf
Artificial intelligence presentation2-171219131633.pdfArtificial intelligence presentation2-171219131633.pdf
Artificial intelligence presentation2-171219131633.pdf
 
Geometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdfGeometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdf
 
Working Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdfWorking Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdf
 
What is Coordinate Measuring Machine? CMM Types, Features, Functions
What is Coordinate Measuring Machine? CMM Types, Features, FunctionsWhat is Coordinate Measuring Machine? CMM Types, Features, Functions
What is Coordinate Measuring Machine? CMM Types, Features, Functions
 
Maximizing Incident Investigation Efficacy in Oil & Gas: Techniques and Tools
Maximizing Incident Investigation Efficacy in Oil & Gas: Techniques and ToolsMaximizing Incident Investigation Efficacy in Oil & Gas: Techniques and Tools
Maximizing Incident Investigation Efficacy in Oil & Gas: Techniques and Tools
 
Filters for Electromagnetic Compatibility Applications
Filters for Electromagnetic Compatibility ApplicationsFilters for Electromagnetic Compatibility Applications
Filters for Electromagnetic Compatibility Applications
 
Presentation on Slab, Beam, Column, and Foundation/Footing
Presentation on Slab,  Beam, Column, and Foundation/FootingPresentation on Slab,  Beam, Column, and Foundation/Footing
Presentation on Slab, Beam, Column, and Foundation/Footing
 
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
 
Diploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdfDiploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdf
 
Databricks Generative AI FoundationCertified.pdf
Databricks Generative AI FoundationCertified.pdfDatabricks Generative AI FoundationCertified.pdf
Databricks Generative AI FoundationCertified.pdf
 
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
 
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...
 
Independent Solar-Powered Electric Vehicle Charging Station
Independent Solar-Powered Electric Vehicle Charging StationIndependent Solar-Powered Electric Vehicle Charging Station
Independent Solar-Powered Electric Vehicle Charging Station
 
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdfInstruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
 
DBMS-Report on Student management system.pptx
DBMS-Report on Student management system.pptxDBMS-Report on Student management system.pptx
DBMS-Report on Student management system.pptx
 
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
 
Adsorption (mass transfer operations 2) ppt
Adsorption (mass transfer operations 2) pptAdsorption (mass transfer operations 2) ppt
Adsorption (mass transfer operations 2) ppt
 

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.