I’m modeling & texture painting an object in Blender 4.0 & exporting it as glTF 2.0 into the Godot project folder. In Godot I open the .glb file as ‘New Inherited Scene’ and in some specific areas the texture is completely wrong:
Blender:
Interesting to note is that the texture is only wrong where metal bands are around the barrel, the wooden part seems fine. I used two different brushes in blender to paint this, one standard wood image, one metal image.
I only modeled one side of the 6-sided barrel and used an array modifier in combination with an empty to get all 6 sides but the modifier was applied before exporting.
The exact same issue also happened to a model of a chest, where I used the same brush for the wooden part and the same metal image brush to paint some bands around it. On there, also the wooden part was fine & the metal part was scuffed. The chest model had mirror modifiers, but they too were applied before exporting.
The only other app I have on the pc to open a .glb is paint3D and there the model looks fine, so it seems to be a Godot import issue.
Do you have any suggestions? Especially since I’m not really actively importing the model with Godot, I only export it in blender to the godot directory, then godot imports it itself when I switch to godot.
The object has only one material, but two different base images on the brush, one for wood & one for metal. To get the highlights & dark areas on the wooden part, the colour of the brush was changed in shades of white/darker gray.
As you can see, I’m a newbie in godot & blender…
Additional info 4:
In the same blender file I also modeled a sword, for some reason this worked perfectly when importing it to godot, it uses two materials, a shiny one for the blade & a matt one for the handle:
For the sword I didn’t use any of the images on the brush like on the two other models, but how can the brush used in blender cause this issue, if the png looks perfectly fine?
I am not sure how “the brush” works in blender, maybe the Blender material is using the texture’s alpha channel as roughtness/matallic where Godot is trying to read it as alpha and ends up adding strange atrifacts.
Try making a new Godot material for the broken textures, exporting the textures separately from the gltf helps here too.
Thx for the reply.
Unfortunately this didn’t work. Then I also tried opening the png in gimp & deleting the alpha channel, saving the png & exporting it as jpeg. Both also looked the same in godot.
yes, it is 64x64. In godot in material settings under sampling I changed the filter from standard Nearest Mipmap to Nearest, both look the same. Would you suggest changing resolution by a pixel or two?
No, a power of two (like 64x64) is great, the GPU will force textures to be a power of two size when mip-mapped so it can lead to unexpected results if not already in that format.
Maybe Godot’s texture compression is killing the quality, try setting it to VRAM uncompressed or lossless? I was thinking the GLTF export might be in a lossy format, but Godot applies it’s own compression by default, and your other program is viewing the GLTF perfectly fine.
Damn, you’re a genius, mode was standard on VRAM compressed, I changed it to lossless, reimported it & it imediately fixed it. Thanks a lot for the help, mate & have a good night
VRAM Uncompressed might do you better than lossless still, mipmaps will help with distant aliasing like with ground textures, and I’m unsure if the lossless mode allows for mipmaps.