Forum Discussion
bdstudio
3 years agoExplorer
Meta Avatar Animation - Help
I've managed to record and play Meta Avatar animation but there are problems because animation always gets stuck.
Here is part of the implementation:
I save modified PackedData every LateUpdate
PacketData packet = new PacketData();
packet.lod = lod;
packet.dataByteCount = SourceAvatar.RecordStreamData_AutoBuffer(lod, ref packet.data);
when i want to play it, i simply interate through List of PacketData and call avatar.ApplyStreamData(data) every update or whenever i want. Everything works fine but animation always stops. There i also this warning popping up every 2-3 seconds or every second frame of data i read:
[ovrAvatar2 native] streaming::Snapshot remote time prediction exceeds one second. Jumping to new time.
UnityEngine.Debug:LogWarning (object,UnityEngine.Object)
The animation always freezes when it starts playing it again, it unfreezes randomly when i decrease update from every frame to once every second. Or when i loop through my 300 frame animation, it only plays it perfectly for the first time and then freezes everytime and plays only last 100 frames. When i stop the playback the animation snaps to last frame after 1-2 seconds and then when i play again its unfreezed and ok. It happends in Editor with Oculus Link cable as well as in build on Oculus Quest 1 and Oculus Quest 2. Need advice on how to fix this, im guessing its related to said warning.
[Todays update]
Seems like playing the animation like "PingPong" doesnt freeze and throw much less "Snapshot remote time prediction" errors. I've extracted ovrAvatar2StreamingPlaybackState and there are couple of interesting variables: latestSampleTime, localTime, remoteTime, oldestSampleTime, recordingPlaybackTime, interpolationBlendWeight. I'm guessing the problem is as follows - some underlying system is analysing animation time and because this data is recorded it is messing with the timings so its trying to interpolate or something. The animation always breaks when subsequent frames playing are more than 30 frames apart.
Follow up!
I miracleously solved the mystery (although its still work-around) but this time with no drawbacks.
zeroing-out 2 values in avatar data apparently responsible for ovrAvatar2StreamingPlaybackState.remoteTime
these two values indexes are 12 and 13 (in all low/medium/high data types)
3 Replies
Replies have been turned off for this discussion
- bdstudioExplorer
Follow up!
I miracleously solved the mystery (although its still work-around) but this time with no drawbacks.
zeroing-out 2 values in avatar data apparently responsible for ovrAvatar2StreamingPlaybackState.remoteTime
these two values indexes are 12 and 13 (in all low/medium/high data types)- ecume.desjoursProtegeovrAvatar2StreamingPlaybackState
Thanks to bdstudio for this workaround. Here's a concrete example of how to implement it.
byte[] firstBytesInList = _animationQueue[animationFrame];
firstBytesInList[12] = 0;
firstBytesInList[13] = 0;if (firstBytesInList != null)
{avatarGameObject.GetComponent<SampleAvatarEntity>().ApplyStreamData(firstBytesInList);
}
- RaoulReplyHonored Guest
This seems to no longer work in the meta avatar sdk version 24, since they changed the network data format in this version. Has anyone already migrated to the new version and has figured out what bytes to change in the newer version? If it even is that easy again.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 11 months ago
- 2 months ago
- 11 days ago
- 6 months ago