I’m trying to port my game from Unity to Godot and I got stuck on the issue of recreating the material I used in Unity, specifically the Normal Map. It doesn’t seem to work properly as it did in Unity and I don’t know what I am supposed to do.

See the video, where I show that enabling the Normal Map property on the Material of MeshInstance3D basically just disables the lighting on that surface. I tried recreating the normal map in some online software, but that didn’t change anything.

Weird thing is that the material works correctly in the material preview on the right side of the editor, but not when applied to the mesh. Any idea what could I try to fix this?

Edit: The issue actually resolved itself after I applied the textures to another MeshInstance3D. I don’t know why it didn’t work on the first mesh…

  • NocturnalMorning@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    9 months ago

    What version of Godot are you using?

    Edit: If you haven’t already, check that you’re using the right normal configuration. I think Unity defaults to DirectX which has the green channel of the normal map flipped.

    • mrsgreenpotato@discuss.tchncs.deOP
      link
      fedilink
      arrow-up
      1
      ·
      9 months ago

      I’m using Godot 4.1.1.

      According to Unity they use OpenGL https://tinyurl.com/2p8frxtf Unity uses Y+ normal maps, sometimes known as OpenGL format.

      The same as Godot https://tinyurl.com/by9tsm3f Godot requires the normal map to use the X+, Y+ and Z+ coordinates, which is known as an OpenGL-style normal map.

      The problem actually resolved itself already. I applied the textures to another MeshInstance3D and it worked there for some reason, I have no idea why it didn’t work on the first mesh…