Replies: 6 comments
-
No, we don't make any changes to the USDZ file. However, we're working on doing on-the-fly conversion to USDZ which would mean both these kinds of changes would be reflected and also that you wouldn't need to supply a separate file. No ETA yet though. |
Beta Was this translation helpful? Give feedback.
-
Sure, I see. Thanks for the reply. Since model-viewer is built on three.js, I'm thinking of using the USDZ exporter that they have as shown in the example here: https://threejs.org/examples/?q=usdz#misc_exporter_usdz Would it be possible to export the model as a GLTF and then export it as USDZ using three.js? |
Beta Was this translation helpful? Give feedback.
-
So I did manage to get it to work using three.js' USDZ exporter by doing the following:
Working result!Currently the texture is flipped, but shouldn't be much of a problem to resolve. |
Beta Was this translation helpful? Give feedback.
-
Yes, that's exactly how we'd like to enable on-the-fly conversion, nice work! Would you be interested in contributing? |
Beta Was this translation helpful? Give feedback.
-
Sure, will make a fork and send a PR accordingly. One thing to note is that for my particular use case, I've edited three.js' USDZ convertor to be compatible with .png textures with transparency. By default, only .jpg textures without transparency is supported. |
Beta Was this translation helpful? Give feedback.
-
Awesome, thank you! And I bet three.js would be happy to have your fix for .png textures too. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
I'm trying to update a texture on runtime based on this example: https://modelviewer.dev/examples/scenegraph/#swapTextures
This works perfectly in the browser and in AR mode for GLB models, however, the texture is not reflected for USDZ models in QuickLook.
Expected texture applied on the model:

Resulting texture shown in iOS Quick Look:

Is this something that's out of model-viewer's control? I understand that scene graph is only supported for GLTF files, but I'm not sure if it is supposed to work the same for USDZ models.
Version
Browser Affected
OS
AR
Beta Was this translation helpful? Give feedback.
All reactions