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

Weird Lighting and Artifacts with Normal Maps under Godot 4 #76233

Closed
aoetiker opened this issue Apr 18, 2023 · 1 comment · Fixed by #76240
Closed

Weird Lighting and Artifacts with Normal Maps under Godot 4 #76233

aoetiker opened this issue Apr 18, 2023 · 1 comment · Fixed by #76240

Comments

@aoetiker
Copy link

Godot version

4.0.2.stable

System information

Windows11, Forward+, NVIDIA GeForce RTX 3080 Ti (31.0.15.2849)

Issue description

I have detected some strange Lighting issues in the new Godot 4. Under Godot 3.5.1 the problem does not exist.

  1. there are some artifacts at the edges of a normal map graphic
  2. the lighting directions seem not to be correct (wrong angle, height < 0?)

The problem I have already discussed in the Godot Forum:
https://godotforums.org/d/33500-weird-artifacts-with-normal-maps-under-godot-4

Steps to reproduce

  1. I have made 2 reproduction projects, one for Godot 3.5.1 and one for Godot 4.x. Both projects are in the Zip File.

  2. These Projects include a normal map test example picture from wikipedia. The diffuse picture is just a white png File of 4096x4096 pixels.
    https://en.wikipedia.org/wiki/File:Normal_map_example_with_scene_and_result.png

  3. The second image "spaceship" shows another normal map graphics where the issue is also visible at the edges
    Additionaly the lighting direction seems to be wrong for the Godot 4.x version (see also the difference-videos in the forum post)

  4. With the PointLight2D you can test around to see the difference between Godot 3.5.1 and Godot 4.x

  5. Important for the ReproductionProject_Godot_3.5.1: That the normal map is working correctly under Godot 3.5.1, the normal_map_invert_y selection must be activated for the two normal map pictures and they must be reimported (the normal map y-axis has somehow changed with godot 4.x ??)

Minimal reproduction project

ReproductionProjects.zip

@Calinou
Copy link
Member

Calinou commented Apr 19, 2023

These look like NaN/INF artifacts from 2D specular lighting. I've noticed this on 4.0 when using normal maps with Light2D.

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

Successfully merging a pull request may close this issue.

4 participants