FASTER THAN LIGHT!
In the last week I have worked night and day to a new frustrum culling system. I’ve radically changed my previous approach and the results are unbelievable! The major problem of the previous method was the fact that when too many objects were in camera field of view (panoramic views) the frame rate drops in an unacceptable way. The problem was in part reduced by using a relatively small terrain which let us to reduce the number of objects to pass to visibility system. But our purpose, in this new build, was enlarge playable area (terrain are now up to 4 kilometers X 4 Kilometers), so the new culling algorithm needed to have less, but very less, complexity.
We are proud to declare that this purpose has been reached: we have reduced the algorithm complexity of an order of magnitude!!
As you can see from image while the previous algorithm takes about 15 ms to compute the panoramic frustrum culling, this new one takes about 1 ms!! In addiction we have speed-up objects setup and we have found a method to move the frustrum culling test to another thread, using the calculation results in the next frame without visible artifacts. This make the main game thread to have much time to make other things like AI, logic, etc…
The following image show the use of the main thread (blue bar) and the auxiliary thread (yellow bar). Auxiliary thread is also used for animation blending and particle systems (see the “after” side of the image).
All the improvements made until now are related to the CPU. The next challenge, in the next week, is to reduce computation time of the GPU which is striclty related to the number of poligons but especially to the fill-rate, i.e. screen resolution. This means reducing the grey gap above the blue bar in the “after” side of the previous image. This means high framerate at higher resolutions.
Another shot showing the results:
All tests showed have been made on the following system:
– Dual core Athlon x64 2.8 Ghz
– Geforce GTS 250 1 Gb
– 2 Gb memory.
Research continues…Next week we will show new results on the GPU side.