Question about frame rate

Blitz3D Forums/Blitz3D Programming/Question about frame rate

mrtricks(Posted 2003) [#1]
Can't quite work out why this happens. Custom meshes, totalling between 10k-20k polys. Fine, frame rate is a solid 72fps, even when all polys are on screen.

Then, when I go right up to the mesh(es) so they fill the screen, it SOMETIMES (hence, not always) halves the frame rate. Generally when I'm looking up or down. Polys are the same looking forward or looking up, amount of screen filled by mesh is same, but fps halves.

I thought it was a fillrate thing but it's fine looking forward... is there some issue with camera angles looking up or down?

Or is it a texture setting I'm missing? Anyone else had this problem?


Rob(Posted 2003) [#2]
I saw you go 25fps on telly once. j/k

Seriously, it looks like a fill rate problem. Lets check a few items off.

-are you using flip false?
-are these meshes using any extended b3d specific things like alpha?
-are they multi surface or with different textures?

If you have terrain too, it looks as though it's actually the terrain going nuts here, not the meshes. Finally, are you multitexturing anything (including any terrains) more than twice?


mrtricks(Posted 2003) [#3]
Not using flip false.
Custom meshes made within the program, not using alpha.
One surface per mesh, all using same texture.
Don't think it's the terrain either, because it's always when I go up close to a mesh.

Hmmm... when I get a proper demo together it might be easier to detect the problem.


Rob(Posted 2003) [#4]
Consider this:

you have a terrain which uses 50 points of processing. When you look directly down at a terrain, it triangulates a hell of a lot more due to the way lod works. This sudden shift often makes the terrain use 75 points of processing.

On this level, you have a mesh, when at a distance, uses 50 points of processing. When close up, it uses 75 points of processing due to the fill rate.

Add it all together and you will be going over the maximum points before you slow down, for dramatically different reasons. Depending on what blitz is doing, this data may be choking the card a bit since terrains upload new data to the card each frame.

I hope you fix it :)


Gabriel(Posted 2003) [#5]
I had exactly the same problem, and all I could put it down to in the end was fill-rate, and a mouse bug which may or may not have been fixed recently.

I wasn't using a terrain at all, but I had exactly this problem of big slowdown but only when I was close, and ONLY at specific, quite narrow, angles.

If you're using mouse control at all, you might want to bung a loop of small delays ( I think it was suggested I use a loop of ten delay 2 's but I'm not 100% ) as the mouse buffer seems to get really hinky when the fillrate starts to become a problem.

Other than that, you can't really block certain camera angles ( well I couldn't anyway ) but you might be able to stop the camera from getting too close to objects.


mrtricks(Posted 2003) [#6]
It's not a huge problem, it just seems odd. I'll keep tinkering.


Bouncer(Posted 2003) [#7]
It's because of the flip... if your code slows down too much to fit into one screen refresh... the vertical beam will wait another "cycle", so your framerate suddenly drops to half.


mrtricks(Posted 2003) [#8]
Ah, of course! So if I use flip false, it'll slow down a little but not by half. I couldn't see the wood for the trees...