Testing game performance depending on polygon count

Started by
3 comments, last by zedzeek 18 years, 1 month ago
I have a simple OpenGL game environment, I am loading different 3DS models into it (not at the same time), and want to test how well the game runs depending on the attributes of each model(e.g polygon count, texture data). I want to be able to get some results from the program to show the difference in how well the game would run with low poly models being used rather than higher poly models. Any ideas on how to record this. I am going to try duplicating the model 30 times(just to make a bigger difference in the poly count on screen), then move the models between two points and record the FPS. Then analyse the FPS. - Does this sound like a good way of doing this? - Will this method ensure that when each different model is loaded it will be a fair test? -Any other suggestions? Cheers.
Advertisement
Just a couple thoughts.

1. With a high poly model you are still going to only have one draw call, just with more primitives. You need to make sure you preserve this with your 30 model version. How you do this depends on your api, but in general you want to put all 30 models in one vertex buffer / array and draw them with a single draw call. This will make sure that the overhead of the draw calls does not tait your results.

2. A high poly model generally doesn't take up much more screen space than the low poly version of the same object. There are more faces, but they are generally smaller. If you draw the same model many times in different places you will generate more fragments to be drawn to the screen. If you are not careful about this then fill rate will have more effect on your test than it would on a real high poly model. Probably the best option would be to make high and low poly versions of the same object (say a sphere) and compare those. If you really want to use multiple versions of the same model, maybe draw them all on the same place using the z-buffer to prevent overdraw.

3. Measure the time to draw a frame instead of the framerate. This will make it easier to compare the test results. Make sure your test frame takes long enough that the accuracy of the timer does not make a significant impact on the test results.
Yeh sorry mate wasnt clear what i said.

Gonna load a low poly model and get the result. Then quit the prog, and run it again and load a version of the model with a high poly count. Then I want to compare the results.

Measuring the time to draw a frame sounds like what im after.

Any idea on how to do that in OpenGL or know any tutorials for it. Sorry if its simple to do, not looked for any info on ot yet.

Cheers.


I would think that you would want to measure frame rate instead, so that you can average over a longer amount of time to filter out anomolies (like windows doing a bunch of stuff in the background).

A simple way to implement this is:

1) Get a snapshot of the current time (with whatever api method you want (like timeGetTime or queryPerformanceCounter))

2) Increment a frame count each frame

3) Check to see if the time elapsed since that first snapshot is >= 1.000 second. If so, the frame count is your frame rate and reset the count and snapshot time. If not, render the next frame.

It is pretty basic, and you can vary the amount of time that you are sampling at, but it should give you a simple way to start.

You may also want to consider the fact that unless the application becomes bound in by the rasterizer or vertex stages you might not see any difference in frame rate between the two versions - so don't assume that something is wrong if they are nearly the same!
u can easily tesselate the polygons (so u increase the number of tris but use the same data)
eg to double the tri count choose the halfway point along one side + choose the opposite corner draw a line between them + u have 2 tris!
or by 3
center of tri == (corner1+corner2+corner3) / 3.0;
from this center create 3 tris by drawing a line to each corner.
keep on subdividing until tris are of a certain size or the required tri count is reached.

This topic is closed to new replies.

Advertisement