CG UNIT VI

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 39

Segment,

Animation and
Gaming
Unit 6
Introduction to segment
• To view an entire image or a part of image with various attributes, we need
to organize image information in a particular manner since existing structure
of display file does not satisfy our requirements of viewing an image.
• To achieve this display, file is divided into Segments. Each segment
corresponds to a component and is associated with a set of attributes and
image transformation parameters like scaling, rotation. Presence of Segment
allows :
• Subdivision of picture.
• Visualization of particular part of picture.
• Scaling, rotation and translation of picture.
Types of Segments :

• Posted Segment : When visible attribute of segment is


set to 1, it is called Posted segment. This is included in
active segment list.
• Unposted Segment : When visible attribute of segment
is set to 0, it is called Unposted segment. This is not
included in active segment list.
Functions for Segmenting the
display :
• Segment Creation : Segment must be created or opened when no other
segment is open, since two segments can’t be opened at the same time
because it’s difficult to assign drawing instruction to particular segment.
• The segment created must be given a name to identify it which must be
a valid one and there should be no segment with the same name.
• After this, we initialize items in segment table under our segment name
and the first instruction of this segment is allocated at next free storage
in display file and attributes of segments are initialized to default.
• Algorithm :
• If any segment is open, give error message : “Segment is still open” and go to step 8.
• Read the name of the new segment.
• If the segment name is not valid, give error message : “Segment name not a valid
name” and go to step 8.
• If given segment name already exists, give error message : “Segment name already
exists in name list” and go to step 8.
• Make next free storage area in display file as start of new segment.
• Initialize size of new segment to 0 and all its attributes to their default values.
• Inform that the new segment is now open.
• Stop.
• Closing a Segment : After completing entry of all display
file instructions, the segment needs to be closed for which
it has to be renamed, which is done by changing the name
of currently open segment as 0. Now the segment with
name 0 is open i.e. unnamed segment is open and if two
unnamed segments are present in display file one needs to
be deleted.
• Algorithm :
• If any segment is not open, give error message : “No segment is open now” and
go to step 6.
• Change the name of currently opened segment to any unnamed segment, lets say 0.
• Delete any other unnamed segment instruction which may have been saved and
initialize above unnamed segment with no instructions.
• Make the next free storage area available in display file as start of the unnamed
segment.
• Initialize size of unnamed segment to 0.
• Stop.
• Deleting a Segment : To delete a particular segment
from display file, we must just delete that one segment
without destroying or reforming the entire display and
recover space occupied by this segment. Use this space
for some other segment. The method to achieve this
depends upon the data structure used to represent display
file. In case of arrays, the gap left by deleted segment is
filled by shifting up all the segments following it.
• Algorithm :
• Read the name of the segment to be deleted.
• If segment name is not valid, give error message : “Segment name is not a valid name” and
go to step 8.
• If the segment is open, give error message : “Can’t delete an open segment” and go to step
8.
• If size of segment is less than 0, no processing is required and go to step 8.
• The segments which follow the deleted segment are shifted by its size.
• Recover deleted space by resetting index of next free instruction.
• The starting position of shifted segments is adjusted by subtracting the size of deleted segment
from it.
• Stop.
• Renaming a Segment : This is done to achieve Double Buffering i.e. the idea of
storing two images, one to show and other to create, alter and for animation.
Algorithm :
• If both old and new segment names are not valid, give error message : “Segment names are
not valid names” and go to step 6.
• If any of two segments is open, give error message : “Segments are still open” and go to step
6.
• If new segment name given already exists in the display list, give error message : “Segment
name already exists” and go to step 6.
• The old segment table entry are copied into new position.
• Delete the old segment.
• Stop.
• Advantages of using segmented display :
• Segmentation allows to organize display files in sub-picture
structure.
• It allows to apply different set of attributes to different portions
of image.
• It makes it easier to the picture by changing/replacing segments.
• It allows application of transformation on selective portions of
image.
Image transformation
• Transformation operations modify the object by changing its position,
scale or orientation.
• Translation, scaling and rotation are basic transformation operation.
• Image to be displayed on screen is stored in the display file so to
create an animation, image transformation operation are applied to
the content of display file.
• To translate the object, rotate and scale the object, we shall specify
translation vector, rotation angle and scaling vector respectively.
• For image transformation, we have to add transformation
parameters for each segment. Now the structure of the
segment table would be
Segme Segme Segme visibili Transl Transl Scale Scale Rotati
nt nt nt size ty ate ate X Y on
Name start X Y Theta

- - - - - - - - -
• Foe each frame of animation video, the segment table is
updated and appropriate transformation parameters are
set.
• For static objects in the scene, transformation parameters
will remain the same in subsequent frames.
Animation
• Animation refers to the movement on the screen of the display device
created by displaying a sequence of still images.
• Animation is the technique of designing, drawing, making layouts and
preparation of photographic series which are integrated into the
multimedia and gaming products.
• Animation connects the exploitation and management of still images to
generate the illusion of movement.
• A person who creates animations is called animator. He/she use various
computer technologies to capture the pictures and then to animate
these in the desired sequence.
• Animation is the movement on the screen of the display device.
• Animation means giving life to any object in graphics.
• It is created by displaying a sequence of still images.
• Animation is the technique of designing, drawing, making layout and
preparation of photographic series that are integrated to create a
multimedia and games.
• It connects the exploitation and the management of still images to
generate the illusion of movement.
• A person who creates the animation is called animator.
• Types of animation
• Conventional Animation : The conventional model has unlimited technology and
computing techniques.
• It is faster than computer animation for high quality.
• The complete control of drawing and motion in conventional animation.
• The conventional animation is limited by artistic ability.
• Computer Animation : In computer animation many frames can be calculated instead
of drawing.
• Many variations can be tried quickly in computer. The complex 3D models are easy to
draw in computer animation as in this don’t have to draw different views.
• In computer animation there are fewer tedious steps.
Design of animation sequences
• Layout of storyboard : it is an action layout that is used to
illustrate the motion sequences as a set of basic events
which are acquire place.
• It is an animation that selects the storyboard layout.
• Hence the story board layout comprises the set of rough
sketches.
Storyboard layout
• It is the outline of a action.
• Whatever we want to animated first we design a skeleton
or outline of texture.
• It defines the motion sequences as a set of basic that are
to take place.
• Depending on type of animation to be produced, the
storyboard could be consist of a set of rough sketches or it
could be list of basic ideas for motions.
Definition of object
• The definition of object is applied on all the participant
object in action. The object can be treated as fundamental
shapes or related to movement with shapes.
• Specification of key frame: it is detailed drawing of the
scene at an exact time in the animation sequence. In the
each key frame all objects are positioned according to
time for that frame.
• Each object participating in the action is given object
definition, such as terms of basic shapes, such as polygon
or splines.
keyframe
• It is one of the many single photographic images in a motion picture.
• The individual frames are separated by frame lines. Normally, 24 frames
are needed for one second of film.
• Keyframe in animation is drawing that defines the starting and ending
points of any smooth transition.
• The drawings are called frames because their position in time is measured
in frames on a strip of film.
• A sequence of keyframe define which movement the viewer will see,
whereas the position of the keyframes on the film, video, or animation
defines the timings of the movements.
Inbetweening or tweening
• Inbetweening is a creation of intermediate frames
between the key frames.
• We create a tween in a keyframe animation, to control
how objects will change over a sequence of frames .
• We can tween the object size, position, rotation or color.
• In the action several key frames are used at the extreme positions and other keys are
spaced. Hence the time interval of key frame is not great.
• More key frame are given for intricate motion than for easy and slowly varying motions.
• In between frames generation: The in-among frames are the frames are the middle
frame in key frames.
• Most of the among frames are based on the media that are utilized to display animation.
• Commonly the 24 frames are needed per second and graphic terminal are refreshed on
the rate of 30 to 60 frames per second .
• The time interval for the motion is set up and therefore 3 to 5 among for each pair of
key frames.
• Several key frames can be duplicated by identified the speed for motion.
• Animation languages : the animation sequences are handled with the set of animation routines.
• Following are some languages that are used as animation languages.
a) C
b) Lisp
c) Pascal
d) FORTRAN
Several animation languages have been developed. The animation functions are used as graphics
editor, key frame generator, in between generator and standard graphic routines.
The graphic editor is used to design and modify object shapes using spline surfaces, constructive
solid geometry methods or other representation.
Animation key framing in
graphics
• The changes in animation will be defined by key framing.
• In animation every frame is the key frame which is created frame b
frame.
• In 3D animation the exact position of the given object is not specify on
every single frame.
• For specifying this positions they create key frames. Key frame is
important for changing size, shape or the other properties of the object in
animation.
• The computer then search out all the in between frames and saves an
extreme amount of time for animator.
Animation morphing in graphics
• The transformation of the object from one form to another
form is called as morphing. It most complicated
transformation. It is shortened from the metamorphosis. It
looks like the two images are mixed into each other as
fluid mixes.
• In technical terms the images are distorted and fade
occurs between them.
• The morphing can be applied on any of the motion that
changes the shape.
Animation motion specification in
graphics.
• In animation the motion can be expressed in various terms.
• Direct motion specification :- It is a straight forward method to define a motion. In this rotation angles
and translation vectors are given explicitly. The matrices are used to translate the position of coordinates.
It is a simple method used by simple user programmed animation sequences.
• Goal Directed system:- The motion which describes the action in animation is defined by the goal directed
system.
• It specifies the motion parameters which given the goal of the animation. For example, if we want to move
an object from one position to destination we use goal directed system. The components motion will be
interpreted as a accomplished selected task in goal directed system.
• Kinematics and Dynamics :- Kinematics and the dynamics are also used to construct animation sequences.
• In kinematics the motion parameters positions, velocity and without references force which causes the
motion are specified. For constant velocity the motion of rigid bodies are designated by giving initial
position and velocity vector for each objects. In dynamics the specification of forces is required which
produces the velocities and acceleration.
Gaming in computer graphics
• The gaming is the part of applied mathematics that is used in social
science, economy biology, computer science and in philosophy.
• It is a design tool.
• It is represented as the mathematics of human interaction.
• It is a forma way to analyse interaction between agents who behave
strategically.
• It is used in conflict situation for making decision.
• Gaming Playform (NVIDIA, I8060)- The platform where users can play
game is known as gaming platform
NVIDIA
• NVIDIA GPUs implement a single instruction multiple thread (SIMT)
execution model (a hybrid of SIMD and SPMD execution models).
• CUDA kernels are implemented as a grid of concurrent thread blocks,
where each block can itself contain hundreds of concurrent SIMT threads.
• The thread blocks are scheduled across the different multiprocessor
units, while the threads within each block are time multiplexed in groups
of 32, termed warps, onto the 8-wide SIMT lanes within each
multiprocessor (shown in Fig).
• Each warp executes the same instruction across all 32 threads, using
predicated execution to implement branching within threads.
• Each SIMT thread has its own local register space and
shares a low-latency, on-chip 16 KB local scratchpad
memory with other threads in its thread block.
• All threads have access to the same global memory. There
are additional read-only memory spaces accessible, but
they are not used in this application and not described
here.
• The device main memory space is distinct from the host
GPP’s memory space, and can only be accessed from a
GPU-kernel or via the CUDA driver.
Advances in Gaming
• Following are advances in gaming
1. Facial recognition
2. Voice recognition
3. Gesture control
4. Amazing graphics
5. Virtual reality
6. High- def displays
7. Augmented reality
8. Mobile gaming
THANK YOU!!!!!!

You might also like