Search Unity

Lower framerate of animations to save cpu cycles?

Discussion in 'Animation' started by nicmarxp, Aug 9, 2018.

  1. nicmarxp

    nicmarxp

    Joined:
    Dec 3, 2017
    Posts:
    406
    i’ve seem in Dead Rising (xbox) with scenes with many zombies that the ones in the back animate with a lower framerate. How is that done in Unity?

    I want my game to run in 60 fps to ensure smooth panning/zooming in mobile but the characters are pretty small and probably would look just as fine in a lower frame rate.

    Ideally I could change this per character, so when zoomed out when many are shown, i have a low frame rate with low LOD and zoomed in it’s fewer characters with higher frame rate.

    Let me know what you think!
     
  2. nicmarxp

    nicmarxp

    Joined:
    Dec 3, 2017
    Posts:
    406
    Isn’t this interesting to anyone? With 100s of animated characters on screen the performance can really suffer, would be great to know how to do this..
     
  3. KB_sky

    KB_sky

    Joined:
    Apr 22, 2021
    Posts:
    2
    I was actually looking to create this effect for artistic purposes, and it seems all the ways to achieve it are at the cost of performance (instead of gain, like you wanted).
     
  4. Geist2501

    Geist2501

    Joined:
    Jun 29, 2019
    Posts:
    25
    I did that years ago for some stop motion lookalike stuff, like KB_sky said, for artistic purposes. I used the old animations system instead of the animator system (which is more performant btw). I then just got, scaled and rounded animation times and set them manually again.

    There was no improvement to framerate from that over paying the animation normally though since all calculations where done and i just discarded most of it to get the 12 FPS effect...

    Most games that have these kind of optimization use baked animations for the lower detail further away enemies. So no skeletal animation but old-school, baked keyframe, vertex based animations.

    There is actually some assets on the store for that kinda stuff, just that these make use of shaders nowadays to be even speedier ;)

    I reckon those would suit both of you for your needs...

    https://assetstore.unity.com/packages/tools/animation/mesh-animator-26009

    https://assetstore.unity.com/packages/tools/animation/gpu-animation-baker-pro-136591

    https://assetstore.unity.com/packag...and-instancing-for-animated-characters-183598

    I'm not affiliated with any of these, nor have i actually used 'em, but that is the kind of stuff you wanna look at. There is free source material for similar stuff on unitylist, but whether that is suited for your skill levels, i don't know. Maybe try the free S*** first ;)
     
    KB_sky likes this.