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

USDZLoader: Distinguish between text (supported) and binary (not supported) usd files and fix UV parsing #26709

Merged
merged 3 commits into from
Sep 7, 2023

Conversation

hybridherbst
Copy link
Contributor

@hybridherbst hybridherbst commented Sep 6, 2023

Related issue:

Description

The previous USDZLoader implementation looked for the first .usda file in the USDZ archive and attempted to load that, and looked for .usd files for geometry references.

This PR improves this by

  • using the first file in the archive as root file (according to the USD spec)
  • treating .usd and .usda both as valid files
  • checking if a root .usd is a crate file (binary, not supported, log warning) or a text file (continue loading it)
  • warning when any .usd file is a crate file (binary, not supported)

It also fixes incorrect UV parsing and incorrect mesh parsing that were written against an old version of the USDZExporter (and were not actually USD spec compliant).

The PR doesn't entirely close the aforementioned issue, as there are still discrepancies between exporter and loader (the exporter supports more USD features at the moment).

This contribution is funded by Needle

@mrdoob mrdoob merged commit 1543d95 into mrdoob:dev Sep 7, 2023
@hybridherbst hybridherbst deleted the fix/usdzloader-read-usd-and-usda branch September 7, 2023 06:01
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