Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for multiple texture coordinates / UV maps #8699

Closed
jurisk opened this issue May 28, 2023 Discussed in #8698 · 2 comments
Closed

Support for multiple texture coordinates / UV maps #8699

jurisk opened this issue May 28, 2023 Discussed in #8698 · 2 comments
Labels
A-Rendering Drawing game state to the screen C-Feature A new feature, making something new possible

Comments

@jurisk
Copy link

jurisk commented May 28, 2023

Summary

Bevy bevy_gltf and meshes currently do not support multiple texture coordinate sets (multiple UV maps).

glTF spec https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#meshes indicates that it should:

Client implementations SHOULD support at least two texture coordinate sets, one vertex color, and one joints/weights set

Discussed in #8698

Originally posted by jurisk May 28, 2023
When loading a glTF scene, I'm getting WARN bevy_gltf::loader: Unknown vertex attribute TEXCOORD_1 errors, and the model loads, but without textures shown (it's completely grey).

I think this is because:

Two questions:

  • Is there an open issue or RFC in Bevy for adding support for multiple sets of texture coordinates / UV maps?
  • What are my options for loading / converting such a model?

@nicopap responded:

Yeah, you can open an issue as a feature request. #1802 lists "Multiple UVs" as a goal, but there isn't an open issue.

Looking at the GLtf spec (https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#meshes), I see:

Client implementations SHOULD support at least two texture coordinate sets, one vertex color, and one joints/weights set

searching for "texture coordinate" in the GLtf document, it seems multiple UVs are used to have a different set of coordinate per material textures (say the normal texture could map differently to the mesh than the diffuse/color texture) I don't quite see how we could implement it in bevy, but I think it's probably a worthwhile feature to consider.

@nicopap nicopap added C-Feature A new feature, making something new possible A-Rendering Drawing game state to the screen labels May 28, 2023
@Adriaaaaan
Copy link

This is key for those of us using lightmaps, gltfs exported from unreal can go as high as uv4 so It would be great if it was more than just adding uv1 also

@superdump
Copy link
Contributor

Fixed by #9992

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Feature A new feature, making something new possible
Projects
None yet
Development

No branches or pull requests

4 participants