Shri Ram Murti Smarak College of Engineering, Technology & Research, Bareilly
Unit-V Part 1:
Topic : Hidden Lines and Curves: Back
Face Detection
Subject Name: Computer Graphics
Subject Code: RCS-603
Presented By:
Sachin Kumar Saxena
Assistant Professor
CSE Department
SRMS College of Engineering,Technology &
Research,Bareilly
Unit- V – 2
sections
1. V Hidden Lines and Surfaces: Back Face Detection
algorithm, Depth buffer method, A- buffer
method, Scan line method
2. Basic illumination models– Ambient light, Diffuse
reflection, Specular reflection and Phong model,
Combined approach, Warn model, Intensity
Attenuation, Color consideration, Transparency
and Shadows.(, A- buffer method, Scan line
method
What are hidden surfaces?
When we view a picture containing non
transparent objects and surfaces, then we
can’t see those objects from view which are
behind from the objects closer to eye. We
must remove these hidden surfaces to get
realistic screen image. The identification &
removal of these surfaces is called the
Hidden- surface problem.
No Lines Removed
Hidden Lines Removed
Hidden Surfaces Removed
Visible Surface Detection
●
Visible surface detection or hidden
surface removal.
●
Realistic scenes: closer objects occludes
the others.
●
Classification:
– Object space methods
– Image space methods
Object Space Methods
●
Algorithms to determine which parts of the
shapes are to be rendered in 3D coordinates.
●
Methods based on comparison of objects for their
3D positions and dimensions with respect to a
viewing position.
●
Efficient for small number of objects but difficult
to implement.
●
Depth sorting, area subdivision methods.
Image Space Methods
●
Based on the pixels to be drawn on 2D. Try to
determine which object should contribute to
that pixel.
●
Running time complexity is the number of
pixels times number of objects.
●
Space complexity is two times the number of
pixels:
– One array of pixels for the frame buffer
– One array of pixels for the depth
●
Coherence
buffer properties of surfaces can be
●
used. Depth-buffer and ray casting methods.
Depth Cueing
●
Hidden surfaces are not removed but displayed
with different effects such as intensity, color, or
shadow for giving hint for third dimension of the
●
object.
Simplest solution: use different colors-
intensities based on the dimensions of the
shapes.
Hidden-surface elimination Or
Visible surface detection
• When we view a picture containing non-transparent
objects and surfaces, then we cannot see those
objects from view which are behind other objects.
• We must remove hidden surfaces to get a realistic
screen image.
• The identification and removal of these surfaces is
called Hidden- surface elimination or We need to
identify those parts of a screen that are visible from
a chosen viewing position. (Visible surface
detection)
Hidden-surface elimination Or
Visible surface detection
There are two
methods of it
1. Object-space
Methods
2. Image-space
Methods
Hidden-surface elimination Or
Visible surface detection
Object-space Methods
An object-space method compare objects and parts
of objects to each other within the scene definition
to determine which surfaces, as a whole, we should
label as visible.
Line display algorithms generally use object space
methods to identify visible lines in wireframe
displays.
Image-space Methods
• In an image space algorithm, visibility is decided
point by point at each pixel position on the
Back Face Detection algorithm
(Object Space 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
• Ax + By + Cz + D <0
• Where coefficients A, B, C, and D are constants
describing the spatial properties of the plane.
Back Face Detection algorithm
• We can simplify this test by
considering the normalvector 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,
then this polygon is a back face
if V.N > 0
Back Face Detection algorithm
• Furthermore, if object descriptions are converted to
projection coordinates and your viewing direction is
parallel to the viewing z- axis, then −
• V = (0, 0, Vz) and V.N = VZC
• So that we only need to consider the sign of C the
component of the normal vector N.
Back Face Detection algorithm
• In a right-handed viewing system with viewing
direction along the negative ZV axis, the polygon
is a back face if C < 0.
• Thus, in general, we can label any polygon as a back
face if its normal vector has a z component value −
C <= 0
Problem:
Given a scene and a
projection, what can we
see?
Two main types of algorithms:
Object space: Determine which part of the object are
visible. Also called as World Coordinates
Image space: Determine per pixel which point of an
object is visible. Also called as Screen Coordinates
Object space Image space
Two main Hidden Surface Removal
Algorithm Techniques:
Object space: Hidden Surface Removal for all
objects
Image space:
Objects: 3 D Clipping
Transformed to Screen Coordinates
Hidden Surface Removal
Any Query ?
www.sachinplacement.blogspot.com
or mail at
sachin.saxena@srms.ac.in