Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GLES2 Light bugs when baking light #43204

Closed
Janders1800 opened this issue Oct 30, 2020 · 13 comments
Closed

GLES2 Light bugs when baking light #43204

Janders1800 opened this issue Oct 30, 2020 · 13 comments

Comments

@Janders1800
Copy link

Janders1800 commented Oct 30, 2020

Godot version:

3.2.4 beta-1

OS/device including version:

Zorin OS 15

Issue description:

Lights flicker wen moving the camera (Only if there is a BakedLightmap node).
"Bake mode all" lights illuminate baked objects, but if I hide it and show it again then it works ok, but it screws other lights.

LightBug

Possible related: #41629

Steps to reproduce:
Make a similar setup as the gif

Minimal reproduction project:

LightMaps.zip

@mrjustaguy
Copy link
Contributor

You forgot to add an MRP

@Janders1800
Copy link
Author

I'm unable to reproduce this bug in a minimal project.

@Janders1800
Copy link
Author

Janders1800 commented Oct 30, 2020

Maybe this old bug is related? #33110

@fire fire changed the title Light bugs wen BakedLight Light bugs when baking light Oct 31, 2020
@mrjustaguy
Copy link
Contributor

mrjustaguy commented Oct 31, 2020

Reprocuded the effect (in GLES 3, not GLES 2):
Light.zip

Reason: Too many lights affecting the mesh --> Renderer Limit --> Flickering due to Choice of lights rendered affected by what the camera sees (I guess? - to the flickering part that is)

Solutions: Reduce number of lights affecting the mesh or wait for Godot 4 and use Vulkan

Edit: Oh nvm, I'm using GLES 3 and not GLES 2, which doesn't have that issue..

@Janders1800 Janders1800 changed the title Light bugs when baking light GLES2 Light bugs when baking light Oct 31, 2020
@Janders1800
Copy link
Author

Janders1800 commented Oct 31, 2020

Sorry but that's not the same setup as wen the bug happens.

  • I'm using GLES2 (sorry, forgot to mention it).
  • Generated meshinstances can't be lightmapped (No UV2).
  • And lights aren't set to "bake mode all".

I've managed to reproduce the bug on a minimal project:
LightMaps.zip
Updated first post, added the reproduction project.

@mrjustaguy
Copy link
Contributor

mrjustaguy commented Nov 1, 2020

I don't think I was successful with reproducing it on your MRP on a Quadro K2000 (driver 452.06).. Gif of the MRP would help in searching, as it's possible I'm looking at the wrong thing and thus not noticing the bug.. Only thing I'm noticing is that I can turn off all lights and still have a lit setup even with the baked lighting node hidden.. which only ends when I kill it.

Edit: nvm I think I reproduced it now.. I'm at the OmniLight toggling it's visibility, and OmniLight6 Changes brightness depending on the Visibility of OmniLight and vice-versa.. based on the Gif.. That is the issue?

Edit 2: Tested it on 3.2.3 Stable now, from 3.2.4 beta 1, seems like a regression, as I've been unable to do it in 3.2.3 Stable (now that I know what I'm looking for), However still haven't seen flickering when moving the camera on any Version I tested.

Edit 3: Found Flickering issue now too. when Baked Lightmap is hidden, on camera coords Translation 0,7,23, rotation -30,0,0
when draging translation z between 22 and 23, OmniLight 7 Flickers. Note: Camera Node isn't needed to reproduce, it's just the rough position where I've encountered it, and Camera Node allows for easier reproduction due to less variables changing.

Edit 4: Flickering Only in 3.2.4 Beta 1 and none of the issues reproducable in 3.2.3 Stable. This reeks of a Regression to me!
Please Test on 3.2.3 Stable on your end and report if 3.2.3 Stable has the issue for you... just in case.

@Janders1800
Copy link
Author

Janders1800 commented Nov 1, 2020

Yeah in stable works OK (of course, without the new functionality of "baked mode all" light discrimination, which I suspect is the culprit)

@clayjohn
Copy link
Member

clayjohn commented Nov 1, 2020

Cc: @JFonS

@JFonS
Copy link
Contributor

JFonS commented Nov 1, 2020

Definitely sounds like a regression from the baked lights PR. I will take a look at it :)

@akien-mga akien-mga added this to the 3.2 milestone Nov 4, 2020
@Janders1800
Copy link
Author

Still happens on 3.2.4 beta-2

@JFonS
Copy link
Contributor

JFonS commented Nov 25, 2020

Sorry for the delay on this issue.

@Janders1800 I opened #43858 which I think fixes the issue. I tested on your MRP and everything seems to work fine, but it would be great if you could test it on your project as well.

@akien-mga
Copy link
Member

Fixed by #43858.

@Janders1800
Copy link
Author

Works OK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

6 participants