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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Number of keyframes

Discussion in 'Animation' started by Twainstar00, Nov 22, 2015.

  1. Twainstar00

    Twainstar00

    Joined:
    Mar 7, 2015
    Posts:
    46
    Will it cause an overhead if my model has many keyframes on it?
     
  2. Torbach78

    Torbach78

    Joined:
    Aug 10, 2013
    Posts:
    296
    not the keyframes themselves.. it is the number of fps * duration * animations * properties animated.

    that is the data and all data costs runtime memory

    your use case can be extreme -- 100 bones with 2,000 seconds of 30fps data? that could lead to memory bloat if not handled right but it can be compressed
    http://docs.unity3d.com/Manual/FBXImporter-Animations.html
    character animation IIRC use "optimal" for best results

    animation authored in Unity *.anim sample rate controls data needed per second. I've found I normally only need 10 for prop animation
    http://docs.unity3d.com/Manual/animeditor-UsingAnimationEditor.html
    {though currently there is no information on this in the document section}

    cinematics I'll to drop to 5 to save...going under 3 samples/sec can create unwanted ease-in ease-out motion
     
    theANMATOR2b likes this.
  3. Twainstar00

    Twainstar00

    Joined:
    Mar 7, 2015
    Posts:
    46
    I have 25 bones with 4,100 keyframes.. Will it lead to memory bloat?