Skip to content

Conversation

j9liu
Copy link
Contributor

@j9liu j9liu commented Sep 5, 2025

Description

This PR adds support for the LINES, LINE_LOOP, and LINE_STRIP primitive modes in glTF.

Apparently the only line mode supported in Unreal is PT_LineList, so the other two have to be converted into line lists with duplicate indices.

image

Author checklist

  • I have done a full self-review of my code.
  • I have updated CHANGES.md with a short summary of my change (for user-facing changes).
  • [ ] I have added or updated unit tests to ensure consistent code coverage as necessary.
  • [ ] I have updated the documentation as necessary.

Remaining Tasks

The normals are off somehow for this model and I haven't figured out why? I added a clause to disable flat normal generation for non-triangle models (since that doesn't make much sense), but there's still some lighting variation among the lines themselves. You can see it when the sun angle is really extreme. 🤔

image

Testing plan

Load this tileset under a georeference with True Origin: MeshPrimitiveModes.zip

Reference screenshot for this sample model here: https://github.com/KhronosGroup/glTF-Sample-Assets/tree/main/Models/MeshPrimitiveModes

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

Successfully merging this pull request may close these issues.

1 participant