Not applied mipmap at gltf runtime loaded model

Godot Version

4.3

Question

When a model is imported into the editor and placed in the world, mipmaps are applied correctly.

However, when the same glTF model is loaded at runtime via GDScript, it appears aliased as if mipmaps are not applied.

How can this be resolved?

best regards.

Could your materials be set to filter by nearest?

If it’s the lack of mipmaps, most likely your import settings for gltf does not create mipmaps when importing in real time, or they are coming in as the wrong format like they are compressed or not a power of 2, etc, thus failing to create mipmaps.

I know there are settings for the editor like EditorSceneFormatImporterBlend β€” Godot Engine (4.0) documentation in English that are related to the importer, but you could also try using GLTFState.get_images() then Image.get_image() and then using generate_mipmaps() to then create mipmaps post load.

It seems that this issue occurs when loading a GLTF file with embedded textures at runtime.

When comparing a *.glb file with embedded textures exported from Blender to a *.gltf + *.bin + textures setup with external textures, the issue does not occur when loading the model with external textures (gltf + bin + textures) at runtime.

According to this link (GitHub Issue), when a GLTF file has embedded textures, mipmaps are generated during runtime loading, but they are not actually applied.

here is sample project file:

1 Like