I have an asset I made in Blender. I created the textures, some of them procedurals, and then baked them to new textures.

When I baked them, I used a second UV map and in the shader graph, I have UV map nodes using the baked UV map:

However, when I export as glTF2.0 or use the .blend import, the asset inside Godot uses the first UV map instead and my textures are all over the place.

Deleting the first UV map works, but I don't want to delete it, in case I want to modify the asset later. Is there a way to control which UV map is used when importing into Godot? Or to change which one is considered the default UV map in Blender?

Thanks!

Edit: To add to the best answer, in case anyone is wondering, to duplicate a UV map, simply select the UV map you want to duplicate and click the +. By default, adding a new UV map will create a duplicate of whichever map you have selected. Then you can delete the old one and rename the new one. This way Godot will use the correct map.

  • Tomcat and LoipesMas replied to this.
  • Lightsheik
    IIRC all UV maps are exported, regardless of "renderability" and Godot assigns first one to UV1 and second one to UV2. So you will either have to use UV2 in Godot or change the order of UV maps in Blender (I think you can't simply swap the order - you have to duplicate UV1 and then delete UV2)

    Lightsheik However, when I export as glTF2.0 or use the .blend import, the asset inside Godot uses the first UV map instead and my textures are all over the place.

    You can assign an alternate texture directly to Godot and report a bug.

      Tomcat The texture is fine, it's the UV map that is wrong. I don't think this is a bug, I think Godot simply might not support multiple UV maps and just defaults to the first one in the list. Can anyone confirm this?

        Lightsheik I think Godot simply might not support multiple UV maps and just defaults to the first one in the list.

        Export is under development, so things may change.

        Lightsheik
        IIRC all UV maps are exported, regardless of "renderability" and Godot assigns first one to UV1 and second one to UV2. So you will either have to use UV2 in Godot or change the order of UV maps in Blender (I think you can't simply swap the order - you have to duplicate UV1 and then delete UV2)

          LoipesMas That seems to be the case. Is there a way to select which UV map to use in the inspector? I couldn't find any setting for it. The only way I found was to convert the material to a shader and in the shader code, write UV=UV2; .

          Duplicating the UV map in Blender and deleting the original worked! Thanks for the trick!

            Lightsheik Is there a way to select which UV map to use in the inspector?

            I don't think there is an option for that