Board index FlightGear Support Hardware

Adding two monitors

Joysticks, pedals, monitors.

Re: Adding two monitors

Postby wkitty42 » Mon Sep 03, 2018 6:22 pm

now we're gettin' somewhere :) :thumbsup:
"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: 9123
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: Adding two monitors

Postby georgem1956 » Tue Sep 04, 2018 12:06 pm

I've tried over the weekend to get the two monitors up and working with no luck. The problem I'm having is the GUI. I have the dropdown menus on my center display but all mouse actions over instruments and switch won't work in the center window. They do work on the right display. How do I get the mouse actions moved to the center display? Also, it would be nice to find a set of config instructions that applied to ver. 2018.2.2. All that I have found so far refers to editing the preferences.xml file.

I set up a separate camera-views.xml file and tried to include it in the rendering tag <rendering include="camera-views.xml"> but the interpreter would not pull that file in. In other words I couldn't get the include to work.

Among other things I'm a php programmer so the tags and their structures are understood. I never thought setting up additional monitors would be this difficult.

Any help would be appreciated.

Thanks,
George
georgem1956
 
Posts: 35
Joined: Thu Aug 23, 2018 3:30 pm

Re: Adding two monitors

Postby wkitty42 » Tue Sep 04, 2018 2:22 pm

georgem1956 wrote in Tue Sep 04, 2018 12:06 pm:Also, it would be nice to find a set of config instructions that applied to ver. 2018.2.2. All that I have found so far refers to editing the preferences.xml file.

just substitute default.xml in those instructions... it is the same file renamed... nothing more...

i cannot offer more specific help in your endeavor because i do not have multiple monitors (yet)... i can offer assistance on somethings and will continue to do so when i spot something that needs to be pointed out...
"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: 9123
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: Adding two monitors

Postby wkitty42 » Tue Sep 04, 2018 2:28 pm

georgem1956 wrote in Tue Sep 04, 2018 12:06 pm:I set up a separate camera-views.xml file and tried to include it in the rendering tag <rendering include="camera-views.xml"> but the interpreter would not pull that file in. In other words I couldn't get the include to work.

you might have to specify the path to that file...

also look at the console or fgfs.log and see if there's any notes in there about your work and why it isn't doing what you are expecting it to do... in the winwhatever flavor of FG, there's an option to enable the console so you can see these messages... you should also be able to start your FG from the command line in a console which will stay open so you can see these messages... i think this option also works on mac and linux flavors but i don't use it on my linux because i always start FG from a console command line specifically so i can see these messages...

on winwhatever, the fgfs.log should be found in %appdata%/roaming/flightgear.org or similar... or possibly in your user's documents folder with other FG related materials...
"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: 9123
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: Adding two monitors

Postby Isaak » Tue Sep 04, 2018 4:47 pm

Can you share your camera-views.xml file? If you place it in the data folder of your installation, it should just load fine in the way you described, so I expect something 's off in the file itself.

You might want to look at my file for connecting 5 screens. It consists of one window with four camera's for the 4 main screens, set up in a 2 x 2 arrangement, with a 5th screen at the right of the top screens. (Photo see below). This file has been written specifically for the 777, as it has an offset pitch for the normal view, which requires both an adjusted pitch and roll when you adjust the heading for the side screens (not needed when you place them in one plane).

The file above is for the 5 right screens, with the viewpoint just behind the yoke, about 85 cm from the screens.

Image
Want to support medical research with your pc? Start Folding at Home and join team FlightGear!
Isaak
 
Posts: 767
Joined: Sat Jun 04, 2011 3:52 pm
Location: Hamme, Belgium
Pronouns: he, him
Callsign: OO-ISA
Version: next
OS: Windows 10

Re: Adding two monitors

Postby georgem1956 » Tue Sep 04, 2018 4:54 pm

Hi Bel, be glad share the file with you when I get home from work. Nice work on 777. A380 started me on this. I'm working my way up from the 172 Skyhawk...would like to learn the A380 one day...Love your cockpit!
georgem1956
 
Posts: 35
Joined: Thu Aug 23, 2018 3:30 pm

Re: Adding two monitors

Postby georgem1956 » Tue Sep 04, 2018 6:34 pm

Here's something I came across that kinda makes sense. Right now I have all 3 monitors set as an extended desktop. I saw a reference of making them independent displays instead. Does that make any sense?
georgem1956
 
Posts: 35
Joined: Thu Aug 23, 2018 3:30 pm

Re: Adding two monitors

Postby georgem1956 » Tue Sep 04, 2018 6:35 pm

I'm adding the link so I'll have it at home...

https://www.mail-archive.com/flightgear ... 18417.html
georgem1956
 
Posts: 35
Joined: Thu Aug 23, 2018 3:30 pm

Re: Adding two monitors

Postby georgem1956 » Tue Sep 04, 2018 9:26 pm

Hi Bel, I need a simple 3 horizontal screens for the 172 skyhawk. I'm trying to modify your file for this. I'm trying to get an understanding of how it works. The include now works by the way, so moving on, "I have one window with 4 cameras". The window name is FGFS multiscreen and to connect the cameras to that window each has that name, right? Display and screen number, is that the point of origin for the window? Does it expand from that point to the other screens? I don't understand what viewport is.
When loaded the image spans all three monitors however the cockpit start at the left most side and is very zoomed in so that all I see is the instrument panel.

my displays are set as 2-1-3. In this config my mouse will span all displays starting from center and moving both left and right. I have 1 set as my main display. Should it be 1-2-3 ?
georgem1956
 
Posts: 35
Joined: Thu Aug 23, 2018 3:30 pm

Re: Adding two monitors

Postby georgem1956 » Tue Sep 04, 2018 9:28 pm

Also is the order of the "cameras" in the main window important? What designates which camera occupies which display?
georgem1956
 
Posts: 35
Joined: Thu Aug 23, 2018 3:30 pm

Re: Adding two monitors

Postby georgem1956 » Tue Sep 04, 2018 9:29 pm

Here's the config I have so far.

<?xml version="1.0" encoding="UTF-8"?>
<PropertyList>
<camera-group>
<window>
<name>FGFS multiscreen</name>
<host-name type="string"></host-name>
<display>2</display>
<screen>2</screen>
<width>5760</width>
<height>1080</height>
<x>0</x>
<y>0</y>
<decoration type="bool">false</decoration>
</window>


<camera>
<window>
<name type="string">FGFS multiscreen</name>
</window>
<viewport>
<x>0</x>
<y>0</y>
<width>1920</width>
<height>1080</height>
</viewport>
<view>
<x>-0.01</x>
<y>-0.16</y>
<z>0.5781</z> <!--0.25-->
<heading-deg type="double">0</heading-deg>
<pitch-deg type="double">0</pitch-deg>
</view>
<frustum>
<top>0.133</top>
<bottom>-0.135</bottom>
<left>-.2425</left>
<right>.2325</right>
<near>0.85</near>
<far>120000.0</far>
</frustum>
</camera>

<camera>
<window>
<name type="string">FGFS multiscreen</name>
</window>
<viewport>
<x>1920</x>
<y>0</y>
<width>1920</width>
<height>1080</height>
</viewport>
<view>
<x>-0.01</x>
<y>-0.16</y>
<z>0.5781</z>
<heading-deg type="double">-35</heading-deg>
<pitch-deg type="double">0</pitch-deg>
<roll-deg type="double">0</roll-deg>
</view>
<frustum>
<top>0.133</top>
<bottom>-0.135</bottom>
<left>-.2750</left>
<right>.2000</right>
<near>0.86</near>
<far>120000.0</far>
</frustum>
</camera>




<camera>
<window>
<name type="string">FGFS multiscreen</name>
</window>
<viewport>
<x>3840</x>
<y>0</y>
<width>1920</width>
<height>1080</height>
</viewport>
<view>
<x>-0.01</x>
<y>-0.16</y>
<z>0.5781</z>
<heading-deg type="double">-35</heading-deg>
<pitch-deg type="double">0</pitch-deg>
<roll-deg type="double">0</roll-deg>
</view>
<frustum>
<top>-0.157</top>
<bottom>-0.425</bottom>
<left>-.2750</left>
<right>.2000</right>
<near>0.86</near>
<far>120000.0</far>
</frustum>
</camera>


<gui>
<window>
<name type="string">FGFS multiscreen</name>
</window>
</gui>
</camera-group>

</PropertyList>
georgem1956
 
Posts: 35
Joined: Thu Aug 23, 2018 3:30 pm

Re: Adding two monitors

Postby georgem1956 » Wed Sep 05, 2018 3:28 am

Ok. Wish I had any idea why this is but in my current configuration of 3 cameras in a camera group I found that the first camera, the top most camera definition <camera>blah,blah,blah</camera> is the one that contains the mouse mapping/rollover layer. God! I spent the last four days trying to implement a 3 monitor system and from the start I've been chasing this damn mouse problem. I had the 3 windows working except for the mouse. I couldn't start the 172, couldn't find the keyboard mappings for priming, turning on the battery, etc. I tried many different ways to show flightgear on 3 monitors and every one of them the mouse didn't work, until I had an epiphany. Dumb luck it what it was. I mocved the camera order around with center display as the center camera definition, right display right cam and left cam left display.

Up until then the right camera had always been on top and that was the display the mouse worked on, until..........I happened to move the left camera config to the top of the three and what do you know, the mouse control flipped to the left display. Damn 5 days messing with this...5 days!

Yes, I'll have some cheese with that wine....

G.
georgem1956
 
Posts: 35
Joined: Thu Aug 23, 2018 3:30 pm

Re: Adding two monitors

Postby Isaak » Tue Sep 11, 2018 10:12 am

Hi georgem,

Sorry for making you wait so long. I 've had one hell of a week and didn't find time to check the forums thoroughly. I hope you're not too frustrated now. The FG-multiscreen system is VERY flexible, you can literally do everything with it, but it's not userfriendly, as it looks you have found out yourself. I 've been struggling for 3 years before I somehow got some insight in the system. I 'll try to explain everything to you.

First of all, regarding your mouse issues: I suggest to only use one window which spans over your screens, because if you use more windows, only one will have the GUI-bindings, which as a side-effect means that you cannot use the mouse to click on hotspots in the other windows. The different cameras are tied to the window by specifying the correct window name in this code group, for each camera:
<window>
<name type="string">FGFS multiscreen</name>
</window>

Now as to what everything means regarding the window definition:
Code: Select all
<window>
 <name>FGFS multiscreen</name> <!-- the window name that can be referenced to by different cameras.-->
 <host-name type="string"></host-name> <!--I have no idea what this does, so I think you can ommit this-->
 <display>4</display> <!--The number of the screen that is the origin of the window. This doesn't always correspond with the window number you find in screen settings in Windows, it can come to some trial and error-->
 <screen>4</screen> <!-- idem @ display -->
 <width>3840</width> <!-- the width of the screen in pixels; this example is for a 2 x 2 setup with four screens of 1920 x 1080 pixels, so 2x1920 = 3840-->
 <height>2160</height> <!--the height of the screen in pixels, so 2 x 1080 = 2160 -->
 <x>0</x> <!--the origin of the window, left-->
 <y>0</y> <!--the origin of the window, top-->
 <decoration type="bool">false</decoration> <!--this defines whether (true) or not (false) the window has to be windowed or full-screen.-->
</window>


And you define a similar block as below for each camera:
Code: Select all
<camera>
   <window> <!--This defines the window in which the camera is drawn)-->
      <name type="string">FGFS multiscreen</name>
   </window>
   <viewport>
   <!--This defines the place in the window where the camera should be drawn. x 0 is at the left side, y 0 is at the bottom.
   You mesure this in pixels. So if you have 3 screens of say 1920 x 1080 pixels, arranged in a 3 x 1 setup, your window definition should be 5760 pixels wide and 1080 pixels high.
   The origin of your left camera would be <x>0</x> <y>0</y>, the center camera's origin would be <x>1920</x> <y>0</y> and the right one would be <x>3840</x> <y>0</y>.
   If you have screens above each other, the y value will increase with the screen's y resolution.-->
   <x>3840</x>
   <y>0</y>
   <width>1920</width> <!--The width of this camera in pixels, normally the same as your screen-->
   <height>1080</height> <!--The height of this camera in pixels, normally the same as your screen-->
   </viewport>
   <view>
   <!--These x, y and z coordinates define the origin of the camera in the simulator, compare it to the position of the eye of the pilot who is watching and drawing everything in the cameras.
    x is left/right, y is up/down and z is forward/back. Normally these will be equal for all your cameras, otherwise your setup will show strange results.-->
    <x>-0.01</x>
    <y>-0.16</y>
    <z>0.5781</z>
   <!--Here comes the magic. I'd suggest to start with a setup where the screens are arranged in one plane, so you don't have to modify the heading, pitch and roll values, and leave them all at 0.
   In that way you 'll get a basic understanding of what everything does. Then when this goes well, you can start modifying these. I 've learned by trial and error that it all keeps quite simple when you
   leave the pitch at 0 and move the heading. Left is positive, right is negative. You have to measure the heading between a straigth forward line (from your eyes) to the straight line between your eyes and the
   offset screen. Make sure all your screens are perpendicular to your line of sight, otherwise you 'll have issues.
   I had the bad luck that I learned how to modify this in the 777, which has an offset pitch of 17.1 degrees from itself. This means that I have a pitch-deg value of 17.1, in the front screens, and this has influence
   when you adjust the heading-deg value. You have to compensate with some roll and adjusted pitch, and here it really comes to some feeling and trial and error. So I strongly suggest to only play with one value at once:
   only the heading, only the pitch or only the roll.-->
    <heading-deg type="double">-35</heading-deg>
    <pitch-deg type="double">0</pitch-deg>
    <roll-deg type="double">0</roll-deg>
   </view>
   <frustum>
   <!--The frustum defines the "window" that is drawn by the camera. The units are all meters, and are defined by your real world setup. You just have to draw an imaginary line between your eye
   and the point at your screen that the perpendicular line of sight to the screen falls upon. I'll call this the center-point below. It's the point that is straight in front of your eyes.
   I 'll explain below how you get them.-->
    <top>0.133</top> <!--The offset between the top of the screen and your center-point. In this example, the center-point is 13,3 cm beneath the top of the screen.-->
    <bottom>-0.135</bottom> <!--The offset between the bottom of the screen and your center-point. In this example, the center-point is 13,5 cm above the bottom of the screen. This means that the screen should be 26,8 cm heigh!-->
    <left>-.2425</left> <!--The offset between the left border of the screen and the ctr-pt. It is 24,25 cm left of the center-point.-->
    <right>.2325</right> <!--The offset btn the right border of the screen and the ctr-pt. It is 23,25 cm right of the center-point, and your screen should be 27,5 cm wide.-->
    <near>0.86</near> <!-- This is the distance between your eye-point and the screen in centimeters.-->
    <far>120000.0</far> <!--You can leave this as is.-->
   </frustum>
</camera>


I hope I 've helped you out a bit. It should be much clearer if I can draw this all down, instead of just trying to explain it in text, but I hope this gives you some insight in the logic.
Want to support medical research with your pc? Start Folding at Home and join team FlightGear!
Isaak
 
Posts: 767
Joined: Sat Jun 04, 2011 3:52 pm
Location: Hamme, Belgium
Pronouns: he, him
Callsign: OO-ISA
Version: next
OS: Windows 10

Previous

Return to Hardware

Who is online

Users browsing this forum: No registered users and 3 guests