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

f3d-web does not support loading OpenUSD files #1676

Open
jo-chemla opened this issue Oct 24, 2024 · 5 comments
Open

f3d-web does not support loading OpenUSD files #1676

jo-chemla opened this issue Oct 24, 2024 · 5 comments

Comments

@jo-chemla
Copy link
Contributor

Describe the bug
The f3d-web is useful to load mesh files (via file browser or providing url-param). However, it cannot load OpenUSD files like usd, usdz, usda, usdc. The same files can be opened correctly with the desktop version of f3d.

Files with such extensions won't be listed by the file explorer modal, and switching File-Explorer filter from All supported types to All files in order to select such a usd file will result in console error File /abc.usdz cannot be opened

To Reproduce
Steps to reproduce the behavior:

  1. Download sample models from apple assets
  2. load them correctly in f3d desktop app
  3. Try to load them in f3d-web
  4. see error in console File /abc.usdz cannot be opened which come from here because scene.supports(filePath) returns false for files with usd extension (impl)

Expected behavior
Should the DF3D_PLUGIN_BUILD_USD flag simply be set to ON in webassembly/build.sh? It is currently not specified, hence probably defaulting to OFF. Seems that the OpenUSD plugin and flag were added in 2.3.0. Extensions EXTENSIONS usd usdc usda usdz are correctly passed here

Also, the doc could explicit which flavors of OpenUSD extensions are supported here doc/user/SUPPORTED_FORMATS.md to add .usdz, .usda, .usdc

@mwestphal
Copy link
Contributor

mwestphal commented Oct 24, 2024

Hi @jo-chemla

Indeed, this is correct, afaik OpenUSD does not seems trivial to build for WebAssembly.
Keep in mind F3DWeb is pretty experimental.

I'm adding this to the main WebAssembly issue: #1252

@mwestphal
Copy link
Contributor

Also, the doc could explicit which flavors of OpenUSD extensions are supported here doc/user/SUPPORTED_FORMATS.md to add .usdz, .usda, .usdc

Indeed, this is missing (FYI @stepperpig )

@Meakk
Copy link
Contributor

Meakk commented Oct 24, 2024

@jo-chemla your analysis is correct.
In case you (or someone else) want to give it a try, we need to build USD in the Docker image here, and then enable the plugin in webassembly/build.sh.
However, USD is using Boost and TBB, so these need to be installed in the Docker image too.

@jo-chemla
Copy link
Contributor Author

Wow that was fast. Thank you both for getting back and adding this to this mega-thread. For some references,

@mwestphal
Copy link
Contributor

Also, the doc could explicit which flavors of OpenUSD extensions are supported here doc/user/SUPPORTED_FORMATS.md to add .usdz, .usda, .usdc

Indeed, this is missing (FYI @stepperpig )

Thanks, I've added it in our documentation: https://f3d.app/doc/user/SUPPORTED_FORMATS.html

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

No branches or pull requests

3 participants