Multiple 3D Skeletons

I would like to detect multiple skeletons in my unity Scene. However the example shown in the reference only provides an example for UI skeletons with the script SkeletonController.cs.

Is it possible to do it with 3D skeletons ?
I have trying to change variables of SkeletonController.cs. SimpleSkeletonAvatar to SimpleSkeletonAvatar3d but it didn’t work.

Thank You !

Hi Elise,

Here is a possible solution:

  1. Go to SkeletonController.cs and replace all SimpleSkeletonAvatar with SimpleSkeletonAvatar3d.
  2. In Unity editor, open the RGBandSkeletons scene.
  3. Set the position of Main Camera to 0, 0, 0
  4. Change settings of Color Frame Canvas: Render Mode = ‘Screen Space - Camera’.
    Drag-and-drop Main Camera (from p.2 ) to Render Camera.
  5. Delete Skeleton Canvas.
  6. Create an empty object and name it Skeleton3d (make sure that its position and rotation are set to 0, 0, 0). Drag-and-drop SimpleSkeletonAvatar3d to this object. Fill in the fields (joint prefab - JointSphere prefab, Connection Prefab - Connection prefab). Save as prefab and delete from the scene.
  7. Create an empty object Skeleton Controller (make sure that its position and rotation are set to 0, 0, 0), drag-and-drop Skeleton Controller to this object. Drag-and-drop the Skeleton3d prefab (from p. 5) to the Skeleton field.

If you need RGB background:

  1. The aspect ratio of the window should be the same as the aspect ratio of your sensor (for example, 4:3).
  2. If the skeleton size is incorrect, you have to change Field of view of Camera to the necessary value (so that the skeleton and RGB image correspond) (for example, 40).

If you don’t need RGB, just delete Color Frame Canvas and don’t follow p. 4 from the previous instructions.

Thank you very much for your response !

Everything is working !

1 Like