Professional Documents
Culture Documents
Unit IV Visual Realism
Unit IV Visual Realism
4
Hidden – Line - Surface - Solid removal algorithms
shading – coloring. Introduction to parametric and
variational geometry based software’s and their
principles creation of prismatic and lofted parts using
these packages.
REALISM IN 3D GRAPHICS
Many computer graphics applications involve the display of 3D
objects.
5
UNIT
4
Hidden – Line - Surface - Solid removal algorithms
shading – coloring. Introduction to parametric and
variational geometry based software’s and their
principles creation of prismatic and lofted parts using
these packages.
Hidden Line Removal
Techniques used:
Then checks for the intersection for any two boxes in both X and Y
directions.
8
Minimax test for typical polygon and edges
9
Containment Test (Surroundedness)
The containment test checks whether a given point lies inside a given
polygon.
Draw a line from the point, is intersected with the polygon edges.
10
Computing Silhouettes
A set of edges that separates visible faces from invisible faces
of an object with respect to a given viewing direction is called
silhouette edges or silhouettes.
11
Hidden Line Removal Algorithm- Three Approaches
2. Silhouette approach
Testing all the edges against all the silhouette edges only.
• F1 is intersected with the other faces in the list, that is, F 2-F6.
4
Hidden – Line - Surface - Solid removal algorithms
shading – coloring. Introduction to parametric and
variational geometry based software’s and their
principles creation of prismatic and lofted parts using
these packages.
Hidden surface removal
• Drawing polygonal faces on screen
consumes CPU cycles
– Illumination
• We cannot see every surface in
scene
– We don’t want to waste time rendering
primitives which don’t contribute to
the final image.
Visibility (hidden surface
removal)
• A correct rendering requires correct visibility
calculations
• Correct visibility
– when multiple opaque polygons cover the same
screen space, only the closest one is visible
(remove the other hidden surfaces)
Z- buffer algorithm
This is also known as the depth buffer algorithm.
z values can be stored for each pixel in the frame buffer.
For each polygon in the scene, find all the pixels (x,y) that lie
inside or on the boundaries of the polygon when projected onto
the screen.
For each of theses pixels, calculate the depth z of the polygon at
(x,y).
If z > depth (x,y), the polygon is closer to the viewing eye than
others already stored in the pixel.
Z-Buffer Algorithm
yv S
S
S’
S’
xv xv
display
zv
Depth-Sorting Algorithm
yv S
S
S’
S’
xv xv
display
zv
Depth-Sorting Algorithm
yv S
S
S’
S’
xv xv
display
zv
Depth-Sorting Algorithm
yv S
S’
S
S’
xv xv
display
zv
Depth-Sorting Algorithm
S’
S S’’
xv
display
zv
UNIT
4
Hidden – Line - Surface - Solid removal
algorithms - shading – coloring. Introduction to
parametric and variational geometry based software’s
and their principles creation of prismatic and lofted
parts using these packages.
Hidden Solid Removal
In the hidden solid removal, display of solid models with hidden lines
or surfaces removed.
First, the ray/primitive intersection points from left and right subtrees
are merged , forming a segmented ray.
4
Hidden – Line - Surface - Solid removal algorithms –
shading – coloring. Introduction to parametric and
variational geometry based software’s and their
principles creation of prismatic and lofted parts using
these packages.
Shading
Line drawings are limited in their ability to represent complex shapes.
Hence we adopt shaded images.
Shaded images can also convey features other than shape such as
surface finish or material type (plastic or metallic look).
Shading process must take into account the position and color of the
light sources and the position, orientation and surface properties of
the visible objects.
Shading models simulate the way
visible surfaces of objects reflect
light.
Shiny surface appears depend on the directions of the light source and
the viewing eye.
Shading Surfaces
Assumptions are:
The object is modeled using plane polygonal surfaces only.
Vertex normal
12 bit of colour output for shading
Phong Shading:
Phong Shading overcomes all the problems
of Gourand Shading, although it requires
more computational time.
4
Hidden – Line - Surface - Solid removal algorithms –
shading – coloring. Introduction to parametric and
variational geometry based software’s and their
principles creation of prismatic and lofted parts using
these packages.
Coloring
Color is one of the two main ingredients (the second one being texture) of
shaded images produced by shading algorithms.
Pure spectral colors are fully saturated and grays are de-
saturated colors.
These models are based on the red, green, and blue (RGB).
For all the models, coordinates are translated into three voltage values in
order to control the display.
The CMY is considered a subtractive model because the model primary colors
subtract some color from white light.
For example, a red color is obtained by subtracting a cyan color from white light
(instead of adding magenta and yellow).
The unit column vector represents white in the RGB model or black in the
CMY model.
CMY Model
It was designed to be compatible with black and white television broadcasts.
The Y axis of the color model corresponds to the luminance (the total amount of
light).
The conversion from YIQ coordinates to RGB coordinates is defined by the following
equation:
= +
HSV (hue, saturated, value) Model
This color model is user oriented because it is based in what artists use to
produce colors (hue, saturation, and value).
It is contrary to the RGB, CMY and YIQ models which are hardware oriented.
The model approximates the perceptual properties of hue, saturation, and value.
The hue value H (range from 0⁰ to 360⁰) defines the angle of any point on or
inside the single hexacone.