Has anyone found a workflow to create multiple animations for a skeletal mesh packaged in a USDZ file and playback the animations using RealityKit?
I have a skeletal mesh with two animations (idle & run). I want to package them into a single USDZ file (or even multiple USDZ files if I have to) to be used in RealityKit.
I have been able to create an FBX for export of my skeletal mesh and the animations, and ship them up to sketchfab for a valid USDZ export that RealityKit can understand. I do not know how to package the second animation into a single USDZ file and then use SWIFT to playback the specific animations based off of specific events.
There seem to be a lot of posts from about a year ago on the topic with no real answers and little activity since. Any pointers would be appreciated.
Storing and extracting multiple Model's animations in RealityKit
In RealityKit you have no possibility to play multiple animations from single
.usdz
model out-of-the-box. Look at this post and this post. There is just one animation accessible by default:When you extract second or third elements from collection, your app crashes:
However, you can append second, third, etc. animations to the main
.usdz
file from other USDZs.And here you can find one more elegant solution.