Level of Detail (LOD)

This Godot 3.x add-on introduces Level of Detail (LOD) functionality for meshes, lights, and particles, significantly boosting performance in large scenes. It supports dynamic adjustments based on distance, enhancing visual quality and frame rates.

https://github.com/Calinou/godot-lod

Preview Image

Preview

Level of Detail (LOD) Add-on for Godot 3.x

This add-on provides Level of Detail (LOD) capabilities for meshes, lights, and particles within the Godot 3.x game engine. It's designed to substantially improve performance in expansive scenes by dynamically adjusting the detail level of objects based on their distance from the camera.

Key Features

  • Comprehensive LOD Support: Manages LOD for meshes, lights (OmniLight, SpotLight), and particles (Particles, CPUParticles).
  • Customizable LOD Distances: Each node can be configured with its own LOD distance properties. A global LOD bias project setting allows tweaking visual quality versus performance.
  • Smooth Transitions: Lights support smooth shadow and light fading with distance for less jarring transitions.
  • Renderer Compatibility: Works seamlessly with both GLES3 and GLES2 renderers.
  • Performance-Focused: Written in GDScript, optimized for performance, and scales well to hundreds or thousands of LOD instances.

Installation

The add-on can be installed either via the Asset Library or manually.

Asset Library Installation:

  1. Open the Godot editor.
  2. Navigate to the AssetLib tab.
  3. Search for "lod".
  4. Install the "Level of Detail (LOD)" plugin, keeping all files checked.
  5. Enable the plugin in Project Settings > Plugins.

Manual Installation:

  1. Clone the Git repository: git clone https://github.com/godot-extended-libraries/godot-lod.git
  2. Move the addons/ folder to your project folder.
  3. Enable the plugin in Project Settings > Plugins.

Usage

Detailed instructions are provided for using LOD with meshes, lights, and particles. The core concept involves creating LODSpatial, LODOmniLight, LODSpotLight, LODParticles, or LODCPUParticles nodes and configuring their properties accordingly. Remember to refer to TIPS.md for performance optimization tips.

Configuration

The add-on provides several project settings to customize behavior, including lod/spatial_bias, lod/light_bias, lod/particle_bias, lod/refresh_rate, and lod/light_refresh_rate. These settings allow fine-tuning the trade-off between visual quality and performance based on the target hardware.

Resource Details

tool

Hugo Locurcio



3