How to clear to a bitmap in 3D?
Blitz3D Forums/Blitz3D Programming/How to clear to a bitmap in 3D?
| ||
Interesting discovery - on a slow GPU my background slows the game to a crawl. At first I used a giant sphere so the camera can move round. Then changing to a fixed camera (for play) I used just a big sprite. But it's SLOW! I guess the card can't cope with the scaling of the texture? If I eliminate the backdrop and just have black in the background it whizzes along. So what's the problem with big polys? Why's the card so slow? Can I lock the buffer and copy over a background before rendering? Can I use a different technique for drawing the background? I used a 64x64 pixel png which is supposed to be blurred. Is larger better, and if so, why? (I'd like to unsterdand the underlying tech rather than just have a fix) |
| ||
Are you rendering the texture in real time (ie. redrawing the texture every frame)? |
| ||
Shifty- Forget sprites, use a quad :) What card do you have? |
| ||
Okay, the test subject is a K6 233 and 32mb Vanta (graphics card is a bit much but still... ;) It seems to be a bandwidth issue. I use a square .3ds mesh. When small it renders quickly. When enlarged it suddenly hits Slowdown City. I tried a larger png and it and it hit slowmode faster. I also switched from 32 bit to 16 bit and it kept up a good speed even with an enlarged quad. I don't understand the principles behind this slowdown though. Bilinear filtering surely only reads two pixels of the texture per texel regardless of quad size. Somewhere that suddenly hits a slowmotion area. |
| ||
Is it using shared memory? I had a similar problem on my laptop and that had shared memory for the 3d card. |
| ||
Same issue as many games have. Have you ever played Counter-strike, RB6 or any game where you can use a smoke grenade? Walk in the middle of the smoke, and you'll notice your FPS goes down to 5-12. Its when a sprite is super large and takes up a lot of space on the screen for some reason this slows it down... Sorry this isn't exactly an explanation of why, or how to fix it...however I've hit the same exact problem with a game I'm working on now. I have a dragon that breathes fire, when the dragon breathes fire (made up of sprites) away from the camera, therein making them smaller, it runs a solid 60 FPS. However, if the flames are blown at the camera, making them huge when they are nearing the hither of the view fustrum the game slows down to almost 2 FPS. Weirdest thing, no idea why, but I remember this being the case with soo many professional games so you're not the only one running into this problem. If I find anything out I'll let ya know... |
| ||
Probably the card does not have a fantastic fill rate. If the background is static then, yeah, you could try pasting a pre-rendered image onto the backbuffer before calling renderworld, but if the card has a poor fill rate it is likely to struggle at mixing 2D and 3D also. |
| ||
Mixing 2D and 3D has already caused problems. I'm just think maybe I can force the texture to fit into VRAM? With 32 mbs this card has plenty. Might give that a try... |
| ||
Shifty- Forget sprites, use a quad :) Eh...what's the difference? No ... really??? |
| ||
Just that ever so tiny tiny tiny speed increase... You never know :P |
| ||
Sprites are usualy slower than creating your own quads (thats a mesh of four vertices joined by two triangles laid 'flat'). Yes, I have heard others suggest these problems are associated with the fillrate of the gfx card. Even though same object/texture, when close their is still more 'stuff' to paint on screen. Rhy :) |
| ||
try using smaller textures? again it will be the vid-cards fill rate, it still has to scan memory to draw the texture, if its a large texture it will slow down a bit. |