Board index FlightGear Support Graphics

Stereoscopic vertical/horizontal split: wrong aspect ratio?

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.

Stereoscopic vertical/horizontal split: wrong aspect ratio?

Postby go3d » Tue May 28, 2013 3:52 pm

Hello,

I was quite excited to try out FG in stereoscopic mode with my big LCD tv. It supports both vertical and horizontal split modes.

At first, I was delighted by the effect until I found out that the aspect ratio of the whole scene was wrong. After trying to figure out what was going on, I came to the conclusion that the rendering of the images for both left and right eyes is wrong.

This can be verified without any special monitor: just activate View -> Stereoscopic View Options -> Stereo Mode: VERTICAL_SPLIT. You can instantly see what I mean: in the cockpit view, which naturally will appear as as 2 images on top of each other, the gauges appear with a normal aspect ratio (perfect circles). And this is the problem: since the stereo capable device (like my LCD tv) will stretch both images vertically to merge them (either interlaced or alternatingly through time), the resulting image will be a vertically stretched one (double as normal). The same happens with HORIZONTAL_SPLIT. The images should actually be pre-shrinked by flightgear, such that the resulting aspect ratio is correct again.

Am I missing out on something here? Anybody knows a solution to this?
go3d
 
Posts: 13
Joined: Thu May 23, 2013 10:06 am
Version: 2.10
OS: Linux

Re: Stereoscopic vertical/horizontal split: wrong aspect rat

Postby Johan G » Tue May 28, 2013 6:10 pm

To be able to select either behaviour is probably preferable (i.e. being able to select either split, and split and stretched for 3d-displays).

Sounds like an excellent feature request/bug report. :D

Add this as a feature request or bug report to the bug tracker, so that the developers will be aware of the need. You may be the first one to have this issue, but hardly the last.
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Some YouTube videos
Johan G
Moderator
 
Posts: 6629
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: Stereoscopic vertical/horizontal split: wrong aspect rat

Postby AndersG » Tue May 28, 2013 6:36 pm

You might be able to set up the two view(s) manually using a camera group without using the FG/OSG stereoscopic options. More work but also more precise control.

See Docs/README.multiscreen for more information on camera groups.

/Anders
Callsign: SE-AG
Aircraft (uhm...): Submarine Scout, Zeppelin NT, ZF Navy free balloon, Nordstern, Hindenburg, Short Empire flying-boat, ZNP-K, North Sea class, MTB T21 class, U.S.S. Monitor, MFI-9B, Type UB I submarine, Gokstad ship, Renault FT.
AndersG
 
Posts: 2524
Joined: Wed Nov 29, 2006 10:20 am
Location: Göteborg, Sweden
Callsign: SE-AG
OS: Debian GNU Linux

Re: Stereoscopic vertical/horizontal split: wrong aspect rat

Postby go3d » Wed May 29, 2013 2:08 pm

Thanks Anders for the hint. However, the link you posted seems to be dead/incorrect.

Are you saying, that the definition of a view/camera allows me to stretch the output vertically/horizontally?
go3d
 
Posts: 13
Joined: Thu May 23, 2013 10:06 am
Version: 2.10
OS: Linux

Re: Stereoscopic vertical/horizontal split: wrong aspect rat

Postby Johan G » Wed May 29, 2013 3:09 pm

go3d wrote in Wed May 29, 2013 2:08 pm:...the link you posted seems to be dead/incorrect.

Unfortunately one more of those files/directories that wont show on Gitorious, but throws a http error 500, Internal server error. :(
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Some YouTube videos
Johan G
Moderator
 
Posts: 6629
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: Stereoscopic vertical/horizontal split: wrong aspect rat

Postby Hooray » Wed May 29, 2013 3:10 pm

we should get in touch with gitorious about that issue, it seems to be specific to the main fg repos, I don't see it with many other gitorious repos - like Gijs said previously, the mapserver is usually more reliable to link to.

Anyhow, $FG_ROOT/Docs is part of every FG installation - no need to use a browser to view files there
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: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Stereoscopic vertical/horizontal split: wrong aspect rat

Postby go3d » Mon Jun 10, 2013 5:04 pm

Ok, I started to define 2 views through an xml file. Indeed, I was able to get the correct aspect ratio as needed. However, two questions arised:

1. How can I zoom in/out? My first attempts showed that the zooming function is not available once my custom views are defined. Any way to re-enable it?

2. The menu seems to be a problem: naturally, it should appear on both channels and it should also appear shrinked vertically by the factor of 2 (like the views themselves)

Any ideas?
go3d
 
Posts: 13
Joined: Thu May 23, 2013 10:06 am
Version: 2.10
OS: Linux

Re: Stereoscopic vertical/horizontal split: wrong aspect rat

Postby wdhunt » Tue Dec 09, 2014 1:53 am

First time poster; came upon this thread trying to solve the same issue, and I have a solution; one might argue that this isn't a bug as a result. Here's the fix:

Set environment variable OSG_SPLIT_STEREO_AUTO_ADJUST_ASPECT_RATIO=ON

That should be all it takes.
User avatar
wdhunt
 
Posts: 35
Joined: Tue Dec 09, 2014 1:50 am
Location: KLCI
Version: 3.2.0
OS: Windows 8.1 Pro

Re: Stereoscopic vertical/horizontal split: wrong aspect rat

Postby Hooray » Tue Dec 09, 2014 3:42 am

if necessary, please update the wiki accordingly
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: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Stereoscopic vertical/horizontal split: wrong aspect rat

Postby winthrom » Mon Oct 23, 2017 7:47 am

I cannot find the Linux location to put "OSG_SPLIT_STEREO_AUTO_ADJUST_ASPECT_RATIO=ON" into effect. I am setting up V.R. via TeamViewer to my Android phone and need the side by side V.R. to be "normal", that is, gauges are round on the PC screen. Currently it is displayed squeezed horizontally. If the environment variable is no longer available, then allow the side by side choices available in BINO 3D. Of course I would like a better solution than TeamViewer, such as Oculis where the Android viewer feeds back to FG for view I am seeing when I move my head, but I digress. Right now correcting the aspect ratio is primary. Thanks for your time and help.
winthrom
 
Posts: 1
Joined: Fri Feb 10, 2017 9:36 pm

Re: Stereoscopic vertical/horizontal split: wrong aspect rat

Postby wkitty42 » Mon Oct 23, 2017 3:53 pm

i'm using OSG 3.4 on my linux system... a quick grep of the sources show this environment variable is still available...

Code: Select all
myuser@mymachine:~/flightgear-dev/next/openscenegraph/src$ egrep -ir -e "OSG_SPLIT_STEREO_AUTO_ADJUST_ASPECT_RATIO" *
osg/DisplaySettings.cpp:        "OSG_SPLIT_STEREO_AUTO_ADJUST_ASPECT_RATIO <mode>",
osg/DisplaySettings.cpp:    if( (ptr = getenv("OSG_SPLIT_STEREO_AUTO_ADJUST_ASPECT_RATIO")) != 0)

as for "where to put it", that would be in your script that starts your flightgear... maybe something like this (taken from the d&c build script methods)...

Code: Select all
#!/bin/bash
cd $(dirname $0)
cd install/flightgear/bin
export OSG_SPLIT_STEREO_AUTO_ADJUST_ASPECT_RATIO=ON
export LD_LIBRARY_PATH=/opt/qt59/lib/x86_64-linux-gnu:/opt/qt59/lib:../../simgear/lib:../../openscenegraph/lib:../../openrti/lib:../../plib/lib
./fgfs --fg-root=$PWD/../fgdata/ $@
"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: Stereoscopic vertical/horizontal split: wrong aspect rat

Postby GuillaumeD » Fri Jan 29, 2021 8:51 pm

Hi all ! First post here.

I'm choosing to continue this post if it's OK, because my problem is exactly the same as winthroom. My goal is to test a VR headset, the kind you put a smartphone in, and so I'd like the view to be stereo with a vertical separation, and the aspect ratio should be normal.

What I'm getting instead is a compressed view with half aspect ratio.

I've tried of course to set OSG_SPLIT_STEREO_AUTO_ADJUST_ASPECT_RATIO and it has no effect at all ; actually no environment variable OSG_* has any effect at all. The OSG code still contains indeed the lines wkitty42 showed us : https://github.com/openscenegraph/OpenS ... ttings.cpp
I've tried also to use the --aspect-ratio-multiplier=2 setting, and it doesn't have any effect either, be it in stereo or in normal mode.

Steps to reproduce :
- run (on linux) OSG_STEREO=ON OSG_STEREO_MODE=VERTICAL_SPLIT OSG_SPLIT_STEREO_AUTO_ADJUST_ASPECT_RATIO=OFF fgfs
- confirm that the screen is not vertically split [should be]
- set view -> stereo -> vertical split
- confirm that the view is split and the aspect ratio is vertically compressed [should'nt be]
- be unable to reset the view because the mouse does not click where the pointer is anymore... that's also a huge problem - let's keep that for the next step
- to reset your view, relaunch fgfs with the option --prop:/sim/rendering/osg-displaysettings/stereo-mode=OFF

Problem reproduced on Linux Mint 20.1 with FG 2019.1.1 and Windows 10 with FG 2020.3 (I think).

Does anyone have better results than me, and how ?
GuillaumeD
 
Posts: 4
Joined: Fri Jan 29, 2021 7:41 pm

Re: Stereoscopic vertical/horizontal split: wrong aspect rat

Postby GuillaumeD » Mon Feb 01, 2021 9:00 pm

Hi again

I didn't find a solution with an environment variable, and anyway that it wasn't the better user experience. I thought it would be better to be able to change this at runtime. I went ahead and jumped in the code to produce a merge request, or actually two : https://sourceforge.net/p/flightgear/fg ... uests/218/ and https://sourceforge.net/p/flightgear/fl ... uests/238/

It works great for me, and what's unexpected and cool is that the mouse works again with the menus if the aspect ratio is normal. Is a relief because I admit this particular bug seemed daunting to me.
I hope my merge requests will be accepted.

Now I have another task in mind to help headtracking work correctly :)
GuillaumeD
 
Posts: 4
Joined: Fri Jan 29, 2021 7:41 pm


Return to Graphics

Who is online

Users browsing this forum: No registered users and 2 guests