CG Module 6 - Visible Surface Detection Algorithm & Animation
CG Module 6 - Visible Surface Detection Algorithm & Animation
In the realistic graphics display, we have to identify those parts of a scene that
are visible from a chosen
viewing position. The various algorithms that are used for that are referred to
as Visible-surface detection methods or hidden-surface elimination
methods.
Back-face detection can identify all the hidden surfaces in a scene that
contain non-overlapping convex polyhedra.
Ax + By + Cz + D < 0
While determining whether a surface is back-face or front face, also consider
the viewing direction. The normal of the surface is given by :
N = (A, B, C)
A polygon is a back face if Vview.N > 0. But it should be kept in mind that after
application of the viewing transformation, viewer is looking down the negative
Z-axis. Therefore, a polygon is back face if :
Considering (a),
V.N = |V||N|Cos(angle)
if 0 <= angle 0 and V.N > 0
Hence, Back-face.
Considering (b),
V.N = |V||N|Cos(angle)
if 90 < angle <= 180, then
cos(angle) < 0 and V.N < 0
Hence, Front-face.
Limitations :
1) This method works fine for convex polyhedra, but not necessarily for
concave polyhedra.
2) This method can only be used on solid objects modeled as a polygon mesh.
Trivial cases are easily handled. Non trivial cases are divided into four equal
subwindows. The windows are again further subdivided using recursion until
all polygons classified trivial and non trivial.
Classification of Scheme
It divides or classifies polygons in four categories:
1. Inside surface
2. Outside surface
3. Overlapping surface
4. Surrounding surface
Algorithm :
As the z value i.e, the depth value at every place in the given
polygon is 3, on applying the algorithm, the result is:
Now, let’s change the z values. In the figure given below, the z
values goes from 0 to 3.
• Frame buffer
• Depth buffer
Calculation of depth :
As we know that the equation of the plane is :
ax + by + cz + d = 0, this implies
AX + BY + CZ + D = 0 implies
Z = (-AX - BY - D)/C ------------(1)
Let S1, S2, S3 are the surfaces. The surface closest to projection
plane is called visible surface. The computer would start
(arbitrarily) with surface 1 and put it’s value into the buffer. It
would do the same for the next surface. It would then check
each overlapping pixel and check to see which one is closer to
the viewer and then display the appropriate color. As at view-
plane position (x, y), surface S1 has the smallest depth from the
view plane, so it is visible at that position.
Points to remember :
1) Z buffer method does not require pre-sorting of polygons.
2) This method can be executed quickly even with many polygons.
3) This can be implemented in hardware to overcome the speed
problem.
4) No object to object comparison is required.
5) This method can be applied to non-polygonal objects.
6) Hardware implementation of this algorithm are available in some
graphics workstations.
7) The method is simple to use and does not require additional data
structure.
8) The z-value of a polygon can be calculated incrementally.
9) Cannot be applied on transparent surfaces i.e, it only deals with
opaque surfaces. For ex :
10) If only a few objects in the scene are to be rendered, then this
method is less attractive because of additional buffer and the overhead
involved in updating the buffer.
11) Wastage of time may occur because of drawing of hidden objects.
Traditional animation is a technique where each frame of an
animation is drawn by hand. This process is very time-consuming
and labor-intensive, but it can create beautiful and expressive
animation.
Traditional animation is a classic art form that has been used to create some
of the most beloved animated films of all time. Although computer
animation has become more popular in recent years, traditional animation
is still used today in some films and television shows.
O App
Q7) Describe Various Principles Of Traditional Animation
Animation is defined as a series of images rapidly changing to
create an illusion of movement. We replace the previous image
with a new image which is a little bit shifted. Animation Industry
is having a huge market nowadays. To make an efficacious
animation there are some principles to be followed.
Principle of Animation:
2) Anticipation:
Anticipation works on action.Animation has broadly divided into
3 phases:
1. Preparation phase
2. Movement phase
3. Finish
3. Arcs:
In Reality, humans and animals move in arcs.
Introducing the concept of arcs will increase the
realism. This principle of animation helps us to
implement the realism through projectile motion
also. For Example, The movement of the hand
of bowler comes under projectile motion while
doing bowling.
5. Appeal:
Animation should be appealing to the audience and
must be easy to understand. The syntax or font style
used should be easily understood and appealing to the
audience. Lack of symmetry and complicated design of
character should be avoided.
6. Timing: Velocity with which object is moving effects
animation a lot. The speed should be handled with care
in case of animation. For Example, An fast-moving
object can show an energetic person while a slow-
moving object can symbolize a lethargic person. The
number of frames used in a slowly moving object is less
as compared to the fast-moving object.
7. 3D Effect:
By giving 3D effects we can make our
animation more convincing and effective.
In 3D Effect, we convert our object in a 3-
dimensional plane i.e., X-Y-Z plane which
improves the realism of the object. For
Example, a square can give a 2D effect but
cube can give a 3D effect which appears
more realistic.
8. Exaggeration:
10.Secondary Action:
Secondary actions are more important than
primary action as they represent the animation as
a whole. Secondary actions support the primary
or main idea. For Example, A person drinking a
hot tea, then his facial expressions, movement of
hands, etc comes under the secondary actions.
11.Follow Through:
It refers to the action which continues to move
even after the completion of action. This type of
action helps in the generation of more idealistic
animations. For Example: Even after throwing a
ball, the movement of hands continues.
12.Overlap:
It deals with the nature in which before ending
the first action, the second action starts. For
Example: Consider a situation when we are
drinking Tea from the right hand and holding
a sandwich in the left hand. While drinking a
tea, our left-hand start showing movement
towards the mouth which shows the
interference of the second action before the
end of the first action.