bgrenat/godot-game-dev-studio/godot-3d-lighting
Claude Code and agent skill by bgrenat/godot-game-dev-studio
- community
Checking that the SKILL.md file is still in the repository.
Expert patterns for Godot 3D lighting including DirectionalLight3D shadow cascades, OmniLight3D attenuation, SpotLight3D projectors, VoxelGI vs SDFGI, and LightmapGI baking. Use when implementing realistic 3D lighting, shadow optimization, global illumination, or light probes. Trigger keywords: DirectionalLight3D, OmniLight3D, SpotLight3D, shadow_enabled, directional_shadow_mode, directional_shadow_split, omni_range, omni_attenuation, spot_range, spot_angle, VoxelGI, SDFGI, LightmapGI, ReflectionProbe, Environment, WorldEnvironment.
Install
npx vskill@latest install bgrenat/godot-game-dev-studio/godot-3d-lightingSKILL.md
The same SKILL.md was published earlier as bgrenat/godot-game-dev-studio/godot-3d-lighting.
3D Lighting
Expert guidance for realistic 3D lighting with shadows and global illumination.
NEVER Do
- NEVER use VoxelGI without setting a proper extents — Unbound VoxelGI tanks performance. Always set
sizeto tightly fit your scene. - NEVER enable shadows on every light — Each shadow-casting light is expensive. Use shadows sparingly: 1-2 DirectionalLights, ~3-5 OmniLights max.
- NEVER forget directional_shadow_mode — Default is ORTHOGONAL. For large outdoor scenes, use PARALLEL_4_SPLITS for better shadow quality at distance.
- NEVER use LightmapGI for fully dynamic scenes — Lightmaps are baked. Moving geometry won't receive updated lighting. Use VoxelGI or SDFGI instead.
- NEVER set omni_range too large — Light attenuation is quadratic. A range of 500 affects 785,000 sq units. Keep range as small as visually acceptable.
- NEVER hide a Light node using the Visible property to exclude it from a Lightmap bake — Hiding a light has no effect on the baker. You must change the light's Bake Mode to Disabled.
- NEVER use VoxelGI with paper-thin walls — VoxelGI evaluates lighting using a 3D grid. Thin walls (less than one voxel thick) will cause severe light leaking. Seal your geometry or place hidden thick MeshInstance3D blocks around the exterior.
- NEVER leave shadow bias at default for cascades — Default bias often causes Peter Panning or light leaking at split transitions. Tune bias per-light based on your scene's scale.
- NEVER bake LightmapGI without a Denoiser — Godot's baked lightmaps are noisy by default. Use OIDN or JNLM (in Project Settings) for professional results.
- NEVER use real-time SDFGI on Mobile/Compatibility renderers — It is a Forward+ exclusive feature. Use fake GI bounce lights for lower-end platforms.
- NEVER use 'Update Continuity' in ReflectionProbes for performance — Keep ReflectionProbes on 'Update Once' and trigger manual updates only when necessary.
Godot 4.7: AreaLight3D
- AreaLight3D provides rectangular area lights with soft shadows — prefer over emissive-material + GI workarounds for screens, glowing panels, and billboards.
- HDR output is supported on all major platforms; enable in Project Settings → Rendering → Viewport for true HDR display chain.
- NEVER use emissive-only fake panels when AreaLight3D gives correct falloff and shadow softness in Forward+.
Available Scripts
MANDATORY: Read the appropriate script before implementing the corresponding pattern.
day_night_cycle.gd
Dynamic sun position and color based on time-of-day. Handles DirectionalLight3D rotation, color temperature, and intensity curves. Use for outdoor day/night systems.
light_probe_manager.gd
VoxelGI and SDFGI management for global illumination setup.
lighting_manager.gd
Dynamic light pooling and LOD. Manages light culling and shadow toggling based on camera distance. Use for performance optimization with many lights.
volumetric_fx.gd
Volumetric fog and god ray configuration. Runtime fog density/color adjustments and light shaft setup. Use for atmospheric effects.
shadow_cascade_tuner.gd
Expert logic for adjusting DirectionalLight3D shadow split distances dynamically based on sun angle and camera tilt.
lightmap_bake_helper.gd
Advanced LightmapGI configuration pattern using Shadowmasking mode for hybrid static/dynamic shadowing.
sdfgi_probe_manager.gd
Dynamic quality scaler for real-time Global Illumination (SDFGI). Adjusts cell size and occlusion for performance/quality trade-offs.
volumetric_fog_zones.gd
Smoothly transitioning localized fog density for cave entrances or forest clearings using Tweens and Area3D triggers.
fake_gi_bounce.gd
Efficient 'Mobile-GI' pattern. Simulates light bouncing off the floor using non-shadowed directional fill lights.
environment_blender.gd
Architectural pattern for transitioning WorldEnvironment parameters (Sky, Ambient, Tonemap) during gameplay.
shadow_bias_tuner.gd
Optimization script for correcting 'Peter Panning' and 'Shadow Acne' on high-fidelity directional lights.
light_lod_optimizer.gd
Distance-based shadow and visibility culling for OmniLight3D nodes in dense environments.
reflection_probe_manager.gd
Performance-aware ReflectionProbe handling using manual 'Update Once' triggers for large environmental changes.
spotlight_projector_setup.gd
High-detail lighting using Projector textures to fake complex shadow patterns (grates, glass ripples).
DirectionalLight3D (Sun/Moon)
Shadow Cascades
Day/Night Cycle
OmniLight3D (Point Light)
Attenuation Tuning
Flickering Effect
SpotLight3D (Flashlight/Headlights)
Setup
Follow Camera
Global Illumination: VoxelGI vs SDFGI
Decision Matrix
| Feature | VoxelGI | SDFGI | |
|---|---|---|---|
| Setup | Manual bounds per room | Automatic, scene-wide | |
| Dynamic objects | Fully supported | Partially supported | |
| Performance | Moderate | Higher cost | |
| Use case | Indoor, small-medium scenes | Large outdoor scenes | |
| Godot version | 4.0+ | 4.0+ |
VoxelGI Setup
SDFGI Setup
LightmapGI (Baked Static Lighting)
When to Use
- Static architecture (buildings, dungeons)
- Mobile/low-end targets
- No dynamic geometry
Setup
Environment & Sky
HDR Skybox
Volumetric Fog
ReflectionProbe
For localized reflections (mirrors, shiny floors):
Performance Optimization
Light Budgets
Per-Light Shadow Distance
Edge Cases
Shadows Through Floors
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/godot-3d-lighting/SKILL.md
Popularity
- Repository stars
- 16
- Repository forks
- 2
- 7-day trend score
- 14
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/bgrenat/godot-game-dev-studio/godot-3d-lighting)