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

Flattened .usdz #216

Open
CedricGuillemet opened this issue Dec 19, 2024 · 3 comments
Open

Flattened .usdz #216

CedricGuillemet opened this issue Dec 19, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@CedricGuillemet
Copy link

I'm testing Tinyusdz with Babylon.js.
BabylonJS/Babylon.js#16005
Not supporting multiple usd files inside the usdz (or flattened) is an issue.
Is it something that can be addressed easily (no pressure!)
Is it part of your roadmap?

@syoyo
Copy link
Collaborator

syoyo commented Dec 20, 2024

You should describe the issue in detail with reproducible file and codes.

@CedricGuillemet
Copy link
Author

The .usdz produced by these playgrounds can't be imported with the wasm build of Tinyusdz:

https://playground.babylonjs.com/#H2G5XW#3
https://playground.babylonjs.com/#H2G5XW#4
https://playground.babylonjs.com/#5N3RWK#1

the extracted .usd can be loaded by Tinyusdz when --flatten command line parameter is set. But flattening usdz seems to be not entirely supported (

std::cout << "--flatten is ignored for USDZ at the moment.\n";
)

@syoyo
Copy link
Collaborator

syoyo commented Dec 22, 2024

USD composition(flattening) feature in TinyUSDZ is work-in-progress, but at least it should work for basic USD compisition.

Composition is disabled a.t.m for USDZ to avoid the potential risk of composition in native(C++) environment(e.g. infinite recursion, memory overflow, etc.). We need more tests and code improvements to make USD composition implementation in TinyUSDZ robust and secure.

But if we use TinyUSDZ through WASM, this limitation can be relaxed, since WASM layer itself will do nice job for security.

So you can contribute enabling flattening feature for USDZ model when the code is beging compiled for WASM(__EMSCRIPTEN__).

PR is much appreciated!(As you know, please see tusdcat source code to how to do flattening)

@syoyo syoyo added the enhancement New feature or request label Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants