Search Unity

Question Animation with .csv data

Discussion in 'Animation' started by Cleo01, Nov 1, 2022.

  1. Cleo01

    Cleo01

    Joined:
    Oct 26, 2022
    Posts:
    2
    hello everyone !
    I am here as a very new user of Unity for a school project (I am in an engineer school). We have a project of body tracking (with the optitracks system if some of you are familiar with it) and we have to visualize our data and people advised me unity.
    For collecting our data, we have some markers on all the body (3 on the head for example, 50 in total) and the positions of these markers are captured with infrared. For each small period, we have the position and the rotation of each markers ( I joined you a picture). The point of this project is to visualise these data in a form of an avatar, if some of you could help me, it would be great because I have no idea how to do it and the only tutorials I found use already existing animation for their avatar (of Maximo for instance).
    Thank you ahead of time
     

    Attached Files:

  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,438
    you can rotate body parts with script, if you find suitable human character that has required parts..
    (test some free ones from asset store first)
    https://docs.unity3d.com/ScriptReference/Transform.html

    but since you have so many markers, and probably not at joint positions, might get complicated (trying to rotate parts).
    Maybe IK enabled character could work, so the body parts react more naturally into moving hands into target positions..

    have you managed to load & parse those values into array?
    google for: unity load csv

    optitrack has also 3ds max exporters, maybe even unity plugin..
    so if want the easy way, import that data into 3ds max, bake character animation there. *Although not sure if this is possible from that kind of CSV data, at least 3ds max plugin can record animated character tracking at realtime..


    upload_2022-11-1_20-16-55.png
     
  3. Cleo01

    Cleo01

    Joined:
    Oct 26, 2022
    Posts:
    2
    Thank you so much for your answer !
    However, I don't know Unity at all, so I didn't really understand all that you told me.
    For your first idea, if I understood well, I should find an avatar that have exactly the same "markers" than me? Isn't possible to take an avatar and indicates for what point we have data ?
    Moreover, could you tell me more about these IK enabled character?

    Finally, using directly optitracks, I already try to upload data under .fbx, but nothing happens when I try to put it in Unity.

    Thank you again for your answer and your time !
     
  4. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,438