You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does gltf-sdk support vertex duplication when one vertex has two or more UV coordinates depending on how many faces it belongs?
Is there any library that can be used within gltf-sdk to do the duplication seamingless ?
Is ACCESSOR_TEXCOORD_1 something operational different from ACCESSOR_TEXCOORD_0, does it offer extra capabilities like vertex duplication like in this specific case ?
Best,
Dimitrios
The text was updated successfully, but these errors were encountered:
jimver04
changed the title
Support of different UV coordinates of faces that share the same vertices ?
Can a single vertex have multiple UV coordinates depending on how many faces it belongs to?
Apr 17, 2024
I'm not sure I understand the ask. glTF-SDK is intended to read/write a glTF, so if the glTF spec doesn't support this, then the SDK won't either. If there is no way to represent what you want in a glTF, then the SDK won't be able to represent it and thus the questions are moot. Or did I misunderstand something?
Hi,
Let us assume that we have two triangles connected to make a quad.
I use gltf-sdk to export the quad with 4 UV texture coordinates, one per vertex, as follows.
The upper triangle (T1) has all 3 UV coordinates as pink (3 dots at pink pixel in the example)
whereas the lower triangle (T2) has 1 new UV coordinate (1 dot at green) and two old pink UV coordinates from T1
So far so good.
In Blender3D, when I select the face of T2, I can change the UV coordinate of the shared upper vertex for T2,
the part of T2 at shared vertex become green without affecting T1.
When I export from Blender3D to gltf, this shared vertex that has different UV coordinate for T1 vs T2,
becomes duplicated:
From what I have understood, GLTF format does not allow a vertex to have two UV coordinates. See this stackoverflow: https://gamedev.stackexchange.com/questions/140132/how-can-i-use-blender-style-uvs-and-not-per-vertex-in-opengl
whereas Blender allows it. Blender uses all features of OpenGL whereas GLTF is let us say a "gpu friendly" format (https://stackoverflow.com/questions/61521259/vertex-normal-texture-uv-coordinate).
Best,
Dimitrios
The text was updated successfully, but these errors were encountered: