Milkshape (ms3d) AnimatedNode -> very slow

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Thorben Linneweber

Milkshape (ms3d) AnimatedNode -> very slow

Post by Thorben Linneweber »

Hi, iam working on a multiplayer fps game but i have problems with the format of my player. For each player i load a ms3d file which has 4000 frames... I tried to load 20 players but my fps-rate go down to 10fps! :(

Has anyone an idea why it is so slow? ... i always thought it doesn't matter how big the animations are... the only important factor or the numbers of bones.

Irrlicht has only to play a animation of 20frames... (e.g. from 1020 to 1040).

Please help!
ThommyE
Posts: 48
Joined: Sun Sep 18, 2005 3:02 pm
Location: germany/badnerlaendle

Post by ThommyE »

i experienced strange framerate drops when using ms3d files...(about 2000 frames) while playing the animation my fps went down from 120 to 80.. after the animation stared over again it was back to 120.. dropping again. try to export you models to x and see if you still have problems.
bdw, shure the animations are the reason? what framerate do you get when not playing any animation?
athlon2400xp+,geforce4200ti, 0.2Tb hd+64mb extern, 512mb ram, linux FC5 2.6.16-1.2096, 100%gates-free system
Thorben Linneweber

Post by Thorben Linneweber »

500...
Andi|xng
Posts: 83
Joined: Thu Mar 24, 2005 10:49 pm
Location: Schrobenhausen, Germany
Contact:

Post by Andi|xng »

The problem is perhaps also caused or influenced by the MS3D loader, which creates 3 vertices per triangle and does not take advantage of reusing vertices in the index buffer.
I think, I solved the problem a few days ago. Read this thread:
http://irrlicht.sourceforge.net/phpBB2/ ... php?t=9119

And please post your results in this thread, too. Niko said to me, that he will perhaps include the patch in the next version. But your support is needed, please test it too :)
Last edited by Andi|xng on Thu Oct 13, 2005 7:32 pm, edited 1 time in total.
Andi|xng
Posts: 83
Joined: Thu Mar 24, 2005 10:49 pm
Location: Schrobenhausen, Germany
Contact:

Post by Andi|xng »

But my patch does not solve all ms3d problems. I have still some speed problems connected with setFrameLoop() and joint-child nodes:
http://irrlicht.sourceforge.net/phpBB2/ ... php?t=8834

Nevertheless, with the patch it works much better now.
Thorben Linneweber

Post by Thorben Linneweber »

... 500 frames if i don't load anything. You are right i have just tested it wihtout playing animations! The frame rate is the same... (10 to 15 without any animation)

:?

I don't know much about ms3d files. Here are some model statistics

---------------------------
Model Statistics
---------------------------
Vertices: 1745
Triangles: 2124
Groups: 9
Materials: 0
Joints: 31
Smoothing Groups: 1
Mins: -36.11 31.78 -6.12
Maxs: 36.11 69.70 8.12
Center: 0.00 50.74 1.00

---------------------------
---------------------------

Is this okay?
Thorben Linneweber

Post by Thorben Linneweber »

Thx for your answer Andi|xng!

I already tried your code but the frame-rate just raised about 5 frames...

Do you have any other idea what takes irrlicht so much time?
Andi|xng
Posts: 83
Joined: Thu Mar 24, 2005 10:49 pm
Location: Schrobenhausen, Germany
Contact:

Post by Andi|xng »

I tried to find the bottleneck by compiling Irrlicht without any ms3d animation possibility. The frame rate was nearly exactly the same as with animation. The bottleneck seems to be the rendering. Try my patch and see if it helps.
Andi|xng
Posts: 83
Joined: Thu Mar 24, 2005 10:49 pm
Location: Schrobenhausen, Germany
Contact:

Post by Andi|xng »

Thorben Linneweber wrote:Thx for your answer Andi|xng!

I already tried your code but the frame-rate just raised about 5 frames...

Do you have any other idea what takes irrlicht so much time?
Sorry, no idea at the moment. But I will look at it when I have time. Unfortunately I am no C++ expert, I work with Java and Jirr...
If you can use .x, use .x! .x is much more faster, but in our project we have problems to convert the .ms3d to a Irrlicht-compatible .x file, so we have to user .ms3d...
Andi|xng
Posts: 83
Joined: Thu Mar 24, 2005 10:49 pm
Location: Schrobenhausen, Germany
Contact:

Post by Andi|xng »

But you can really help me a lot if you send me your .ms3d file: andi@xenoage.com . Thanks!
Thorben Linneweber

Post by Thorben Linneweber »

I would use *.x but i was wondering if there is also a way to add a node to a joint (here the weapon to the playerhand) with a *.x file ?
Thorben Linneweber

Post by Thorben Linneweber »

I converted the models to *.x but the fps-rate is now about 20fps :shock:

-> There muste be a problem with the model :shock:

Do you have any ideas why ???
ThommyE
Posts: 48
Joined: Sun Sep 18, 2005 3:02 pm
Location: germany/badnerlaendle

Post by ThommyE »

20 models with 2k triangles per model.. result is 40k poly...(at least 20k visible ) thats A LOT. at least for my geforce ti4200... level not includet in this calculation.
but i wouldnt get more than 20-30 fps with that.
if you'r hardware isnt drastically better than mine you really should concider using LOD or simmilar stuf.. or simply reducing the trinagle cout if possible.

@Thorben: you can attach a dummy node quite easy by linking its position to the matrix of the bone. the only problem is that the matrix is updated AFTER rendering the image.. so your attached node will allways be 1-frame behind the parent. I'm still looking 4 a solution.
athlon2400xp+,geforce4200ti, 0.2Tb hd+64mb extern, 512mb ram, linux FC5 2.6.16-1.2096, 100%gates-free system
Guest

Post by Guest »

For each player i load a ms3d file which has 4000 frames... I tried to load 20 players but my fps-rate go down to 10fps!
4000 "frames"? :shock:
Simplify your models for fewer polys and perhaps fewer "frames". You might also want to post your OS, video card type and driver version...
Andi|xng
Posts: 83
Joined: Thu Mar 24, 2005 10:49 pm
Location: Schrobenhausen, Germany
Contact:

Post by Andi|xng »

I also think, the problem is your model, not Irrlicht.
I have really problems to display it in Milkshape, and I have the newest version! Milkshape has problems to display the current frame number when playing the animation, and it is not smooth. The bones are jumping around suddenly... Try to simplify your model (its high resolution is not good for games) and reduce your keyframes, I am sure about 500 would be enough for your animations.
Post Reply