Page 1 of 1

fps going down with a lot of animation models !

Posted: Fri Nov 19, 2010 6:23 pm
by paulorr29
hi ! a question.
how i should be do, if i wanna make a level with 20 models with animation ?
with 1 or 2 models, runs fine , 100 + fps , but when i load a lot of model with animation ( 15 - 20 ) fps going down to 8 -15.

the models are low poly, with small textures.
with static models, dont happen that

i see in games a lot of times, 10 + enemies attacking you ,and the fps going fine.


-greetings

Posted: Fri Nov 19, 2010 6:42 pm
by Mel
Currently Irrlicht doesn't support hardware based animation systems. So, using many models (with some complexity) adds a great amount of processing time to the scene, because it has to calculate the mesh for each object, in memory and then, load it into the videocard.

Currently, the only solution i could really think of is to create a shader which did the skinning processes inside the videocard, that the animated meshes always rendered from the identity mesh, and that the meshes were ALWAYS stored in the video card.

I've seen games with 40 to 50 enemies very highly detailed (10000 triangles and more!) attacking you at a time ^^U But that requires also batching optimizations, and crowd rendering routines.

Posted: Fri Nov 19, 2010 8:56 pm
by lazerblade
That's a real letdown for me.

Anybody know of any tutorials on using shaders to do hardware accelerated skinning/skeletal animation in Irrlicht?

That's one feature that needs to be in 1.8 for sure.

Posted: Sun Dec 05, 2010 12:40 am
by jerrelDulay
Thanks for posting this. This is a great topic and I'm glad you addressed it. I was also wondering the same thing, and now I'm a wee bit disappointed as well. :( I hope we can get hardware animating in a future version.

:edit:
Also, wouldn't it be possible to substitute the animated mesh nodes with non-animated meshes if they are a certain distance from the player/and or deactivated in gameplay?

:edit again:
Just tested that idea. In my game engine, I have the class "actor," which previously only had a pointer to the animated scene node. I just added two nodes to this actor class, one is an animated scene node, and the other is just a non-animated mesh. The non-animated mesh just copies the transforms and rotations of the animated mesh.

Only one of these two scene nodes are visible at a time. It's set so that if the actor is a certain distance from the player/camera, that actor then "deactivates," and makes the animated mesh invisible, while the non-animated mesh becomes visible. This prevents a massive FPS drop.

However, this only works in certain games, like a Final Fantasy-type RPG. If you're doing something like a Left 4 Dead game where tons of enemies attack you at once, then this won't be much help.

Posted: Sun Dec 05, 2010 6:39 am
by lazerblade
Someone apparently wrote a shader for this and it's available if you look
here: http://irrlicht.sourceforge.net/phpBB2/ ... 6&start=15

Posted: Sun Dec 05, 2010 11:40 am
by jerrelDulay
Wicked, thanks for posting that!

Posted: Mon Dec 06, 2010 6:44 am
by bitplane
A simpler solution would be to implement levels of detail for meshes based on distance. You don't need to skin every mesh every frame, nor do you need a mesh with fifty bones when you're viewing from afar.

Also, your meshes may not be optimized. You should combine to as few materials as possible and remove unnecessary joints.

Posted: Mon Dec 06, 2010 7:52 am
by Bear_130278
paulorr29, i think there is something wrong with your models 8))