godotengine / godotengine/godot

VoxelGI doesn't render if a LightmapGI's data is loaded

Open
#97,393 4 comments 1 reaction 0 assignees View on GitHub
bug confirmed documentation topic:3d topic:rendering
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

- Reproducible in v4.3.stable.official [77dcf97d8]

### System information

- Windows 10.0.22621 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3050 Laptop GPU (NVIDIA; 32.0.15.5599) - 12th Gen Intel(R) Core(TM) i5-12500H (16 Threads)

### Issue description

## Expected Behavior

If a LightmapGI node and a VoxelGI node exist, making one visible and one invisible will render just the GI style of the visible node. Lowest in the scene tree order has priority in rendering.

## Observed Behavior

If a LightmapGI node and a VoxelGI node exist, and LightmapGI has light data loaded, under no circumstances the VoxelGI node will affect the lighting. Turning the LightmapGI node invisible will make Godot think **neither** exist, even if VoxelGi is visible and has baked data.

If a LightmapGI node and a VoxelGI node exist, BUT LightmapGI has no light data loaded, the VoxelGI correctly affects the lighting if it's visible.

## Use-case and Possible Workaround

I want to have both a VoxelGI and LightmapGI set-up and ready for different target platforms / graphical settings, choosing which is visible on scene load, and otherwise easily previewing both in the editor by making them visible/invisible, including test runs.

However, as the existance of a loaded LightmapGI invalidates VoxelGI completely, to swap between the two looks in the editor I either need to keep clearing the light data field or removing the lightmap node completely, which means I'd have to add them back later which is not quick. In the actual game I'd just use scripts to control this on load but the editor is the key use-case here.

Issue can be seen recorded here:
https://youtu.be/EgHb4anSAqk

### Steps to reproduce

- Make a scene with meshes that can receive lightmaps.
- Add a VoxelGI node, set it up and bake. Lighting should change to the voxel's.
- Add a LightmapGI node and bake. Lighting should change to the lightmap's.
---
- Make the LightmapGI node invisible. Lighting should act as if VoxelGI is also invisible, displaying just the engine lighting.
---
- Clear the "Light Data" field of LightmapGI. Lighting will work correctly, displaying the voxel's lighting.

### Minimal reproduction project (MRP)

[voxelandlightmap.zip](https://github.com/user-attachments/files/17131247/voxelandlightmap.zip)

Contributor guide

Open the contributing guide

Research direction

Start with the linked minimal reproduction project and follow the listed steps, comparing LightmapGI and VoxelGI visibility with and without loaded Light Data. Done means a visible, baked VoxelGI affects lighting when the LightmapGI node is invisible, even when its light data remains loaded.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics, game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.