Does number of frames affect performance?

I’m animating my character’s idle sequence:

stare ahead, look left, pause, look right, pause, return to looking forward. I’m at 239 frames. This is a lot right?

1 Answer

1

The number of frames affects performance in that Unity is working harder when an animation is playing than when there is no animation playing, but there is no “fatigue” phenomenon that I am aware of. If Unity were accruing some kind of muck on the inside of the pipes while the animation data were flowing through, that would be truly crappy, and so I (optimistically?) doubt that this is the case. Perhaps someone would like to profile an hour long walk cycle? 239 frames is not an unusually large number of frames for an animation. In consideration of any other performance issues you may have, it is very unlikely that your animation length is a primary problem. What is your target platform?

I'd guess that animations with more keyframes would have a slightly larger memory footprint. That's about all I'd anticipate off the top of my head. Does sound like an interesting test, though. ;)

Right, as long as you have the available memory to load it in the first place, it shouldn't be more strain to play it back. Maybe there would be a performance hiccup at load, though.

Thanks everyone for the feedback. I guess this is something I can always tweak as need be. I'm working on a machine with i7, 8 gigs of ram, 2 gigs vram so what runs ok for me may not run good for some in the end.