Animation Influence on fps

I’ve noticed that, even if you have designed everything efficiently in a scene, Actor animation can drink down a lot of fps. I know you can create an animation LOD, but that’s not really effective if the Actors are all going to be around the camera (up close and personal).

Just wondering,

Is there anything else that can be done to minimize fps lost from animations?

Other wise I would say a full detailed environment with a dozen actors would ‘flatten’ the fps at 30.

Decrease number of vertices, you could try using hardware acceleration for animations.

hardware-animated-vertices #t

in your config.prc

You think around 5-6k vertice an Actor is too much?

It should not be, are you perhaps exposing joints, so your actors are made of multiple parts?

What hardware do I need for the animations to run on the gpu ? I’don’t see any change with this on or off.

From my own tests a total of15k verts and 50 bones was the limit where fps would drop a lot, but that was on low-end cpu (1core, 1GHz ).

For testing purposes, I have several joints exposed on one Actor, and just one joint exposed on four more Actors.

Can’t imagine exposing a joint would cause major fps drop.

I have placed a punch of Actors on the screen with just one animating, and the fps stayed perfect. That’s why I’m assuming the animated vertices are expensive, but are a major part of any game application.

I guess testing things out was the smart thing to do, instead of working on a project right away.

You can tell in PStats whether it is joints or vertices (“skinning”) that contributes the biggest part of your frame rate drop.

Don’t forget to pass your egg files through egg-optchar. This can give a big speedup to animation performance.

David

I know egg-optchar is done from the command line right? Can you post a command line example of how to do it right?


Found this -
Optimizes models by removing unused joints

I don’t think I have any unused joints on my Actors, so I guess egg-optchar would have no effect with my Actor eggs.

Command line example:

mkdir output
egg-optchar -d output *.egg

You should just try it. It does more than just remove joints.

David

Is it enough to just run optchar on the geometry file of an actor, or should I run it on animation files as well?

I’m guessing files used as animations are all about the key frame data, and no geometry is pull from those files.


I tried it and it messed up my animations period. My Actors were frozen in the base pose with only one part of their body animating.

It was horrible!!! Lol

You have to run all of the animations and the model(s) through egg-optchar at the same time. It is doing wholesale restructuring of your skeleton hierarchy. If you try to do just part of it, it will mess up your animations.

David

If that’s the case, then wouldn’t it be better to do it when all animations are done? But I wouldn’t even know how many animations I might design at this point.

Which brings me to this question -

If another animation gets added to an Actor later, after an optchar was performed, would all models and animations have to receive the optchar again?

Yes, just re-run egg-optchar every time you add a new animation, or modify the animation data in any way. Think of it as part of the process of preparing your character tables for real-time rendering.

David

This is were I wish you could paste directly into the command line. One “typo” in the command and you have to re-type. If you have numerous animations, that can kill you.

Question -

I’ve only used egg-optchar on a single file. For multiple files, do I have to define multiple outs? or should I just define an out put directory and expect the process the give each new file the same name as the original?

Would a multiple file case look like this:

egg-optchar -d C:\OutPutDir C:\Files\file1.egg C:\Files\file2.egg

Not sure how to define things with multiple files. Seems like a comma should be place between the out and files.

That’s the right idea. Use -d to specify the directory, and a space between filenames.

Write a script so you don’t have to type the command every time.

David

So it’ll look somethin like this:

egg-optchar -d Odir File1 -d Odir File2 -d Odir File3

No, more like this:

egg-optchar -d Odir File1 File2 File3 

David

I created a .bat file so I didn’t have to re-type the script.

Like before, my model was all messed up. I receive numerous errors about textures not being found and Joints not existing.

Plus my model was in its natural pose, but some vertices were pulling away from it (because of animations playing).

It was all crazy again. I guess egg-optchar can’t handle my low poly Actors. Lol

Are you sure you were loading both the model and the animation files from Odir, and not from the original source? egg-optchar works perfectly well with low-poly models, but it sounds like you were loading files from different sources.

You can make sure that the original source directory is on your model-path to fix the error messages about textures.

David

I actually over wrote my origianl files with the new ones (but saved the original just in case). The process doesn’t identify all bones, because it’s reporting that there isn’t a bone by this name or that name, which is incorrect. Egg-optchar also had texture issues, couldn’t find them in short.