The GLTF model produces a large number of moire patterns when viewed at close range

Hi, guys. Can you help me look at the problems in this playground? A large number of moire patterns appear on the surface of the model at close range. Is there something wrong with my gltf file or with Babylon.js?

In this position

Something’s wrong with your normal map (bumpTexture)

Ok, thank you very much. But I can’t set the normal map level to 0 because I need some details. If normal map is the problem, what is the crux of the problem, and how should I modify my normal map to make it work?

Another possible cause of the problem is that the model has a large coordinate offset. If we set its coordinates to 0,0,0, the Moore-pattern will also disappear.

That’s because of the large coordinates, indeed (there’s the same problem with the Khronos glTF viewer: glTF Sample Viewer).

Something to test would be to generate the tangents in Blender and export the glb file with the tangents in and see if that helps.

Also, we have a doc page that explains how to handle large coordinates in case you really need to deal with such values:

1 Like

I don’t want to use floating origin yet, any more info on generate the tangents in Blender?

Sorry, I don’t know enough about Blender to know how to do this.

However, @PatrickRyan probably knows!

@zhangyahan, if you want to include tangents in your glTF export, simply enable it in the exporter in Blender. Tangents default to not exporting, so you will need to confirm that the flag is enabled when exporting.


Thank your answer, export the tangent space does solve the problem

1 Like

@zhangyahan, you’re welcome! I totally forgot to mention that we have a page in our docs about exporting to glTF from multiple tools that can be helpful. Glad to know you are unblocked now!