Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Place animation event on EXACT keyframe?

Discussion in 'Animation' started by Kerihobo, Jun 10, 2023.

  1. Kerihobo

    Kerihobo

    Joined:
    Jun 26, 2013
    Posts:
    61
    For Animation Clips generated from WITHIN Unity, you can scrub to a specific keyframe on the timeline (e.g. frame 26) in the Animation window, with respect to your sample rate, and place events on the frame.



    I'm trying to setup events on imported FBX animations though, which is a different story. It only lets me scrub by normalized time and the accuracy of the scrub is determined by how wide my inspector panel is at the time. It's very imprecise.



    I'd rather be able to place events the same way I do with Unity-generated anims in the Animation window than have such a fluid %-based scrubber like in an FBX's preview window.

    I realize that `time` is more relevant than `frame` given how it's unknowable which exact moment is rendered to the user's screen, but the artist I'm working with is putting his best work in, being very intentional about his keyframes and I'd like to offer assurance that I'm placing events as best as I can.

    Is there some way I can place events by frame rather than % without going out of my way to make a custom tool that scrubs steps of divisions? Another way I've decided to do it is by opening the FBX's meta file after placing events and then typing the fraction where his keyframe is placed.

    Any input on this is appreciated. Thanks.
     
    Last edited: Jun 10, 2023
  2. AAAAAAAAAE

    AAAAAAAAAE

    Joined:
    Jun 8, 2013
    Posts:
    90
    I placed animation events on key frames of an imported fbx file from Mixamo.
    anim_preview.png

    anim_event.png

    U need to select the fbx file and press ctrl+d to separate the animation as editable file.
    anim_files.png
     
  3. Kerihobo

    Kerihobo

    Joined:
    Jun 26, 2013
    Posts:
    61
    I'm aware of the duplicate option but I don't really consider it a solution. It's almost ok if your character only has like 4 or 5 animations, but in our case, each character has over 100. If you have lots of characters and literally hundreds of animations, you need the events preserved when your artists updates them in Blender again without having to duplicate those 100s of anims all over again, re-distributing events for each one and then reassigning the new clips to the right states in rather complex controllers which will take a very long time.

    I'm really after a pipeline-friendly solution, ideally the FBX Preview scrubber could just be better lol. But yeah, am really after better way to edit the events directly on the FBX.
     
    Last edited: Jun 11, 2023
  4. AAAAAAAAAE

    AAAAAAAAAE

    Joined:
    Jun 8, 2013
    Posts:
    90
  5. Kerihobo

    Kerihobo

    Joined:
    Jun 26, 2013
    Posts:
    61
    I'd be ok with a coded route but at that point its not much different from me keying normalized time into the meta file. I feel if im gonna head down this path and have 1 giant C# file distribute potentially 1000+ events i may as well put in the effort to make a custom editor.
     
    Last edited: Jun 11, 2023