godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
89.72k stars 20.83k forks source link

Vulkan: VoxelGI and LightmapGI incorrectly calculating the light for the same object #38020

Open guilhermefelipecgs opened 4 years ago

guilhermefelipecgs commented 4 years ago

Godot version: master (495b28765d03aa9459bc312ebba190ec208979e7)

OS/device including version: Arch 5.6.4-arch1-1

Issue description: GIProbe are generating different results depending on the position of the object inside giprobe's cage: Captura de tela de 2020-04-19 15-48-10 Rotating the object also affects the calc (happens in 3.2.1 as well, maybe is related to #35200): Captura de tela de 2020-04-19 15-51-00 Captura de tela de 2020-04-19 15-50-43 cube was rotated and rebaked

Steps to reproduce: I exported a cube with inverted normals from blender. I setup 3 spot lights for each cube. Then I bake giprobe with interior on and light intensity to 8.

Minimal reproduction project: giprobe_test.zip

guilhermefelipecgs commented 4 years ago

CC @clayjohn

clayjohn commented 4 years ago

Yea that looks like the same issue. I will press reduz about it more, as I still don't understand what is broken and why my PR fixes it.

guilhermefelipecgs commented 4 years ago

Just a note, BakedLighmap is also affected: Captura de tela de 2020-05-01 10-34-35

Calinou commented 2 years ago

@guilhermefelipecgs Can you still reproduce this in the latest master branch with VoxelGI, and with the new GPU lightmapper (LightmapGI)? You can download a nightly build here.

Calinou commented 2 years ago

Closing due to lack of response. Please comment if you can still reproduce this bug.

PS: If no minimal reproduction project was included in the original bug report, please upload one as well to ease troubleshooting.

guilhermefelipecgs commented 2 years ago

The bug is still there (VoxelGI), even worse when entering in orthogonal view now.

https://user-images.githubusercontent.com/1387165/152700307-4baa2bc6-7a03-4b79-83e0-32e231c3e700.mp4

Minimal reproduction project updated to v4.0.alpha1.official giprobe_test.zip

guilhermefelipecgs commented 2 years ago

On the other hand, looks like the LightmapGI has been fixed.

https://user-images.githubusercontent.com/1387165/152700147-4242ecd5-2cf4-49d5-b38f-1dd26ba8aca9.mp4