Lighting u0026 Shadows in Game Engines Quiz Quiz

Explore foundational concepts and best practices for managing lighting and shadows in game development environments. This quiz covers light types, shadow mapping, performance trade-offs, dynamic versus static lighting, and common pitfalls in rendering accurate shadows.

  1. Question 1

    Which type of light is best suited for simulating sunlight in an outdoor scene within a game engine?

    1. Directional Light
    2. Area Light
    3. Point Light
    4. Spot Light

    Explanation: Directional lights simulate light coming from a specific direction at an infinite distance, making them ideal for creating sunlight in outdoor scenes. Spot lights project light in a cone shape and are more suited for effects like flashlights. Point lights emit light equally in all directions from a single point, similar to a light bulb. Area lights illuminate from a flat surface area, often used for soft indoor lighting effects rather than simulating the sun.

  2. Question 2

    In game engines, which shadow technique is commonly used for real-time rendering due to its balance of quality and performance?

    1. Shadow Mapping
    2. Blob Shadows
    3. Ray Traced Shadows
    4. Hard Shadows Only

    Explanation: Shadow mapping is widely used in real-time rendering because it efficiently provides convincing shadows with moderate performance cost. Ray traced shadows offer higher accuracy but at much greater computational expense, making them less suitable for real-time use in most cases. Hard shadows only ignore soft edge transitions, resulting in unnatural results. Blob shadows are a simple, low-quality technique that cannot accurately replicate object contours or depth.

  3. Question 3

    Why might casting shadows from every dynamic object in a complex scene cause performance issues in a game engine?

    1. It raises the polygon count unnecessarily
    2. It increases sound calculation overhead
    3. It demands more processor and graphics resources
    4. It strains the lighting hardware

    Explanation: Enabling shadow casting for every dynamic object increases the computational load on both the processor and graphics resources, potentially lowering frame rates. It does not affect audio or sound calculations. Though lighting calculations can stress hardware, the main impact is due to the amount of data processed rather than the lighting hardware itself. The polygon count may influence performance, but shadow casting affects rendering overhead independently of polygon quantity.

  4. Question 4

    When should a developer use baked (precomputed) lighting instead of real-time dynamic lighting in a scene?

    1. When lighting needs to be adjusted by the player
    2. When all objects are moving constantly
    3. When lights and geometry rarely change
    4. When seeking the lowest shadow resolution

    Explanation: Baked lighting is ideal when both the lights and scene geometry remain static, as it allows for higher visual quality with less runtime cost. If all objects are moving, dynamic lighting is required for accurate results. Baked lighting is not about reducing shadow resolution but about achieving detailed lighting effects efficiently. It also cannot be adjusted interactively by the player without recalculating the baked data.

  5. Question 5

    A character in a game stands under a tree and their shadow appears detached or floating. What is a likely technical cause of this artifact?

    1. Excessive camera motion blur
    2. Wrong texture filtering type
    3. Use of an emissive material
    4. Incorrect shadow bias setting

    Explanation: An incorrect shadow bias can make shadows look detached, floating, or disconnected from objects due to how depth values are offset to fight shadow acne. Excessive camera motion blur affects image clarity but does not cause shadow detachment. Texture filtering issues may cause blurriness at shadow edges but not detachment. Emissive materials control light emission but are unrelated to shadow artifacts like floating shadows.