Serializing VL.Skeleton

hey @joreg and @Rayment ,

been playing around with the avateering features and love it - great work!

one thing that i’m really struggling with: i’d like to serialize a Skeleton for storage, network transfer etc. but can’t wrap my head around how to do this. common Serializers available for VL fail as recursive structures are not supported by them. do you have any tipps how to get this running?

Hey @motzi , thanks for trying it out and giving the feedback!

I’d suggest to register a custom serializer for ISkeletonTreeNode where you would exclude Parent. Then after deserializing you’d need to call ResolveParents. This will work already for most of the cases, but to make it bulletproof the lib needs a bit of a cleanup.

1 Like

hey @Rayment
i kind of failed with the custom serializer and now solved it by:

  • creating a basic SkeletonNode class that omits the parent
  • some operations to copy back and forth data to RootNode or ChildNode

with that it is possible to (de)serialize the Skeletons in an easy to use way.
check this branch if you’re curious.

my personal intention is to make skeletons transferrable over the network, without requiring the AzureKinect or ZED nugets on the receiver side. because of that i also decided to make a copy of the nodes defining the structure of the different skeletons that hardcode the structure but don’t require the original jointID enums from the respective packs.

i’d be interested in a discussion if this is a meaningful way of doing all this or if there are more elegant methods to achieve this…