godotengine / godotengine/godot

LightmapGI: Importing gltf with materials from Blender causes light bleeding at edges

Open
#106,529 3 comments 1 reaction 0 assignees View on GitHub
bug topic:3d topic:import topic:rendering
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

- `v4.5.dev4.official [209a446e3]` - main tested version
- `v4.4.1.stable.official [49a5bc7b6]` - looks worse even with no material export, might be a different unrelated issue

### System information

Godot v4.5.dev4 - EndeavourOS #1 ZEN SMP PREEMPT_DYNAMIC Fri, 09 May 2025 17:35:59 +0000 on Wayland - X11 display driver, Multi-window, 1 monitor - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1650 (nvidia; 570.144) - AMD Ryzen 5 5600H with Radeon Graphics (12 threads)

### Issue description

I get obvious light bleeding when I spawn a mesh with materials assigned in Blender and bake lightmaps with it:

![Inside view of a orange room with light leaks at every edge](https://github.com/user-attachments/assets/d5dde6a3-56f7-4fbb-bfc5-52c5b2b43d12)

This doesn't happen if I export the same model with materials disabled and set the same texture/roughness/metallic in Godot:

![Same room with no leaks](https://github.com/user-attachments/assets/a276d6da-a0f0-449b-abd5-b71924307bd5)

Might be related to #87815 but this happens even with a single manifold mesh and zero intersecting geometry. The baked EXR shows a bit of orange in places that should be pure black (saturation boosted, bad lightmap on top good on bottom):

![Image comparing the two lightmaps](https://github.com/user-attachments/assets/33522dd4-6021-4c40-828c-33215121535f)

### Steps to reproduce

- Download and run project
- Click on the screen or press space to switch camera

### Minimal reproduction project (MRP)

[light-bleeding.zip](https://github.com/user-attachments/files/20265516/light-bleeding.zip)

Contributor guide

Open the contributing guide

Research direction

Start by running the linked light-bleeding.zip minimal reproduction project in the listed Godot versions, then compare the LightmapGI bake using Blender-exported materials with the bake using equivalent materials assigned in Godot. Inspect the LightmapGI and glTF material-import paths while reproducing the edge bleeding. Done means the imported-material case no longer produces the reported leaks without regressing the control case.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.