You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While the glTF specification allows any material texture slot to use any UV channel, three.js requires most material texture slots to use UV1, and requires AO textures or lightmaps to use UV2. If the model only has one UV channel, GLTFLoader will automatically duplicate it if needed for an AO texture:
However, it skips that if doing so would overwrite an existing UV channel, and in this case the model already has a second (unused) UV channel. Potentially that could be fixed, but there are a lot of messy edge cases involved in doing so.
The easier workaround is to remove the unused UV channel in Blender. The better, long-term solution is #12608.
Describe the bug
This glb file sofa.zip which made and exported from Blender, has diffuseMap and aoMap.
When loaded to threejs scene using GLTFLoader, the aoMap display incorret.
I guess they has different uvs and tried to add this line
sofa.geometry.attributes.uv2.copy(sofa.geometry.attributes.uv)
then display correct.I also tried https://threejs.org/editor/ and https://modelviewer.dev/editor/ ( which I heard also based on threejs ), all has the same problem.
But with https://sandbox.babylonjs.com/ , https://playcanvas.com/viewer and Win10 3D Viewer, display all ok.
Is the problem of threejs's GLTFLoader?
To Reproduce
Steps to reproduce the behavior:
Code
Live example
See above metioned gltf viewer and load the glb model.
Expected behavior
Display correct aoMap with this glb model like in https://sandbox.babylonjs.com/ , https://playcanvas.com/viewer and Win10 3D Viewer.
Screenshots
See above.
Platform:
The text was updated successfully, but these errors were encountered: