Search Unity

Animate a humanoid avatar using only a CSV file! S.O.S.

Discussion in 'Animation' started by Virtual_Velociraptor, Jul 21, 2017.

  1. Virtual_Velociraptor

    Virtual_Velociraptor

    Joined:
    Jul 1, 2017
    Posts:
    7
    Hello everyone,

    I'm currently trying to animate my humanoid avatar with a CSV (comma separated values) file that contains the desired x,y,z coordinates of each joint, frame after frame. I have tried several solutions, but all of them keep giving me serious problems. I want to accomplish this myself without the use of any 3rd party software.

    Solution 1: I set my avatar's rig to humanoid and attached (with script) every joint on the rig to the desired Vector3 coordinate in the csv file. This resulted in a warped avatar with strangely bent arms. Also, the body parts seem to want to stay in a T-Pose while still moving.
    Solution 2: Second, I tried making my avatar into a "ragdoll" and mapping each corresponding joint, once again. This gave me a highly unstable avatar that kept bouncing around all over the place, while keeping its joints locked on to the corresponding Transforms from the csv file.

    In the images below, both avatars are getting their points from the same CSV files. Based on how the MoCap avatar's arms are positioned, it seems like it is trying to keep its original T-Pose. Also, note how all of the blue avatar's joints are dislocated. Does anybody know why this is happening?

    I'm not sure what other options to try out. Maybe one of these current options is appropriate, but I'm doing something wrong in my implementation. I would really appreciate any insight, suggestions, or tutorials. Thanks! mocapIssue1.PNG mocapIssue2.PNG mocapIssue3.PNG mocapIssue4.PNG