- Home /
A question about animating an object & CPU performance
Hello,
This is probably more of a question of if something can be done, not necessarily how to do it. I've animated gameobjects before directly in Unity with no issues, however when trying to animate my current gameobject (a boss character) Unity will slow down to an unusable speed, and my computer will show between 50 - 95% CPU usage.) Bear in mind, this is in the editor, not in playtesting. Essentially, once I open the animation window on the character, it will take about two minutes before I can select a portion of the armature, another two minutes before I'm able to insert a keyframe, then another two minutes (all estimates, btw) before I can pose that item, give another two minutes to select another part, (a leg, for example) and repeat the process. Have never experienced that with animating anything else in Unity. A couple of things:
The character was created in MakeHuman
The character clothes were rigged in Blender
The armature was added in Blender
The character has a TON of different parts, some of which I've deleted since they're under clothes and will never be visible
My CPU is an older quad core Acer desktop with 4GB of RAM. Older, but has never been backbreaking. Still, I recognize that this MIGHT be my issue.
Thought I'd throw this out to the community in case others have experienced this and have found a fix that doesn't include purchasing the latest hardware. Thanks, and God bless.
Did. You make sure the poly count of the objects are low? He higher the poly the slower your computer goes.
Admittedly I had seen the terms "high poly - low poly," but had yet not looked into what they meant, though I suspected they would affect performance. Briefly tried making the animation in a brand new scene though, and so far, so good.
Answer by zephyr7 · Nov 04, 2013 at 08:47 PM
Apart from the polygon count, there are other factors that greatly influence how much performance a rigged character draws.
One of the most important ones is how many bones a vertex can be influenced by. You can set at limit to that in the graphics/quality settings of unity.
What about your animation - Are there animation curves for many values that aren't even animated? Ditch those. Baking or importing animations around can also cause a lot of excess keyframes which can be reduced, if it looks like there are far more keyframes than neccessary to describe the curves, try to run a keyframe cleanup in your animation package over it.
The number of bones in a character also plays a role, as does polycount.
thank you so much (everyone!) for the tips. Very strange indeed, but I simply can't make animations in my main game scene. The lag gets horrendous. That said, I can make them in a nearly empty "test scene," attach them to a prefab, and place the prefab in the main scene, and the animations will run with no problem. Only lags (and all of them do) on editing, and in that particular scene.