Skip to content
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

Fix vertices export with multiple attributes #78

Open
Brachi opened this issue Mar 6, 2024 · 0 comments
Open

Fix vertices export with multiple attributes #78

Brachi opened this issue Mar 6, 2024 · 0 comments
Labels

Comments

@Brachi
Copy link
Owner

Brachi commented Mar 6, 2024

Vertices are not exported correctly, causing visual artifacts in-game around UV seams.
The work-around is to use the "Fix leaked textures" tool from Albam Reloaded that essentially splits vertices in the UV edges.
This shouldn't be necessary if the exporter would generate the extra vertices at export time. Touching the original mesh or a copy of it shouldn't be necessary
This happens because GPUs expect that each new vertex attribute be a different item in in the vertices array. That's why an imported model always has duplicate vertices that can be removed with the "Merge by distance" operator.
See the official Blender glTF importer/explanation in the "Merge vertices" tooltip for import:

the glTF format requires discontinuous normals, UVs, and other vertex attributes to be stored as separate vertices, as required for rendering on typical graphics hardware. This option attempts to combine co-located vertices where possible.

The glTF exporter splits the vertices automatically, so it can be used as a reference. Handling triangle strips (RE5) when performing the split seems like a challenge and prevented this to be implemented so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Backlog
Development

No branches or pull requests

1 participant