Frame-based animation/md2 performance issue

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!
CuteAlien
Admin
Posts: 9643
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Frame-based animation/md2 performance issue

Post by CuteAlien »

Can you publish the models in md2 and ms3d? Or send them to me in private so I can do some profiling with them.

edit: Ah ok, I already see md2 recalculates always.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
CuteAlien
Admin
Posts: 9643
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Frame-based animation/md2 performance issue

Post by CuteAlien »

I've added a check in svn trunk r5227. Now md2 only calculates the interpolation when the animation has changed since the last frame. Thought I suppose you need to make mesh copies then to get this working. Otherwise if you have nodes in different animation states accessing the same mesh then it will still do recalculations. Except they are all in the same state - then this will be a lot faster now.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
npc
Posts: 17
Joined: Mon Apr 27, 2015 2:52 pm

Re: Frame-based animation/md2 performance issue

Post by npc »

Happy New Year, guys!

Just posted a video on youtube that shows the ants in their first action: https://www.youtube.com/watch?v=0cZd66d ... e=youtu.be - they make their appearance in the last third of the video (there's also some grass growing and water animation before that). The ants don't have any real AI yet, I need to fix the threading model for that first - but the good thing is that the bottleneck is now on my side (the issue is that messages get out of sync, this is running in a server/client model), while Irrlicht happily renders hundreds of ants, even with a more sophisticated animation than shown here.
CuteAlien
Admin
Posts: 9643
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Frame-based animation/md2 performance issue

Post by CuteAlien »

Nice start. Hm, I guess AI stands in this case for Ant Intelligence ;-)
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
npc
Posts: 17
Joined: Mon Apr 27, 2015 2:52 pm

Re: Frame-based animation/md2 performance issue

Post by npc »

Yes, precisely ;)
npc
Posts: 17
Joined: Mon Apr 27, 2015 2:52 pm

Re: Frame-based animation/md2 performance issue

Post by npc »

Hi CuteAlien,

Thanks for your changes in r5227, I'll check those out (literally and figuratively) asap!

Cheers,

npc239
chronologicaldot
Competition winner
Posts: 685
Joined: Mon Sep 10, 2012 8:51 am

Re: Frame-based animation/md2 performance issue

Post by chronologicaldot »

Cool. Would've liked to see an ant fall into to water and show the splash. XD But that's alright...
npc
Posts: 17
Joined: Mon Apr 27, 2015 2:52 pm

Re: Frame-based animation/md2 performance issue

Post by npc »

It's coming... but let me give the ant a proper AI first, otherwise it wouldn't be fair... :) ...or fun to watch :) anyway, there'll also be a leaf floating around that the ant can use for rescue (the shadow at the bottom of the puddle looks quite amazing as it is, but I still need to get the movement of the leaf on the surface right).
Post Reply