Board index FlightGear Support Graphics

[solved] No antialiasing with nvidia cards

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.

[solved] No antialiasing with nvidia cards

Postby massima » Tue Dec 06, 2016 8:25 pm

Since version 2016.2/2016.3/2016.4 i cannot set antialiasing with a nvidia 635M and driver 367.57, no issues with the integrated graphic card. Via launcher it fails, via console the option:

Code: Select all
--prop:/sim/rendering/multi-sample-buffers=1
--prop:/sim/rendering/multi-samples=2


gives:

Code: Select all
initializing cloud layers
Error: Not able to create requested visual.

getDefaultWindow: failed to create GraphicsContext
Error: Not able to create requested visual.

getDefaultWindow: failed to create GraphicsContext
CameraGroup::buildGUICamera: failed to build a window

Without antialiasing the graphic is really ugly. Thanks
Last edited by massima on Fri Dec 09, 2016 8:34 pm, edited 1 time in total.
User avatar
massima
 
Posts: 264
Joined: Sat Jan 03, 2015 7:48 pm
Location: Italy
Callsign: M-AXX
Version: 2020.4.0
OS: debian testing

Re: No antialiasing with nvidia cards

Postby wkitty42 » Tue Dec 06, 2016 9:12 pm

my card is a GeForce GT 730 using driver 367.57 on kubuntu 14.04.5...
i compile my flightgear from the repo and an always using the latest code...
i use the following in my start up options...
Code: Select all
--texture-filtering=16
--prop:/sim/rendering/multi-sample-buffers=1
--prop:/sim/rendering/multi-samples=4

the first one may or may not apply to your situation...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: No antialiasing with nvidia cards

Postby Josh_grtuxteam » Wed Dec 07, 2016 1:09 am

this popup a remark and a question, i use to work with FXAA (GTX560i ) , i never had to use any graphic option within FG , and ever got nice rendering with a 1920 X 16000 display.
Am i out of topic when recommending FXAA instead of the generic Antialiasing ?


Josh
User avatar
Josh_grtuxteam
 
Posts: 106
Joined: Mon Oct 17, 2016 3:58 pm
Location: France
Version: lastStable
OS: Linux OpenSUSE

Re: No antialiasing with nvidia cards

Postby Thorsten » Wed Dec 07, 2016 6:54 am

Am i out of topic when recommending FXAA instead of the generic Antialiasing ?


The obvious problem is that the GPU native techniques anti-aliase away things you don't really want to (GUI texts and similar things) - which people have pointed out makes them tough to read at times.

And of course software multi-sampling allows techniques like 'alpha to coverage' which are rather neat for tree appearance.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: No antialiasing with nvidia cards

Postby Josh_grtuxteam » Wed Dec 07, 2016 1:43 pm

Thanks for the reply,
I do understand, yes i noticed the difference with GUI texts , though to me not that, significant , let's say the display is less precise but readable.
I did not notice "tree appearance" difference , but may be you are talking about ALS.

Anyhow i must conclude it is up to my choice, lazy and easy choice without questioning , so i am wrong when i suggested to use it instead.

Josh
User avatar
Josh_grtuxteam
 
Posts: 106
Joined: Mon Oct 17, 2016 3:58 pm
Location: France
Version: lastStable
OS: Linux OpenSUSE

Re: No antialiasing with nvidia cards

Postby Thorsten » Wed Dec 07, 2016 4:24 pm

'alpha to coverage' requires multi-sampling, which prevents it to run in Rembrandt. It's implemented in both ALS and classic otherwise - but only on if you run multi-sampling.

(For those who don't know - rather than mixing color values of foreground and background half and half for a 50% transparent surface, it paints 50% of pixels in one and 50% in the other color. Which works rather well for foliage, since looking through a tree you don't see 50% of what's behind it, you see parts of it while other parts are leaves).
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: No antialiasing with nvidia cards

Postby massima » Wed Dec 07, 2016 8:35 pm

Sorry wkitty42, but your setting doens't solve my problem. Thank you anyway
User avatar
massima
 
Posts: 264
Joined: Sat Jan 03, 2015 7:48 pm
Location: Italy
Callsign: M-AXX
Version: 2020.4.0
OS: debian testing

Re: No antialiasing with nvidia cards

Postby hamzaalloush » Wed Dec 07, 2016 9:39 pm

I assume you have Linux and trying to start Flightgear in a laptop with dedicated GPU? I assume you use Bumblebee to offload rendering to your dedicated GPU?

It has been a long time since i started Flightgear in Linux, but if i'm not mistaken i had that problem as well as the solution:

https://groups.google.com/forum/m/#!top ... 19e3uqLk9E

avoid using virtualgl when offloading to the GPU. Or just remove Bumblebee, hope this helps and if not then sorry.
hamzaalloush
 
Posts: 631
Joined: Sat Oct 26, 2013 10:31 am
OS: Windows 10

Re: No antialiasing with nvidia cards

Postby wkitty42 » Thu Dec 08, 2016 2:53 am

massima wrote in Wed Dec 07, 2016 8:35 pm:Sorry wkitty42, but your setting doens't solve my problem. Thank you anyway

are you using the default setting for the driver or have you messed about with them? mine are fully default... our card are not that much different and the driver is the same... maybe i'm not understanding your problem and more details are needed?

eg:
1. my monitor is standard old school CRT
2. i have 1600x1200 max resolution
3. i run FG at 1024x768 full screen
4. i use the setting i gave above
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: No antialiasing with nvidia cards

Postby massima » Thu Dec 08, 2016 8:53 pm

On my laptop i launch fgfs via the "optirun" command, no particular setting. The default resolution of the display is 1366x768 but i'm used to playing with 800x600, i'll try something to solve it. i've removed the .fgfsrc file and if i launch:

Code: Select all
optirun fgfs --prop:/sim/rendering/multi-sample-buffers=1 --prop:/sim/rendering/multi-samples=2--prop:/sim/rendering/multi-samples=4 --texture-filtering=16


it fails

platform default fg_root = Path "/usr/share/games/flightgear"
Reading global preferences
Finished Reading global preferences
Reading user settings from Path "/home/attila/.fgfs/autosave_2016_4.xml"
init package root at:Path "/home/attila/.fgfs/Aircraft"
No user specified aircraft, using default
Loading aircraft -set file from:Path "/usr/share/games/flightgear/Aircraft/c172p/c172p-set.xml"
Found language resource for: it_IT
Reading localized strings for 'en' from Path "/usr/share/games/flightgear/Translations/en/sys.xml"
Reading localized strings for 'it' from Path "/usr/share/games/flightgear/Translations/it/sys.xml"
Reading localized strings for 'en' from Path "/usr/share/games/flightgear/Translations/en/atc.xml"
Reading localized strings for 'it' from Path "/usr/share/games/flightgear/Translations/en/atc.xml"
option:prop = /sim/rendering/multi-sample-buffers=1
option:prop = /sim/rendering/multi-samples=2--prop:/sim/rendering/multi-samples=4
option:texture-filtering = 16
Using default download dir: Path "/home/attila/.fgfs"
read-allowed path not found:Path "/home/attila/.fgfs/AI"
read-allowed path not found:Path "/home/attila/.fgfs/Liveries"
Using TerraSync dir: Path "/home/attila/.fgfs/TerraSync"
initializing cloud layers
Error: Not able to create requested visual.

getDefaultWindow: failed to create GraphicsContext
Error: Not able to create requested visual.

getDefaultWindow: failed to create GraphicsContext
CameraGroup::buildGUICamera: failed to build a window
Configuration State
======= ==============
aircraft-dir = "/usr/share/games/flightgear/Aircraft/c172p"
fghome-dir = "Path "/home/attila/.fgfs""
download-dir = "/home/attila/.fgfs"
terrasync-dir = "/home/attila/.fgfs/TerraSync"
aircraft-search-paths =

scenery-search-paths =
/home/attila/.fgfs/TerraSync

/usr/share/games/flightgear/Scenery
/usr/share/games/flightgear/Scenery/Terrain
/usr/share/games/flightgear/Scenery/Objects


It is a mistery :? :?
User avatar
massima
 
Posts: 264
Joined: Sat Jan 03, 2015 7:48 pm
Location: Italy
Callsign: M-AXX
Version: 2020.4.0
OS: debian testing

Re: No antialiasing with nvidia cards

Postby hamzaalloush » Thu Dec 08, 2016 9:23 pm

This is what i mean, optirun will default to using virtualgl rendering bridge if not specified, and it's what caused my FG to crash with multi-sample as well, try to run flightgear with a different rendering bridge like so:

Code: Select all
optirun -b primus fgfs


Or the alias

Code: Select all
primusrun fgfs


You would need to install "primus" if you don't have it via apt-get.
hamzaalloush
 
Posts: 631
Joined: Sat Oct 26, 2013 10:31 am
OS: Windows 10

Re: No antialiasing with nvidia cards

Postby wkitty42 » Fri Dec 09, 2016 3:45 am

also, you have sim/rendering/multi-samples listed twice...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: No antialiasing with nvidia cards

Postby massima » Fri Dec 09, 2016 8:32 pm

Opsss! my fault, wkitty42, bad copy/past. I'm getting blind, i won't be able to fly anymore :cry:

Thanks, hamzaalloush!!!!! It works :mrgreen: :mrgreen: I've always thought that optirun/primusrun were the same but it isn't.
User avatar
massima
 
Posts: 264
Joined: Sat Jan 03, 2015 7:48 pm
Location: Italy
Callsign: M-AXX
Version: 2020.4.0
OS: debian testing

Re: [solved] No antialiasing with nvidia cards

Postby massima » Thu Feb 01, 2018 9:12 pm

I get the same problem with the latest debian "buster", no antialiasing. From the debian mailing list a holy man :wink: gives to me a workaround:

What happens if you install the "mesa-utils" package and run:

optirun glxinfo | grep OpenGL

does it say Nvidia as the vendor?

Primus is in a broken state in Sid, has been for a while, so it is probably the same in Testing now. If you can't get it to work (I gave up) because the "non-glvnd" and "glvnd" Nvidia variant conflict, you can use virtualGL as a workaround.

If you need to go that way just uninstall primus (but keep bumblebee), make sure the "glvnd" (not "non-glvnd") variant of the Nvidia packages are installed, and download the .deb packages for virtualGL here:

https://sourceforge.net/projects/virtualgl/files/

If I presume you are on 64bits (amd64) system you need both "virtualgl-[version]-amd64.deb" and "virtualgl32-[version]-amd64.deb" if you are running 32bits programs and have Nvidia 32bits compatibility packages installed.
After installing the virtualgl packages, and maybe a reboot, the "optirun glxinfo" command above should report Nvidia as OpenGL vendor, and your programs should work properly.


Simply install the virtualgl package and use the virtualgl bridge with:
Code: Select all
optirun -b virtualgl

followed by the app name.
User avatar
massima
 
Posts: 264
Joined: Sat Jan 03, 2015 7:48 pm
Location: Italy
Callsign: M-AXX
Version: 2020.4.0
OS: debian testing


Return to Graphics

Who is online

Users browsing this forum: No registered users and 2 guests