sprite3d speed issues

Advanced game related topics
peter
New User
New User
Posts: 8
Joined: Thu Apr 08, 2004 7:56 pm

sprite3d speed issues

Post by peter »

I have a question about sprite3d.

I have a starfield scrolling with about 500 stars, 32x32 pixels blended sprites
I also have about 25-50 128x128 blended sprites scrolling. i also use bilinear filtering.
Everything runs fine here. 60-75 fps
But when i increase the amount 3 times, so 1500/75-150 then it's pretty slow
(20-30 fps)
I find this strange since I have a athlon1600 and a radeon9000 pro wich is a good 3d accelerator, it runs unreal 2004 smooth at high settings.
Is sprite3d a slow or a fast routine? How many sprites3d can a decent computer handle? Is sprite3d unoptimized or something. Because I think my computer could draw much more sprites at a decent speed.

Also can i use normal code between start3d and stop3d like:
start3d:
for g = 1 to 1000
displaysprite3d(1,x(g),y(g),200)
x(g)+1
y(g)+1
next
stop3d

Or is this a bad thing (like it slows the drawing proces by a large amount)
And should I only use the 3dspritecommands between those lines.
Fred
Administrator
Administrator
Posts: 18350
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

Sprite3D doesn't use a Z-Buffer or anything to prevent to display sprites which would be non-visibles (unlike regular 3D games) which means than every sprite is displayed, blended etc.. It use a lot of fillrate and 1500 32x32 sprites is huge. I even surprised you can maintain such rate with so much pixels blended.

BTW: you should be able to render much more normal sprites.
Blade
Enthusiast
Enthusiast
Posts: 362
Joined: Wed Aug 06, 2003 2:49 pm
Location: Venice - Italy, Japan when possible.
Contact:

Post by Blade »

Fred wrote:BTW: you should be able to render much more normal sprites.
You mean that the "software" 2D sprite library is faster than the "hardware" 3D library?
Fred
Administrator
Administrator
Posts: 18350
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

I mean the 2D hardware sprites are faster than 3D hardware one. 2D software are much slower (as expected..)
peter
New User
New User
Posts: 8
Joined: Thu Apr 08, 2004 7:56 pm

Post by peter »

Hmm I understand.
So I should use the 2dsprite library if possible.
I thought 3d would be faster.
The 2d hardware sprites are only possible if you have directx 8 isnt it?
Fred
Administrator
Administrator
Posts: 18350
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

No, 2D hardware sprite start with DX3 (NT4).
peter
New User
New User
Posts: 8
Joined: Thu Apr 08, 2004 7:56 pm

Post by peter »

Hmm, tell me, how can I see the difference between software and hardware 2d sprites?

I also have trouble with some other 3d cards.
The starfield is blended correctly on my radeon900pro, but with a radeon 9500 or geforce2mx I see nothing.
I use the following lines to display the stars

Sprite3DBlendingMode(0,2)
DisplaySprite3D(stars(g)\sprite,stars(g)\x,stars(g)\y,250)

The transparency value doesn't seem to have any effect, if I change it to 50 or something it doesn't matter. Could this have something to do with the blending? I really don't know what to do....
Fred
Administrator
Administrator
Posts: 18350
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

Yes, it has to do with the blending. You will have to find a combination which work on every cards (not all cards supports the same combinations).
Post Reply