A pleasing discovery, should help frame rates

Circastes

Chieftain
Joined
Nov 6, 2004
Messages
16
I have discovered that when VSYNC is enabled, when certain areas of the map are viewed - that don't have any extra detail vs. the average screenload - frame rate can drop by around 35%. If you're curious: what VSYNC does is it synchronises the frame output of the graphics card with the rate at which your monitor is refreshing its phosphors (the image). The purpose of this is to stop a new frame from being sent from your graphics card to your monitor halfway through a monitor refresh cycle, so as to prevent the screen from displaying half of a previous frame and half of a new frame. This problem can be observed as a small 'image tearing' glitch at particularly high frame rates, but usually will just make things seem a little less smooth as you move around in an FPS or scroll in an RTS/TBS.

So early in a game when scrolling over a certain region, I visually observed the frame rate to be dropping an annoying amount over that region, then as I moved away it went back to the previous smoothness. I was quite confused as there was absolutely nothing special in terms of geometry/textures/effects about this area. When I used a program called 'Fraps' to view frame rate, I noticed it was capped at 85 in the menu - which suggested VSYNC was enabled since my monitor refresh rate was forced at 85Hz. I decided that VSYNC is pretty useless in a game like Civ4 and it I knew it tended to decrease mouse responsiveness at low frame rate, so I exited the game and turned it off. When I went back into my savegame and observed the strange area - the performance didn't drop at all. I exited again, reenabled VSYNC, loaded the savegame and the problem was back, with frame rate dropping from 42fps to 28fps as calculated by Fraps.

Screenshots (the frame rate is the yellow number superimposed in the top left corner):

(All shots @ Medium settings, 2xAA)

VSYNC ON


-normal area-


-the strange area-


VSYNC OFF


-normal area-


-strange area-


It seems this is occurring to varying degrees, as demonstrated by these shots:

VSYNC ON


VSYNC OFF


I wondered how this would affect the really huge games, when the screen is completely covered with city improvements, larger city size, units, towns and things. So I loaded a huge map game at 1735AD and checked. Because of RAM issues, I wasn't able to get screenshots without the frame rate dropping in the process, but I compared the numbers I was getting, and they were exactly the same in a scene completely covered with buildings, units and things whether VSYNC was on or off. But then I noticed the frame rate was exactly the same with 2xAA samples enabled as it was with 0xAA samples (and I know the game was definitely applying it) in this scene. This suggested to me that since geometry is done on the CPU and these scenes have extremely high levels of geometry, the CPU is acting as a bottleneck in these scenes and preventing the VSYNC issue from making any mark, since the graphics card isn't being completely utilised (not much can be done about this, bar Firaxis implementing geometry instancing, but I don't know practical this is or even if it's already being used in the game or not). However - this may not be the case for other people, and it may even still be the case for me since I only had the patience to test a small area, as I had to wait for the hard drive to stop loading each scene so I could observe the real framerate, being only on 512mb RAM (I just ordered another 512mb).

So there you go. There's some sort of bug with VSYNC on [at least on ATi cards]. VSYNC is enabled by default on both nVIDIA and ATi cards, and enabled by default in Civ4. It can be forced off in Windows using either the nVIDIA or ATi control panel. You'll have to Google it to find precisely where, as I use a program called Radlinker for my 9800 Pro. Hope this applies to everyone, and helps.

My system specs:
2.3GHz AMD Barton
512MB DDR400
ATI-built 9800 Pro using modified third-party Catalyst 5.11s
Civ4 v1.09
 
Most interesting piece of work. I can't say it solves a problem which is particularly irritating me but many thanks for posting your findings friend.
 
Back
Top Bottom