Board index FlightGear Support Graphics

How to increase your fps past 60... [vsync tip]

Graphics issues like: bad framerates, weird colors, OpenGL errors etc. Bad graphics ar usually the result of bad graphics cards or drivers.
Forum rules
In order to help you, we need to know a lot of information. Make sure to include answers to at least the following questions in your initial post.

- what OS (Windows Xp/Vista, Mac etc.) are you running?
- what FlightGear version do you use?
- what graphics card do you have?
- does the problem occur with any aircraft, at any airport?
- is there any output printed to the console (black window)?
- copy&paste your commandline (tick the "Show commandline box on the last page of FGRun or the "Others" section on the Mac launcher).
- please upload a screenshot of the problem.

If you experience FlightGear crashes, please report a bug using the issue tracker (can be also used for feature requests).
To run FlightGear on old computers with bad OpenGL support, please take a look at this wiki article. If you are seeing corrupted/broken textures, please see this article.

Note: If you did not get a reponse, even after 7 days, you may want to check out the FlightGear mailing lists to ask your question there.

How to increase your fps past 60... [vsync tip]

Postby Bug Bunny » Thu Feb 26, 2015 12:51 am

This info could help people with >60fps problem:

I play FG 3.4 on ATI Rad 6870 with Win7 sp1 (and it is great)
Vsync is set to "controlled by application", and my monitor is 60Hz one, so I got 60fps max (or lower).
What is interesting is that even with "Framelimiter off" I got 60fps... hmm, looks like FG sets Vsync "on" by default.
So I went to ATI Catalyst Control Center and created 3D profile for fgfs.exe and set "Wait for vertical sync" to off, saved it and relaunched FG.

Now i got solid >100fps (at 1280*1024, AF8x, AA2x, ALS on, max on most settings). And it feels great! However, if high fps looks choppy/buggy (I've seen that effect on MS FSX), you can just set limiter for best result.

I'm not quite sure why FG uses Vsync on by default, iirc, vsync under heavy load causes big fps drops in "60, 30, 20, 15, 12, 10fps" fashion. I could be wrong. :idea:
Bug Bunny
 
Posts: 41
Joined: Tue Feb 24, 2015 4:00 pm
Location: Ukraine
Version: 3.6.0RC
OS: Windows 7

Re: How to increase your fps past 60... [vsync tip]

Postby Hooray » Thu Feb 26, 2015 2:30 am

See: http://wiki.flightgear.org/Troubleshooting_crashes
Image

BTW: you can also use traits->vsync=false at the osgviewer level to disable this easily in the C++ code, exposing this as a property via fgGetBool() would be simple, and would not require any OS/GPU specific application profiles
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11326
Joined: Tue Mar 25, 2008 8:40 am

Re: How to increase your fps past 60... [vsync tip]

Postby hamzaalloush » Thu Feb 26, 2015 11:45 am

I used to do the same in Win7 from the Nvidia control panel, provided you have the aero theme disabled which turns off desktop composition.

You can't do the same in Win8.1 unless you somehow kill the standard shell.

Did anybody ever turn off vsync successfully for FG/OpenGL apps on Win8.1?
hamzaalloush
 
Posts: 632
Joined: Sat Oct 26, 2013 9:31 am
OS: Windows 10

Re: How to increase your fps past 60... [vsync tip]

Postby Hooray » Thu Feb 26, 2015 4:07 pm

The C++ change suggested above should work regardless of the OS - if in doubt, file a feature request to expose this as a property which is trivial to do ...
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11326
Joined: Tue Mar 25, 2008 8:40 am

Re: How to increase your fps past 60... [vsync tip]

Postby hamzaalloush » Sun Mar 15, 2015 10:55 pm

@Horray, my friend

i know i'm late, best to implement this fix into src/View/fg_os_osgviewer.cxx ?

so, expose osg "attr"there, then let nasal take it from there to the PUI?

if i'm sounding like a total noob, which i am, please enlighten me. your advice is always priceless :wink:
hamzaalloush
 
Posts: 632
Joined: Sat Oct 26, 2013 9:31 am
OS: Windows 10

Re: How to increase your fps past 60... [vsync tip]

Postby Hooray » Mon Mar 16, 2015 1:46 am

you don't need to touch anything involving PUI - it's just about editing the C++ traits used for creating the OSG window to disable vsync.

See:

http://forum.openscenegraph.org/viewtopic.php?t=1098
http://thermalpixel.github.io/osg/2014/ ... meras.html
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11326
Joined: Tue Mar 25, 2008 8:40 am

Re: How to increase your fps past 60... [vsync tip]

Postby hamzaalloush » Mon Mar 16, 2015 1:53 am

Thanks for the rescue Hooray, will read them throughly. 8)
hamzaalloush
 
Posts: 632
Joined: Sat Oct 26, 2013 9:31 am
OS: Windows 10

Re: How to increase your fps past 60... [vsync tip]

Postby zlsa » Mon Mar 16, 2015 2:12 am

I have integrated Intel HD 4000 graphics.

"How to increase your fps past 60..." lol
zlsa
 
Posts: 145
Joined: Fri Feb 14, 2014 2:29 am
Callsign: N275A
Version: 3.5 git
OS: Linux

Re: How to increase your fps past 60... [vsync tip]

Postby Thorsten » Mon Mar 16, 2015 6:20 am

The human eye can see about 30 fps - 60 is way beyond what the eye can do. I don't think a normal screen would even refresh at a much higher rate than 75 Hz - so if you run the GPU at 300 fps, all you do is rewrite the framebuffer a lot without changing anything of the graphics.

Ah, the lure of spectacular numbers... which is why they can sell 12 megapixel cameras, in spite of the fact that the human eye can only perceive about 2 megapixels...
Thorsten
 
Posts: 10820
Joined: Mon Nov 02, 2009 8:33 am

Re: How to increase your fps past 60... [vsync tip]

Postby Hooray » Mon Mar 16, 2015 10:11 am

this is all true, for actually "using" (=viewing) the simulator, anything beyond ~monitor refresh rate is an unnecessary waste of resources - but I guess the merits of disabling vsync depends entirely on your use-case, especially in conjunction with frame rate throttling and time step acceleration or even just benchmarking to compare performance and draw conclusions, especially because of the generally non-threaded SGSubsystem architecture, e.g. restricting I/O subsystems - So the other obvious use-case is I/O (e.g. networking) requiring frequencies >= (or more stable) than your monitor's vsync rate. We've seen people doing Matlab interfacing or other scientific projects, where the standard 30-60 fps would not suffice, so they had to use a handful of different options to accelerate/slow down simulation rate and use a corresponding FDM rate, as well as an appropriate frame rate to ensure that all these numbers match up - for details, refer to the interfacing sub forum. I think AndersG has posted a number of explanations on configuring your computer accordingly.

Then again, disabling vsync will also give you a ballpark figure on maximum update rate per subsystem for your particular computer - e.g. even with rendering of aircraft/scenery/terrain and models entirely disabled via draw masks and vsync disabled, which shows up in performance monitor accordingly, which is why people like Mathias have been working towards decoupling rendering from the simulation main loop (fgviewer) and using HLA to partition the main loop into distinct components. Those people satisfied with 60 hz/fps, simply happen to be in the camp of people with powerful hardware who are not usually CPU bound/limited with their use-cases. Others however, are interested in seeing update rates beyond 60 hz for certain subsystems, so need to find a workaround to make that happen.

Subject: What would enabling this option do...?
i4dnf wrote:VSync is short for Vertical Sync. It's also an option you can enable somewhere in your video card settings. In short it makes sure the monitor doesn't display parts from different frames at the same time, like the upper half from a new frame and the lower half from the old one. This is not an issue for static images, but as soon as you start moving things in the image it might become visible.
More technical info here.
(it comes from the CRT era, but is still valable today)


Subject: What would enabling this option do...?
i4dnf wrote:That option helps with VSync (The option that reduces horisontal tearing when the card has to send a new frame to the monitor and it has not finished drawing it). With triple buffering VSync can happen at any frequency, thus improving framerates. Without triple buffering, VSync will progresively half the framerate with respect to the desired refresh rate (i.e 30, 15, 7 fps for a 60hz refresh rate), in order to keep frames in sync, basicaly keeping the same image for 2 cycles (or 4, or 8 ), until the GPU catches up.
So it's generaly a good idea to keep it on, if you have VSync on.
Same thing happens if the GPU renders the frames faster than the monitor displays it, thus frames above 60 will get lost.



Subject: 3.2rc1 Overall impression
hvengel wrote:Recent nvidia drivers have a new mode that will maintain vsync speed when it can and then get out of the way when it can't. I forget what it is called inside the driver UI so you will need to play around with it to locate the option (the vsync setting basically has 3 options off, on and the new mode - what ever that is called). I am currently using the new mode and I adjust my eye candy in FG to the point where I can maintain vsync most of the time (for my hardware everything is close to max). In this mode when the GPU load is high enough to cause things to slow down below vsync they only go a little below (IE. I seldom see less than 50FPS). Definitely worth looking into and over all much better than using the frame rate throttling in FlightGear or the older style vsync throttling in the NVidia driver.



Subject: 3.2rc1 Overall impression
hvengel wrote:I had trouble with the FG frame rate throttling on my machine in that it would throttle to 50FPS no matter what. Turning off the FG throttling and using the drivers adaptive vsync mode was a huge improvement and now I see 60FPS 95% of the time with very high eye candy settings both in the driver settings and FG rendering settings. Using the non-adaptive vsync driver setting I would see much larger frame rate hits when the video card was loaded so the adaptive setting is definitely the way to go. I haven't seen any posts here before about this and now that the usefulness of this setting has been confirmed by someone else I will get on the wiki and add this info.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11326
Joined: Tue Mar 25, 2008 8:40 am


Return to Graphics

Who is online

Users browsing this forum: No registered users and 2 guests