Jump to content

Animation FPS drops


Recommended Posts

I am wondering if anyone can help me with an animation problem I am having. I have seen this same issue on other part mods and it frequently happens to my animated parts. When placing the part it will cause large FPS drops until I deploy then undeploy the animation. This happens in the VAB and once loaded into the game. There are no errors or warnings in the log and no spam.

Is this something that happens because of overlapped colliders, moving colliders, non-linear animations? It happens on parts with a high polygon count, large numbers of moving parts and colliders, but it also happens to single parts with a single moving animation. I can't find any reason for it.

Link to comment
Share on other sites

high number of mesh colliders can eat up frame rates, high number like in the 20+; also check to see if there are properties that have key frames where they shouldn't... things like collider size; component on/off. Most of those will give you an error during export or KSP load time and you won't see the part in game, but maybe some of them slips through.

Link to comment
Share on other sites

So I can't resize a collider by having it as the child to a part that changes or I just can't resize it directly using keyframes? I have many parts with colliders set as their child that change size. One of my solar panels has 31 simple "cube" mesh colliders and it causes no lag at all. I then have a part with a single moving antenna with 2 colliders total that causes massive fps drops.

Link to comment
Share on other sites

I think parent objects of colliders can animate, and if a child object happens to have collider, it's not a probelm. but collider themselves should not have any key frames, like if you keyframed the radius on a capsule collider... or convex tick box on a mesh collider, that will usually give you errors either during export or during game load.

it's hard to know why animations run super slow. a lot of times I end up redoing them and they work afterwards. are there any messages in Unity console when you scrub the animation on the part that's slow in KSP? I had a really weird error message related to an imported animation in Unity recently, but was never able to reproduce it. would have been useful for future references.

Edited by nli2work
Link to comment
Share on other sites

I think this is a phenomenon known as "animation lag". It has something to do with keyframes, though I don't remember the details. Yogui's models had great issues with it in the past.

Link to comment
Share on other sites

I think I figured out the issue. If I separate the animated parts, like the antennae, from the rest of the ship and make them their own model/part the lag disappears. I am currently in the process of converting all of my parts by making the antennae and dishes separate parts.

Link to comment
Share on other sites

hm, interesting. Is the animation component on the root transform of the entire part, or on the transform that is animated? if you have bits that use different animation clips, might help if the bits have their own animation component with it's own clip, instead of single animation component on the root transform with multiple clips. You can still call all the different clips as normal. Added bonus of being able to shift the animated transform around the heirarchy without breaking its animation clip.

Link to comment
Share on other sites

As much as I hate to do this I am dropping the stock animation module. I don't want dependencies but I don't have a choice here. I switched back to the firespitter animator and the craft no longer lag at all.

Edited by raidernick
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...