[no bug] Framerate drop in 1.6

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Locked
shadowslair
Posts: 758
Joined: Mon Mar 31, 2008 3:32 pm
Location: Bulgaria

[no bug] Framerate drop in 1.6

Post by shadowslair »

I`m really, really sorry for the offtopic, but I still have no clue what causes the frame rate drop for my app porting from 1.5.1 to 1.6.0 I mentioned about some days earlier:
Hmm... just compiled my project with the new version and it runs slower. The framerate dropped from 107 to 76 in test 1, and from 68 to 52 in test 2. This is some big drop. As a whole I have one 2-3k level mesh, two animated skinned models = up to 12k tris total, half of them skinned and some simple class objects. What could be the reason? Confused
Recently I don`t have much time for testing this seriously and try removing some of the few objects I have in my test scenes to find the reason, but this really bothers me and my app is on ice until I figure out what`s causing this. Of course I can simply continue with 1.5.1, but soon or later will have to move on some recent version.

What I need to know is whether I`m the only one having this issue porting from 1.5.1 to 1.6 (such a drop in frame rate)? :?

PS: As I mentioned about earlier I`m not using OctTree for any object. Basically my level is 2,5k .bsp, one 5k skinned .X model and another 1,5k, some non-animated models, some lines and nodes for visualisation and a skybox.

EDIT: Just checked the examples from both versions and the ones from 1.6 run faster than the ones from 1.5.1, which is some good news. Hopefully tomorrow I`ll find the reason.
Last edited by shadowslair on Tue Nov 10, 2009 11:02 pm, edited 2 times in total.
"Although we walk on the ground and step in the mud... our dreams and endeavors reach the immense skies..."
shadowslair
Posts: 758
Joined: Mon Mar 31, 2008 3:32 pm
Location: Bulgaria

Post by shadowslair »

Ok, I removed all my models and objects, leaving only my character, one bot (not updated, just standing there running through idle animation) one box for the level floor and the code showing me the fps.

I commented all update calls in my RUN loop, leaving only:

Code: Select all

Driver->beginScene(...);
		
Smgr->drawAll();
GuiEnv->drawAll();
	    
//code drawing FPS here

Driver->endScene();
The framerate increases a bit, but it`s still lower than the one in my 1.5.1 version with all my objects in it. From 52 increased to 64-65, without rendering my character, only the 1,5k bot model (total 1,6k polys rendered) to 128, where 107-108 fps with full scene same circumstances with previous version).

I have no more ideas- probably I`ll skip 1.6.0 an wait for 1.6.1 hoping everything will be fine there... :?
"Although we walk on the ground and step in the mud... our dreams and endeavors reach the immense skies..."
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You have an empty scene rendering at 128FPS? That's very low, are you sure your card's memory is enough to store the models and textures? Onboard cars tend to be overloaded very soon.
shadowslair
Posts: 758
Joined: Mon Mar 31, 2008 3:32 pm
Location: Bulgaria

Post by shadowslair »

Not exactly. I have some additional calculations like Physics, AI, etc., but they aren`t related with Irrlicht. I checked this by removing each one of them making comparison with both versions. I downloaded the latest SVN, compiled the .dll and my app with it in "Release" the .dll is 1.8mb and the app runs even slower- 49/72 for test1/test2 (on 1.5.1 is 68/107 ).

OS: WinXP Prof.
Compiler: VS 2008
PC: AMD 1,14 512 128 ATI 9550 1680x1050
App: running at 1024x768 windowed, D3d 9, code and circumstances reproduced 100% the same on both versions.

I`ll give it another try tommorow if I have some time, but this is killing me. :?
"Although we walk on the ground and step in the mud... our dreams and endeavors reach the immense skies..."
shadowslair
Posts: 758
Joined: Mon Mar 31, 2008 3:32 pm
Location: Bulgaria

Post by shadowslair »

Hey, just to report that believe or not the drop in fps was caused by my models exported from 3d max via Panda exporter, causing a 50(!!!) frames slowdown. And this was happening for 9 months- I made them in february. The panda .X format was 1.56 Mb, where the absolutely same model and animation exported via kW export was 266 kb. Somehow this switching between versions made this slowdown clearly spottable, so my app runs fine now. (*doing some happy idiot dev dance*) :lol:
=== PROBLEM SOLVED ===

SHIFT KEY not working in 1.6
Just one more thing: The "Shift" key isn`t working for me now, but it`s not such big deal. My event receiver starts collecting events in the step end and stops in the next step beginng. If it`s not my fault, then maybe it conflicts with "- Add Shift+Control states to mouse event" change in 1.6. :wink:
"Although we walk on the ground and step in the mud... our dreams and endeavors reach the immense skies..."
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

shadowslair wrote: SHIFT KEY not working in 1.6
Just one more thing: The "Shift" key isn`t working for me now, but it`s not such big deal. My event receiver starts collecting events in the step end and stops in the next step beginng. If it`s not my fault, then maybe it conflicts with "- Add Shift+Control states to mouse event" change in 1.6. :wink:
That change should just add the information to the event-struct and is rather independent gathered from the other key-informations. I'm not on Windows right now, but at least on Linux shift-keys still seem to be recognized. Well, they are recognized as KEY_LSHIFT and KEY_RSHIFT, not as KEY_SHIFT - so maybe that is the problem.
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
B@z
Posts: 876
Joined: Thu Jan 31, 2008 5:05 pm
Location: Hungary

Post by B@z »

shift key working without a problem for me O.o
Image
Image
shadowslair
Posts: 758
Joined: Mon Mar 31, 2008 3:32 pm
Location: Bulgaria

Post by shadowslair »

OK, here`s one easy test. I put this code in the run loop of the "Movement example" on line 243 in version 1.5.1 and in 1.6:

Code: Select all

printf("=========== New step ===========\n");
		if(receiver.IsKeyDown(irr::KEY_SHIFT))    printf("Shift\n");
		if(receiver.IsKeyDown(irr::KEY_LSHIFT))   printf("Left Shift\n");
		if(receiver.IsKeyDown(irr::KEY_RSHIFT))   printf("Right Shift\n");
		if(receiver.IsKeyDown(irr::KEY_CONTROL))  printf("Control\n");
		if(receiver.IsKeyDown(irr::KEY_LCONTROL)) printf("Left Control\n");
		if(receiver.IsKeyDown(irr::KEY_RCONTROL)) printf("Right Control\n");
		if(receiver.IsKeyDown(irr::KEY_KEY_Z))    printf("Z key\n");
In version 1.5.1:
the Z key is working
the KEY_SHIFT is working
the KEY_CONTROL is working
the KEY_LCONTROL, KEY_RCONTROL, KEY_LSHIFT, KEY_RSHIFT calls are ignored


In version 1.6:
the Z key is working
the KEY_CONTROL is working
the KEY_SHIFT is ignored
the KEY_LCONTROL, KEY_RCONTROL calls are ignored
the KEY_LSHIFT, KEY_RSHIFT always return true after being pressed once.

Is this happening only on my PC? :roll:
"Although we walk on the ground and step in the mud... our dreams and endeavors reach the immense skies..."
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

shadowslair wrote: In version 1.6:
the Z key is working
the KEY_CONTROL is working
the KEY_SHIFT is ignored
the KEY_LCONTROL, KEY_RCONTROL calls are ignored
the KEY_LSHIFT, KEY_RSHIFT always return true after being pressed once.
confirmed !!!
also if I press AltGr (right Alt key) it returns KEY_CONTROL !!! :shock:
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

Hm, not on Linux, sounds like a problem with the win32 device.
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
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

Highly possible. I saw the code they use are not the same for the keyboard mapping. It's handled by each OS devices.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

I've added a fix yesterday to the 1.6 trunk. It's now more or less using the way to handle which pc0de posted here:

http://irrlicht.sourceforge.net/phpBB2/ ... highlight=

As mentioned there, there is still an open problem, for which I found no solution so far. Also it probably breaks Windows 98 support (*sigh*), but I don' t know if anyone tested that within last year anyway. But except that it should work again now. Please use that other thread continuing discussion about this bug.
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
Locked