Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Kinematica - When creating my own Kinematica asset, only the "first" animation is ever selected

Discussion in 'Animation Previews' started by Mic_Emond, Oct 21, 2020.

  1. Mic_Emond

    Mic_Emond

    Joined:
    Nov 16, 2016
    Posts:
    45
    So I've been looking into Kinematica, and the demos work great.
    It's all pretty straightforward, but I seem to be missing a crucial step that I can't figure out.

    If i create my own Kinematica Asset with exactly the same anim set as the Biped Demo, like so:
    Idle animation : Tag Idle + Tag Locomotion
    All other animations: Tag Locomotion

    With a "Default" metric that looks at both those tags.

    Then MINE (even using the Biped demo code for movement) will start in Idle, and when I input, will always pick the first animation that satisfies the "locomotion only" query. It will also never go back to Idle (drifting slightly in a direction forever).

    The character I use is just a duplicate of the one in the scene. The only difference being the linked Kinematica Asset that I recreated to match the demo one for one.

    In that case, the demo turns and everything, but the copy will only ever use the one anim. If I tried to turn, sometimes it seems it will play a long sequence with a plant and turn at the end, like it's saying the best pick is this long forward run followed by the turn (always in the first anim).

    On different animations, it will slowly replay the same 3-4 frames that turn the character for example, because they are the only frames in the first animation that satisfy my trajectory (I assume).

    What am I missing ?
     
  2. FrancoisFournel

    FrancoisFournel

    Unity Technologies

    Joined:
    Feb 12, 2020
    Posts:
    66
    Hello,

    Can you share a screenshot of the setup of the Default metric in your Kinematica asset please ? (select the asset in the project hierarchy, then in the inspector unwrap the Default metric area)

    This could be due to joints not properly setup in the Default metric. You need to setup joints (usually the feet on the neck for the biped) for the metric, so that Kinematica can discriminate between poses and chose the best one.
     
  3. Mic_Emond

    Mic_Emond

    Joined:
    Nov 16, 2016
    Posts:
    45
    It is the exact same as the demo (I set all the options 1 by 1 to match the demo metric)
    Both feet and the neck are checked.
    Linked is the screenshot.

    I remade yet another one from scratch just to validate and I still get the same behavior. This time it does seems to play ONE other animation sometimes (plant and turn) but it's mostly picking the first one that is not Idle. It will also never go back to idle. (always back to the first locomotion animation)

    It uses the Biped from the sample as well as the "Biped" script from the sample. If I just swap the Kinematica asset back to the one from the sample on the Kinematica component, then everything is good.

    (PS: Since I just experienced it again: any plans for multi edition to add tags? It's pretty inefficient right now to go one by one!)
     

    Attached Files:

  4. FrancoisFournel

    FrancoisFournel

    Unity Technologies

    Joined:
    Feb 12, 2020
    Posts:
    66
    Ok, no issue with the metric. Could you send me the project via DM ? would be probably easier to have a look !
     
  5. Mic_Emond

    Mic_Emond

    Joined:
    Nov 16, 2016
    Posts:
    45
    Hey. Not sure how to link the project here. It says the file is too big (57mb). In private conversation as well.
     
  6. Mic_Emond

    Mic_Emond

    Joined:
    Nov 16, 2016
    Posts:
    45
    Any help on this so we can figure this out? :)
     
  7. FrancoisFournel

    FrancoisFournel

    Unity Technologies

    Joined:
    Feb 12, 2020
    Posts:
    66
    Hello, I apologized for the delay, thanks for uploading the project, I took a look at it and it's indeed a nasty bug on our side. I was not yet able to pinpoint the exact reason.

    Meanwhile, I found you can workaround the issue by removing and adding back the Idle tag on Idle clip. Let me know if that works for you!
     
  8. Mic_Emond

    Mic_Emond

    Joined:
    Nov 16, 2016
    Posts:
    45
    Seems like re-adding the tag did work, at least partially. Seems like it still doesn't want to go back to Idle, but that might just be a thing with the demo.

    But yeah thanks for the tip! Glad we found a bug !
     
    FrancoisFournel likes this.