donmccurdy / three-gltf-viewer

Drag-and-drop preview for glTF 2.0 models in WebGL using three.js.
https://gltf-viewer.donmccurdy.com/
MIT License
2.09k stars 534 forks source link

Exported glTF file on Cinema4D, texture is not shown, Error: MESH_PRIMITIVE_TOO_FEW_TEXCOORDS #318

Closed gregorjahner closed 1 year ago

gregorjahner commented 1 year ago

Hey,

I'm trying to upload a model with an image-based texture I build on Cinema4D as glTF on glTF-viewer. The texture's not shown and an Error appears: MESH_PRIMITIVE_TOO_FEW_TEXCOORDS. I think, that the image is not right linked in the file, so that the viewer is not able to represent it. But I have no idea how to embed the .jpg texture right.

Maybe someone can help out.

Bildschirmfoto 2022-11-02 um 10 53 15 PM Bildschirmfoto 2022-11-02 um 3 46 31 PM
donmccurdy commented 1 year ago

Hi! It sounds like Cinema 4D is not exporting a valid glTF file. If it's missing UV coordinates, as the error suggests, then that would need to be fixed, you can't use textures without UVs.

If you're not sure how to create UVs in Cinema 4D, I would recommend asking on their help sites (I don't use C4D myself). Or if the model does have UVs, you may need to report a bug if the UVs aren't exported.