Game Development Community

Slow Performance with Trees and Swap Buffer

by Cai Yundong · in Torque Game Engine Advanced · 06/08/2009 (8:22 pm) · 3 replies

Hi I have encountered the following oddity. At certain locations in my Game, The Frame Rate drops to below 20 FPS. Using the built in profiler, i discovered that over 50% of the time was used for Swap Buffer.

However, when i used metric(gfx) It shows that at that particular camera angle, there are only about 100,000 Poly. In fact, In that location, there are only trees, the default TGEA Oak trees (oak1 156 poly, oak2 196 poly and shrub 16poly according to showtools.), but quiet a number of them, of them, about 30-40. Based on poly count and the 256x256 textures used, this should not be a problem.

I have tested with default PNG and have converted them to DDS (DXT1 for trunk and DXT5 for branches) with not much impact. In other locations on my game with buildings, metric(gfx) reports over 500,000 Poly but can produce a framerate of 30 - 50 FPS.

I am using a Core 2 Duo 2.66ghz, with 3.25gb Ram, a ATI 2400pro 256mb with ATI Catalyst 9.2 Drivers and TGEA 1.81. The project is a new empty project, Legacy Terrain, but just some buildings and the trees at one side.

Anyone have any idea what is causing the issue ?

#1
06/09/2009 (5:48 am)
Like in the other thread, NVPerfHUD would be able to tell you what's going on. You have to forget about [more polygons = less performance] because it's not that simple today with pixel and vertex programs. It adds up, but it's not the main factor.

You could be draw call limited, which will stall your CPU.
If you don't have an ATI chipset, try Pix.
#2
06/09/2009 (11:14 am)
Thanks for your reply again :P As per the other thread, I will run ATI PerfStudio or PIX and let you know. NVPerfHUD looks cool but unfortunately i don't have an Nvidia card :(
#3
06/09/2009 (1:43 pm)
Let us know what you find out! Good luck.