-
Notifications
You must be signed in to change notification settings - Fork 320
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
Exporting/Importing causing edge split and duplicate materials. #590
Comments
glTF is a GPU-friendly format. Vertices with discontinuous UVs, discontinuous normals etc. must be split during export. Each vertex has a set of associated attributes in memory, there's no concept of a "shared" vertex that has separate attributes per face. |
This creates extra vertices in WebGL apps like AframeVR or three.js and causes issues with models when they are reimported into blender. You can merge the verts by distance but this creates numerous issues with the models faces and normals. Is there a fix to this? It's very problematic for WebGL uses which is a main function of GLTF as a file format. |
It's built for WebGL. WebGL can't handle per-face discontinuous UVs. You're required to split the verts. Desktop GPUs need that too, Blender is just hiding that effect from the artist. A single Blender vertex can represent many co-located GPU vertices. |
Note that the .blend has normals/UVs/colors turned off. So (at least now that #1023 is merged) verts are not split because of discontinuities in those. The reason is verts get split when they're in tris with different materials. This is not required by glTF though. If you have two tris with different materials, they get exported like this. However it could also do it like this, with a shared accessor It wouldn't help the importer any though; it always imports primitives separately. |
Closing, as we now have an option to export shared accessors, helping not splitting for material difference. |
Describe the bug
When importing my objects, they are double the vertex/face/edge/ count. It seems like the object was edge split, when in fact edge split was never even used right exactly before exporting. I did use edge split while making the model but only in certain areas. Not sure if its the exporter doing this or importer since there is no options for edge splitting the object for either import nor export. Additionally, its duplicating the materials.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expected the object not to be double in vertex/face count and not have any material duplicated. Unless edge splitting and material duplicating is how .glb functions?
.blend file/ .gltf
https://www.dropbox.com/s/goy24fw9qf4colu/issue.blend?dl=0
Version
Additional context
I did edge split some areas of the model, but only certain areas like the shoes. The arms torso, legs, i never used edge split and theyre edge split after importing. This has been happening to every single object i import/export, so its not just the object in the .blend file.
The text was updated successfully, but these errors were encountered: