📘 Lighting in Computer Graphics — Exam Notes
🔹 1. Introduction
Lighting in computer graphics refers to the process of simulating how light interacts with objects to produce realistic images.
👉 It determines how bright, dark, or colored a surface appears in a scene.
🔹 2. Why Lighting is Important?
- Makes objects look realistic
- Helps in understanding shape and depth
- Enhances visual quality
- Used in games, animation, VR, CAD
🔹 3. Basic Lighting Concept
Lighting depends on:
- Light Source
- Object Surface
- Viewer Position
- Material properties
🔹 4. Types of Light Sources
✔️ 4.1 Ambient Light
- General background light
- No specific direction
- Illuminates all objects equally
👉 Example: Light in a room without direct sunlight
✔️ 4.2 Point Light Source
- Light comes from a single point
- Spreads in all directions
👉 Example: Bulb, candle
✔️ 4.3 Directional Light
- Light rays are parallel
- Comes from a very far source
👉 Example: Sunlight
✔️ 4.4 Spot Light
- Light focused in a cone shape
- Has direction and limited area
👉 Example: Torchlight, stage light
🔹 5. Lighting Reflection Model
Lighting is calculated using three main components:
🔸 5.1 Ambient Reflection
✔️ Concept
- Base light present everywhere
✔️ Formula:
[
I_a = k_a \cdot I_l
]
Where:
- (k_a) = ambient reflection coefficient
- (I_l) = light intensity
🔸 5.2 Diffuse Reflection (Lambertian Reflection)
✔️ Concept
- Light scattered evenly from rough surfaces
- Depends on angle of light
✔️ Formula:
[
I_d = k_d \cdot I_l \cdot \cos\theta
]
Where:
- (k_d) = diffuse coefficient
- (\theta) = angle between light and surface normal
✔️ Key Idea
- Maximum brightness when light hits directly
🔸 5.3 Specular Reflection
✔️ Concept
- Produces shiny highlights
- Depends on viewer position
✔️ Formula:
[
I_s = k_s \cdot I_l \cdot (\cos\alpha)^n
]
Where:
- (k_s) = specular coefficient
- (\alpha) = angle between reflection and viewer
- (n) = shininess factor
🔹 6. Phong Illumination Model (Very Important)
✔️ Total Light Intensity:
[
I = I_a + I_d + I_s
]
Where:
- (I_a) = ambient
- (I_d) = diffuse
- (I_s) = specular
🔹 7. Gouraud vs Phong Shading
✔️ Gouraud Shading
- Lighting calculated at vertices
- Interpolated across surface
👉 Fast but less accurate
✔️ Phong Shading
- Lighting calculated at each pixel
- More realistic highlights
👉 More accurate but slower
🔹 8. Surface Normal (Very Important)
✔️ Definition
A normal vector is perpendicular to a surface.
✔️ Use in Lighting
- Determines angle of light
- Used in diffuse and specular calculations
🔹 9. Light Interaction with Material
✔️ Material Properties:
- Ambient reflection coefficient (ka)
- Diffuse coefficient (kd)
- Specular coefficient (ks)
- Shininess (n)
🔹 10. Attenuation (Light Reduction)
✔️ Concept
Light intensity decreases with distance.
✔️ Formula:
[
I = \frac{I_0}{a + bd + cd^2}
]
Where:
- (d) = distance
- (a, b, c) = attenuation constants
🔹 11. Diagram Descriptions
✔️ Light Reflection Diagram
-
Show:
- Light ray hitting surface
- Normal vector
- Reflected ray
✔️ Types of Light Sources
- Draw bulb (point light)
- Sun rays (directional)
- Torch (spotlight cone)
🔹 12. Applications
- Video games
- Animation movies
- Virtual reality
- Medical visualization
- CAD systems
🔹 13. Advantages
- Realistic images
- Better depth perception
- Improves visual quality
🔹 14. Limitations
- High computational cost
- Complex calculations
- Requires powerful hardware
📝 Likely Exam Questions
- Define lighting in computer graphics.
- Explain different types of light sources.
- What is ambient, diffuse, and specular reflection?
- Write Phong illumination model equation.
- Differentiate Gouraud and Phong shading.
- What is a surface normal?
- Explain attenuation of light.
- Describe how light interacts with materials.
- Draw and explain specular reflection.
- Why is lighting important in graphics?
⚡ Quick Revision Summary
-
Lighting = simulation of light in graphics
-
Types of light:
- Ambient
- Point
- Directional
- Spot
-
Reflection components:
- Ambient (background)
- Diffuse (matte surface)
- Specular (shiny highlight)
-
Total model:
[
I = I_a + I_d + I_s
]
-
Phong model = most important lighting model
-
Used in games, animation, VR