Board index FlightGear Support Graphics

OSG multithreading

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.

OSG multithreading

Postby cain071546 » Thu Sep 04, 2014 11:13 pm

Has been covered a million times but i have some up to date tips i want to share i have read alot of posts and none of the wrap it all up into one

this is for desktop users who have a Multi-core CPU and a modern Radeon card and at least 4Gbs of system RAM

THE IDEA
flightgear doesn't utilize multi core CPU's very well

enable multi-threading mode then check a CPU monitor Windows/Linux/Mac is irrelevant all of them have a System-Monitor of some sort
on my AMD quad-core cpu FG was only using 1 core heavily, now its balanced out across them and none of them ever maxes out witch causes a stutter for me

add to Advanced Properties in FGRUN /sim/rendering/multithreading-mode=DrawThreadPerContext

THE EFFECT ON PERFORMANCE
Windows users your Drivers have issues rendering text ie menus/window text/ect... this is a known issue

for Linux users You have 2 Drivers to pick from 1) the open source driver 2) the proprietary driver

generally i find both run a stock install of 3.0 pretty good but the

1)open source driver runs Hot! but faster frames
2)closed source driver has issues rendering text like its windows counterpart but runs good otherwise

and after you enable Multithreading mode the opensource driver takes a FPS hit
and the closed source driver gets a FPS gain

so regardless of Driver Windows or Linux /sim/rendering/multithreading-mode=DrawThreadPerContext
Helps alot with a Multicore-CPU that is not being utilized

gives increased stability and less lag when using systems and in game windows map and menus and when loading and unloading terrain

for opensource driver users if you can live with the FPS drop the stability benefits are still good


i have tested this with Flightgear 3.0 3.2 3.3

sorry if i ramble but i had to get that off my chest after fiddling with it for so long i hope this helps people
Last edited by cain071546 on Mon Sep 22, 2014 10:44 pm, edited 2 times in total.
two wrongs never made a right but two wrights made a airplane
cain071546
 
Posts: 111
Joined: Wed Sep 29, 2010 9:55 pm
Location: Washington USA
Callsign: cain
IRC name: cain
Version: 3.2
OS: Linux

Re: hard learned tips for AMD video card owners

Postby Hooray » Thu Sep 04, 2014 11:18 pm

Thank you, it might be a good idea to update the wiki accordingly, see for example: http://wiki.flightgear.org/Howto:Activa ... PU_support
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: 11345
Joined: Tue Mar 25, 2008 8:40 am

Re: hard learned tips for AMD video card owners

Postby Lydiot » Sat Sep 13, 2014 11:27 pm

On my machine adding the property line either in FGrun or in the preferences file actually does the complete opposite: my 4 cores are now unevenly loaded! Core #2 is way more loaded and spikes frequently (old AMD CPU). If I undo the tweak the cores actually load more evenly, which is odd. I've tried this with both "AutomaticSelection" and "DrawThreadPerContext".

When testing I spawned at parking at KSFO with a 747-400. I chose the "rear view" of the plane since I assume it's compute-intense when it then draws parts of the plane that's not visible when spawning (only cockpit and its view is). It takes my computer about 30 seconds to switch to that view the first time regardless of what settings I've chosen.

Is this what I should be seeing? Or am I missing something here?
Lydiot
 
Posts: 987
Joined: Tue Oct 22, 2013 10:50 pm

Re: hard learned tips for AMD video card owners

Postby zlsa » Sun Sep 14, 2014 1:12 am

@Lydiot, exact same problem with one of the older versions of the f16. (AMD/ATI card here); however, the FGUK version (f-16c) does not have that problem anymore.
zlsa
 
Posts: 145
Joined: Fri Feb 14, 2014 2:29 am
Callsign: N275A
Version: 3.5 git
OS: Linux

Re: hard learned tips for AMD video card owners

Postby cain071546 » Sun Sep 14, 2014 1:14 am

please be more specific than Old AMD cpu

i have tested this on 4 Pcs

2 First Gen Phenom X4 stepping B3 cpus @2.5Ghz
1 Phenom II x4 @ 3.8Ghz
1 core 2 duo @ 2.2Ghz

a friend has also tested this on a AMD A8 X4


there are multiple threading options for OSG

* AutomaticSelection
* CullDrawThreadPerContext
* DrawThreadPerContext
* CullThreadPerCameraDrawThreadPerContext

information describing the difference can be found here

http://www.mail-archive.com/osg-users@o ... 09620.html
two wrongs never made a right but two wrights made a airplane
cain071546
 
Posts: 111
Joined: Wed Sep 29, 2010 9:55 pm
Location: Washington USA
Callsign: cain
IRC name: cain
Version: 3.2
OS: Linux

Re: hard learned tips for AMD video card owners

Postby Lydiot » Sun Sep 14, 2014 3:19 am

Phenom 9950 (quad core 2.6GHz), single ATI Radeon HD 4600 card.

Like I said, I don't see a difference in performance, and on core usage the opposite of what was suggested.
Lydiot
 
Posts: 987
Joined: Tue Oct 22, 2013 10:50 pm

Re: hard learned tips for AMD video card owners

Postby cain071546 » Mon Sep 15, 2014 3:07 am

could you try one of the other threading options?

"I have changed the default ThreadingModel to AutomaticSelection, and this
calls the new method Viewer::suggestThreadingModel() to set the final
threading model used. This method will look at how many CPU cores you have
available and how many windows you have and try to choose the best threading
model to run"

http://www.mail-archive.com/osg-users@o ... 09620.html
two wrongs never made a right but two wrights made a airplane
cain071546
 
Posts: 111
Joined: Wed Sep 29, 2010 9:55 pm
Location: Washington USA
Callsign: cain
IRC name: cain
Version: 3.2
OS: Linux


Return to Graphics

Who is online

Users browsing this forum: No registered users and 0 guests