SlideShare a Scribd company logo
1 of 20
CG
3/1/2023
LECTURE No. (7)
Dr. Majid D. Y.
dr.majid@uomosul.edu.iq
Surface Detection Methods
2
of
20
Why?
We must determine what is visible within a
scene from a chosen viewing position
For 3D worlds this is known as visible
surface detection or hidden surface
elimination
3
of
20
Two Main Approaches
Visible surface detection algorithms are
broadly classified as:
– Object Space Methods: Compares objects
and parts of objects to each other within the
scene definition to determine which surfaces
are visible
– Image Space Methods: Visibility is decided
point-by-point at each pixel position on the
projection plane
Image space methods are by far the more
common
4
of
20
Back-Face Detection
The simplest thing we can do is find the
faces on the backs of polyhedra and
discard them
5
of
20
Back-Face Detection Method
• A fast and simple object-space method for identifying
the back faces of a polyhedron is based on the "inside-
outside" tests. A point (x, y, z) is "inside" a polygon
surface with plane parameters A, B, C, and D if
• When an inside point is along the line of sight to the
surface, the polygon must be a back face (we are inside
that face and cannot see the front of it from our viewing
position).
0



 D
Cz
By
Ax
D
Cz
By
Ax
S 



6
of
20
Back-Face Detection Method
• We can simplify this test by considering the
normal vector N to a polygon surface, which has
Cartesian components (A, B, C). In general, if V
is a vector in the viewing direction from the eye
(or "camera") position, as shown in Fig, then this
polygon is a back face if
V.N>0
7
of
20
N calculation
P1(X1,Y1,Z1)
P2(X2,Y2,Z2)
P3(X3,Y3,Z3)
)
P
-
(P
)
P
-
(P
N 2
3
2
1 


















2
3
2
3
2
3
2
1
2
1
2
1
N
Z
Z
Y
Y
X
X
Z
Z
Y
Y
X
X
k
j
i
k
Y
Y
X
X
Y
Y
X
X
j
Z
Z
X
X
Z
Z
X
X
i
Z
Z
Y
Y
Z
Z
Y
Y

































2
3
2
3
2
1
2
1
2
3
2
3
2
1
2
1
2
3
2
3
2
1
2
1
N
       
2
3
2
1
2
3
2
1
A *
N Y
Y
Z
Z
Z
Z
Y
Y 






       
2
3
2
1
2
3
2
1
B *
N X
X
Z
Z
Z
Z
X
X 






       
2
3
2
1
2
3
2
1
C *
N X
X
Y
Y
Y
Y
X
X 






8
of
20
Back-Face Detection Method
• Ensure we have a right handed system with the
viewing direction along the negative z-axis
Now we can simply say that if the z component
(C) of the polygon’s normal is less than zero the
surface cannot be seen
V = (0, 0, Vz)  V.N=Vz.C
so that we only need to consider the sign of C,
the ; component of the normal vector N .
9
of
20
Back-Face Detection Method
• In a right-handed viewing system with
viewing direction along the negative z,
axis, the polygon is a back face if C <= 0.
• In a Left-handed viewing system with
viewing direction along the positive z, axis,
the polygon is a back face if C > 0.
10
of
20
Back-Face Detection (cont…)
In general back-face detection can be
expected to eliminate about half of the
polygon surfaces in a scene from further
visibility tests
More complicated surfaces
though scupper us!
We need better techniques
to handle these kind of
situations
11
of
20
Depth-Buffer Method
Compares surface depth values throughout
a scene for each pixel position on the
projection plane
Usually applied to scenes only containing
polygons
As depth values can be computed easily,
this tends to be very fast
Also often called the z-buffer method
12
of
20
Depth-Buffer Method (cont…)
Images
taken
from
Hearn
&
Baker,
“Computer
Graphics
with
OpenGL”
(2004)
13
of
20
Depth-Buffer Algorithm
1. Initialise the depth buffer and frame buffer
so that for all buffer positions (x, y)
depthBuff(x, y) = 1.0
frameBuff(x, y) = Color
14
of
20
Depth-Buffer Algorithm (cont…)
2. Process each polygon in a scene, one at
a time
– For each projected (x, y) pixel position of a
polygon, calculate the depth z (if not already
known)
– If z < depthBuff(x, y), compute the surface
colour at that position and set
depthBuff(x, y) = z
frameBuff(x, y) = surfColour(x, y)
After all surfaces are processed depthBuff
and frameBuff will store correct values
15
of
20
A-Buffer Method
The A-buffer method is an extension of the
depth-buffer method
The A-buffer method is visibility detection
method developed at Lucasfilm Studios for
the rendering system REYES (Renders
Everything You Ever Saw)
16
of
20
A-Buffer Method (cont…)
The A-buffer expands on the depth buffer
method to allow transparencies
The key data structure in the A-buffer is the
accumulation buffer
17
of
20
A-Buffer Method (cont…)
If depth is >= 0, then the surface data field
stores the depth of that pixel position as
before
If depth < 0 then the data filed stores a
pointer to a linked list of surface data
18
of
20
A-Buffer Method (cont…)
Surface information in the A-buffer includes:
– RGB intensity components
– Opacity parameter
– Depth
– Percent of area coverage
– Surface identifier
– Other surface rendering parameters
The algorithm proceeds just like the depth
buffer algorithm
The depth and opacity values are used to
determine the final colour of a pixel
19
of
20
Scan-Line Method
An image space method for identifying
visible surfaces
Computes and compares depth values
along the various scan-lines for a scene
20
of
20
Depth-Sorting Method
A visible surface detection method that uses
both image-space and object-space
operations
Basically, the following two operations are
performed
– Surfaces are sorted in order of decreasing
depth
– Surfaces are scan-converted in order, starting
with the surface of greatest depth
The depth-sorting method is often also known
as the painter’s method

More Related Content

Similar to 7-Surface Detection Methods.ppt

Visible surface determination
Visible  surface determinationVisible  surface determination
Visible surface determinationPatel Punit
 
Hidden lines & surfaces
Hidden lines & surfacesHidden lines & surfaces
Hidden lines & surfacesAnkur Kumar
 
visual realism Unit iii
 visual realism Unit iii visual realism Unit iii
visual realism Unit iiiArun Prakash
 
Hidden surface removal
Hidden surface removalHidden surface removal
Hidden surface removalPunyajoy Saha
 
Visible surface identification
Visible surface identificationVisible surface identification
Visible surface identificationPooja Dixit
 
rural marketing ppt
rural marketing pptrural marketing ppt
rural marketing pptelaya1984
 
Visual surface detection i
Visual surface detection   iVisual surface detection   i
Visual surface detection ielaya1984
 
B. SC CSIT Computer Graphics Unit 4 By Tekendra Nath Yogi
B. SC CSIT Computer Graphics Unit 4 By Tekendra Nath YogiB. SC CSIT Computer Graphics Unit 4 By Tekendra Nath Yogi
B. SC CSIT Computer Graphics Unit 4 By Tekendra Nath YogiTekendra Nath Yogi
 
Ray casting algorithm by mhm
Ray casting algorithm by mhmRay casting algorithm by mhm
Ray casting algorithm by mhmMd Mosharof Hosen
 
Visible Surfacte Detection Methods - Z-Buffer and Scanline methods.pptx
Visible Surfacte Detection Methods - Z-Buffer and Scanline methods.pptxVisible Surfacte Detection Methods - Z-Buffer and Scanline methods.pptx
Visible Surfacte Detection Methods - Z-Buffer and Scanline methods.pptxJeoJoyA
 
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
 
Computer Graphics - Hidden Line Removal Algorithm
Computer Graphics - Hidden Line Removal AlgorithmComputer Graphics - Hidden Line Removal Algorithm
Computer Graphics - Hidden Line Removal AlgorithmJyotiraman De
 
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
 
De-convolution on Digital Images
De-convolution on Digital ImagesDe-convolution on Digital Images
De-convolution on Digital ImagesMd. Shohel Rana
 
TAO Fayan_X-Ray and MIP volume rendering
TAO Fayan_X-Ray and MIP volume renderingTAO Fayan_X-Ray and MIP volume rendering
TAO Fayan_X-Ray and MIP volume renderingFayan TAO
 

Similar to 7-Surface Detection Methods.ppt (20)

Visible surface determination
Visible  surface determinationVisible  surface determination
Visible surface determination
 
Hidden lines & surfaces
Hidden lines & surfacesHidden lines & surfaces
Hidden lines & surfaces
 
visual realism Unit iii
 visual realism Unit iii visual realism Unit iii
visual realism Unit iii
 
Hidden surface removal
Hidden surface removalHidden surface removal
Hidden surface removal
 
Visible surface identification
Visible surface identificationVisible surface identification
Visible surface identification
 
3 d
3 d3 d
3 d
 
rural marketing ppt
rural marketing pptrural marketing ppt
rural marketing ppt
 
Visual surface detection i
Visual surface detection   iVisual surface detection   i
Visual surface detection i
 
Unit 2 notes
Unit 2 notesUnit 2 notes
Unit 2 notes
 
B. SC CSIT Computer Graphics Unit 4 By Tekendra Nath Yogi
B. SC CSIT Computer Graphics Unit 4 By Tekendra Nath YogiB. SC CSIT Computer Graphics Unit 4 By Tekendra Nath Yogi
B. SC CSIT Computer Graphics Unit 4 By Tekendra Nath Yogi
 
Ray casting algorithm by mhm
Ray casting algorithm by mhmRay casting algorithm by mhm
Ray casting algorithm by mhm
 
Visible Surfacte Detection Methods - Z-Buffer and Scanline methods.pptx
Visible Surfacte Detection Methods - Z-Buffer and Scanline methods.pptxVisible Surfacte Detection Methods - Z-Buffer and Scanline methods.pptx
Visible Surfacte Detection Methods - Z-Buffer and Scanline methods.pptx
 
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
 
Computer Graphics - Hidden Line Removal Algorithm
Computer Graphics - Hidden Line Removal AlgorithmComputer Graphics - Hidden Line Removal Algorithm
Computer Graphics - Hidden Line Removal 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)
 
UNIT-V
UNIT-VUNIT-V
UNIT-V
 
3D Display
3D Display3D Display
3D Display
 
De-convolution on Digital Images
De-convolution on Digital ImagesDe-convolution on Digital Images
De-convolution on Digital Images
 
Hidden Surfaces
Hidden SurfacesHidden Surfaces
Hidden Surfaces
 
TAO Fayan_X-Ray and MIP volume rendering
TAO Fayan_X-Ray and MIP volume renderingTAO Fayan_X-Ray and MIP volume rendering
TAO Fayan_X-Ray and MIP volume rendering
 

Recently uploaded

CFO_SB_Career History_Multi Sector Experience
CFO_SB_Career History_Multi Sector ExperienceCFO_SB_Career History_Multi Sector Experience
CFO_SB_Career History_Multi Sector ExperienceSanjay Bokadia
 
Hot Call Girls |Delhi |Janakpuri ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Janakpuri ☎ 9711199171 Book Your One night StandHot Call Girls |Delhi |Janakpuri ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Janakpuri ☎ 9711199171 Book Your One night Standkumarajju5765
 
Vip Modals Call Girls (Delhi) Rohini 9711199171✔️ Full night Service for one...
Vip  Modals Call Girls (Delhi) Rohini 9711199171✔️ Full night Service for one...Vip  Modals Call Girls (Delhi) Rohini 9711199171✔️ Full night Service for one...
Vip Modals Call Girls (Delhi) Rohini 9711199171✔️ Full night Service for one...shivangimorya083
 
Dubai Call Girls Starlet O525547819 Call Girls Dubai Showen Dating
Dubai Call Girls Starlet O525547819 Call Girls Dubai Showen DatingDubai Call Girls Starlet O525547819 Call Girls Dubai Showen Dating
Dubai Call Girls Starlet O525547819 Call Girls Dubai Showen Datingkojalkojal131
 
CALL ON ➥8923113531 🔝Call Girls Nishatganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Nishatganj Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Nishatganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Nishatganj Lucknow best sexual serviceanilsa9823
 
reStartEvents 5:9 DC metro & Beyond V-Career Fair Employer Directory.pdf
reStartEvents 5:9 DC metro & Beyond V-Career Fair Employer Directory.pdfreStartEvents 5:9 DC metro & Beyond V-Career Fair Employer Directory.pdf
reStartEvents 5:9 DC metro & Beyond V-Career Fair Employer Directory.pdfKen Fuller
 
Motilal Oswal Gift City Fund PPT - Apr 2024.pptx
Motilal Oswal Gift City Fund PPT - Apr 2024.pptxMotilal Oswal Gift City Fund PPT - Apr 2024.pptx
Motilal Oswal Gift City Fund PPT - Apr 2024.pptxMaulikVasani1
 
Escorts Service Cambridge Layout ☎ 7737669865☎ Book Your One night Stand (Ba...
Escorts Service Cambridge Layout  ☎ 7737669865☎ Book Your One night Stand (Ba...Escorts Service Cambridge Layout  ☎ 7737669865☎ Book Your One night Stand (Ba...
Escorts Service Cambridge Layout ☎ 7737669865☎ Book Your One night Stand (Ba...amitlee9823
 
Top Rated Pune Call Girls Deccan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated  Pune Call Girls Deccan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...Top Rated  Pune Call Girls Deccan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated Pune Call Girls Deccan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...Call Girls in Nagpur High Profile
 
Presentation on Workplace Politics.ppt..
Presentation on Workplace Politics.ppt..Presentation on Workplace Politics.ppt..
Presentation on Workplace Politics.ppt..Masuk Ahmed
 
Resumes, Cover Letters, and Applying Online
Resumes, Cover Letters, and Applying OnlineResumes, Cover Letters, and Applying Online
Resumes, Cover Letters, and Applying OnlineBruce Bennett
 
Call Girls Bidadi ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Call Girls Bidadi ☎ 7737669865☎ Book Your One night Stand (Bangalore)Call Girls Bidadi ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Call Girls Bidadi ☎ 7737669865☎ Book Your One night Stand (Bangalore)amitlee9823
 
Call Girls Hosur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hosur Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hosur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hosur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangaloreamitlee9823
 
Call Girls Btm Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Btm Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...Call Girls Btm Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Btm Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...amitlee9823
 
Get To Know About "Lauren Prophet-Bryant''
Get To Know About "Lauren Prophet-Bryant''Get To Know About "Lauren Prophet-Bryant''
Get To Know About "Lauren Prophet-Bryant''Lauren Prophet-Bryant
 
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Sa...
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Sa...Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Sa...
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Sa...Pooja Nehwal
 
Virgin Call Girls Delhi Service-oriented sexy call girls ☞ 9899900591 ☜ Rita ...
Virgin Call Girls Delhi Service-oriented sexy call girls ☞ 9899900591 ☜ Rita ...Virgin Call Girls Delhi Service-oriented sexy call girls ☞ 9899900591 ☜ Rita ...
Virgin Call Girls Delhi Service-oriented sexy call girls ☞ 9899900591 ☜ Rita ...poojakaurpk09
 
WhatsApp 📞 8448380779 ✅Call Girls In Salarpur Sector 81 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Salarpur Sector 81 ( Noida)WhatsApp 📞 8448380779 ✅Call Girls In Salarpur Sector 81 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Salarpur Sector 81 ( Noida)Delhi Call girls
 
Dombivli Call Girls, 9892124323, Kharghar Call Girls, chembur Call Girls, Vas...
Dombivli Call Girls, 9892124323, Kharghar Call Girls, chembur Call Girls, Vas...Dombivli Call Girls, 9892124323, Kharghar Call Girls, chembur Call Girls, Vas...
Dombivli Call Girls, 9892124323, Kharghar Call Girls, chembur Call Girls, Vas...Pooja Nehwal
 

Recently uploaded (20)

CFO_SB_Career History_Multi Sector Experience
CFO_SB_Career History_Multi Sector ExperienceCFO_SB_Career History_Multi Sector Experience
CFO_SB_Career History_Multi Sector Experience
 
Hot Call Girls |Delhi |Janakpuri ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Janakpuri ☎ 9711199171 Book Your One night StandHot Call Girls |Delhi |Janakpuri ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Janakpuri ☎ 9711199171 Book Your One night Stand
 
Vip Modals Call Girls (Delhi) Rohini 9711199171✔️ Full night Service for one...
Vip  Modals Call Girls (Delhi) Rohini 9711199171✔️ Full night Service for one...Vip  Modals Call Girls (Delhi) Rohini 9711199171✔️ Full night Service for one...
Vip Modals Call Girls (Delhi) Rohini 9711199171✔️ Full night Service for one...
 
Dubai Call Girls Starlet O525547819 Call Girls Dubai Showen Dating
Dubai Call Girls Starlet O525547819 Call Girls Dubai Showen DatingDubai Call Girls Starlet O525547819 Call Girls Dubai Showen Dating
Dubai Call Girls Starlet O525547819 Call Girls Dubai Showen Dating
 
CALL ON ➥8923113531 🔝Call Girls Nishatganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Nishatganj Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Nishatganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Nishatganj Lucknow best sexual service
 
reStartEvents 5:9 DC metro & Beyond V-Career Fair Employer Directory.pdf
reStartEvents 5:9 DC metro & Beyond V-Career Fair Employer Directory.pdfreStartEvents 5:9 DC metro & Beyond V-Career Fair Employer Directory.pdf
reStartEvents 5:9 DC metro & Beyond V-Career Fair Employer Directory.pdf
 
Motilal Oswal Gift City Fund PPT - Apr 2024.pptx
Motilal Oswal Gift City Fund PPT - Apr 2024.pptxMotilal Oswal Gift City Fund PPT - Apr 2024.pptx
Motilal Oswal Gift City Fund PPT - Apr 2024.pptx
 
Escorts Service Cambridge Layout ☎ 7737669865☎ Book Your One night Stand (Ba...
Escorts Service Cambridge Layout  ☎ 7737669865☎ Book Your One night Stand (Ba...Escorts Service Cambridge Layout  ☎ 7737669865☎ Book Your One night Stand (Ba...
Escorts Service Cambridge Layout ☎ 7737669865☎ Book Your One night Stand (Ba...
 
Top Rated Pune Call Girls Deccan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated  Pune Call Girls Deccan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...Top Rated  Pune Call Girls Deccan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated Pune Call Girls Deccan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
 
Presentation on Workplace Politics.ppt..
Presentation on Workplace Politics.ppt..Presentation on Workplace Politics.ppt..
Presentation on Workplace Politics.ppt..
 
Resumes, Cover Letters, and Applying Online
Resumes, Cover Letters, and Applying OnlineResumes, Cover Letters, and Applying Online
Resumes, Cover Letters, and Applying Online
 
Sensual Moments: +91 9999965857 Independent Call Girls Paharganj Delhi {{ Mon...
Sensual Moments: +91 9999965857 Independent Call Girls Paharganj Delhi {{ Mon...Sensual Moments: +91 9999965857 Independent Call Girls Paharganj Delhi {{ Mon...
Sensual Moments: +91 9999965857 Independent Call Girls Paharganj Delhi {{ Mon...
 
Call Girls Bidadi ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Call Girls Bidadi ☎ 7737669865☎ Book Your One night Stand (Bangalore)Call Girls Bidadi ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Call Girls Bidadi ☎ 7737669865☎ Book Your One night Stand (Bangalore)
 
Call Girls Hosur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hosur Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hosur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hosur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
 
Call Girls Btm Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Btm Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...Call Girls Btm Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Btm Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
 
Get To Know About "Lauren Prophet-Bryant''
Get To Know About "Lauren Prophet-Bryant''Get To Know About "Lauren Prophet-Bryant''
Get To Know About "Lauren Prophet-Bryant''
 
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Sa...
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Sa...Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Sa...
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Sa...
 
Virgin Call Girls Delhi Service-oriented sexy call girls ☞ 9899900591 ☜ Rita ...
Virgin Call Girls Delhi Service-oriented sexy call girls ☞ 9899900591 ☜ Rita ...Virgin Call Girls Delhi Service-oriented sexy call girls ☞ 9899900591 ☜ Rita ...
Virgin Call Girls Delhi Service-oriented sexy call girls ☞ 9899900591 ☜ Rita ...
 
WhatsApp 📞 8448380779 ✅Call Girls In Salarpur Sector 81 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Salarpur Sector 81 ( Noida)WhatsApp 📞 8448380779 ✅Call Girls In Salarpur Sector 81 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Salarpur Sector 81 ( Noida)
 
Dombivli Call Girls, 9892124323, Kharghar Call Girls, chembur Call Girls, Vas...
Dombivli Call Girls, 9892124323, Kharghar Call Girls, chembur Call Girls, Vas...Dombivli Call Girls, 9892124323, Kharghar Call Girls, chembur Call Girls, Vas...
Dombivli Call Girls, 9892124323, Kharghar Call Girls, chembur Call Girls, Vas...
 

7-Surface Detection Methods.ppt

  • 1. CG 3/1/2023 LECTURE No. (7) Dr. Majid D. Y. dr.majid@uomosul.edu.iq Surface Detection Methods
  • 2. 2 of 20 Why? We must determine what is visible within a scene from a chosen viewing position For 3D worlds this is known as visible surface detection or hidden surface elimination
  • 3. 3 of 20 Two Main Approaches Visible surface detection algorithms are broadly classified as: – Object Space Methods: Compares objects and parts of objects to each other within the scene definition to determine which surfaces are visible – Image Space Methods: Visibility is decided point-by-point at each pixel position on the projection plane Image space methods are by far the more common
  • 4. 4 of 20 Back-Face Detection The simplest thing we can do is find the faces on the backs of polyhedra and discard them
  • 5. 5 of 20 Back-Face Detection Method • A fast and simple object-space method for identifying the back faces of a polyhedron is based on the "inside- outside" tests. A point (x, y, z) is "inside" a polygon surface with plane parameters A, B, C, and D if • When an inside point is along the line of sight to the surface, the polygon must be a back face (we are inside that face and cannot see the front of it from our viewing position). 0     D Cz By Ax D Cz By Ax S    
  • 6. 6 of 20 Back-Face Detection Method • We can simplify this test by considering the normal vector N to a polygon surface, which has Cartesian components (A, B, C). In general, if V is a vector in the viewing direction from the eye (or "camera") position, as shown in Fig, then this polygon is a back face if V.N>0
  • 7. 7 of 20 N calculation P1(X1,Y1,Z1) P2(X2,Y2,Z2) P3(X3,Y3,Z3) ) P - (P ) P - (P N 2 3 2 1                    2 3 2 3 2 3 2 1 2 1 2 1 N Z Z Y Y X X Z Z Y Y X X k j i k Y Y X X Y Y X X j Z Z X X Z Z X X i Z Z Y Y Z Z Y Y                                  2 3 2 3 2 1 2 1 2 3 2 3 2 1 2 1 2 3 2 3 2 1 2 1 N         2 3 2 1 2 3 2 1 A * N Y Y Z Z Z Z Y Y                2 3 2 1 2 3 2 1 B * N X X Z Z Z Z X X                2 3 2 1 2 3 2 1 C * N X X Y Y Y Y X X       
  • 8. 8 of 20 Back-Face Detection Method • Ensure we have a right handed system with the viewing direction along the negative z-axis Now we can simply say that if the z component (C) of the polygon’s normal is less than zero the surface cannot be seen V = (0, 0, Vz)  V.N=Vz.C so that we only need to consider the sign of C, the ; component of the normal vector N .
  • 9. 9 of 20 Back-Face Detection Method • In a right-handed viewing system with viewing direction along the negative z, axis, the polygon is a back face if C <= 0. • In a Left-handed viewing system with viewing direction along the positive z, axis, the polygon is a back face if C > 0.
  • 10. 10 of 20 Back-Face Detection (cont…) In general back-face detection can be expected to eliminate about half of the polygon surfaces in a scene from further visibility tests More complicated surfaces though scupper us! We need better techniques to handle these kind of situations
  • 11. 11 of 20 Depth-Buffer Method Compares surface depth values throughout a scene for each pixel position on the projection plane Usually applied to scenes only containing polygons As depth values can be computed easily, this tends to be very fast Also often called the z-buffer method
  • 13. 13 of 20 Depth-Buffer Algorithm 1. Initialise the depth buffer and frame buffer so that for all buffer positions (x, y) depthBuff(x, y) = 1.0 frameBuff(x, y) = Color
  • 14. 14 of 20 Depth-Buffer Algorithm (cont…) 2. Process each polygon in a scene, one at a time – For each projected (x, y) pixel position of a polygon, calculate the depth z (if not already known) – If z < depthBuff(x, y), compute the surface colour at that position and set depthBuff(x, y) = z frameBuff(x, y) = surfColour(x, y) After all surfaces are processed depthBuff and frameBuff will store correct values
  • 15. 15 of 20 A-Buffer Method The A-buffer method is an extension of the depth-buffer method The A-buffer method is visibility detection method developed at Lucasfilm Studios for the rendering system REYES (Renders Everything You Ever Saw)
  • 16. 16 of 20 A-Buffer Method (cont…) The A-buffer expands on the depth buffer method to allow transparencies The key data structure in the A-buffer is the accumulation buffer
  • 17. 17 of 20 A-Buffer Method (cont…) If depth is >= 0, then the surface data field stores the depth of that pixel position as before If depth < 0 then the data filed stores a pointer to a linked list of surface data
  • 18. 18 of 20 A-Buffer Method (cont…) Surface information in the A-buffer includes: – RGB intensity components – Opacity parameter – Depth – Percent of area coverage – Surface identifier – Other surface rendering parameters The algorithm proceeds just like the depth buffer algorithm The depth and opacity values are used to determine the final colour of a pixel
  • 19. 19 of 20 Scan-Line Method An image space method for identifying visible surfaces Computes and compares depth values along the various scan-lines for a scene
  • 20. 20 of 20 Depth-Sorting Method A visible surface detection method that uses both image-space and object-space operations Basically, the following two operations are performed – Surfaces are sorted in order of decreasing depth – Surfaces are scan-converted in order, starting with the surface of greatest depth The depth-sorting method is often also known as the painter’s method

Editor's Notes

  1. =
  2. =
  3. =
  4. =