Silk smooth framerate and possibly prevents stuttering caused by 100% CPU

Discussion in 'General Discussion' started by KeiKei, Jun 21, 2012.

  1. KeiKei

    KeiKei Registered

    Joined:
    May 24, 2012
    Messages:
    806
    Likes Received:
    44
    Hi fellow racers!

    I've not been satisfied with the rendering quality and been trying to change numerous settings to improve. Finally it seems I've found a really good compromise between framerate, rendering quality and input lag. By changing "Render Once Per VSync" to "3" in \rFactor2\UserData\player\player.PLR seems to give steady 60 frames per seconds (or whatever your monitor refresh rate is) and has hardly any impact on input lag. But before you change this option go to in-game settings and set Sync to None/Off.

    Render Once Per VSync="3" has few drawbacks but I think those are quite minor compared to what you'll gain. I'll try to explain by introducing what different sync options do (in my opinion):

    No vertical sync

    Framerate is not limited and graphics adapter is working as hard as it can. Framerate indicator (while in game press Ctrl+F) can show very high values for example 180 fps and one could think this gives the smoothest rendering quality possible. However this is not the case because your monitor can only show limited amount of frames for example 75 frames per second (if your monitor refresh rate is set to 75 Hz). Frames created by game's graphics engine are not synced so they output to monitor kind of "randomly" - some of the created frames are skipped and rendering is not completely smooth.

    Graphics adapter is doing lot's of useless work and at least on my system with build 90 it seems to cause major problems because CPU usage can go up to 100% (had problems with previous versions too). When this happens the physics engine falls out of real-time and everything is happening in slow-motion. When playing online other players are going faster than you even though your speedometers are showing same values! No wonder why you're so slow. :)

    In my opinion the only good thing about no vertical syncing is the lowest possible input lag (in other words what you see is what you get). If you don't know what the input lag is then see video http://www.youtube.com/watch?v=9U_3xgWZPz0 and you'll understand why it's so important to have as low input lag as possible. Note it's not the controllers information going slow into the computer but graphics system delaying to show you what has happened - so you are always reacting late; you can't take control of the slides, turn too late, brake too late, etc.

    Vertical sync: Video

    Gives the best rendering quality and absolutely smooth framerate. Also haven't noticed any screen tearing (http://en.wikipedia.org/wiki/Screen_tearing) so it's working as it should. However it gives you massive input lag (at least for my system it does) and will make you a worse driver. Slides are almost impossible to control properly etc. Big input lag is OK for arcade games but for racing sims it's absolutely something you would want to avoid.

    Vertical sync: Software

    In rFactor 2 this is pretty good actually. It doesn't seem to add any input lag and gives almost perfect framerate. There seems to be no tearing but some frames are apparently shown twice every now and then. Some may find it a bit annoying (I do).

    Vertical sync: GPU

    Don't really know what this does. It's not a pure vertical synchronization because framerate doesn't match with monitor. Some old changelog noted: "GPU sync is a UI element for the PLR's "Flush Previous Frame" setting. This setting is not recommended for SLI". Well I don't have SLI and for me it seemed like no sync at all but lower fps so I find it quite useless.

    Back to Render Once Per VSync="3"

    OK so much for the different in-game sync options. If you want to learn more about how vsync is done then I recommend to read article http://www.anandtech.com/show/2794

    Even though I'm a software developer I can't tell how ISI was able to make this work so well. It seems like it's only doing page flipping but in a very controllable way so it doesn't cause tearing. Maybe it synchronizes the physics engine's sampling frequency with the monitor or something like that. Actually it's not 100% free of tearing. When game's "inner framerate" is decreasing close to monitor refresh rate then there is some tearing happening near the top of the screen. Luckily your eyes are on the road (should be! :)) and sky is usually quite homogeneous so you'll hardly notice when it's happening.

    There is another downside too. If game's "inner framerate" drops under your monitor's refresh rate then the visible framerate seems to be cut in half. So if you had 60 fps then going slightly under will cause it to drop down to 30 fps. However this really shouldn't be a problem because in a racing simulation framerate is everything - at least IMHO. What you see at your monitor is the biggest "feedback" you're getting from the car so make sure framerate is maxed out. In other words make sure graphic details are set so low the framerate doesn't fall under your monitor's refresh rate in any situation. Or if you want more candy go by a decent hardware! :)

    Third drawback is that it might add a little input lag but personally haven't been able to notice any difference. By observing green spike location at GPU/CPU meter (Ctrl+C) it seems like it's a bit further to the right so there can be some extra lag. Maybe ISI would comment on this? However did short hotlapping with Megane's at Malaysia and was able to put 1:01,1xx. Since my PB is 1:00,9xx it looks like it's not slowing me down at all.

    Try it out and hopefully works as good as it does for me. Great job ISI!

    PS. Please don't abandon this "vblank, wait" option from the final product since I like it so much! :)
     
    4 people like this.
  2. 1959nikos

    1959nikos Registered

    Joined:
    Mar 26, 2012
    Messages:
    3,915
    Likes Received:
    83
    Great post!!!
     
  3. buddhatree

    buddhatree Registered

    Joined:
    Dec 22, 2011
    Messages:
    1,700
    Likes Received:
    249
    Thank you sir! Works very well :D
     
  4. liebestod

    liebestod Registered

    Joined:
    Jan 9, 2012
    Messages:
    142
    Likes Received:
    2
    Interesting post, but please note that input lag is absolutely not acceptable for arcade racers, or arcade-style racers. It is just as undesirable.
     
  5. KeiKei

    KeiKei Registered

    Joined:
    May 24, 2012
    Messages:
    806
    Likes Received:
    44
    It took a while for me to understand why there appeared to be so little input lag with this Render Once Per VSync="3" + "Sync: None/Off" thing. Actually it didn't sync the monitor output on graphics card level. There were still screen tearing but it appeared quite steadily on the lower part of the screen and hence driving cars like Meganes the tearing was not visible because dashboard hardly moves (compared for example to scenery during cornering). However sometimes with open-wheelers like Formula Masters tearing happened on the horizon level and was very annoying. It looks like the vertical position of the tearing is determined by the graphics settings and visible details so it's not possible to make it happen only on the upper or lower parts of the screen - at least by the user.

    Well not to worry. By leaving Render Once Per VSync="3" and changing Sync to Video it's still very drivable, framerate is smooth and screen tearing is completely gone. Actually I believe it doesn't add any input lag compared to "Render Once Per VSync=3" + "Sync: None/Off" because previously only the lower part of the screen was the latest frame - not the scenery (which apparently was the second latest frame). In any case the input lag is considerably better with Render Once Per VSync="3" + "Sync: Video" when compared to original Render Once Per VSync="0" + "Sync: Video". So test the following settings and see how it looks/feels for you:

    1. Change "Render Once Per VSync" to "3" in \rFactor2\UserData\player\player.PLR
    2. Go to in-game settings and set "Sync: Video"

    It still keeps the CPU's cores load low and prevents the stuttering problem (at least on my system).

    BTW there is a great feature under development by the ISI called Auto Detail. Currently it can be enabled by changing Auto Detail Framerate to a non-zero value. I changed mine in \rFactor2\UserData\player\player.PLR to:

    Auto Detail Framerate="120"

    It basically reduces visible vehicles and details up to half when (inner) framerate goes below given value (and also adds details back when framerate goes up). However it seems to favor visible vehicle count and personally would want it to reduce details first. At least for me it's important to see as much cars as possible so I can react early for example when there is mayhem at turn one right after the start. Maybe ISI would implement a prioritization list for user to define which details are the most important? Mine would be something like (topmost are the most important details):

    - Mirrors (aware of opponents)
    - Rain Drops (aware of changing track conditions)
    - Road Reflection (aware of current track conditions)
    - Special Effects (smoke limiting visibility and good indicator of mayhem ahead if visible vehicle count is limited)
    - Circuit Detail (limits driving line for example little wooden sticks at Spa/Historic)
    - Texture Details (better indication of breaking points etc)
    - Visible Vehicles (earlier reaction for example to mayhems at turn one right after the start)
    - High Dynamic Range Imaging (looks fantastic)
    - Player Details (nice to have detailed dashboard etc)
    - Shadows (looks very nice even if set to Medium)
    - Texture Filter (improves texture quality)
    - FXAA (good anti-aliasing with low impact on performance)
    - Sun Occlusion (looks great)
    - Opponent Details (nice to have more detailed opponents)
    - Environment Reflection (looks stunning especially on hood)
    - Movies (nice to have)
    - Wind and Crowd Motion (nice to have)
    - Anti-aliasing (nice to have improved after FXAA)
    - Shadow Blur (nice to have)

    Of course some of the details cannot be automatically changed during gameplay so the list is kind of theoretical.

    Hmm, maybe I should write about this to a wish list topic...
     
  6. Legion78

    Legion78 Registered

    Joined:
    Jun 15, 2012
    Messages:
    39
    Likes Received:
    2
    Great post, I will be rushing home to change these settings! I'm suffering terrible stutter both online & off line so much so that I can be on a good lap, the game freezes/stutters at the last corner (or late in the lap) making it impossible to come down the gears or judge my braking. I'm sure ISI will optimise in time but any quick fix to rule this out is greatly appreciated!

    p.s. thats right, all my poor performances are due to the stuttering;)
     
  7. KeiKei

    KeiKei Registered

    Joined:
    May 24, 2012
    Messages:
    806
    Likes Received:
    44
    Really hope it works for you but I've heard it's not a 100% fix for everybody. Well, worth trying for sure!
     
  8. Legion78

    Legion78 Registered

    Joined:
    Jun 15, 2012
    Messages:
    39
    Likes Received:
    2
    hey, can get it to work for me:(
    still suffering stutters, don't think its any worse though - thanks for the info though & let me know if you find out anything else
     
  9. buddhatree

    buddhatree Registered

    Joined:
    Dec 22, 2011
    Messages:
    1,700
    Likes Received:
    249
    I urge anyone with an Nvidia card to go back to the 296.10 drivers. Stutters and slo-mo have all disappeared.

    All of the 300.xx (and above) drivers give me stutters.
     
  10. tjc

    tjc Registered

    Joined:
    Jun 4, 2012
    Messages:
    5,884
    Likes Received:
    405
    Yeh I tried KeiKei`s suggestions too but it never worked for me either sadly... got more of a steady stutter with it than without it, although to be fair I don`t suffer from too many stuttering probs anyway.

    Appreciate you posting this up to try though KeiKei. :)

    I have also rolled back to the 296.10`s as got big stutter and fps problems with the 300.xx`s too...
     
  11. Knight of Redemption

    Knight of Redemption Registered

    Joined:
    Jun 23, 2012
    Messages:
    881
    Likes Received:
    56
    Latest Nvidia beta drivers solved (more or less) my stutters...go figure. Best not to give out absolutes and leave folk to see what works for them.
     
  12. tjc

    tjc Registered

    Joined:
    Jun 4, 2012
    Messages:
    5,884
    Likes Received:
    405
    I don`t see anybody giving out any "absolutes"...
     
  13. 1959nikos

    1959nikos Registered

    Joined:
    Mar 26, 2012
    Messages:
    3,915
    Likes Received:
    83
    It seems everybody has different results from nvidia drivers. Me too...
     
  14. tjc

    tjc Registered

    Joined:
    Jun 4, 2012
    Messages:
    5,884
    Likes Received:
    405
    Indeed nikos...

    I waited off till I did a fresh OS of W7 to try these new drivers, both the 301.42`s and the 304.48`s and was sorely disappointed with them yet they work well for others...
     
  15. 1959nikos

    1959nikos Registered

    Joined:
    Mar 26, 2012
    Messages:
    3,915
    Likes Received:
    83
    I had major problem with 295.73
    All the rest are ok, but I dont really see any difference between them.
    Now Im running 304.79, same as the others really, but Im far from an expert here...
     
  16. KeiKei

    KeiKei Registered

    Joined:
    May 24, 2012
    Messages:
    806
    Likes Received:
    44
    I've been using 304.48 beta drivers and works for me. Maybe I'll stick with these - don't want to rock the boat! :) In case someone wants to try nVidia beta drivers they can be found from:

    http://www.nvidia.com/Download/Find.aspx

    From drop-down menu "Recommended/Beta" select "Beta" or "All".
     
  17. Satangoss

    Satangoss Registered

    Joined:
    Jun 2, 2011
    Messages:
    1,123
    Likes Received:
    7
    No effect here, Nvidia is releasing drivers one worse than the previous. There's just one certainly, the next Nvidia driver will stutter even more in RF2.
     
  18. jimcarrel

    jimcarrel Registered

    Joined:
    Jan 15, 2012
    Messages:
    1,720
    Likes Received:
    24
    Different outcome for me, finally went back to 296.10's, and ended up using GPU instead of Video. (GPU setting was only one that gave smoooth results)
    GTX 460---different strokes for different folks, I guess
     
  19. buddhatree

    buddhatree Registered

    Joined:
    Dec 22, 2011
    Messages:
    1,700
    Likes Received:
    249
    I have a 460 too. GPU sync was my savior with the 300.xx series, but I haven't needed it since going back to 296.10's.
     
  20. GTrFreak

    GTrFreak Registered

    Joined:
    Dec 7, 2010
    Messages:
    376
    Likes Received:
    7
    Guys, do you know what's wrong here?

    I've tried some tips from KeiKei too because I experience stuttering too. I didn't have problems at first but I guess I've changed some settings in the game since and now its stuttering.

    I've tried the setting: render once per Vsync:3 with Vsync on Video. It resulted in UTTERSMOOTH SILKY nice gameplay but ONLY if my graphics card could keep up. It would render a smooth 59 or so frames which resulted in almost no tearing (what I could notice). theres a big BUT right here. If I got into the cockpit I got 35-40 FPS and it never got higher. When switching to the T-cam view of the ISI it rendered 60 frames again and the gameplay was extremely smooth. That's because in that view the mirrors are disabled. So I tried getting into the cockpit with the mirrors disabled and sure, there we are, 60 frames and smooth gameplay.

    Now, I knew that mirrors cost me some frames but 20 to 25 frames (constantly) was too much. So I tried disabling vsync to see how much of a difference it made. To my surprise it cost me just 5 frames max. (or there must be something wrong with the FPS counter in rF2)

    I've read somewhere that when your GPU can't keep up with those 60 frames it would automatically reduce FPS to about 30 (half the frames) with some setting. Is that what happened here (although FPS counter showed me 35-40) ??

    Does anyone know a solution? Because I don't need mirrors to hotlap but I need them for online play.
     

Share This Page