USDZExporter: Add animation support.#33589
Conversation
I've tried this today and it's a nightmare. Neither Blender nor Sketchfab produce USDZ assets with animated skeletons that fully work in Mac Preview/Quicklook. When adapting the same USD structure like from the assets of the Quick Look gallery (https://developer.apple.com/augmented-reality/quick-look/), the export needs Quick-Look specific Quirks. And even the official models render broken in Preview e.g. they fallback to flat shading when skeletal animation is used. Testing with Mac Preview does not seem to be the best approach so I wonder if it isn't better to strictly stick to the USD spec for now. |
|
I'm going to stop the addition of skeletons since the current skinning support in tools is very inconsistent. No tool (Mac Preview/Quick Look, Blender, Sketchfab) handles skeletal animation in USDZ uniformly. Every implementation interprets the spec differently. Meaning the USDZ files produces in Blender or Sketchfab do not fully work in the other tools. So when our At the moment, I think it's better to focus |
Related issue: #26010, #31652
Fixed #23415
Description
The PR adds basic animation support to
USDZExporter. It's based on #26010 but with a different API and implementation that better matchesGLTFExporter.Side note: The bike asset is not fully exported correctly since four parts (black rubber tubes) of the asset are instances of
SkinnedMesh. As soon as we addUsdSkelsupport toUSDZExporter, that issue should be fixed as well.Updated demo: https://rawcdn.githack.com/Mugen87/three.js/def24839d00eff6803ee828bde446a0875ef0f05/examples/misc_exporter_usdz.html
Below shows the exported USDZ in Mac Preview:
vid.mov