Computer Graphics_Notes_Unit-VI
Computer Graphics_Notes_Unit-VI
Class: SE Div.: C
A. Y.: 2024-25
Course Notes
UNIT IV
Introduction to Animation and Gaming
Segment
Segments serve as the basic building blocks for representing graphical scenes, defined by two
endpoints specified by their (x, y) coordinates in a 2D Cartesian coordinate system. These segments can
be utilized to create a variety of shapes and objects depending on their length, curvature, and orientation.
To effectively view an entire image or specific parts of it, particularly when existing display file
structures are inadequate, the image information must be organized systematically. This is accomplished
by dividing the display file into segments, with each segment corresponding to a component of the image.
Each segment is associated with attributes and transformation parameters, such as scaling and rotation.
In computer graphics, a segment table is a data structure used to manage and store information
about different segments in a graphical scene. Each entry in the segment table typically corresponds to a
specific segment and contains various attributes associated with that segment. Here's a detailed
breakdown of what a segment table might include:
1. Segment ID: A unique identifier for each segment, often an integer or a string.
2. Endpoints: Coordinates defining the segment: Start Point (x1, y1): Coordinates of the starting
endpoint. End Point (x2, y2): Coordinates of the ending endpoint.
3. Attributes: Properties that define how the segment is rendered. Common attributes include:
Colour: The colour used to render the segment., Line Style: Style of the line (solid, dashed, dotted,
etc.). Thickness: The width of the line segment.
6. Associated Data: Any additional data related to the segment, such as: Parent Segment ID: If the
segment is part of a larger composite segment, this might link to that parent and Children Segment
IDs: If the segment is a composite that contains other segments.
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:
1. If any segment is open, give error message: “Segment is still open” and go to step 8.
3. If the segment name is not valid, give error message: “Segment name not a valid name” and go
to step 8.
4. If given segment name already exists, give error message: “Segment name already exists in name
list” and go to step 8.
5. Make next free storage area in display file as start of new segment.
6. Initialize size of new segment to 0 and all its attributes to their default values.
8. 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:
1. If any segment is not open, give error message: “No segment is open now” and go to step 6.
2. Change the name of currently opened segment to any unnamed segment, let’s say 0.
3. Delete any other unnamed segment instruction which may have been saved and initialize above
unnamed segment with no instructions.
4. Make the next free storage area available in display file as start of the unnamed segment.
6. 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.
Algorithm:
2. If segment name is not valid, give error message: “Segment name is not a valid name” and go to
step 8.
3. If the segment is open, give error message: “Can’t delete an open segment” and go to step 8.
5. The segments which follow the deleted segment are shifted by its size.
7. The starting position of shifted segments is adjusted by subtracting the size of deleted segment
from it.
8. 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:
1. If both old and new segment names are not valid, give error message: “Segment names are not
valid names” and go to step 6.
2. If any of two segments is open, give error message: “Segments are still open” and go to step 6.
3. If new segment name given already exists in the display list, give error message: “Segment name
already exists” and go to step 6.
4. The old segment table entry are copied into new position.
6. Stop.
Visibility:
Segment visibility in computer graphics refers to the ability to control whether specific segments of
a graphical scene are rendered or displayed to the user. Managing segment visibility is essential for
optimizing performance, enhancing user experience, and ensuring that only relevant information is
shown. 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.
Application of Segment Visibilty:
1. Drawing lines and curves: Segments are commonly used to represent lines and curves in 2D
graphics. By connecting two or more points with a series of line segments, you can create a variety
of shapes and objects, including geometric shapes, symbols, and illustrations.
2. Vector graphics: In vector graphics, segments are used to define the paths of shapes and objects.
By defining a series of interconnected segments, you can create complex curves and shapes that
can be resized and transformed without losing their clarity or resolution.
3. Computer-aided design (CAD): Segments are widely used in CAD applications to define the
edges and curves of 2D and 3D models. By connecting a series of segments together, you can
create complex shapes and objects that can be manipulated and transformed in a virtual
environment.
4. Animation: Segments are used extensively in animation to create smooth, fluid motion. By
defining a series of keyframes and connecting them with segments, you can create animations
that mimic the movement of real objects and characters.
5. Computer vision: Segments are often used in computer vision applications to identify and track
objects in real-time video. By defining a set of reference points on an object and tracking their
movement using segments, you can create a model of the object’s motion and use it to track it in
a video stream.
Animation:
In today’s visually-driven world, the concept of animation plays a significant role in capturing
our imagination. When people hear the term "animation," they often envision vibrant cartoons and
beloved Disney productions. It's no surprise that animated movies, such as those from Disney and shows
like "Doraemon," are immensely popular among children. These animated works consist of thousands of
individual images that are sequenced together to create the illusion of movement.
Looking back several decades, we can see that animation was traditionally created through hand-
drawn techniques or paintings. Early animations also involved puppet-like structures to convey
movement, representing a form of physical, real-world animation. In contrast, today’s technological
advancements have led to the rise of digital animation. A variety of sophisticated tools are now available,
allowing creators to build animated scenes more efficiently and within shorter time frames. Some of the
popular software for this purpose includes Blender 3D, Maya, and Cinema 4D.
Animation can be categorized into several distinct types based on its creation method. The most common
categories include:
2D Animation: This involves creating movement in a two-dimensional space, often using traditional
hand-drawn techniques or digital platforms.
3D Animation: This type utilizes three-dimensional models, providing depth and realism to characters
and scenes. etc
Conventional and computer-based animation:
Conventional animation is grounded in traditional artistic techniques and the principles of
animation. It emphasizes hand-drawn artistry, frame-by-frame progression, and the physical
manipulation of materials to create the illusion of motion. It contains Hand-Drawn Frames: Each frame
is meticulously hand-drawn, resulting in a unique and artistic look. Physical Medium: Traditional
animation typically uses materials like paper, pencils, and paints. Time-Consuming Process: Creating
each frame manually requires significant time and effort, as animators must draw thousands of images
for even short sequences. Frame Rate: Generally, 24 frames per second are needed for smooth motion,
which can amount to a considerable workload. Examples: Classic Disney films like "Snow White" and
"Cinderella.”, Stop-motion films like "The Nightmare Before Christmas."
Computer-based animation, often called digital animation, utilizes computer software and
technology to create animated sequences. In 2D Vector Animation technique uses mathematical
equations to create smooth lines and shapes, which can be easily manipulated. 3D Animation technique
involves creating 3D models and animating them in a virtual space, often using rigging (creating a
skeletal structure). Motion Capture technique captures the movements of real actors and translates them
into digital models, providing realistic animations. Examples: Pixar films like "Toy Story" and "Finding
Nemo.", Animated series like "Avatar: The Last Airbender," which employs a blend of 2D and 3D
techniques.
Concept Development: This is the initial stage where you decide what your animation will be about.
Storyboarding: Think of this as creating a comic strip. You sketch out the key scenes of your animation
to visualize how the story unfolds. Scriptwriting: Write down what characters will say or do in each
scene. This helps you keep track of the story and dialogue.
Character and Asset Design: This involves creating the characters and backgrounds for your animation.
Character Design: Draw your characters, thinking about their personality, appearance, and how they’ll
move. Create different views (like front, side, and back) to help you animate them later. Environment
Design: Design the places where your story happens. This includes backgrounds and props (like furniture
or tools your characters might use).
Animation Style and Technique: Decide how you want your animation to look and how you will create
it. Animation Style: Choose a style that fits your story. It could be 2D (like cartoons) or 3D (like Pixar
movies). Animation Techniques: Think about how you’ll animate your characters.
Timing and Motion This step focus on how fast actions happen and how characters move. Timing: Decide
how long each action will take. For example, a jump might take 1 second, while a walk might take longer.
Motion: Use techniques like easing, where movements start slow, speed up, and then slow down again.
This makes actions feel more natural.
Scene Layout and Composition: This is about arranging everything in each scene so it looks good and is
easy to understand. Composition: Think about where to place characters and objects in each scene. Use
the rule of thirds to make your shots more interesting. Camera Angles: Decide how to show the action.
A close-up can show emotion, while a wide shot can show the setting.
Animation Production: This is the actual creation of the animation. Animating: Use software like Blender
or Adobe Animate to create your animation. Start bringing your story to life by following your
storyboard. Layering: Work with layers to separate different elements (like characters and backgrounds).
This makes it easier to adjust things later. Sound Design: Add sound effects and music. This can enhance
the mood and make your animation more engaging.
Review and Refinement: This step is all about improving your animation. Feedback: Show your
animation to classmates or teachers and ask for their thoughts. They can help you spot areas that need
improvement. Revisions: Make changes based on feedback. You might need to adjust timing,
movements, or even the story.
Final Render and Export: This is the last step where you finalize your animation. Rendering: The
software processes your animation to create the final version. This includes adding effects and finalizing
colours. Exporting: Save your animation in a format suitable for where you want to show it (like on
YouTube, in a presentation, etc.)
Animation Languages:
Animation languages are specialized tools or coding frameworks designed to create animations,
widely used in multimedia applications, video games, and simulations. These languages allow developers
and animators to control how objects move and behave over time. Examples of such languages include:
Keyframe:
A keyframe is a pivotal frame in an animation sequence that marks the beginning or end of a
particular motion. Keyframes define crucial positions or movements of an object, while the frames
between these key moments are filled in automatically through a process called "tweening" to create
smooth transitions. For example, in an animation of a ball rolling across the screen, the keyframes would
specify the ball's location at the start and end, and the computer would generate the intermediate
positions.
Morphing:
Morphing is a technique where one image or shape is seamlessly transformed into another over
time. This transformation can include changes in shape, size, colour, or other features. It is frequently
used in 2D and 3D animations to show transitions, like a character’s face changing expression or one
object gradually turning into another.
Motion Specification:
Motion specification refers to the techniques used to describe how objects move in animations.
These techniques can include:
- Kinematics: Defining motion based on parameters like position, speed, and acceleration.
- Dynamic Simulation: Using physical forces like gravity or collisions to influence an object's
movement.
- Scripting and Procedural Animation: Writing code to dictate specific movement patterns, like
spinning or moving objects.
- Constraints: Restricting motion to specific directions or ranges, such as limiting movement to a
straight line or within a defined space.
Gaming:
Gaming refers to the act of playing video games, which are interactive digital experiences that
engage players through challenges, storytelling, problem-solving, and competition. Video games have
evolved from simple arcade games into highly sophisticated forms of entertainment across various genres
like action, strategy, sports, and role-playing games. Gaming today is not only a recreational activity but
also a professional industry with competitive esports, game development careers, and a dedicated
community of players.
Gaming Platforms:
A gaming platform is the hardware or software environment where games are played. There are various
platforms, each offering different capabilities for gaming performance, graphics, and user experiences.
Key platforms include:
• NVIDIA: NVIDIA is a leading manufacturer of graphics processing units (GPUs), which are
critical for rendering high-quality visuals in video games. Their GPUs, like the GeForce series,
power advanced gaming graphics, enabling smooth, immersive gameplay with technologies such
as real-time ray tracing, AI-powered image rendering, and high frame rates. NVIDIA also
supports cloud gaming through its GeForce NOW platform, which allows gamers to stream
games directly to devices without requiring high-end hardware.
• Intel i8060 (Intel Core i5): The Intel i8060, often referred to as Intel Core i5-8060, is a processor
that supports gaming by providing fast processing speeds, especially for CPU-intensive games.
While not as important as the GPU for graphics, the CPU plays a vital role in managing game
logic, physics simulations, AI behavior, and multitasking, such as running background
applications while gaming.
Advances in Gaming:
Gaming technology has rapidly advanced, with innovations enhancing the overall experience and
creating new possibilities for players and developers alike. Some key advances include:
• Virtual Reality (VR) and Augmented Reality (AR): VR headsets like the Oculus Rift and
PlayStation VR immerse players in a 360-degree interactive environment, while AR games like
Pokémon Go overlay digital elements in the real world, offering new forms of interactive play.
• Ray Tracing and Real-Time Graphics: Technologies like NVIDIA's real-time ray tracing enhance
realism by simulating how light interacts with objects in a game. This allows for lifelike
reflections, shadows, and lighting effects.
• Cloud Gaming: Platforms like NVIDIA's GeForce NOW, Google's Stadia, and Microsoft's Xbox
Cloud Gaming allow users to stream games directly to their devices, eliminating the need for
powerful hardware. This opens gaming to more players, as all processing is done in remote
servers.
• Cross-Platform Gaming: Advances in networking and game development have enabled cross-
platform play, allowing players on different consoles and systems (like PlayStation, Xbox, and
PC) to play together seamlessly in multiplayer games.
• Esports and Competitive Gaming: The rise of esports has turned gaming into a professional sport,
with players competing in global tournaments for massive prizes. This has led to the development
of gaming peripherals, specialized PCs, and networks designed for high-speed, low-latency
competitive gaming.