Linux Shell and File Management Explained
Here are the solutions for all the questions from Unit 1: 3D Graphics for Game
Design retrieved from your Game Development Question Bank. The responses are
structured with appropriate depth and length corresponding to their respective
marks (2 Marks, 5 Marks, and 7 Marks).
Unit 1: 3D Graphics for Game Design
2 Marks Questions (Concise & Direct)
1. Define 2D and 3D graphics in game design.
2D Graphics: Flat, two-dimensional visual representations utilizing X and Y
axes. Images are rendered using pixel grids (raster graphics) or vector shapes
(e.g., side-scrollers, platformers like Super Mario Bros.).
3D Graphics: Three-dimensional representations utilizing X , Y , and Z (depth)
axes. Objects are modeled as polygonal meshes in 3D space and projected
onto a 2D screen using cameras and lighting (e.g., GTA V, Elden Ring).
2. What are the primary differences between parallel and perspective
projection?
Feature Parallel (Orthographic) Perspective Projection
Projection
Object Size Object size remains constant Objects appear smaller as their
regardless of distance from the distance from the camera increases
camera. (foreshortening).
Parallel Parallel lines remain parallel Parallel lines converge at a distant
Lines after projection. vanishing point.
Feature Parallel (Orthographic) Perspective Projection
Projection
Application Tactical RPGs, isometric games, 3D first-person / third-person games
engineering UI. for realistic depth.
3. Name any two color models used in game design.
1. RGB (Red, Green, Blue): An additive color model primarily used for digital
displays, shader programming, and texture rendering.
2. HSV / HSB (Hue, Saturation, Value / Brightness): An intuitive color space used
in artist color pickers, UI design, and dynamic color adjustment effects (e.g.,
changing player shirt colors).
4. What is the purpose of a vertex shader?
A vertex shader is a programmable GPU pipeline stage that processes individual
vertices of a 3D mesh. Its primary purposes are:
Transforming vertex positions from local object space to world, view, and clip
space via transformation matrices (M V P matrix).
Calculating vertex attributes such as normals, tangents, color values, and UV
texture coordinates for downstream rendering stages.
5. Differentiate between keyframe animation and procedural
animation.
Keyframe Animation: Artists manually define specific pose frames
("keyframes") along a timeline, and software interpolates (tweens) the motion
in between.
Procedural Animation: Motion is generated dynamically in real time using
algorithms, physics equations, or inverse kinematics (IK) (e.g., ragdoll physics
or foot placement on uneven terrain).
5 Marks Questions (Detailed Explanations & Examples)
1. Explain the RGB and HSV color models with their applications in
game design.
RGB (Red, Green, Blue) Color Model
Concept: An additive color model where light intensities of Red, Green, and
Blue primary colors are combined (typically ranging from 0 to 255 or floating-
point values from 0.0 to 1.0).
White = (1.0, 1.0, 1.0), Black = (0.0, 0.0, 0.0)
Applications in Games:
1. Hardware Display: Directly maps to screen sub-pixels.
2. Texture Masks: Used in channel packing (e.g., Red channel = Metallic,
Green = Roughness, Blue = Ambient Occlusion) to optimize GPU memory.
3. Shader Operations: Vector arithmetic directly manipulates RGB channels
for color grading and screen tinting.
HSV (Hue, Saturation, Value) Color Model
Concept: Represents colors in a cylindrical coordinate system closer to human
perception:
Hue (0∘ − 360∘ ): The base color type (e.g., red, green, violet).
Saturation (0% − 100%): The purity or intensity of the color (vibrant vs.
desaturated gray).
Value / Brightness (0% − 100%): The lightness or darkness of the color.
Applications in Games:
1. Dynamic Character Customization: Allows players to smoothly adjust
hair, skin, or armor colors using a color wheel.
2. Environmental Mood Transitions: Smoothly shifting HSV saturation and
value creates day/night or weather transitions.
2. Describe the basic types of 3D transformations with examples.
3D transformations manipulate the position, orientation, and size of objects in 3D
space using 4 × 4 homogeneous coordinate matrices.
1. Translation (Position Shift)
Moves an object from one position to another along the X, Y , Z axes by
offsets (tx , ty , tz ).
x′ 1 0 0 tx x
y ′ 0 1 0 ty y
=
′
z 0 0 1 tz z
1 0 0 0 1 1
Game Example: Moving a character forward when pressing the 'W' key.
2. Scaling (Resizing)
Alters the size of an object relative to the origin by factors (sx , sy , sz ).
x′ sx 0 0 0 x
′
y 0 sy 0 0 y
=
z
′ 0
0
sz
0
z
1 0 0 0 1 1
Game Example: Growing a character power-up (e.g., Mushroom effect in Super
Mario).
3. Rotation (Orientation)
Rotates an object around a specified axis (X, Y , or Z ) by an angle θ.
Rotation around Z-axis:
x′ cos θ − sin θ 0 0 x
′
y sin θ cos θ 0 0 y
′ =
z 0 0 1 0 z
1 0 0 0 1 1
Game Example: Turning a vehicle steering wheel or rotating a camera around a
character.
3. Compare flat shading, Gouraud shading, and Phong shading
techniques.
Feature Flat Shading Gouraud Shading Phong Shading
Calculation Computed once Computed per vertex Computed per
Point per polygon/face using vertex normals; pixel (fragment) by
using a single colors interpolated interpolating
surface normal. across faces. normals across
pixels.
Visual Quality Low. Visible Medium. Smooth High. Smooth
polygonal facets; surfaces, but specular shading with crisp,
sharp blocky highlights are realistic specular
appearance. distorted/lost on large highlights.
polygons.
Computational Extremely low Moderate (GPU vertex Higher (GPU
Cost (fastest). shader heavy). fragment shader
heavy).
Best Used For Low-poly aesthetic Older mobile games, Modern 3D AAA
games (Unturned, low-end devices. games requiring
Superhot). realistic lighting.
4. What is texture mapping? How does it enhance 3D game visuals?
Definition of Texture Mapping
Texture mapping is the technique of mapping a 2D image (called a texture) onto the
surface of a 3D polygon mesh. It uses UV coordinates where U (horizontal) and V
(vertical) normalized values (0.0 to 1.0) correlate 2D pixel coordinates (texels) to 3D
mesh vertices.
How Texture Mapping Enhances 3D Game Visuals:
1. High Visual Detail without Geometric Complexity: Adds complex visual
patterns (brick walls, skin pores, fabric weaves) without increasing polygon
counts, maintaining high frame rates.
2. Surface Material Properties (PBR Workflow):
Diffuse / Albedo Map: Provides base surface colors.
Normal Map: Simulates fine surface bumps, depth, and scratches by
altering surface normal angles without extra geometry.
Roughness & Metallic Maps: Dictate how shiny or reflective different
parts of an object appear.
3. Realism and Context: Transforms plain geometric boxes into realistic crates,
buildings, or characters.
5. Explain the role of illumination models in creating realistic game
environments.
Illumination models (lighting models) calculate light intensity at surface points to
simulate interaction between light sources and physical materials.
Components of the Standard Phong Illumination Model:
Total Light = Iambient + Idiffuse + Ispecular
1. Ambient Light (Iambient ):
Simulates indirect, scattered background light in an environment.
Ensures non-lit shadow regions are not pitch black.
2. Diffuse Reflection (Idiffuse ):
Represents light scattered equally in all directions from rough/matte
surfaces.
Calculated using Lambert's Cosine Law: Id = IL ⋅ kd ⋅ (N ⋅ L), where
N is the surface normal and L is the light direction vector.
3. Specular Reflection (Ispecular ):
Simulates shiny highlights caused by light reflecting directly toward the
viewer's eye.
Calculated as: Is = IL ⋅ ks ⋅ (R ⋅ V)n , where V is the view vector and
n is surface shininess.
Role in Realism:
Establishes depth perception, surface orientation, and spatial hierarchy.
Communicates material types (e.g., distinguishing dull wood vs. reflective
chrome metal).
Sets environmental mood (e.g., warm golden sunset vs. gloomy damp
dungeon).
7 Marks Questions (Comprehensive & Structured)
1. Discuss different game genres with examples and their graphical
requirements.
Game genres dictate rendering priorities, camera structures, and technical
optimization requirements.
Game Genres & Graphical Demands
├── First-Person Shooters (FPS) --> High Frame Rate (60-144 FPS), Low L
├── Open-World Action RPGs --> High LOD, Dynamic Shadows, Atmosphe
├── Real-Time Strategy (RTS) --> High Instance Render Count, Particl
├── Racing / Simulation Games --> Real-time Reflections, Motion Blur,
└── Platformers & Indie Games --> Stylized Art Direction, Shader Effe
1. First-Person Shooters (FPS)
Examples: Call of Duty, Doom Eternal, Counter-Strike 2.
Graphical Requirements:
High Frame Rates & Low Latency: Minimum 60–144+ FPS for responsive
gunplay.
First-Person View Models: Extremely detailed mesh/texture resolution
for weapon models and hands held close to camera.
Particle & Post-Processing Effects: Realistic muzzle flashes, bullet
impacts, dynamic smoke, and screen space reflections (SSR).
2. Open-World Action / RPGs
Examples: The Witcher 3, Red Dead Redemption 2, Zelda: Tears of the
Kingdom.
Graphical Requirements:
Level of Detail (LOD) & Streaming: Seamless streaming of vast terrains
with aggressive LOD systems to render distant mountains smoothly.
Dynamic Weather & Time-of-Day: Dynamic global illumination (GI),
volumetric fog, and real-time shadow casting.
3. Real-Time Strategy (RTS)
Examples: StarCraft II, Age of Empires IV.
Graphical Requirements:
High On-Screen Entity Count: GPU instancing to render hundreds of
individual soldiers simultaneously.
Top-Down Orthographic/Perspective View: Optimized frustum culling
and simplified lighting shader models per unit.
4. Racing & Simulation
Examples: Forza Horizon, Gran Turismo.
Graphical Requirements:
High-Fidelity Reflections & Shaders: Cube maps or real-time Ray-Traced
Reflections (RTR) on car paint and glass.
Motion Blur & Speed Effects: Radial motion blur, bloom, and road shader
detail.
2. Explain the process of skeletal animation and its advantages in 3D
games.
Process of Skeletal Animation
Skeletal animation (Rigging and Skinning) is a technique where a 3D character
surface mesh is driven by an underlying hierarchical bone structure.
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ 1. Mesh Creation│ ───► │ 2. Skeleton │ ───► │ 3. Skinning & │ ───
│ (Polygonal) │ │ Rigging (Bones)│ │ Vertex Weights │
└─────────────────┘ └─────────────────┘ └─────────────────┘
1. Skeleton Hierarchy Creation (Rigging):
Artists construct an internal skeleton consisting of joints/bones arranged
in a tree hierarchy (e.g.,
Hips -> Spine -> Shoulder -> Arm -> Hand ).
Parent bone transformations automatically cascade down to child bones.
2. Binding / Skinning:
The outer 3D polygon mesh is attached ("skinned") to the skeleton.
3. Vertex Weighting:
Each vertex in the mesh is assigned influence weights (summing to 1.0)
from neighboring bones.
Example: An elbow vertex might be influenced 50% by the upper arm
bone and 50% by the lower arm bone for smooth bending.
4. Animation & Pose Evaluation:
Animators move bones using Forward Kinematics (FK) or Inverse
Kinematics (IK).
In real-time, the GPU evaluates vertex transformations using Linear Blend
Skinning (LBS):
n
v = ∑ wi ⋅ Mi ⋅ v
′
i=1
(where wi is bone weight and Mi is bone transformation matrix).
Advantages in 3D Games:
1. Extreme Memory Efficiency: Animation data stores only small 4 × 4 bone
matrices per frame instead of storing high-density vertex positions for every
frame.
2. Animation Reusability: A single set of animations (e.g., walk, run, jump) can be
shared across multiple character meshes sharing the same skeleton structure
(Mecanim / Retargeting).
3. Real-time Procedural Control: Supports runtime Inverse Kinematics (IK) for
adjusting feet to terrain slopes or aiming weapons toward dynamic targets.
3. Compare rasterization, ray tracing, and ray marching rendering
techniques.
1. Rasterization
Mechanism: Projects 3D mesh polygons onto the 2D camera viewport plane.
Individual pixels falling inside transformed triangles are converted into
fragments and shaded.
Performance: Extremely fast; real-time performance (60 − 240+ FPS)
handled natively by graphics card pipelines.
Limitations: Struggled with global light transport; reflections, ambient
occlusion, and soft shadows must be approximated using hacks (e.g., shadow
maps, screen space reflections).
2. Ray Tracing
Mechanism: Traces paths of light rays backwards from the camera pixel into
the 3D scene. When rays intersect objects, secondary rays (reflection,
refraction, shadow rays) are spawned to evaluate physics-accurate lighting.
Performance: Computationally expensive; requires specialized hardware
acceleration cores (e.g., NVIDIA RTX RT Cores).
Advantages: Produces photorealistic global illumination, soft shadows,
accurate glass refractions, and true inter-object reflections.
3. Ray Marching
Mechanism: Rather than analytically calculating exact ray-polygon
intersections, the algorithm steps ("marches") incrementally along a ray
direction using Signed Distance Functions (SDFs) until it reaches an object
surface boundary.
Performance: Medium to High cost depending on step count and scene
complexity.
Best Used For: Volumetric effects without explicit geometry, such as
volumetric clouds, dense fog, smoke, fire, and organic fractal procedural
shapes.
Comparison Summary Matrix:
Feature Rasterization Ray Tracing Ray Marching