hello, i'm having problems porting my project to godot 4. The images, which are illuminated by a light source, have strange artifacts at the edges. I have attached two normal map test images in an identical scene, one loaded with godot 3.5.1 and one with Godot 4.0.1. With Godot 3.5.1 everything seems ok. When importing the images I chose Texture2D and lossless. What could be the reason for this?

Godot 3.5.1:

Godot 4.0.1:

Artifacts in Detail:

It certainly does look like compression artifacts... even though you are importing them as lossless it could be that whatever format you saved/exported them to might have introduced the compression artifacts, in which case while importing them lossless shouldn't introduce any more it also wouldn't magically get rid of any artifacts that are already in the data that is being imported. That's my best guess anyways.

It could certainly be that there is some bug in the 4.0.1 importer that needs to be fixed. You can try downloading 4.0.2 and see if it has a relevant fix in it(there was certainly something) but if that doesn't do it then check the issue tracker, if nothing related is reported open a new issue.

edit: you might also want to read through this issue report:
https://github.com/godotengine/godot/issues/57981

and maybe try setting the project Rendering>Texture setting Import Bptc enabled, and enabling Bptc Ldr in the normalmap texture import settings then reimport normal map using VRAM Compressed as per what is recommended in there.

9 days later

Hi,
I tried that. First I installed version 4.0.2, but that didn't help.

Then I tested the project and import settings you recommended. Unfortunately, the Bptc Ldr import setting is no longer available in the current version. Rendering>Texture setting Import Bptc did not bring any improvement.

I have also compiled the current Master Branch with commit a7276f1ce0c2911216a2c4718efddab98ddffd8f, but still here, the same.

To me it seems to be a bug because this problem didn't exist with 3.5.1. But it could also be a new attitude that I don't know

btw, the normalmap test-image i found here: https://en.wikipedia.org/wiki/Normal_mapping, while the diffuse picture is just a white png with the same size of 4096 x 4096 pixels.

Maybe someone else can reproduce and confirm that issue?

You have to set normal maps as VRAM Uncompressed and click Reimport. Strange bug that I don't know how it wasn't caught.

    cybereality You have to set normal maps as VRAM Uncompressed and click Reimport. Strange bug that I don't know how it wasn't caught.

    It is mentioned in the issue I linked, so I'd say it's caught.

    Only changing compression from VRAM Compressed to VRAM Uncompressed already fixes the visual for me, I don't have to disable mipmaps.

    Apparently above in my previous post I misquoted it and said to reimport with VRAM compressed when I meant to say uncompressed tho. That's my bad.

      Megalomaniak It is mentioned in the issue I linked, so I'd say it's caught.

      On a Github issue from over a year ago.

      I meant the workaround is known, the issue with compression on is still being replicated and yet to be resolved. Maybe I misunderstood what you meant tho. The bug is known, the resolution to it doesn't yet exist far as I can tell.

      Ok, unfortunately, "VRAM Uncompressed and click Reimport" did not help. See the unchanged screenshot.

      To show my problem I made 2 videos of exact the same scene where you can see the lighting difference between 3.5.1 and 4.0.2.

      I noticed that the new Godot version made fundamental changes to the normal maps, including the inverted y-axis.
      The differences are strange lighting angles which look wrong as well as this pixelated and grainy artifacts on the edges

      Normal Map Test Picture

      Video 3.5.1

      Video 4.0.2

      Picture of wrong lighting and artifacts:

        a_d_d_y Well, what I said initially still stands, if you feel this is a separate issue that no other bug reports apply to then open a new issue on the tracker so it's reported.