Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Methods
Visibility
Introduction
• A set of 3-D surfaces are to be projected onto
a 2-D screen.
• Hidden surface removal or Visible-surface
detection methods are used to identify those
parts of a scene that are visible from a chosen
viewing position.
• Correct visibility
– when multiple opaque polygons cover the same
screen space, only the closest one is visible.
• There are many algorithms developed and still
being developed for hidden surface removal.
• Deals with the projected images of the
objects and not directly with objects.
• Visibility is determined point by point at each
pixel position on the projection plane.
• It is a discrete method.
• Accuracy of the calculation is bounded by the
display resolution.
• A change of display resolution requires re-
calculation
Back face Removal
• Only those faces that are facing the camera (centre of projection) are
visible. The normal from a polygon face indicates the direction in which it
is facing. Thus face can be seen if some component of the normal N is
along the direction of projector ray P.
• The polygon normal of a …
front-facing polygon points towards the viewer
back-facing polygon points away from the viewer
back-facing
front-facing
Detecting Back-face Polygons
We can simplify test this by considering the normal vector N to a
polygon surface. In general, if V is a vector in the viewing
direction from the eye (camera) position, then this polygon is a
back face if
If (N V) ≤ 0 “front-face”
V = view vector
front
Depth-Buffer Method
(Z-Buffer Method)
• It compares the surface depths at each pixel
position on the projection plane.
• Object depth is usually measured from the view
plane along the z axis of a viewing system.
• Each surface of a scene is processed separately,
one point at a time across the surface.
• Sorting is done at the pixel level
Rule: Only draw a polygon at a pixel if it is closer
than a polygon that has already been drawn to this
pixel.
This method requires 2 buffers:
1) Depth buffer or z-buffer:
• To store the depth values for each (X, Y) position, as
surfaces are processed.
• 0 ≤ depth ≤ 1
2) Frame Buffer:
• To store the intensity value or Color value at each
position (X, Y).
DAM Entertainment
Z = 0.3
Z = 0.5
• Step 1: Initialize the depth buffer
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
• Step 2: Draw the polygon with depth 0.3
0 0 0 0
0 0 0 0
0.3 0.3 0 0
0.3 0.3 0 0
• Step 3: Draw the polygon with depth 0.5
0 0 0 0
0 0.5 0.5 0
0.3 0.3 0 0
Advantages
It is simple to implement.
It reduces the speed problem if implemented in hardware.
It processes one object at a time.
Disadvantages
It requires large memory (uses 2 buffers).
Database Structures for Graphics Modelling
Functions:
• To manipulate the data on screen, such as
zooming, panning.
• To interact with the user
• To edit the geometry
• To evaluate the properties like areas, volumes,
inertias etc.
• To provide additional information like
manufacturing specifications.
Database Structures for Graphics Modelling
The graphic data bases may contain graphical information such as point coordinates.
Alphanumerical information such as manufacturing requirements or some
procedural type.
Typical data that would normally be contained in drawing file is of two types:
Boundary Representation or B-rep: A solid is first broken into edges, which are
further broken into surfaces and vertices for completely defining the object.
Each vertex being indicated by means of its Cartesian coordinates X, Y, and
Z.
Relational database: When data is organized in a database it is required to
ensure the basic integrity of the data in terms of eliminating redundancy
and security problems while maintaining the standards and ease of use.
The most common form in which the graphical database is organized is in
terms of number of tables that are interlinked by relations.