Page 1 of 3

more .X much more decrease FPS.

Posted: Sun Jan 14, 2007 8:28 am
by Espanol
I fact, I am not sure that is bug or not but I doesn't happen with another engine.

My game is RTS game and this problem is make my project can't go on.
I fixed my FPS at most is 30 FPS the game was running properly before I produce soldier fron barrack. After number of soldier more than 7, FPS was lower than 30FPS and if I go on produce soldier, FPS will lower lower and lower...., even my scene just render lower 10,000 of polygons

My model is .X format used biped and physique for animation with 1710 animation keyframes exported with panda DirectX from 3ds Max 8.0.

After I test to find the source of problem, length of animation keyframe, amount of polygon per-unit, texture and even if i setloopMode(false); to all node its can't help anymore. May be problem is from reading bone or biped data stored in Xmesh each loop(i just my suggestion).
(Use Direct3D_9 or OPENGL is the same FPS result)

you can get my model from this link
Sword_Soldier.zip
Any nody please download it to test for me and fixed this problem it is a tremendous problem of my team. :cry:

Any body please help.

Posted: Sun Jan 14, 2007 10:32 am
by Luke
1710 animation keyframes is crazy, I'm making a fps and I've got 100 keyframes and it's more then I need, and the animation is perfectly smooth,

If it's because you are baking the frames, I recommend a better mesh loader, that can do better keyframe interpolation.

I can easily run 30 animated characters each 2000 ploy on my laptop, with fairly good frame rate.

The .x animator is slow, try a format with a faster animator like .ms3d or something, and cut down on them keyframes, why so many, I cannot see any reason.

Posted: Sun Jan 14, 2007 11:29 am
by Espanol
Luke wrote:1710 animation keyframes is crazy, I'm making a fps and I've got 100 keyframes and it's more then I need, and the animation is perfectly smooth,

If it's because you are baking the frames, I recommend a better mesh loader, that can do better keyframe interpolation.

I can easily run 30 animated characters each 2000 ploy on my laptop, with fairly good frame rate.

The .x animator is slow, try a format with a faster animator like .ms3d or something, and cut down on them keyframes, why so many, I cannot see any reason.
Thank you Luke but I think length of key frame isn't point of problem because I try export the same model that I attached above for download again with just 100 keyframe(in panda exporter i choose to export only 0-100 of keyframes) and load in to play again but the result is the same.

here is a picture link.
Image

only 9 soldier(in orange marked) each was exported with 100 of keyframes. THE RESULT IS THE SAME.

PLEASE HELP. I love irrlicht but if this problem cannot solved our project must change engine. I don't want to leave irrlicht.

Posted: Sun Jan 14, 2007 12:50 pm
by Luke
Hmmm,

What's your cpu speed,

Like I said try a different mesh format, .x meshes are pretty slow at animating.

How many vertices on each soldier?

Posted: Sun Jan 14, 2007 2:33 pm
by Espanol
Luke wrote:Hmmm,

What's your cpu speed,

Like I said try a different mesh format, .x meshes are pretty slow at animating.

How many vertices on each soldier?
My computer spec is 1.75Centrino/1GB RAM/GF 6600GO 128MB

If u sure that .X format is the point of problem, I will try changing my model format whole of my game, but what is the model format in your openion that will not have FramePS problem.

My soldier has about 800 face of poly.

Posted: Mon Jan 15, 2007 1:11 am
by Luke
Yeah, I'd say something is wrong because me laptop is a only a 1.60 Centrino Duo/1GB RAM

I'm using b3d but only the SVN version is fast, not 1.2.

ms3d is fast too.

Posted: Mon Jan 15, 2007 5:21 am
by Espanol
Luke wrote:Yeah, I'd say something is wrong because me laptop is a only a 1.60 Centrino Duo/1GB RAM

I'm using b3d but only the SVN version is fast, not 1.2.

ms3d is fast too.
Thanks again luke, we will try .b3d because we don't want to animate all of our character again in milkshape and I will retold the result again.

But just has only one question remain.... Does the amount animation keyframes of a character much slow down the render process? Why just a concept explanation for me is enought.

THANK YOU.

Posted: Mon Jan 15, 2007 7:45 am
by Luke
A small speed up, 40-45fps (in .x) to 70-82. (in .b3d), but I’m only testing with 10 meshes.

The large numbers of keyframes is bad because the animater has to sort though them to work out which keyframe it’s on.

There’s are 1007 vertices on that mesh which is not that bad, but 104 bones? Sorry I didn’t see that problem before. That will really kill the framerate much more then the keyframes problem, The latest games out don’t use that many bones. Try getting it under 40 bones.

Posted: Mon Jan 15, 2007 12:49 pm
by Espanol
Luke wrote:A small speed up, 40-45fps (in .x) to 70-82. (in .b3d), but I’m only testing with 10 meshes.

The large numbers of keyframes is bad because the animater has to sort though them to work out which keyframe it’s on.

There’s are 1007 vertices on that mesh which is not that bad, but 104 bones? Sorry I didn’t see that problem before. That will really kill the framerate much more then the keyframes problem, The latest games out don’t use that many bones. Try getting it under 40 bones.
Thank you Luke, but 104 bones? I don't understand. You count my model bones by what function, is getJointCount () or not, if so It return only 52 to me. ????

Posted: Mon Jan 15, 2007 1:05 pm
by Luke
Well unwrap3d is loading it with 104 bones, did you make that mesh? Why would you need to use getJointCount() to find out the bone count?

I'm not sure why it gives you 52 bones is the mesh loading right?

Posted: Mon Jan 15, 2007 1:24 pm
by Luke
I see you mesh had a lot of bones called 'blank' doing nothing, I deleted them, and it now has 37 bones.

I now get 100fps, animating 10 b3d meshes, all animating differently (to stop it caching)

and with 40 meshes, I only get 25fps, but there is still room to optimize the mesh.

Posted: Mon Jan 15, 2007 1:28 pm
by BlindSide
Dunno if you noticed but, 52 = 104 / 2 :lol:

Posted: Mon Jan 15, 2007 1:38 pm
by Luke
Thank you Luke but I think length of key frame isn't point of problem because I try export the same model that I attached above for download again with just 100 keyframe
By the way this only scaled the frame numbers there are still 1710 animation keyframes from 1-100, So it doesn't change anything.

Posted: Mon Jan 15, 2007 2:06 pm
by drac_gd
I ran your model in DirectX MeshView approx 160-680 fps
this is almost identical to what my model runs ( multipart mesh.. no bones )

In Irrlicht latest Svn MeshViewer my model approx 250 fps
your model 45 fps

Both models the transforms were all messed up in irrlicht but ok in directx MeshView

My computer
AMD Septeron 1.6 GHz
GForce 6600

My model

http://www.tronacom.com/downloads/hfaTry11.rar

My guess
looking at your .x file my guess is that the skin weights are really slowing things down. calculating the weight effects are very costly cpu time.

I finally hacked irrlicht enough to show my model correctly with correct animations. Im working on in game armour attach/unattach I am using 3dsmax9/panda. If you decide to do a multimesh model instead maybe we can collaborate.

Posted: Mon Jan 15, 2007 4:30 pm
by Espanol
Luke wrote:I see you mesh had a lot of bones called 'blank' doing nothing, I deleted them, and it now has 37 bones.

I now get 100fps, animating 10 b3d meshes, all animating differently (to stop it caching)

and with 40 meshes, I only get 25fps, but there is still room to optimize the mesh.
Thanks again Luke and would you please send your modifiered model back to me for test and compare.