YEAR 13 DIGITAL TECHNOLOGY
  • Home
  • Web Design
    • Web Design Overview
    • Level 2 JS with HTML recap
    • Level 2 CSS Recap
    • Responsive Design
    • Javascript - Non-Core Functionality
    • Learn - Photoshop
    • User Experience Principles
    • AS91903 - Media Outcome >
      • Resources
  • Programming
    • Programming Overview
    • Recap Level 1
    • Recap Arrays
    • Recap Test: Game Organiser App
    • Objects & Classes in Javascript
    • Importing Text into Javascript
    • AS91906 - Brief
  • Electronics
    • Electronics Intro
    • New components
    • Mini project - clock setter
  • Databases
    • Recap - Microsoft Access
    • SQL - SELECT
    • SQL - INSERT/UPDATE/DELETE
    • SQL - JOIN
    • Forms & Advanced Queries
    • Open with main menu and DELETE
    • Documentation x7
    • Extra for experts >
      • Security Lockdown
    • AS91902 - Database
  • External
    • Computer Graphics >
      • Introduction
      • Bitmap and Vector Graphics
      • Matrices and Transformations
      • Line and Circle Algorithms
      • Image Rendering
      • Lighting
      • Texture Mapping
    • Pre-exam info
    • (Optional) Reflection
  • Freyberg Digital

Lighting, Lighting Effects, Shadows, and Reflections

Lighting

Lighting in computer graphics determines how light sources affect an object’s appearance, defining its color and brightness on a pixel grid. It uses models like ambient (uniform background light), diffuse (light scattering based on surface angle), and specular (shiny highlights on reflective surfaces).
Picture
Source: https://clara.io/
Ambient Lighting
​Ambient lighting represents uniform, non-directional light that illuminates all objects equally, simulating background light in a scene (e.g. a room’s overall glow). It ensures no part of a scene is completely dark, providing a baseline brightness without complex calculations. In rendering, it’s a simple constant added to pixel colors, used in both rasterization and ray tracing for efficiency. Ambient lighting affects texture appearance minimally but prevents unnatural darkness in bitmap displays, making it essential for balanced visuals.
Picture
Source: https://www.cs.uic.edu/
Diffuse Lighting
​Diffuse lighting models light scattering evenly across a surface, like sunlight hitting a matte wall. Its intensity depends on the angle between the light source and the surface’s normal (perpendicular direction), with brighter results when light hits directly. Calculated using Lambert’s cosine law, it adds realism by showing surface orientation. In rasterisation, diffuse lighting is computed per pixel for speed; in ray tracing, it’s more precise tracing rays to account for exact light angles and global illumination. Diffuse lighting enhances texture details (e.g. a textured brick surface) in bitmap rendering.
Picture
Source: https://www.cs.uic.edu/
Specular Lighting
​Specular lighting simulates shiny highlights on reflective surfaces, like a polished metal sphere, based on the light source, surface normal, and viewer’s position. It uses models like Phong shading, where intensity peaks when reflected light aligns with the viewer’s perspective. Ray tracing handles specular effects accurately by tracing reflected rays, while rasterisation approximates them for speed. Specular lighting makes textures appear glossy or metallic, adding depth to bitmap and vector-based scenes, especially in realistic rendering.
Picture
Source: https://media.springernature.com/

​Lighting Effects

Picture
Source: https://blog.demofox.org/
When we use and combine lighting in different ways we can get different effects that enhance our scenes to look more realistic (or just cooler).

Some examples of lighting effects include:
  • soft shadows - blurred edges from diffuse light
  • global illumination - light bouncing between surfaces, this can also cause colour bleed where surfaces tint nearby objects
  • caustics - focused light patterns, like through glass
  • ambient occlusion - soft shadowing in crevices where light is reduced

Ray tracing naturally produces these effects by simulating light paths, while rasterisation relies on approximations - using things like shadow maps - due to its focus on speed and performance.

Lighting effects make scenes more lifelike, impacting how textures and objects appear, and are key in making our scenes more realistic. Note: when talking about these in exams it is important to not only talk about video games (as many might be tempted to). These effects are used heavily in films, in fact if you look at the credits for a movie that uses a lot of CGI you will see that a fairly large percentage of the people employed on it were working on lighting/lighting effects.

​Shadows

Shadows occur when objects block light, creating darker areas in a scene (also real life lol). In graphics, they add depth and realism by showing light-source relationships.


Rasterisation uses techniques like shadow maps, which approximate shadows quickly by rendering depth from the light’s perspective. Shadow maps are less resource intensive but may lack precision and produce jagged edges.
​Ray tracing calculates accurate shadows by tracing light rays to detect obstructions, producing soft or hard edges based on light type.

​
​Shadows interact with textures and lighting, affecting bitmap rendering (e.g. pixel colour adjustments) and requiring careful computation to avoid artifacts in real-time displays. For example, shadow maps may need anti-aliasing techniques to smooth edges, while ray-traced shadows naturally capture subtle variations, enhancing texture appearance in complex scenes.
Picture
Source: https://fynv.github.io/
Picture
Using anti-aliasing to soften the edges of a shadow. Source: https://developer.download.nvidia.com

Reflections

Reflections simulate light bouncing off surfaces, like mirrors or glossy objects, adding realism to scenes. The type of reflection that we get is determined by the type of surface that the light is hitting.
  • Specular reflections - show mirrored images of other objects, examples of surfaces: polished flat mirrors and calm, still water.
  • Imperfect specular reflections - create shiny highlights and blurred or distorted reflections, for example: polished wood with varnish, slightly rippled water, and brushed stainless steel.
  • Diffuse reflections - might not look like reflections at all, due to the light scattering upon reflection due to surface roughness. Examples of surfaces: unpainted gib walls, clothing, stone/concrete, or paper/cardboard.
​
Ray tracing accurately simulates specular and imperfect specular reflections by tracing light rays, capturing details like distorted reflections in glass, while rasterisation uses environment maps—precomputed textures—for faster but less precise reflections in real-time applications like games. This trade-off between realism and performance shapes how reflections enhance visuals in films and interactive media.
Picture
Source: https://micro.magnet.fsu.edu/
< Image rendering
Texture mapping >
Powered by Create your own unique website with customizable templates.
  • Home
  • Web Design
    • Web Design Overview
    • Level 2 JS with HTML recap
    • Level 2 CSS Recap
    • Responsive Design
    • Javascript - Non-Core Functionality
    • Learn - Photoshop
    • User Experience Principles
    • AS91903 - Media Outcome >
      • Resources
  • Programming
    • Programming Overview
    • Recap Level 1
    • Recap Arrays
    • Recap Test: Game Organiser App
    • Objects & Classes in Javascript
    • Importing Text into Javascript
    • AS91906 - Brief
  • Electronics
    • Electronics Intro
    • New components
    • Mini project - clock setter
  • Databases
    • Recap - Microsoft Access
    • SQL - SELECT
    • SQL - INSERT/UPDATE/DELETE
    • SQL - JOIN
    • Forms & Advanced Queries
    • Open with main menu and DELETE
    • Documentation x7
    • Extra for experts >
      • Security Lockdown
    • AS91902 - Database
  • External
    • Computer Graphics >
      • Introduction
      • Bitmap and Vector Graphics
      • Matrices and Transformations
      • Line and Circle Algorithms
      • Image Rendering
      • Lighting
      • Texture Mapping
    • Pre-exam info
    • (Optional) Reflection
  • Freyberg Digital