How much do Animated Meshes Affect Frame p/sec?

magicmyshu

28-04-2007 18:21:57

Hi - I'm new here =)

I'm very very happy about the performance in Python-Ogre so far. Having come from using (and I still use it) the blender game engine I just find the speed and features to be amazing :D

I do have a question though:

In the Blender game engine it's a fact that rendering a static 3d mesh and rendering one that is rigged to an armature and animated are two different stories. For instance in the blender game engine let's say you render one 80,000 tris static model at 60fps. Once you rig that same model to an armature and animate it - then that very same scene is going to slow down to about 20-30fps. So that being only one model you then know that armatures really have a strong effect in the perfomance, but especially when dealing with dense meshes like the one mentioned above with 80,000 tris. If said model had only been 5,000 tris instead of 80,000, then perfomance might not have taken any noticeable hit at all.

I've only just installed PythonOgre about 2 days ago and I've only just figured out how to place objects inside of the scene (I still haven't figured out materials though) - and I've tested a mesh that contained a lot more tris than 80,000 inside of the Grass demo. And it rendered fine at 60fps! Which was just incredible.

It will take time for me to figure out how to get the animation to work iniside of Ogre - I'm working on that part now - so my question is, what is the affect of complex animated models on Ogre's perfomance?

On a solid computer how big a poly-count is too big as far as characters are concerned - if you are looking for 30-60 fps playability?

How many bones is too many for an armature (skeleton)?

I was thinking that I'd like to have about 5-6 18,000-24,000 tri characters each utiliziting animation from their own 25 bone armature skeleton on screen at once. Does this sound feasible at all for 30fps? Or would the armatures need to be simpler? It's hard for me to know seeing as I am so very new :roll: and I don't have a proper understanding of how Ogre performs with animation and effects and etc.

Right now it's hard for me to test, seeing as I don't know how to convert my blender animations into Ogre compatible form just yet. (let alone how to run the animations once they are inside)

thank you

bharling

28-04-2007 19:03:45

Hi :)

to answer your last point, the blender xml mesh exporter should be able to export animations as well (if not, check your version). These get saved as .skeleton.xml and you pass them through the ogreCommandLineTools as with a mesh. The names of your animations will be remembered in the skeleton file, so to start your character animating do this:

self.animState = self.Entity.getAnimationState('Walk')
self.animState.enabled = True


then every frame you need to update the character or object holding the animState pointer. You need a framelistener to get the '.timeSinceLastFrame' property each frame, which you pass to the animation call like this:

self.animState.addTime( frameEvent.timeSinceLastFrame * self.animSpeed )

self.animSpeed is the animation speed playback rate you can set yourself. Usually 1.0 or so.

Of course you can use your own timing mechanism instead of a frameListener, but you need to keep track of the time between frames being rendered.

I dont know the answers to the rest of your questions, but to find out, you could do 'self.animState.enabled = True' as the result of a keypress in the game ( see any of the framelisteners in the demos to do this ), and watch whether the framerate changes.

magicmyshu

29-04-2007 00:21:23

thank you I'll try it :D