three-usdz-loader icon indicating copy to clipboard operation
three-usdz-loader copied to clipboard

Some USDZ models can't be loaded

Open Alyona2209 opened this issue 2 years ago • 9 comments

For some reason, some USDZ models are not been loaded in the viewer (but they are loaded on iOS). Without special errors, the scene just remains clean: Screenshot 2022-09-12 at 11 10 03 usdz (1).zip Please, check

Alyona2209 avatar Sep 12 '22 09:09 Alyona2209

Same here with some usdz files:

[Warning] Coding Error: in Usd_GetAPISchemaPluginApplyToInfoForType at line 1527 of /home/schroek/src/USD_schroek/pxr/usd/usd/schemaRegistry.cpp -- Failed to find plugin for schema type 'UsdVolOpenVDBAsset' (emHdBindings.js, line 2970)
[Warning] Coding Error: in Usd_GetAPISchemaPluginApplyToInfoForType at line 1527 of /home/schroek/src/USD_schroek/pxr/usd/usd/schemaRegistry.cpp -- Failed to find plugin for schema type 'UsdVolVolume' (emHdBindings.js, line 2970)
[Warning] Coding Error: in Usd_GetAPISchemaPluginApplyToInfoForType at line 1527 of /home/schroek/src/USD_schroek/pxr/usd/usd/schemaRegistry.cpp -- Failed to find plugin for schema type 'UsdVolField3DAsset' (emHdBindings.js, line 2970)
[Warning] Coding Error: in _GetSchemaKindFromPlugin at line 273 of /home/schroek/src/USD_schroek/pxr/usd/usd/schemaRegistry.cpp -- Failed to find plugin for schema type 'UsdVolOpenVDBAsset' (emHdBindings.js, line 2970)
[Warning] Coding Error: in _GetSchemaKindFromPlugin at line 273 of /home/schroek/src/USD_schroek/pxr/usd/usd/schemaRegistry.cpp -- Failed to find plugin for schema type 'UsdVolVolume' (emHdBindings.js, line 2970)
[Warning] Coding Error: in _GetSchemaKindFromPlugin at line 273 of /home/schroek/src/USD_schroek/pxr/usd/usd/schemaRegistry.cpp -- Failed to find plugin for schema type 'UsdVolField3DAsset' (emHdBindings.js, line 2970)

GregOriol avatar Aug 09 '23 10:08 GregOriol

I think this is connected to animations. See here: #11

LucaFilitz avatar Aug 10 '23 16:08 LucaFilitz

It's most likely on the wasm side of things, but not sure when/how it could be supporting what is missing

GregOriol avatar Aug 10 '23 18:08 GregOriol

It seems like the wasm side is not compiled with openvdb support. Maybe your files have simulation data in them?

meshula avatar Aug 10 '23 19:08 meshula

@meshula No idea! What about the file provided by @Alyona2209 in the issue?

GregOriol avatar Aug 10 '23 20:08 GregOriol

Yeah, my apologies, I just checked the contents of the file. The file is well formed, and the balloon is animated in various programs that I checked. I just opened the file in usdedit and searched through it, there's nothing in the file related to the warnings reported coming from emHdBindings.js. I misunderstood that you thought they were related to the problem when you meant that you see the same warnings.

meshula avatar Aug 12 '23 02:08 meshula

@meshula I'm seeing the errors in the console as I pasted above, which seems to be the same errors as @Alyona2209 saw in the screenshot and with the file attached in the first message of the issue.

Could you maybe also check the files pointed on there https://github.com/ponahoum/three-usdz-loader/issues/11 :

  • https://developer.apple.com/augmented-reality/quick-look/models/stratocaster/fender_stratocaster.usdz => said to not have animations and to work with the loader
  • https://developer.apple.com/augmented-reality/quick-look/models/drummertoy/toy_drummer_idle.usdz => said to have animations and not work with the loader

The files that don't work on my side seem to have animations too. Maybe toy_drummer_idle.usdz is a good way to investigate?

GregOriol avatar Aug 12 '23 13:08 GregOriol

Those files work in Quicklook and other places. The problem must be with three-usdz-loader itself.

meshula avatar Aug 12 '23 20:08 meshula

@meshula @GregOriol @Alyona2209 thanks for the report. The issues you are encountering with those files are very likely to be within the wasm side of things indeed. As mentioned in the readme, this library is just a wrapper around autodesk wasm adaptation of usd. It could be some missing extensions during compilation, or something else. I don’t have much time right now to investigate, but I would encourage you to compile autodesk usd repository yourself, and see if compiling with those extra extensions fixes your issues.

I plan to investigate about all of those issues as soon as I have time, thanks for your understanding !

ponahoum avatar Aug 12 '23 21:08 ponahoum