👾

Graphics Analysis of Lethal Company

Jul 21, 2024

Lecture Notes: Graphics Analysis of Lethal Company

Introduction

  • Lethal Company: A horror-comedy game praised for its unique visual style.
  • Key Insight: Nearly all shader effects used come prepackaged with the Unity engine.

Visual Analysis of Lethal Company

Key Visual Features Identified from Screenshot

  1. Dense Fog: Short distance from the camera fades into a homogeneous color.
    • Verified as volumetric lighting with God rays and spotlights.
  2. Light Surface Interactions: Appears either fully lit or fully in shadow, indicative of quantization.
  3. Edge Detection: Visible only close to the camera.
  4. Blurry Helmet: Likely post-processing effect.
  5. Low Resolution: Image is upscaled from a lower resolution (860x520).
  6. Bloom Effect: Evident on the rocks with bleed onto shadows.
  7. Color Corrections: Usual corrections like exposure and gamma are assumed.
  8. Skybox: Potentially sourced from Google Street View.

Deep Dive: Frame Capture

  • Frame Capture Tool: Captures all graphics API calls made by the game.
  • Unity Engine: Uses Unity's high-definition rendering pipeline (HDRP).
  • Performance Analysis: Lethal Company achieves high FPS by rendering at lower resolutions than native (860x520).

Rendering Techniques

Forward vs. Deferred Rendering

  • Forward Rendering: Lighting and coloring calculations are immediate.
  • Deferred Rendering: Information written to the g-buffer for post-processing lighting calculations.

Frame Analysis

  • Shadow Mapping and Volumetric Lighting: HDRP Shadow calculations are extensive (~8,000 API calls).
  • Render Order: Objects are drawn in view with inverted coordinates (flipped for viewing).
  • Deferred Lighting Pass: Corrects colors and adds volumetric fog for realism.
  • Post Processing: Stylization is applied after realistic rendering (posterization, edge detection).

Proprietary Shader Analysis

Posterization and Edge Detection

  • Posterization: Likely applied to volumetric lighting data, not color data.
  • Edge Detection: Multiple detections including color luminance and depth contrast.

Depth of Field

  • Helmet Visor Blurring: Uses Unity’s depth of field shader normally responsible for realistic camera focus.

Final Pass - Uber Post

  • Combination of Effects: Lens distortion, chromatic aberration, bloom, vignetting, color grading, post exposure, and gamma correction in one shader.
  • Effects Used by Lethal Company: Bloom, post-exposure adjustments, possible color grading for saturation.

Summary and Conclusion

  • Rendering Pipeline Recap:
    1. Scene drawn realistically.
    2. Atmospheric effects composited.
    3. Custom shaders for posterization and edge detection applied.
    4. Depth of field for visor blurriness.
    5. Final visual tweaks (bloom, color corrections).
    6. Upscaling for pixelated effect.
  • Key Takeaway: Lethal Company combines realistic rendering techniques with custom stylization, demonstrating that complex effects can yield unique visuals without proprietary technology.

Closing Remarks

  • Inspiration for indie developers to use available tools creatively for unique game visuals.