vpenades / SharpGLTF

glTF reader and writer for .NET Standard
MIT License
467 stars 75 forks source link

Issue with CoordinateSet #65

Closed Crauzer closed 4 years ago

Crauzer commented 4 years ago

I've ran into an issue with the CoordinateSet (texCoord in JSON) property in TextureBuilder.

My vertex format includes one UV (TEXCOORD_0), but it appears that it's not being used by the primitives when I import it into anything.

I'm not assigning any texture to the material which I believe is why the UV set isn't being assigned.

I think this might be some kind of glTF limitation but I'm not so sure.

Is it possible to somehow specify an empty texture? You shouldn't need a valid texture for UV's to be assigned.

(Using MemoryImage.Empty didn't do anything)

vpenades commented 4 years ago

Mesh primitives with unused texture coordinates (or any other kind of vertex attribute) are fine, but are essentially a waste of resources, that's why your getting warnings (but not errors)