How Zoink achieved FULLY dynamic lighting in their Unity game | Lost in Random

Unity
29 Oct 202111:01

Summary

TLDRThis transcript explores the challenges and creative solutions involved in lighting large, complex game levels. The team initially struggled with baked lighting but switched to dynamic lighting for more flexibility and better visual fidelity. Key performance optimizations included using shadow blocks to fake shadows, a custom light script to manage light distances, and replacing point lights with spotlights to reduce computational costs. The team creatively utilized ambient lighting to enhance dark areas, ensuring aesthetic appeal while maintaining performance. These techniques allowed the developers to balance technical constraints and artistic vision, providing valuable insights for other developers facing similar challenges.

Takeaways

  • 😀 The team initially tried baking all lighting in the game, but found it more effective in smaller, stylized levels like 'Ghost Train' due to memory and performance constraints.
  • 😀 Dynamic lighting was adopted over baked lighting to preserve the specular highlights, which are crucial to the game's art style, and to avoid the loss of detail in dark areas.
  • 😀 To optimize performance, the team turned off shadows for all environment meshes in the levels, replacing them with shadow proxies (cubes set to cast only shadows).
  • 😀 The shadow proxies simulate the shadows of the buildings and help to avoid rendering expensive shadows on individual meshes, improving performance without sacrificing visual fidelity.
  • 😀 A custom 'call light' script was created to manage lighting within specific distances, ensuring lights are only rendered when necessary to improve performance.
  • 😀 Instead of using point lights with shadows (which are expensive), spotlights were used, and point lights without shadows were added for extra visual effect where needed.
  • 😀 Lighting performance was also optimized for specific platforms like the Nintendo Switch by turning off unnecessary lights, allowing for better performance on lower-end hardware.
  • 😀 Ambient lighting, using a sky gradient, was employed to light the darker parts of the levels, with different colors for the top, middle, and bottom of meshes to create depth and artistic contrast.
  • 😀 The use of ambient lighting helped balance the darker areas in the game while keeping the art style intact, adding a painterly or stylized aesthetic to the levels.
  • 😀 Despite limitations, the team found creative ways to use lighting to guide the player and enhance the visual experience, proving that technical constraints can lead to artistic innovation.

Q & A

  • Why did the development team switch from baked lighting to dynamic lighting?

    -The team switched to dynamic lighting because baked lighting caused issues with texture memory usage, and specular highlights on meshes were lost in dark areas. Dynamic lighting allowed them to retain these highlights and maintain visual fidelity, especially in large and complex levels.

  • What problem did the team encounter with baked lighting on larger levels?

    -Baked lighting required huge texture sizes to maintain detail in dark areas, which was memory-intensive. Additionally, it caused specular highlights to disappear in shadows, reducing the quality of the visuals in those parts of the game.

  • How did the team address performance issues caused by dynamic lighting?

    -To improve performance, the team turned off shadows on environment meshes, which were typically costly to render. They replaced these with 'shadow blocks,' simple cubes set to 'shadows only,' which simulated shadows without rendering the cubes themselves.

  • What is a 'shadow block,' and how does it work in the game?

    -A shadow block is a simple cube placed in the environment to simulate shadows. It blocks light and generates shadow effects without rendering itself as a visible object in the scene, reducing the performance cost of dynamic shadows.

  • How did the team control the visibility of dynamic lights in the game?

    -The team used a custom 'call light script,' which dynamically loaded and unloaded lights based on the player's proximity. This ensured that only the necessary lights were rendered at any given time, optimizing performance.

  • Why did the team use spotlights instead of point lights?

    -Spotlights were used instead of point lights because point lights with shadows are performance-intensive. Spotlights offered similar visual effects without the heavy performance costs, and in some areas, point lights were used without shadows for additional visual flair.

  • What special consideration was given to lighting on the Nintendo Switch version of the game?

    -On the Switch version, the team turned off certain non-essential lights to improve performance. This ensured the game ran smoothly on the more limited hardware while still maintaining visual quality.

  • How did the team create an artistic lighting effect with the ambient lighting?

    -The team used a sky gradient as the ambient lighting, which illuminated different parts of the meshes (top, middle, bottom) based on their position. This helped create depth and visual interest in dark areas, enhancing the artistic feel of the environment.

  • What role did ambient lighting play in the game, especially in darker areas?

    -Ambient lighting played a critical role in illuminating shadowed parts of the level. By using the sky gradient, they added subtle light to meshes, making darker areas more readable while maintaining the mood of the environment.

  • How did technical limitations influence the visual style of the game?

    -Technical limitations, especially the need to optimize lighting for performance, actually contributed to the clean and focused aesthetic of the game. By limiting the number of lights and using them strategically, the team was able to create a more visually appealing and readable environment, especially on platforms like the Switch.

Outlines

plate

Dieser Bereich ist nur für Premium-Benutzer verfügbar. Bitte führen Sie ein Upgrade durch, um auf diesen Abschnitt zuzugreifen.

Upgrade durchführen

Mindmap

plate

Dieser Bereich ist nur für Premium-Benutzer verfügbar. Bitte führen Sie ein Upgrade durch, um auf diesen Abschnitt zuzugreifen.

Upgrade durchführen

Keywords

plate

Dieser Bereich ist nur für Premium-Benutzer verfügbar. Bitte führen Sie ein Upgrade durch, um auf diesen Abschnitt zuzugreifen.

Upgrade durchführen

Highlights

plate

Dieser Bereich ist nur für Premium-Benutzer verfügbar. Bitte führen Sie ein Upgrade durch, um auf diesen Abschnitt zuzugreifen.

Upgrade durchführen

Transcripts

plate

Dieser Bereich ist nur für Premium-Benutzer verfügbar. Bitte führen Sie ein Upgrade durch, um auf diesen Abschnitt zuzugreifen.

Upgrade durchführen
Rate This

5.0 / 5 (0 votes)

Ähnliche Tags
Game DesignLighting TechniquesPerformance OptimizationDynamic LightingShadow ProxyArt StyleVisual FidelityPerformance TuningGaming TechnologyLighting SystemsAmbient Lighting
Benötigen Sie eine Zusammenfassung auf Englisch?