尊敬的 微信汇率:1円 ≈ 0.046166 元 支付宝汇率:1円 ≈ 0.046257元 [退出登录]
SlideShare a Scribd company logo
HIDDEN SURFACE REMOVAL
MADE BY
PUNYAJOY SAHA
What is a hidden surface?
 When we view a picture containing non-transparent objects and surfaces, then we cannot see
those surfaces from view which are behind from surfaces closer to eye.
Visible surfaceHidden surface
Why hidden surface removal is needed?
 If we don’t remove hidden surface, there may be some spurious surfaces in the 3d object.
 We must remove these hidden surfaces to get a realistic screen image.
3D object with false surfaces 3D object with true surfaces
False surface
Two types of approaches
 Object space approach
 Image space approach
OBJECT SPACE APPROACH
 Algorithm
for(each object in the world)
{
determine those parts of the object whose view is unobstructed
by other parts of it or any other object;
draw those parts in the appropriate colour
}
 Computational cost: O(n^2) (n is number of objects)
 Examples: . Roberts algorithm, Warnock’s algorithm
IMAGE SPACE APPROACH
 Algorithm
for(each pixel in the image)
{
determine the object closest to the viewer that is intercepted by
the projector through the pixel;
draw the pixel in the appropriate colour;
}
 Computational cost: O(np) (n:number of object p:number of pixels)
 Examples: . Z-buffer, Floating horizon algorithm
Image space approaches
 Floating horizon
 Z-buffer
 Ray tracing
Floating Horizon Algorithm
The technique is to convert 3D problem to equivalent 2D problem by intersecting 3D surface
with a series of parallel cutting planes at constant values of the coordinate in the view
direction. It could be x, y or z. The function F(x,y,z)=0 is reduced to a planar curve in each of
these parallel planes
y  f (x,z)
SELECTION OF PLANES
 F(x, y, za)=0
 F(x, y, zb)=0
 F(x, y, zc)=0
 and so on….
Y
Z
Za
Zc
Zb
Visibility of curves
 With z=constant plane closest to the viewpoint, the curve in each plane is
generated (for each x coordinate in image space the appropriate y value is
found).
X
Y
FRONT
BACK
Z1
Z2
Z3
Z4
Z5
Possible cases..
X
Y
FRONT
BACK
Z1
Z2
Z3
Z4
Z5
Case 1
Case 2
Z-Buffer Algorithm
 In this process depth of the z-axis is used to determine the closest (visible surface).
 The depth value of a pixel is compared and the closest surface determines the colour
 Depth buffer ( values between 0 to inf) for each pos (x,y).
 Frame buffer is used to store the intensity of the colour value.
Intensity f(x ,y)
Depth Z(x ,y)
INTENSITY DEPTH
Pseudo code
 Initialize all d[i,j]=inf (max depth), c[i,j]=background color.
for (each polygon)
{
for (each pixel in polygon’s projection)
{
Find depth-z of polygon at (x,y) corresponding to pixel (i,j);
If z < d[i,j]
{
d[i,j] = z;
p[i,j] = color;
}
}
}
X
Y
Z
Za
Zb
Zc
(x,y)
Example
Not parallel to XY
plane
parallel to XY
plane
α α α α α α α α
α α α α α α α α
α α α α α α α α
α α α α α α α α
α α α α α α α α
α α α α α α α α
α α α α α α α α
α α α α α α α α
BG BG BG BG BG BG BG BG
BG BG BG BG BG BG BG BG
BG BG BG BG BG BG BG BG
BG BG BG BG BG BG BG BG
BG BG BG BG BG BG BG BG
BG BG BG BG BG BG BG BG
BG BG BG BG BG BG BG BG
BG BG BG BG BG BG BG BG
DEPTH BUFFER
FRAME BUFFER
Initialisation
Parallel with
the image plane 
 
      
     
    
   
  
 

Checking the first surface….
Updating the frame buffer and depth
buffer
       
       
       
       
       
       
       
       
Depth buffer Frame buffer
Checking the second surface….




 
  
   
    
     
Updating the frame buffer and depth
buffer
       
       
       
       
       
       
       
       
Depth buffer Frame buffer
Ray Tracing
 Allows the observer to see a point on the surface as a result of interaction of the
rays emanating from other source.
•
•
•
View
point
•
•
Invisible Rays
cast from the
viewpoint
Regular grid,
corresponding
to pixels:
• The rays find
the closest object
intersected...
rays are stopped
at the first
intersection...
• A ray is fired
from the viewpoint
through each
pixel to which the
window maps
Pseudo code:
For each scan line in the image
For each pixel in a scan line
• Determine the ray from the viewpoint (or center of
projection) through the pixel;
• For each object in the scene
– If the object is intersected and is closest found so
far...then record the intersection and object's name;
• Set the pixel's color to the closest object intersection;
BACKWARD RAY TRACING
 Camera shoots rays
 Rays get reflected and intercepted by camera
 Closest intersection is visible
Finding the closest intersection point P
 RD=(xD,yD,zD)
 R0=(x0,y0,z0)
2 2 2
D
0 D
D D
t 0
x y z 1
R(t) R R t 
 



2 2 2 2
C C C R(x x ) (y y ) (z z ) S     
Given equations
 Ray equation
We consider the ray towards the scene not opposite to the
scene
We consider normalized direction of the ray i.e. perpendicular to
the viewer’s plane
 Sphere equation
Calculations
 Put the ray equation into sphere equation and solve t
 We get:
Find the value of closest t from R0
0 D
0 D
0 D
x x x t
y y y t
z z z t
 
 
 
2 2 2
D D D
D 0 C D 0 C D 0 C
2 2 2
0 C 0 C 0
2
C
A x y z
B (x (x x ) y (y y ) z (z z ))
C (x x ) (y
At Bt C
y ) ( )
0
z z
 
  
     
   

 
THANK YOU

More Related Content

What's hot

Visible surface detection in computer graphic
Visible surface detection in computer graphicVisible surface detection in computer graphic
Visible surface detection in computer graphic
anku2266
 
Computer Graphics - Hidden Line Removal Algorithm
Computer Graphics - Hidden Line Removal AlgorithmComputer Graphics - Hidden Line Removal Algorithm
Computer Graphics - Hidden Line Removal Algorithm
Jyotiraman De
 
Halftoning in Computer Graphics
Halftoning  in Computer GraphicsHalftoning  in Computer Graphics
Halftoning in Computer Graphics
University of Potsdam
 
Window to viewport transformation
Window to viewport transformationWindow to viewport transformation
Window to viewport transformation
Ankit Garg
 
2 d viewing computer graphics
2 d viewing computer graphics2 d viewing computer graphics
2 d viewing computer graphics
KALESHWAR KUMAR
 
3D Transformation in Computer Graphics
3D Transformation in Computer Graphics3D Transformation in Computer Graphics
3D Transformation in Computer Graphics
sabbirantor
 
Hidden surface removal algorithm
Hidden surface removal algorithmHidden surface removal algorithm
Hidden surface removal algorithm
KKARUNKARTHIK
 
Visible Surface Detection
Visible Surface DetectionVisible Surface Detection
Visible Surface Detection
AmitBiswas99
 
3D transformation in computer graphics
3D transformation in computer graphics3D transformation in computer graphics
3D transformation in computer graphics
SHIVANI SONI
 
Projection In Computer Graphics
Projection In Computer GraphicsProjection In Computer Graphics
Projection In Computer Graphics
Sanu Philip
 
2D transformation (Computer Graphics)
2D transformation (Computer Graphics)2D transformation (Computer Graphics)
2D transformation (Computer Graphics)
Timbal Mayank
 
Spline representations
Spline representationsSpline representations
Spline representations
Nikhil krishnan
 
3D Graphics : Computer Graphics Fundamentals
3D Graphics : Computer Graphics Fundamentals3D Graphics : Computer Graphics Fundamentals
3D Graphics : Computer Graphics Fundamentals
Muhammed Afsal Villan
 
visible surface detection
visible surface detectionvisible surface detection
visible surface detection
Balakumaran Arunachalam
 
Shading
ShadingShading
Shading
Amit Kapoor
 
Unit 3
Unit 3Unit 3
Unit 3
ypnrao
 
Hidden surfaces
Hidden surfacesHidden surfaces
Hidden surfaces
Mohd Arif
 
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
rajivagarwal23dei
 
Concept of basic illumination model
Concept of basic illumination modelConcept of basic illumination model
Concept of basic illumination model
Ankit Garg
 
Bresenham's line algorithm
Bresenham's line algorithmBresenham's line algorithm
Bresenham's line algorithm
Pooja Dixit
 

What's hot (20)

Visible surface detection in computer graphic
Visible surface detection in computer graphicVisible surface detection in computer graphic
Visible surface detection in computer graphic
 
Computer Graphics - Hidden Line Removal Algorithm
Computer Graphics - Hidden Line Removal AlgorithmComputer Graphics - Hidden Line Removal Algorithm
Computer Graphics - Hidden Line Removal Algorithm
 
Halftoning in Computer Graphics
Halftoning  in Computer GraphicsHalftoning  in Computer Graphics
Halftoning in Computer Graphics
 
Window to viewport transformation
Window to viewport transformationWindow to viewport transformation
Window to viewport transformation
 
2 d viewing computer graphics
2 d viewing computer graphics2 d viewing computer graphics
2 d viewing computer graphics
 
3D Transformation in Computer Graphics
3D Transformation in Computer Graphics3D Transformation in Computer Graphics
3D Transformation in Computer Graphics
 
Hidden surface removal algorithm
Hidden surface removal algorithmHidden surface removal algorithm
Hidden surface removal algorithm
 
Visible Surface Detection
Visible Surface DetectionVisible Surface Detection
Visible Surface Detection
 
3D transformation in computer graphics
3D transformation in computer graphics3D transformation in computer graphics
3D transformation in computer graphics
 
Projection In Computer Graphics
Projection In Computer GraphicsProjection In Computer Graphics
Projection In Computer Graphics
 
2D transformation (Computer Graphics)
2D transformation (Computer Graphics)2D transformation (Computer Graphics)
2D transformation (Computer Graphics)
 
Spline representations
Spline representationsSpline representations
Spline representations
 
3D Graphics : Computer Graphics Fundamentals
3D Graphics : Computer Graphics Fundamentals3D Graphics : Computer Graphics Fundamentals
3D Graphics : Computer Graphics Fundamentals
 
visible surface detection
visible surface detectionvisible surface detection
visible surface detection
 
Shading
ShadingShading
Shading
 
Unit 3
Unit 3Unit 3
Unit 3
 
Hidden surfaces
Hidden surfacesHidden surfaces
Hidden surfaces
 
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
 
Concept of basic illumination model
Concept of basic illumination modelConcept of basic illumination model
Concept of basic illumination model
 
Bresenham's line algorithm
Bresenham's line algorithmBresenham's line algorithm
Bresenham's line algorithm
 

Similar to Hidden surface removal

Visible surface determination
Visible  surface determinationVisible  surface determination
Visible surface determination
Patel Punit
 
Lec03 light
Lec03 lightLec03 light
Lec03 light
BaliThorat1
 
Ray Tracing.pdf
Ray Tracing.pdfRay Tracing.pdf
Ray Tracing.pdf
Mattupallipardhu
 
CG OpenGL surface detection+illumination+rendering models-course 9
CG OpenGL surface detection+illumination+rendering models-course 9CG OpenGL surface detection+illumination+rendering models-course 9
CG OpenGL surface detection+illumination+rendering models-course 9
fungfung Chen
 
Interactive Refractions And Caustics Using Image Space Techniques
Interactive Refractions And Caustics Using Image Space TechniquesInteractive Refractions And Caustics Using Image Space Techniques
Interactive Refractions And Caustics Using Image Space Techniques
codevania
 
Scene Representation Networks: Continuous 3D-Structure-Aware Neural Scene Rep...
Scene Representation Networks: Continuous 3D-Structure-Aware Neural Scene Rep...Scene Representation Networks: Continuous 3D-Structure-Aware Neural Scene Rep...
Scene Representation Networks: Continuous 3D-Structure-Aware Neural Scene Rep...
Vincent Sitzmann
 
Hidden Surface Removal using Z-buffer
Hidden Surface Removal using Z-bufferHidden Surface Removal using Z-buffer
Hidden Surface Removal using Z-buffer
Raj Sikarwar
 
7-Surface Detection Methods.ppt
7-Surface Detection Methods.ppt7-Surface Detection Methods.ppt
7-Surface Detection Methods.ppt
MarkHark1
 
unit 4.pptx
unit 4.pptxunit 4.pptx
unit 4.pptx
PrabinNeupane8
 
Understanding neural radiance fields
Understanding neural radiance fieldsUnderstanding neural radiance fields
Understanding neural radiance fields
Varun Bhaseen
 
Computer Vision: Shape from Specularities and Motion
Computer Vision: Shape from Specularities and MotionComputer Vision: Shape from Specularities and Motion
Computer Vision: Shape from Specularities and Motion
Damian T. Gordon
 
Computer Graphics Part1
Computer Graphics Part1Computer Graphics Part1
Computer Graphics Part1
qpqpqp
 
Computer graphics iv unit
Computer graphics iv unitComputer graphics iv unit
Computer graphics iv unit
aravindangc
 
Use of Specularities and Motion in the Extraction of Surface Shape
Use of Specularities and Motion in the Extraction of Surface ShapeUse of Specularities and Motion in the Extraction of Surface Shape
Use of Specularities and Motion in the Extraction of Surface Shape
Damian T. Gordon
 
Image segmentation
Image segmentationImage segmentation
Shadow Mapping with Today's OpenGL Hardware
Shadow Mapping with Today's OpenGL HardwareShadow Mapping with Today's OpenGL Hardware
Shadow Mapping with Today's OpenGL Hardware
Mark Kilgard
 
3 intensity transformations and spatial filtering slides
3 intensity transformations and spatial filtering slides3 intensity transformations and spatial filtering slides
3 intensity transformations and spatial filtering slides
BHAGYAPRASADBUGGE
 
Light effect
Light effectLight effect
Light effect
Vanitha Chandru
 
Hidden lines & surfaces
Hidden lines & surfacesHidden lines & surfaces
Hidden lines & surfaces
Ankur Kumar
 
Class[4][19th jun] [three js-camera&amp;light]
Class[4][19th jun] [three js-camera&amp;light]Class[4][19th jun] [three js-camera&amp;light]
Class[4][19th jun] [three js-camera&amp;light]
Saajid Akram
 

Similar to Hidden surface removal (20)

Visible surface determination
Visible  surface determinationVisible  surface determination
Visible surface determination
 
Lec03 light
Lec03 lightLec03 light
Lec03 light
 
Ray Tracing.pdf
Ray Tracing.pdfRay Tracing.pdf
Ray Tracing.pdf
 
CG OpenGL surface detection+illumination+rendering models-course 9
CG OpenGL surface detection+illumination+rendering models-course 9CG OpenGL surface detection+illumination+rendering models-course 9
CG OpenGL surface detection+illumination+rendering models-course 9
 
Interactive Refractions And Caustics Using Image Space Techniques
Interactive Refractions And Caustics Using Image Space TechniquesInteractive Refractions And Caustics Using Image Space Techniques
Interactive Refractions And Caustics Using Image Space Techniques
 
Scene Representation Networks: Continuous 3D-Structure-Aware Neural Scene Rep...
Scene Representation Networks: Continuous 3D-Structure-Aware Neural Scene Rep...Scene Representation Networks: Continuous 3D-Structure-Aware Neural Scene Rep...
Scene Representation Networks: Continuous 3D-Structure-Aware Neural Scene Rep...
 
Hidden Surface Removal using Z-buffer
Hidden Surface Removal using Z-bufferHidden Surface Removal using Z-buffer
Hidden Surface Removal using Z-buffer
 
7-Surface Detection Methods.ppt
7-Surface Detection Methods.ppt7-Surface Detection Methods.ppt
7-Surface Detection Methods.ppt
 
unit 4.pptx
unit 4.pptxunit 4.pptx
unit 4.pptx
 
Understanding neural radiance fields
Understanding neural radiance fieldsUnderstanding neural radiance fields
Understanding neural radiance fields
 
Computer Vision: Shape from Specularities and Motion
Computer Vision: Shape from Specularities and MotionComputer Vision: Shape from Specularities and Motion
Computer Vision: Shape from Specularities and Motion
 
Computer Graphics Part1
Computer Graphics Part1Computer Graphics Part1
Computer Graphics Part1
 
Computer graphics iv unit
Computer graphics iv unitComputer graphics iv unit
Computer graphics iv unit
 
Use of Specularities and Motion in the Extraction of Surface Shape
Use of Specularities and Motion in the Extraction of Surface ShapeUse of Specularities and Motion in the Extraction of Surface Shape
Use of Specularities and Motion in the Extraction of Surface Shape
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
Shadow Mapping with Today's OpenGL Hardware
Shadow Mapping with Today's OpenGL HardwareShadow Mapping with Today's OpenGL Hardware
Shadow Mapping with Today's OpenGL Hardware
 
3 intensity transformations and spatial filtering slides
3 intensity transformations and spatial filtering slides3 intensity transformations and spatial filtering slides
3 intensity transformations and spatial filtering slides
 
Light effect
Light effectLight effect
Light effect
 
Hidden lines & surfaces
Hidden lines & surfacesHidden lines & surfaces
Hidden lines & surfaces
 
Class[4][19th jun] [three js-camera&amp;light]
Class[4][19th jun] [three js-camera&amp;light]Class[4][19th jun] [three js-camera&amp;light]
Class[4][19th jun] [three js-camera&amp;light]
 

Recently uploaded

An In-Depth Exploration of Natural Language Processing: Evolution, Applicatio...
An In-Depth Exploration of Natural Language Processing: Evolution, Applicatio...An In-Depth Exploration of Natural Language Processing: Evolution, Applicatio...
An In-Depth Exploration of Natural Language Processing: Evolution, Applicatio...
DharmaBanothu
 
Hot Call Girls In Bangalore ✔ 9079923931 ✔ Hi I Am Divya Vip Call Girl Servic...
Hot Call Girls In Bangalore ✔ 9079923931 ✔ Hi I Am Divya Vip Call Girl Servic...Hot Call Girls In Bangalore ✔ 9079923931 ✔ Hi I Am Divya Vip Call Girl Servic...
Hot Call Girls In Bangalore ✔ 9079923931 ✔ Hi I Am Divya Vip Call Girl Servic...
Banerescorts
 
Asymmetrical Repulsion Magnet Motor Ratio 6-7.pdf
Asymmetrical Repulsion Magnet Motor Ratio 6-7.pdfAsymmetrical Repulsion Magnet Motor Ratio 6-7.pdf
Asymmetrical Repulsion Magnet Motor Ratio 6-7.pdf
felixwold
 
Sachpazis_Consolidation Settlement Calculation Program-The Python Code and th...
Sachpazis_Consolidation Settlement Calculation Program-The Python Code and th...Sachpazis_Consolidation Settlement Calculation Program-The Python Code and th...
Sachpazis_Consolidation Settlement Calculation Program-The Python Code and th...
Dr.Costas Sachpazis
 
SELENIUM CONF -PALLAVI SHARMA - 2024.pdf
SELENIUM CONF -PALLAVI SHARMA - 2024.pdfSELENIUM CONF -PALLAVI SHARMA - 2024.pdf
SELENIUM CONF -PALLAVI SHARMA - 2024.pdf
Pallavi Sharma
 
AN INTRODUCTION OF AI & SEARCHING TECHIQUES
AN INTRODUCTION OF AI & SEARCHING TECHIQUESAN INTRODUCTION OF AI & SEARCHING TECHIQUES
AN INTRODUCTION OF AI & SEARCHING TECHIQUES
drshikhapandey2022
 
Basic principle and types Static Relays ppt
Basic principle and  types  Static Relays pptBasic principle and  types  Static Relays ppt
Basic principle and types Static Relays ppt
Sri Ramakrishna Institute of Technology
 
paper relate Chozhavendhan et al. 2020.pdf
paper relate Chozhavendhan et al. 2020.pdfpaper relate Chozhavendhan et al. 2020.pdf
paper relate Chozhavendhan et al. 2020.pdf
ShurooqTaib
 
Update 40 models( Solar Cell ) in SPICE PARK(JUL2024)
Update 40 models( Solar Cell ) in SPICE PARK(JUL2024)Update 40 models( Solar Cell ) in SPICE PARK(JUL2024)
Update 40 models( Solar Cell ) in SPICE PARK(JUL2024)
Tsuyoshi Horigome
 
Call Girls Chandigarh 🔥 7014168258 🔥 Real Fun With Sexual Girl Available 24/7...
Call Girls Chandigarh 🔥 7014168258 🔥 Real Fun With Sexual Girl Available 24/7...Call Girls Chandigarh 🔥 7014168258 🔥 Real Fun With Sexual Girl Available 24/7...
Call Girls Chandigarh 🔥 7014168258 🔥 Real Fun With Sexual Girl Available 24/7...
shourabjaat424
 
Mahipalpur Call Girls Delhi 🔥 9711199012 ❄- Pick Your Dream Call Girls with 1...
Mahipalpur Call Girls Delhi 🔥 9711199012 ❄- Pick Your Dream Call Girls with 1...Mahipalpur Call Girls Delhi 🔥 9711199012 ❄- Pick Your Dream Call Girls with 1...
Mahipalpur Call Girls Delhi 🔥 9711199012 ❄- Pick Your Dream Call Girls with 1...
simrangupta87541
 
The Differences between Schedule 40 PVC Conduit Pipe and Schedule 80 PVC Conduit
The Differences between Schedule 40 PVC Conduit Pipe and Schedule 80 PVC ConduitThe Differences between Schedule 40 PVC Conduit Pipe and Schedule 80 PVC Conduit
The Differences between Schedule 40 PVC Conduit Pipe and Schedule 80 PVC Conduit
Guangdong Ctube Industry Co., Ltd.
 
My Airframe Metallic Design Capability Studies..pdf
My Airframe Metallic Design Capability Studies..pdfMy Airframe Metallic Design Capability Studies..pdf
My Airframe Metallic Design Capability Studies..pdf
Geoffrey Wardle. MSc. MSc. Snr.MAIAA
 
Online train ticket booking system project.pdf
Online train ticket booking system project.pdfOnline train ticket booking system project.pdf
Online train ticket booking system project.pdf
Kamal Acharya
 
一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理
gapboxn
 
🔥 Hyderabad Call Girls  👉 9352988975 👫 High Profile Call Girls Whatsapp Numbe...
🔥 Hyderabad Call Girls  👉 9352988975 👫 High Profile Call Girls Whatsapp Numbe...🔥 Hyderabad Call Girls  👉 9352988975 👫 High Profile Call Girls Whatsapp Numbe...
🔥 Hyderabad Call Girls  👉 9352988975 👫 High Profile Call Girls Whatsapp Numbe...
aarusi sexy model
 
Call Girls Chennai +91-8824825030 Vip Call Girls Chennai
Call Girls Chennai +91-8824825030 Vip Call Girls ChennaiCall Girls Chennai +91-8824825030 Vip Call Girls Chennai
Call Girls Chennai +91-8824825030 Vip Call Girls Chennai
paraasingh12 #V08
 
Better Builder Magazine, Issue 49 / Spring 2024
Better Builder Magazine, Issue 49 / Spring 2024Better Builder Magazine, Issue 49 / Spring 2024
Better Builder Magazine, Issue 49 / Spring 2024
Better Builder Magazine
 
CSP_Study - Notes (Paul McNeill) 2017.pdf
CSP_Study - Notes (Paul McNeill) 2017.pdfCSP_Study - Notes (Paul McNeill) 2017.pdf
CSP_Study - Notes (Paul McNeill) 2017.pdf
Ismail Sultan
 
Literature review for prompt engineering of ChatGPT.pptx
Literature review for prompt engineering of ChatGPT.pptxLiterature review for prompt engineering of ChatGPT.pptx
Literature review for prompt engineering of ChatGPT.pptx
LokerXu2
 

Recently uploaded (20)

An In-Depth Exploration of Natural Language Processing: Evolution, Applicatio...
An In-Depth Exploration of Natural Language Processing: Evolution, Applicatio...An In-Depth Exploration of Natural Language Processing: Evolution, Applicatio...
An In-Depth Exploration of Natural Language Processing: Evolution, Applicatio...
 
Hot Call Girls In Bangalore ✔ 9079923931 ✔ Hi I Am Divya Vip Call Girl Servic...
Hot Call Girls In Bangalore ✔ 9079923931 ✔ Hi I Am Divya Vip Call Girl Servic...Hot Call Girls In Bangalore ✔ 9079923931 ✔ Hi I Am Divya Vip Call Girl Servic...
Hot Call Girls In Bangalore ✔ 9079923931 ✔ Hi I Am Divya Vip Call Girl Servic...
 
Asymmetrical Repulsion Magnet Motor Ratio 6-7.pdf
Asymmetrical Repulsion Magnet Motor Ratio 6-7.pdfAsymmetrical Repulsion Magnet Motor Ratio 6-7.pdf
Asymmetrical Repulsion Magnet Motor Ratio 6-7.pdf
 
Sachpazis_Consolidation Settlement Calculation Program-The Python Code and th...
Sachpazis_Consolidation Settlement Calculation Program-The Python Code and th...Sachpazis_Consolidation Settlement Calculation Program-The Python Code and th...
Sachpazis_Consolidation Settlement Calculation Program-The Python Code and th...
 
SELENIUM CONF -PALLAVI SHARMA - 2024.pdf
SELENIUM CONF -PALLAVI SHARMA - 2024.pdfSELENIUM CONF -PALLAVI SHARMA - 2024.pdf
SELENIUM CONF -PALLAVI SHARMA - 2024.pdf
 
AN INTRODUCTION OF AI & SEARCHING TECHIQUES
AN INTRODUCTION OF AI & SEARCHING TECHIQUESAN INTRODUCTION OF AI & SEARCHING TECHIQUES
AN INTRODUCTION OF AI & SEARCHING TECHIQUES
 
Basic principle and types Static Relays ppt
Basic principle and  types  Static Relays pptBasic principle and  types  Static Relays ppt
Basic principle and types Static Relays ppt
 
paper relate Chozhavendhan et al. 2020.pdf
paper relate Chozhavendhan et al. 2020.pdfpaper relate Chozhavendhan et al. 2020.pdf
paper relate Chozhavendhan et al. 2020.pdf
 
Update 40 models( Solar Cell ) in SPICE PARK(JUL2024)
Update 40 models( Solar Cell ) in SPICE PARK(JUL2024)Update 40 models( Solar Cell ) in SPICE PARK(JUL2024)
Update 40 models( Solar Cell ) in SPICE PARK(JUL2024)
 
Call Girls Chandigarh 🔥 7014168258 🔥 Real Fun With Sexual Girl Available 24/7...
Call Girls Chandigarh 🔥 7014168258 🔥 Real Fun With Sexual Girl Available 24/7...Call Girls Chandigarh 🔥 7014168258 🔥 Real Fun With Sexual Girl Available 24/7...
Call Girls Chandigarh 🔥 7014168258 🔥 Real Fun With Sexual Girl Available 24/7...
 
Mahipalpur Call Girls Delhi 🔥 9711199012 ❄- Pick Your Dream Call Girls with 1...
Mahipalpur Call Girls Delhi 🔥 9711199012 ❄- Pick Your Dream Call Girls with 1...Mahipalpur Call Girls Delhi 🔥 9711199012 ❄- Pick Your Dream Call Girls with 1...
Mahipalpur Call Girls Delhi 🔥 9711199012 ❄- Pick Your Dream Call Girls with 1...
 
The Differences between Schedule 40 PVC Conduit Pipe and Schedule 80 PVC Conduit
The Differences between Schedule 40 PVC Conduit Pipe and Schedule 80 PVC ConduitThe Differences between Schedule 40 PVC Conduit Pipe and Schedule 80 PVC Conduit
The Differences between Schedule 40 PVC Conduit Pipe and Schedule 80 PVC Conduit
 
My Airframe Metallic Design Capability Studies..pdf
My Airframe Metallic Design Capability Studies..pdfMy Airframe Metallic Design Capability Studies..pdf
My Airframe Metallic Design Capability Studies..pdf
 
Online train ticket booking system project.pdf
Online train ticket booking system project.pdfOnline train ticket booking system project.pdf
Online train ticket booking system project.pdf
 
一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理
 
🔥 Hyderabad Call Girls  👉 9352988975 👫 High Profile Call Girls Whatsapp Numbe...
🔥 Hyderabad Call Girls  👉 9352988975 👫 High Profile Call Girls Whatsapp Numbe...🔥 Hyderabad Call Girls  👉 9352988975 👫 High Profile Call Girls Whatsapp Numbe...
🔥 Hyderabad Call Girls  👉 9352988975 👫 High Profile Call Girls Whatsapp Numbe...
 
Call Girls Chennai +91-8824825030 Vip Call Girls Chennai
Call Girls Chennai +91-8824825030 Vip Call Girls ChennaiCall Girls Chennai +91-8824825030 Vip Call Girls Chennai
Call Girls Chennai +91-8824825030 Vip Call Girls Chennai
 
Better Builder Magazine, Issue 49 / Spring 2024
Better Builder Magazine, Issue 49 / Spring 2024Better Builder Magazine, Issue 49 / Spring 2024
Better Builder Magazine, Issue 49 / Spring 2024
 
CSP_Study - Notes (Paul McNeill) 2017.pdf
CSP_Study - Notes (Paul McNeill) 2017.pdfCSP_Study - Notes (Paul McNeill) 2017.pdf
CSP_Study - Notes (Paul McNeill) 2017.pdf
 
Literature review for prompt engineering of ChatGPT.pptx
Literature review for prompt engineering of ChatGPT.pptxLiterature review for prompt engineering of ChatGPT.pptx
Literature review for prompt engineering of ChatGPT.pptx
 

Hidden surface removal

  • 1. HIDDEN SURFACE REMOVAL MADE BY PUNYAJOY SAHA
  • 2. What is a hidden surface?  When we view a picture containing non-transparent objects and surfaces, then we cannot see those surfaces from view which are behind from surfaces closer to eye. Visible surfaceHidden surface
  • 3. Why hidden surface removal is needed?  If we don’t remove hidden surface, there may be some spurious surfaces in the 3d object.  We must remove these hidden surfaces to get a realistic screen image. 3D object with false surfaces 3D object with true surfaces False surface
  • 4. Two types of approaches  Object space approach  Image space approach
  • 5. OBJECT SPACE APPROACH  Algorithm for(each object in the world) { determine those parts of the object whose view is unobstructed by other parts of it or any other object; draw those parts in the appropriate colour }  Computational cost: O(n^2) (n is number of objects)  Examples: . Roberts algorithm, Warnock’s algorithm
  • 6. IMAGE SPACE APPROACH  Algorithm for(each pixel in the image) { determine the object closest to the viewer that is intercepted by the projector through the pixel; draw the pixel in the appropriate colour; }  Computational cost: O(np) (n:number of object p:number of pixels)  Examples: . Z-buffer, Floating horizon algorithm
  • 7. Image space approaches  Floating horizon  Z-buffer  Ray tracing
  • 8. Floating Horizon Algorithm The technique is to convert 3D problem to equivalent 2D problem by intersecting 3D surface with a series of parallel cutting planes at constant values of the coordinate in the view direction. It could be x, y or z. The function F(x,y,z)=0 is reduced to a planar curve in each of these parallel planes y  f (x,z)
  • 9. SELECTION OF PLANES  F(x, y, za)=0  F(x, y, zb)=0  F(x, y, zc)=0  and so on…. Y Z Za Zc Zb
  • 10. Visibility of curves  With z=constant plane closest to the viewpoint, the curve in each plane is generated (for each x coordinate in image space the appropriate y value is found). X Y FRONT BACK Z1 Z2 Z3 Z4 Z5
  • 12. Z-Buffer Algorithm  In this process depth of the z-axis is used to determine the closest (visible surface).  The depth value of a pixel is compared and the closest surface determines the colour  Depth buffer ( values between 0 to inf) for each pos (x,y).  Frame buffer is used to store the intensity of the colour value. Intensity f(x ,y) Depth Z(x ,y) INTENSITY DEPTH
  • 13. Pseudo code  Initialize all d[i,j]=inf (max depth), c[i,j]=background color. for (each polygon) { for (each pixel in polygon’s projection) { Find depth-z of polygon at (x,y) corresponding to pixel (i,j); If z < d[i,j] { d[i,j] = z; p[i,j] = color; } } }
  • 14. X Y Z Za Zb Zc (x,y) Example Not parallel to XY plane parallel to XY plane
  • 15. α α α α α α α α α α α α α α α α α α α α α α α α α α α α α α α α α α α α α α α α α α α α α α α α α α α α α α α α α α α α α α α α BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG BG DEPTH BUFFER FRAME BUFFER Initialisation
  • 16. Parallel with the image plane                                Checking the first surface….
  • 17. Updating the frame buffer and depth buffer                                                                 Depth buffer Frame buffer
  • 18. Checking the second surface….                        
  • 19. Updating the frame buffer and depth buffer                                                                 Depth buffer Frame buffer
  • 20. Ray Tracing  Allows the observer to see a point on the surface as a result of interaction of the rays emanating from other source. • • • View point • • Invisible Rays cast from the viewpoint Regular grid, corresponding to pixels: • The rays find the closest object intersected... rays are stopped at the first intersection... • A ray is fired from the viewpoint through each pixel to which the window maps
  • 21. Pseudo code: For each scan line in the image For each pixel in a scan line • Determine the ray from the viewpoint (or center of projection) through the pixel; • For each object in the scene – If the object is intersected and is closest found so far...then record the intersection and object's name; • Set the pixel's color to the closest object intersection;
  • 22. BACKWARD RAY TRACING  Camera shoots rays  Rays get reflected and intercepted by camera  Closest intersection is visible
  • 23. Finding the closest intersection point P  RD=(xD,yD,zD)  R0=(x0,y0,z0)
  • 24. 2 2 2 D 0 D D D t 0 x y z 1 R(t) R R t       2 2 2 2 C C C R(x x ) (y y ) (z z ) S      Given equations  Ray equation We consider the ray towards the scene not opposite to the scene We consider normalized direction of the ray i.e. perpendicular to the viewer’s plane  Sphere equation
  • 25. Calculations  Put the ray equation into sphere equation and solve t  We get: Find the value of closest t from R0 0 D 0 D 0 D x x x t y y y t z z z t       2 2 2 D D D D 0 C D 0 C D 0 C 2 2 2 0 C 0 C 0 2 C A x y z B (x (x x ) y (y y ) z (z z )) C (x x ) (y At Bt C y ) ( ) 0 z z                  
  翻译: