V-sync with maxfps 60 is way smoother

YoungTrotskyYoungTrotsky Join Date: 2007-03-09 Member: 60307Members
edited March 2013 in Technical Support
Not sure if this has been discussed before, I tried a quick search and didn't turn anything up but apologies if this is old news. I don't like playing with v-sync disabled as I get tearing and it bugs me, with v-sync on I am aware there can be some input lag but I haven't noticed a significant difference. I have a 60Hz LCD monitor and pretty high-end machine so with triple-buffered v-sync enabled I get a constant 60 fps except in the busiest of fights.

What I have noticed is that despite a constant 60 fps I was getting pretty high numbers in the 'waiting for gpu' line of r_stats. This seemed strange as I'm pretty sure my graphics card is not bottlenecking at 60fps with everything turned to low. I tried setting maxfps 60 in console and voila - 'waiting for gpu' is now locked at 0ms all the time, except on those rarest of occasions when fps drops below 60.

This isn't just a 'that number bugs me' problem either, the movement is way smoother than without the maxfps limit, even though fps is reported as 60 in either case. I don't know if this is some flaw in the way v-sync is implemented in NS2 that could be fixed, but I highly recommend anyone who prefers to have v-sync enabled to set maxfps 60 in console. Unfotunately it gets un-set on map change, the workaround I have come up with is to bind my 1 and 2 keys to maxfps 60 so that I will automatically set it without having to think about it whenever I change weapon, you could bind W or Space or Mouse1 but then the console gets spammed with "maxfps 60" over and over.

If anyone would like to shed some light on why this happens I would appreciate that information. Thanks.

Comments

  • IronHorseIronHorse Developer, QA Manager, Technical Support & contributor Join Date: 2010-05-08 Member: 71669Members, Super Administrators, Forum Admins, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Blue, Subnautica Playtester, Subnautica PT Lead, Pistachionauts
    edited March 2013
    Hmm interesting find.
    BUT you should know that a) maxfps was only intended as a debugging tool and b) while you may not notice any delay there definitely is one with triple buffering.

    edit: should note that vsync has had wonky issues in the past like hitching etc. Will pass this on to Max to look over just in case.
  • NordicNordic Long term camping in Kodiak Join Date: 2012-05-13 Member: 151995Members, NS2 Playtester, NS2 Map Tester, Reinforced - Supporter, Reinforced - Silver, Reinforced - Shadow
    If you want vsync and are having trouble with the game setting, try forcing it from your driver interface.
  • YoungTrotskyYoungTrotsky Join Date: 2007-03-09 Member: 60307Members
    edited March 2013
    IronHorse wrote: »
    Hmm interesting find.
    BUT you should know that a) maxfps was only intended as a debugging tool and b) while you may not notice any delay there definitely is one with triple buffering.

    edit: should note that vsync has had wonky issues in the past like hitching etc. Will pass this on to Max to look over just in case.

    OK thanks for your response. I assume that with maxfps uncapped the game actually still renders frames as fast as it can but selectively sends them to the buffer according to monitor refreseh rate, hence still getting 'waiting for gpu' values despite only having 60 FPS visible, but I don't think that explains why the picture is choppy with maxfps 0 and smooth with maxfps 60, or maybe it does and I'm just not knowledgeable enough on this subject to understand it.

    I like that article you link to btw, but it actually doesn't really go over input lag, I found this one more useful for that: http://vsra.forumotion.com/t109-vsync-and-input-lag
  • MaxMax Technical Director, Unknown Worlds Entertainment Join Date: 2002-03-15 Member: 318Super Administrators, Retired Developer, NS1 Playtester, Forum Moderators, NS2 Developer, Constellation, Subnautica Developer, Pistachionauts, Future Perfect Developer
    I can understand why using maxfps 60 would affect the "waiting for the GPU" number. The logic of the game looks like this:

    loop
    {
    (1) if the GPU has buffered too many frames, wait for it to finish (display amount of time waiting)
    (2) do game stuff
    (3) if maxfps is set, wait until we hit the desired frame rate
    }

    So by setting maxfps, you're causing the game to stall at (3), which gives the GPU more time to process before it does (1). As a result, you end up not having to wait at (1) since you've already waited at (3).

    I'm not sure why this would affect the smoothness of the game though. I'll have to think about that some more.

  • Racer1Racer1 Join Date: 2002-11-22 Member: 9615Members
    With unlimited fps, I can imagine scenarios where a number of frames are rendered very quickly, followed by others taking more time than normal, followed by others rendering quickly again, causing "sputtering" of frames. Assuming the cap is at 60 fps, someone would have to have the ability to (subconsciously) perceive the difference of the framerates going from 60 to e.g. 90 fps and back many times a second for it to be "smoother" when capped. I don't know if human eyes can notice differences at those speeds.
  • CrushaKCrushaK Join Date: 2012-11-05 Member: 167195Members, NS2 Playtester
    Doesn't a higher-than-necessary framerate mean more computations by the GPU, which means unnecessary power consumption and heat? I would always play with VSync enabled if I'd actually manage to hit such high framerates in the game.
  • Kouji_SanKouji_San Sr. Hινε Uρкεερεг - EUPT Deputy The Netherlands Join Date: 2003-05-13 Member: 16271Members, NS2 Playtester, Squad Five Blue
    CrushaK wrote: »
    Doesn't a higher-than-necessary framerate mean more computations by the GPU, which means unnecessary power consumption and heat? I would always play with VSync enabled if I'd actually manage to hit such high framerates in the game.
    I'd rather have a proper frame-limiter, then using the input/mouse lag inducing V-Sync...

    Double buffering wasn't that bad, but somehow this changed. maxfps right now does something weird and is much less smooth then when actually running at the same FPS. But hey its a debug tool not a game option :P

  • YoungTrotskyYoungTrotsky Join Date: 2007-03-09 Member: 60307Members
    Max wrote: »
    <stuff>
    Thanks for the info Max, I can confirm 100% that the game is MUCH smoother with maxfps 60 than without, even though I get 60 FPS in either case, using vsync.
    CrushaK wrote: »
    Doesn't a higher-than-necessary framerate mean more computations by the GPU, which means unnecessary power consumption and heat? I would always play with VSync enabled if I'd actually manage to hit such high framerates in the game.

    I think everything you say is correct, the downside to using vsync or just capping frame rate is that you get an input delay compared to if you just let the gpu send frames to the monitor as soon as they're ready. It isn't much (never more than 16.67 ms if you have constant 60 FPS) but it can potentially mess with your aim a bit. There is of course a certain unavoidable delay if your monitor refresh rate is lower than your maximum achievable FPS, but adding vsync or capped frames on top of this can exacerbate the problem. That's why some people choose not to use vsync and just put up with screen-tearing, it makes the game a bit more responsive.

    That is my understanding at least, I am by no means an expert, and would welcome corrections if anyone knows better.



Sign In or Register to comment.