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

Material assigned to meshes with different attributes #160

Closed
lilleyse opened this issue Oct 17, 2018 · 0 comments
Closed

Material assigned to meshes with different attributes #160

lilleyse opened this issue Oct 17, 2018 · 0 comments

Comments

@lilleyse
Copy link
Contributor

If a material is assigned to meshes with different attributes it should be duplicated. If one of those meshes doesn't have texture coordinates the textures in the duplicated material should be removed.

The glTF spec backs this up by saying:

Mesh must have corresponding texture coordinate attributes for the material to be applicable to it.

https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#textureinfotexcoord

Example obj snippet:

usemtl red
f 1//2 3//2 5//2 1//1
...
usemtl red
f 1/2/3 5/4/2 1/7/4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant