Using ZED cameras to record and save animations in runtime

Hi everyone,

I am working on a project in Unity where the objective is to use the ZED cameras to display the avatars on screen and then from that save animation files for each character which I then intend to play on a standalone VR application. SVOs aren’t compatible with standalone VR and most of the methods I have found for recording animation do not work during runtime or do not capture the data of each of the children for each model.
I have been successful in getting the ZED cameras running and having the avatars display in runtime in realtime the animations of each character in the scene.
Now it is my quest to find a way to record and save those animations in a way that can be played back in a build. Has anyone done something similar or have any ideas?

Thank you all and have a great day

Hello @bregermann, welcome to the forums.

You can base yourself on our body tracking export samples.
And the Unity Live Link project replays the skeletons from JSON data coming through UDP, so that’s pretty much the whole pipeline :slight_smile:

Hi there,

This example you have provided is in c++, I need to make this work inside Unity, am I correct in assuming I need to make it a dll to be able to be called and accessed inside Unity
or are you suggesting I use it as an example to create an entirely new script in Unity to handle this? I have tried many ideas and methods and none of them have seemed to work, they will save the model but not the animations or they will only save the first frame of animations or they will only save the parent which has all 0s but not any of the children. Has become frustrating

Hello @bregermann

If you need to do it from Unity, I suggest a whole new script indeed. However, all the data to put in the JSON should be accessible relatively easily either from the animator or from the SDK data. It’s more of an issue of building a JSON file or any other medium. You’ve probably already stumbled upon it, but maybe this can help: https://forum.unity.com/threads/use-unity-recorder-to-record-humanoid-animation.610441/#post-9381326

Thank you for the fast reply
I came across Unity’s built in recorder before, which I think is really cool, the issue is that it only works inside of the editor but I need it to work in a standalone build

ooo but I am looking into the FBX Exporter and I am seeing a built in FBX Recorder, perhaps that can be used in runtime, will investigate further

1 Like