fps going down with a lot of animation models !

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
paulorr29
Posts: 27
Joined: Fri Aug 27, 2010 8:23 pm
Location: Panama
Contact:

fps going down with a lot of animation models !

Post 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
my first app with irrlicht http://youtube.com/watch?v=8OHUgciBT8E
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Post 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.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
lazerblade
Posts: 194
Joined: Thu Mar 18, 2010 3:31 am
Contact:

Post 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.
LazerBlade

When your mind is racing, make sure it's not racing in a circle.

3d game engine: http://sites.google.com/site/lazerbladegames/home/ray3d
lazerBlade blog: http://lazerbladegames.blogspot.com/
jerrelDulay
Posts: 15
Joined: Tue Nov 02, 2010 4:49 am

Post 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.
lazerblade
Posts: 194
Joined: Thu Mar 18, 2010 3:31 am
Contact:

Post 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
LazerBlade

When your mind is racing, make sure it's not racing in a circle.

3d game engine: http://sites.google.com/site/lazerbladegames/home/ray3d
lazerBlade blog: http://lazerbladegames.blogspot.com/
jerrelDulay
Posts: 15
Joined: Tue Nov 02, 2010 4:49 am

Post by jerrelDulay »

Wicked, thanks for posting that!
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post 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.
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Bear_130278
Posts: 237
Joined: Mon Jan 16, 2006 1:18 pm
Location: Odessa,Russian Federation

Post by Bear_130278 »

paulorr29, i think there is something wrong with your models 8))
Do you like VODKA???
Image
Image
Post Reply