Support for glTF models with two UV layers
Description
I have a GLB model that uses two UV layers to map textures:
- UV[0] --> Base Color, Normal
- UV[1] --> Ambient Occlusion, Roughness, Metalness
Ambient Occlusion, Roughness and Metalness are packed into one single texture.
Problem
When I load the model into the viewer, it seems like only the first UV layer is used for all the textures, and this creates incorrect results as the two UV layers are different. Is it possible to use models whose textures are mapped in two UV layers?
This is a known issue in three.js that is currently being worked on. Hopefully we'll have proper support for multiple UV channels soon. Currently on the AO map can use the second UV set.
@elalish mind linking the relevant three issues here? I found various (like https://github.com/mrdoob/three.js/issues/12608) but none that looked like currently being worked on.
I've chatted with @mrdoob about this occasionally, not sure of the current status; perhaps he'll comment.
I came across this quick fix for three.js: https://discourse.threejs.org/t/using-multiple-uv-maps-per-model/41973 Maybe can be ported easily.
Nice! I hear official three.js support for multiple UVs is coming soon 🤞
any news on this? cannot find any PR or issue on threejs repo
Fixed by #4186