PDA

View Full Version : 30.000 triangles



jordiperez
10-06-2002, 11:44 PM
Hi all,

I am rendering a scene that contains 30.000 triangles.
- I use glDrawElements() and display lists

On my Geforce 4 i have 100 - 200 FPS, but on TNT2 cards i only get 1 or 3 FPS. I tried without textures and the results are the same.

30.000 Polys are enought to collapse a TNT2? How can i make the scene rendering faster? (i know BSP, but i don't know from where dowload some useful code)

Thanks.

Ninja
10-06-2002, 11:58 PM
The easiest way is to use some sort of culling. Try viewfrustum culling and a bounding volume hierarchy.
For furtheroptimization its important to know where in the pipeline the bottleneck is (application, geometry or rasterization), and try to optimiaze that part.

//Ninja

tweakoz
10-07-2002, 09:37 AM
my guess is its mostly time spent with the CPU doing T&L.

mtm


Originally posted by jordiperez:
Hi all,

I am rendering a scene that contains 30.000 triangles.
- I use glDrawElements() and display lists

On my Geforce 4 i have 100 - 200 FPS, but on TNT2 cards i only get 1 or 3 FPS. I tried without textures and the results are the same.

30.000 Polys are enought to collapse a TNT2? How can i make the scene rendering faster? (i know BSP, but i don't know from where dowload some useful code)

Thanks.

jordiperez
10-07-2002, 10:44 AM
I use colorVertices, no lights, no normals, no transformations, only the vertex arrays and the camera tranformation.

I tryed right now on a ati radeon with 64 MB and i got 4 FPS.

I am fustrated, what's the matter? are 30.000 triangles enought to kill a "standard" graphics card or what i am missing?

Ketzal
10-07-2002, 12:23 PM
Ninja is right. You should use some kind of culling to render you scene in lower sized chunks. You are choking the card! I also have a TNT and I have seen that to mantain a constant 60 fps display you can't send more than 3000-4000 triangles a second. Visit gametutorials at http://www.gametutorials.com for info on how to implement an octree or a bsp tree.

*Aaron*
10-07-2002, 03:16 PM
I have seen that to mantain a constant 60 fps display you can't send more than 3000-4000 triangles a second. Hehe. That's 50-67 tris/frame. I think you mean 3000-4000 tris/FRAME.

Ysaneya
10-07-2002, 11:33 PM
Hey, i could hand-paint the polygons on paper faster than that :) I'm sure a TNT is faster than me :)

Y.

Madoc
10-08-2002, 12:48 AM
A TNT2 is faster than that, you should get more than 1 to 3 fps for 30k triangles. This is most likely something to do with how you pass the geometry (given that you don't do much else), try compiling your display lists in immediate mode or using drawarrays as opposed to drawelements. Do you stripify the geometry?

jordiperez
10-08-2002, 03:49 AM
I will try as you say drawArrays instead of DrawElements.

I use DisplayLists, what do you mean with inmediate mode display list??

Thanks for replys.

Tom Nuydens
10-08-2002, 03:52 AM
Is your TNT2 running at an absurdly high resolution? Running out of texture memory perhaps?

-- Tom

[This message has been edited by Tom Nuydens (edited 10-08-2002).]

Madoc
10-08-2002, 08:18 AM
If he was fill limited the geforce 4 wouldn't do 200 fps, it can't be a texture memory problem because he gets the same perf without texturing.

Immediate mode is passing geometry using glVertex etc calls rather than using vertex arrays. I would probably try this first, I think there are some issues with display lists and vertex arrays (I think you have be selective about what goes in the display list?)

Cheers,
Madoc

ndj55
10-08-2002, 08:58 AM
I have some problems with performance on some systems too... I don't know why,but it's like that... http://openair.free.fr/public/TestProg.zip
It runs @ 60 FPS on a TNT2/ATHLON 700 and @ 24 on a GF2GTS/ATHLON 1000...
Crazy isn't it?

ToolChest
10-08-2002, 09:07 AM
I'm guessing fill rate. To begin with the fill rate on the gf4 smokes the gf2 (I would imagine the gf2 smokes the tnt). Second the gf4 does a depth check before the fragment ops right? That may help a little too...

John.

Btw: I compare the gf4 and gf2, because I have never used a tnt (sometimes I'm not very clear http://www.opengl.org/discussion_boards/ubb/smile.gif ).

[This message has been edited by john_at_kbs_is (edited 10-08-2002).]

pbrown
10-08-2002, 04:41 PM
My first guess would be that you're using an OpenGL feature that isn't supported by TNT, and the driver is falling back to software. OpenGL has evolved to 1.4, but TNT is probably closest to 1.1 in capability. In particular, features like cube maps, 3D textures, shadow maps, and much, much more, are not supported on TNT hardware.

Even so, there are "new" features in 1.4 that are supported natively on TNT hardware.

jwatte
10-08-2002, 08:29 PM
In a case like this, I usually recommend the 5-step program:

Step 1: Obtain Intel's VTune
Step 2: Install Intel's VTune
Step 3: Run Intel's VTune while your app is running
Step 4: Intel's VTune will tell you where you spend all the time
Step 5: You have to figure out how not to spend time there

Good luck!

jordiperez
10-09-2002, 08:11 AM
Well,

I've tested the application with display list on Inmediate mode triangles, the results are in the TNT 2 8 FPS ( 4 times more than before), i will try to test in the newer ATI, i hope now in the ati almost i get some respectacle FPS number.

Surely the 30.000 triangles are what sloow down all on old cards without T&L.

I will be happy if i found a usefull C++ Source code making and rendering BSP trees.

Thanks to all.

ToolChest
10-09-2002, 08:21 AM
what does your scene look like? is it a big open area or a series of rooms? try to visualize the scene, if you're looking at a wall how many walls are behind it? are you rendering all of those walls?

fyi: I can bring the frame rate on my gf2 down to 20fps with just 4x over draw across the whole screen (1024x768x32)...

John.

pkaler
10-09-2002, 09:51 AM
Originally posted by jwatte:
In a case like this, I usually recommend the 5-step program:

Step 1: Obtain Intel's VTune
Step 2: Install Intel's VTune
Step 3: Run Intel's VTune while your app is running
Step 4: Intel's VTune will tell you where you spend all the time
Step 5: You have to figure out how not to spend time there

Good luck!

Great Advice!!! For OpenGL programs, I would also like to add:
Step 6: Replace glVertex, glNormal calls with glColor to find out if you are app-limited
Step 7: Disable lighting, to see if you're transform-limited
Step 8: remove glColor, glNormal to see if AGP is the bottleneck
Step 9: render at lower resolution to see if your fill-limited

*Aaron*
10-09-2002, 11:42 AM
Step 1: Obtain Intel's VTune
Step 2: Install Intel's VTune
Step 3: Run Intel's VTune while your app is running
Step 4: Intel's VTune will tell you where you spend all the time
Step 5: You have to figure out how not to spend time thereI would like to add two steps:
Step 0: Get high-bandwidth connection (demo is 107.75 Mb)
Step 0.5: Pay $700 license fee.
http://www.opengl.org/discussion_boards/ubb/wink.gif

pocketmoon
10-09-2002, 12:53 PM
Step 0: Get high-bandwidth connection (demo is 107.75 Mb)
Step 0.5: Pay $700 license fee.
http://www.opengl.org/discussion_boards/ubb/wink.gif

You aint got broadband ? Ring intel up and *try* asking for a demo cd http://www.opengl.org/discussion_boards/ubb/smile.gif It might work!

OT, but Vtune is amazing and the Intel C compiler produces (in my cases) code that's regularly 10-20% faster the MSVC++. That's just plain vanilla (no simd) code.

But the price is high http://www.opengl.org/discussion_boards/ubb/frown.gif

jordiperez
10-13-2002, 10:56 AM
I've done dysplay lists on Inmediate mode geometry and works at 20 FPS on a ATI 7000 and a geforce 2 MX, so that you have solved my problem. Thanks a lot.

In cards without T&L i only get 1 or 2 FPS but the scene is heavy and it is normal (i think).

Thanks a lot.

knackered
10-13-2002, 11:32 AM
Why are people suggesting vtune?
VTune will only tell you where the CPU is spending time, not the GPU.
If you're T&L bound, then all vtune will show is a hotspot at the drawelements call, or glvertex if you're using it. And that's it. But you already know that a tnt2 is going to spend a lot of time in drawelements because it's performing the transforms on the CPU, so it's not really told you anything you don't know already.
Not really worth downloading for this particular case. (btw, www.grokster.com (http://www.grokster.com) to see if someone will 'share' vtune with you).

jwatte
10-13-2002, 03:27 PM
The guy was not using T&L. Thus, he'll likely be spending time in the GL driver for his card. Being told that's what you do will give a good indication of what to change.

Note that a Radeon 7000 does NOT have T&L.