Skip to content

glTF importer fixes#290

Merged
jeffamstutz merged 8 commits intoNVIDIA:next_releasefrom
tarcila:tsd-gltf-fixes
May 1, 2026
Merged

glTF importer fixes#290
jeffamstutz merged 8 commits intoNVIDIA:next_releasefrom
tarcila:tsd-gltf-fixes

Conversation

@tarcila
Copy link
Copy Markdown
Collaborator

@tarcila tarcila commented May 1, 2026

Fix glTF importer with:

  • multi-UV handling
  • normal scale applied AFTER decoding
  • byte indices instead of just short and int indices
  • strided accessors for cases where data can be interleaved
  • missing-normal where normals are to be deduced from the geometry
screenshot_20260430_204615_314 screenshot_20260430_204604_454

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the glTF importer and shared tangent-generation utilities to better handle real-world glTF assets, including multiple UV sets, more index formats, strided/interleaved accessors, and improved tangent/normal-map handling.

Changes:

  • Add support for selecting among multiple TEXCOORD_n sets when wiring textures/material samplers.
  • Improve mesh attribute ingestion by using stride-aware accessor copies and supporting UNSIGNED_BYTE indices.
  • Extend tangent reconstruction to support optional normal input, optional V-flip, and optional face-varying tangent outputs.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
tsd/src/tsd/io/importers/import_GLTF.cpp Adds multi-UV wiring, strided accessor copying helpers, expanded index handling, and updated tangent reconstruction logic.
tsd/src/tsd/io/importers/detail/importer_common.hpp Extends calcTangentsForTriangleMesh() API with defaults for texcoord Y-flip and face-varying tangents.
tsd/src/tsd/io/importers/detail/importer_common.cpp Implements optional texcoord Y-flip and face-varying tangent output in tangent generation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tsd/src/tsd/io/importers/import_GLTF.cpp
Comment thread tsd/src/tsd/io/importers/import_GLTF.cpp
@tarcila tarcila requested a review from jeffamstutz May 1, 2026 01:55
Downstream code attaches surfaces to nodes via surfaces[surfaceIndex + i],
assuming a 1:1 primitive→surface mapping which was not always true.
Copy link
Copy Markdown
Collaborator

@jeffamstutz jeffamstutz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@jeffamstutz jeffamstutz merged commit d76607e into NVIDIA:next_release May 1, 2026
12 checks passed
@tarcila tarcila deleted the tsd-gltf-fixes branch May 1, 2026 21:40
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.

3 participants