-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Can "MESH_PRIMITIVE_TOO_FEW_TEXCOORDS" not be treated as an error? #68
Comments
I'm confused. How can a mesh exist, with a baseColorTexture, without using said texture? I don't think it's legal glTF to skip those coordinates, even if the WebGL frameworks tolerate it. That said, the errors in this project are user-configurable. You can reduce the severity to Warning, Info, or Hint, or turn off the reporting of this type of error completely. See config-example.yaml. Of course, if you're trying to produce conformant glTF files, you should leave this error enabled and just supply some zeros for texture coordinates. |
Btw, supplying zeros doesn't require storing them in the buffer. For example, this asset defines a {
"asset":{
"version":"2.0"
},
"accessors": [
{
"count": 12,
"componentType": 5126,
"type": "VEC2"
}
]
} |
This is more of a case where a material has texture(s) but the mesh primitive pointing to the material does not have texture coordinates. I think this is a valid use of materials. The same material can be used with textures and without textures. |
Found this thread: KhronosGroup/glTF#1023 (comment). |
Ah yes, I remember that thread now. Thanks for the pointer. https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/schema/textureInfo.schema.json#L17 currently says this:
This means that a material cannot be reused the way I described. Since it's spelled out explicitly in the spec, let's keep the validator as is. We will update the BabylonJS exporter to output two separate materials. |
Thanks all for clarifying! |
Hello!
I recently came across a model that was converted to glTF from BabylonJS. The model is able to render in BabylonJS and ThreeJS, but the glTF validator yields the
MESH_PRIMITIVE_TOO_FEW_TEXCOORDS
error when the model shares a material across multiple mesh primitives, but one does not actually use the textures:i.e.
Is it possible to have this not treated as an error? It may cause false negatives for some models and could cause extra material duplication just to try to get rid of the errors.
Thanks!
The text was updated successfully, but these errors were encountered: