Severe slowdown with B3D and MD2 after v1.88

Archives Forums/Blitz3D Bug Reports/Severe slowdown with B3D and MD2 after v1.88

Doiron(Posted 2007) [#1]
Some years ago I was working on a game which involved hundreds of characters on screen, and I coded a small stress test in order to see how much animated models Blitz3D could handle. It turned out that the best choice was to use MD2's, which at the time enabled me to have about 300 models on screen while keeping about 35 frames per second on a Athlon XP 2700mhz with a Radeon 9600 Pro. This simple technique involved loading a single MD2 ("dragon.md2" from the Blitz3D examples) and then copying the mesh as many times as needed. The same method applied to B3D's as well, though I obviously obtained a lower frame rate.

Recently I tried to run the old demo again, and noticed that the frame rate on the same system dropped to about 7 frames per second (five times slower!). After some tests, it turned out that the same code compiled with any Blitz3D version after v1.88 gave that awful slowdown. The changelog for Blitz v1.89 only mentions a "Fix for 'vertex glitching' issue with latest nvidia driver and skinned/md2 animating entities.", though the bug applies to B3D models as well (which in the test dropped from 15fps to 3fps, about the same slowdown).

I have created two small demos in order to see if it was common on other configurations as well, and it looks like all share the same problem.

I also tried with different models from different sources with the same results.

Here you can find the two examples:
http://www.break-in-games.com/workspace/B3D_slowdown_demo.zip
(B3D slowdown demo - source + compiled .exe from v1.88, v1.89 and v1.98)

http://www.break-in-games.com/workspace/MD2_slowdown_demo.zip
(MD2 slowdown demo - source + compiled .exe from v1.88, v1.89 and v1.98)


Keep in mind that while the stress test had 300 models, the slowdown is still serious with far less objects on screen: with 40 B3D's the difference was of 55fps against 35fps, with 100 B3D's of 53fps against 18fps (!).

I hope this issue can be easily addressed, since it would force to compile with v1.88 for anything which has a decent amount of animated 3D models on screen.


Wayne(Posted 2007) [#2]
On the nvidia geforce 7600GS I saw all the demos run the same speed.


Doiron(Posted 2007) [#3]
I tried the demos on:
Athlon XP 2700+, Ati Radeon 9600 Pro, latest DirectX 9.0c
Athlon 64 3200+, Ati X1300 AGP, latest DirectX 9.0c

Maybe your system was too fast to notice a drop in the framerate? I suppose the demo didn't 'stress enough' your pc (it should be noticeable by adding more models to the scene).

Out of curiosity, how much FPS did you get?

Anyway, have you compared the v1.88 executable with the v1.89 one?


kragoth74(Posted 2007) [#4]
Damn, you're right!!

For the b3d version, FPS dropped from 30 to 6.
For the m2d version, FPS dropped from 30 to 8.

Athlon 3800+ X2, ATI X800 GTO, latest DirectX 9.0c


Doiron(Posted 2007) [#5]
Could anyone else test this, please?


John Blackledge(Posted 2007) [#6]
B3D 1.88 3/4 fps
B3D 1.98 3/4/5 fps

MD2 1.88 8 fps
MD2 1.98 13 fps

Pentium(R) 4 1.60 Ghz 768MB Ram
Nvidia GeForce4 Ti4200


Beaker(Posted 2007) [#7]
MD2 - all versions - 12 fps.
B3D - all versions - 11 fps.

Toshiba laptop with centrino duo & intel gfx card.


Mikele(Posted 2007) [#8]
B3D 1.88 14/15 fps
B3D 1.98 24/27 fps

MD2 1.88 20 fps
MD2 1.98 42 fps

P4/2.4 GF6600


Doiron(Posted 2007) [#9]
Looking at the posts above, it looks like the problem only affects ATI cards...


Mikele(Posted 2007) [#10]
I have ATI too :)
AMD64/1.58 ATI X700 (notebook)

B3D 1.88 14/15 fps
B3D 1.98 18/19 fps

MD2 1.88 28/29 fps
MD2 1.98 47/48 fps


Doiron(Posted 2007) [#11]
However it's a laptop, and maybe (looking at beaker's) there isn't much of a difference with an integrated chipset.
It could be interesting to hear other reports, just to understand where the issue lies.

By the way, I am using the latest catalyst.


BasicMonkey(Posted 2007) [#12]
Doiron, I don't know if you've figured out your problem but here's my results.

B3D 1.88 - 15 Fps
B3D 1.98 - 3 Fps

MD2 is 30/6 respectively.

I'm using an Athlon XP 2400+ / ATI 9600XT 256MB Cat7.3

Seems to be ATI specific like you said as Mikele actually got a boost on Nvidia GF6600. I'd be curiously to see how it ran on a ATI X1k series as the rendering path is suppose to be similar to the GF6+. Obviously that doesn't help the fact that it bogs on the old ATI cards.

~John~


Doiron(Posted 2007) [#13]
I'd be curiously to see how it ran on a ATI X1k series

As written in my second post, I tried it with a ATI X1300 as well (AGP though, not PCI Express) without success.

The bummer is that instead of being a sensible slowdown, this issue totally kills the framerate. Your specs aren't so bad, still enough for most of the latest games. Kragoth74's specs are far better, enough for everything on the market, and the 'after v1.88' issue still kills his framerate as well.

Maybe Mark Sibly can give us his opinion on the issue? since the problem came right after one of the updates, it could very well be a bug which can be addressed.


BasicMonkey(Posted 2007) [#14]
Hi Doiron,

I do believe I've found at least part of your problem, as I'm now running at:

B3D V1.88/1.98 - 15/15
MD2 V1.88/1.98 - 30/45

I reverted the ATI drivers back to Cat 4.7. Test it out and see what you get for results. I got the drivers off guru3d.com I'm guessing ATI in optimizing for DirectX9 broke something DirectX7 related along the way? Mark maybe able to code around it however. At least you should be able to continue your project. And have your first set of system requirements once it goes retail. (they happen to be officially supported WoW drivers too.)

~John~


Doiron(Posted 2007) [#15]
That's great info BasicMonkey, thanks for the tests!

I'm guessing ATI in optimizing for DirectX9 broke something DirectX7 related along the way?

To be precise, it looks like the updates made after blitz v1.88 interfere somewhere with Catalyst drivers starting from v4.7: before blitz v1.89 everything works nicely even with the latest Catalyst.

It's still an issue which Mark Sibly should address, since it makes no sense to ask the users to revert to older video drivers if they have an ATI card.

Again, I beg Mark Sibly to respond. :)


ZJP(Posted 2007) [#16]
B3D 1.88 8/9 fps
B3D 1.98 4 fps

MD2 1.88 8 fps
MD2 1.98 4 fps

A3400+ Radeon 9600P


Geaytes(Posted 2007) [#17]
I get completely opposite results.

B3D 1.88 16 fps
B3D 1.98 24 fps

MD2 1.88 20 fps
MD2 1.98 45 fps

Pentium D (805)
128 Meg nVidia 6600 GT (AGP)


Doiron(Posted 2007) [#18]
I get completely opposite results.

The reason has already been found, though ZJP double posting eclipsed it :)

Now I'm only waiting for the opinion of Mark Sibly on the subject...


John Blackledge(Posted 2007) [#19]
Sorry? Let me get this right...
You've defined the problem as being that the latest ATI drivers are not (as) DirectX7 compatible, but you want Mark Sibly to fix the problem, not ATI.
Err, I know how I'd feel.


Doiron(Posted 2007) [#20]
No.

Up to Blitz3D V1.88, everything works nicely with any ATI card and any Catalyst driver.

After Blitz3D V1.88, with any Catalyst driver after v4.7 there is a drastic framerate drop on ATI cards.

So, something which has been modified in Blitz3D V1.89 creates conflicts with every ATI card with reasonably updated Catalyst drivers.

As you can see, it is another matter entirely.

To summarize, any Blitz3D version after v1.88 is less compatible with the majority of ATI cards.

If you are coding a game which don't stress the machine it's not a problem, otherwise if the framerate is seriously low it's not simple to ask the users to change their video card to a nVidia or to revert to a ridiculously old - current version is 7.4 - Catalyst driver (usually it's the other way around).

To me it's just striking that no one noticed it before (it's just that no B3D game is heavily using 3D graphics, nor using many properly animated 3D models).

Anyway, your point makes no sense since Blitz3D v1.89 is newer than catalyst drivers v4.7 (which were released on 2004-07-08, while B3D v1.89 timestamp reads 2005-02-24). And even if so, it would have been good practice to adapt the engine to the latest drivers, since three years of ATI updates didn't revert the situation. I just think that at the time Mark Sibly didn't notice the issue, simple as that.


H&K(Posted 2007) [#21]
Before I would start to ask for either ATI or Mark to explain themsleves, I would like to see Full FPS results for all the Catalyst options. Thats is maybe the problem usnt that B3d is slower after 1.88 and catylyst v4.7 but rather that some combination of default values is slowing it down

From I remember there are the Broad settings of Performace vrs Display and a ton of secondary ones. If it turns out that you do find a setting that works, then you can call it the "Doiron Catalyst B3D settings"


Doiron(Posted 2007) [#22]
So far it looks like that any configuration brings the same results. The simple way is to leave everything application controlled, so that it can't be something changed by the user.

And even if I could find a strange configuration which works, can I ask everyone to change their settings accordingly? (given that most users never triggered with the internal parameters of their video card and neither should)

The fact that almost every ATI suffers from that update isn't enough to define it as a BUG, considered that we even found where the problem begun and that I posted source and compiled .exes to reproduce it?


BasicMonkey(Posted 2007) [#23]
Hey Doiron,

Here's some even more specific information I've gathered on your problem. I do believe I've pin pointed it. All tests were done using the installed default settings on the drivers. So they should be repeatable without any trouble.

What we know of your project:
ATI Catalyst 7.4 + B3D v1.88 = GOOD FRAMERATES
ATI Catalyst 7.4 + B3D v1.89 and above = EXTREME SLOWDOWN

What I've found out:
ATI Catalyst 6.1 Works PERFECTLY
ATI Catalyst 6.2 However has the EXTREME SLOWDOWN.

Hopefully, Mark can squash the bug once he's provided with this info.

~John~


BasicMonkey(Posted 2007) [#24]
Just for clarity,

It's my understanding that every Catalyst driver prior and including 6.1 will NOT exhibit the slowdown and run with good frame rates.

Catalyst 6.2 to the current which is 7.4 Will have the extreme slowdown.

~John~


ZJP(Posted 2007) [#25]
Woa !!!. Pb with my post. Sorry Sorry Sorry Sorry.


skidracer(Posted 2007) [#26]
I've currently been struggling with this issue.

Until next version of blitz3d is released a workaround for ati performance is to not use CopyEntity with b3d, md2 meshes. The following tweak seems to return ATI performance close to 1.88 behavior when rendering 14 rows of the clone army?

		Added\Obj = LoadAnimMesh("robot2.b3d")
;		Added\Obj = CopyEntity(B3D\Obj)




Doiron(Posted 2007) [#27]
You're right Skidracer... it takes longer to load, but everything runs almost as fast as before. Thanks for the workaround!


Until next version of blitz3d is released

Unfortunely, judging from the answer I received from Sibly itself it looks like this issue will not be solved:
Hi,

The problem is due to weird bugs in d3d7 drivers, for which I have found no solution.

The 'fast', pre-1.88 version of b3d started displaying weird 'glitching' artifacts when playing anims (around when d3d8 came out?) despite the fact that b3d followed the d3d specs for fast vertex buffer updates.

To fix the glitches, we had to use a different way to update vertex buffers - which unfortunately turned out to be slower.

Mark



Doiron(Posted 2007) [#28]
Interesting news!

It looks like Windows Vista solved the bug.

In fact, on Vista with 300 models I get 44fps both with copyentity() and the loadanimmesh() method suggested by Skidracer. With XP, I get 8fps with copyentity(), and 40fps with loadanimmesh()... so yeah, it is even faster in Vista than in XP. :)

The test machine is a AMD X2 5200, ATI 1950 Pro, 2gb RAM, Vista Ultimate.


BasicMonkey(Posted 2007) [#29]
That's good news Doiron,

I happen to have a dual-boot system so figured I'd check it out. I get 30 FPS with .B3D and 60 FPS with .MD2 and v1.98 on a ATI 9600XT.

However I did find something rather interesting that may be of help to anyone using XP/Windows 2000. The Omega Drivers which are based on the current ATI drivers, DO NOT!!! have the slowdown issues that the regular CATALYST 7.1 exhibit.

using a standard install of v8.3.330 (CAT 7.1), I was able to acheive 30 FPS across all of the tests regardless of Blitz version or Model type used.

I doubt Mark's got the time to research the reason behind this issue, but at least that gives people another workaround for the pre-Vista ATI systems.


skidracer(Posted 2007) [#30]
The fix in the Blitz3DSDK is a pretty ugly hack.

Re drivers, installing June2007 DirectX update on XP machines may also be a factor, you may have similar version on your vista install?

Unfortunately I don't have ATI config at hand to test.

It is listed as DirectX version 9.19.1007, I assume xp end users get it as a software update sometime in the future dunno.

http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=b406cf67-d926-463b-99e8-27199d6626b5

That page also has link at bottom for web update which I presume would be a little more efficient on the language support.

Also interesting, what the h is bi-monthly???

The DirectX redist installation includes all the latest and previous released DirectX runtime. This includes the bi-monthly D3DX, XInput, and Managed DirectX components.


mongia2(Posted 2007) [#31]
skidracer new for a blitz3d 1.99?

thanks


Pete Carter(Posted 2007) [#32]
anymore news on this issue?

im using 6.14 drivers on ati because of performance issues in battlefield 2.

so as this slow down doesnt take place with these drivers i get the best frame rate the the newest version of blitz 1.98.

i only get 8 fps in version 1.88

I get 54-56 fps with a 3200 64 athlon, 9800pro, 1gb ram


Doiron(Posted 2007) [#33]
DirectX 9 updates got very chaotic after they started to release bimonthly updates without changing the version number... from time to time you can still notice a thread on gaming forum from perplexed people which found that their game worked after 'reinstalling' DirectX 9.0c, when in fact it just added the latest updates.

After all, if you have DirectX 9.0c and a game asks you if you want to install DirectX 9.0c without detailing anything about the bimonthly update, you are supposedly going to click on cancel...

Re drivers, installing June2007 DirectX update on XP machines may also be a factor, you may have similar version on your vista install?

At the time, I had the latest update (February or April 2007)... since on Vista I tried with the current release, you could be right. I'll give it another go with XP and let you know.

For anyone interested, here there are both the latest full version DirectX 9.0c and the individual bimonthly updates:
http://filehippo.com/download_directx/


Pete Carter(Posted 2007) [#34]
ive got agp so ive just upgraded from a 9800pro to a x1950pro and my frame rate in all the tests are bellow 10 fps. when on my 9800pro with old drivers i got over 50 fps.

just installed latest direct X and it made no difference at all


Doiron(Posted 2007) [#35]
If you have the slowdown on *all* the tests, there probably is an issue with your system: you shouldn't have any slowdown with v1.88 compiled exes.

The same applies to Skidracer's workaround for v1.89 and higher: if it doesn't work, probably it isn't the same problem discussed on this thread.

By the way, I both have a X1950Pro AGP and a X1950Pro PCI Express which are working as described, so there shouldn't be any particular issue with this model either.