Board index FlightGear Development Spaceflight

Space Shuttle - Display adjustments (PFD, DPS, HUD,...)

Discussion about development and usage of spacecraft

Re: Space Shuttle - Display adjustments (PFD, DPS, HUD,...)

Postby eatdirt » Tue Nov 10, 2020 8:42 pm

Hi Gingin,
People on the forum illuminated me with the ADI ball white on white problem for the numbers. Are you using "<text> animation" for this?
Apparently, FG is bugged for all version of OSG >= 3.4.1 and does not render the correct color. That may be the culprit here, I don't have 3.4.0 since a long while on my distro and currently using 3.6.3!


Cheers.
eatdirt
 
Posts: 1012
Joined: Wed Aug 15, 2018 3:06 pm

Re: Space Shuttle - Display adjustments (PFD, DPS, HUD,...)

Postby Thorsten » Wed Nov 11, 2020 7:21 am

No, OSGText doesn't play nice with shaders which is why I've banned it from all my developments, the ADI ball is canvas which has no such issues.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Space Shuttle - Display adjustments (PFD, DPS, HUD,...)

Postby Hooray » Wed Nov 11, 2020 12:48 pm

Thorsten wrote in Wed Nov 11, 2020 7:21 am:No, OSGText doesn't play nice with shaders which is why I've banned it from all my developments, the ADI ball is canvas which has no such issues.


Indeed, it's a long-standing issue too - first reported back in early 2017 apparently.
At least so far, the propagated "workaround" has been to use a canvas based approach instead.
A number of senior core devs have also been pointing out that this is blocking us from adopting a more recent OSG version.

There have been some recurring discussions to fix/port or rather retarget the osgtext animation so that the core implementation uses a canvas fallback internally.
So far, the main concern here has been that allocating one FBO per animation (panel legend) would be rather wasteful.
Another idea disussed previously was to use a single Canvas FBO to serve as a cache texture and allocate all strings inside that, while registering an effect/shader that merely gets a handle to the canvas SUB-TEXTURE - which is an approach already used elsewhere (namely the Canvas SymbolCache).

For a rough summary of past talks, feel free to refer (and add) to: http://wiki.flightgear.org/OSGText_Issues
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: Space Shuttle - Display adjustments (PFD, DPS, HUD,...)

Postby eatdirt » Wed Nov 11, 2020 9:51 pm

why I've banned it from all my developments


Ah, perfect! Thanks Hooray for the link.

Here what I do have for the ADI ball with latest dev-snapshot, which does no match what Gingin has:

Image

It looks like the rectangles are missing!

@gingin, I've been reading the SCOM, and page 2.7-3, they do show a drawing of the ADI ball. In this one, they actually have the numbers and other characters black over the white hemisphere, and white over the black hemisphere; the white rectangles encompassing black character appearing only on the equator.
I don't know if his drawing is accurate, but at least, it shows again that white is sky and Earth is black. The HSI compass indeed increases counterclockwise, which means inverted flight, and the ADI ball in LVLH shows black above, which indeed mean black is Earth and white is sky!
eatdirt
 
Posts: 1012
Joined: Wed Aug 15, 2018 3:06 pm

Re: Space Shuttle - Display adjustments (PFD, DPS, HUD,...)

Postby GinGin » Fri Nov 13, 2020 11:01 pm

@EatDirt: I just changed three lines and adjusted RGB settings, so I dont know why it does not work on yours.
I will move on 2020 this week end, so I'll see if it is linked to that or not (?)


I am almost at the end with the system management and fault messages associated.
I have been testing a lot what would be the useful fault messages to have, letting the sim run for a day or two in back ground task ( so stable) to check on the thermal system etc.
I forgot how deep was coded the thermal distribution and hydraulic recirculating pumps, fascinating.

So, I finished with environment and thermal management indicators // fault messages.
I used svg subgroup with setVisible for heater indicators linked to a same variable, way more efficient.

No excuses now for not monitoring correctly the parameters :mrgreen:

Image

A bit less dense with BFS, as memory was quite limitated

Image

I have been through a whole scenario of thermal failures leading to an Abort Once Around like in that real scenario : https://www.youtube.com/watch?v=nIvGBd0SHOQ&feature=emb_title
Entertaining.




Here some dps pages dedicated to ECLSS

Image

Image




And the one for OMS/RCS heaters

Image


Real screen on the right

Image
GinGin
 
Posts: 1580
Joined: Wed Jul 05, 2017 11:41 am
Location: Paris
Callsign: Gingin

Re: Space Shuttle - Display adjustments (PFD, DPS, HUD,...)

Postby Thorsten » Sat Nov 14, 2020 10:47 am

@EatDirt: I just changed three lines and adjusted RGB settings, so I dont know why it does not work on yours.


Could be z-ordering - they're drawn, but end up underneath?
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Space Shuttle - Display adjustments (PFD, DPS, HUD,...)

Postby GinGin » Sat Nov 14, 2020 11:33 pm

@EatDirt: And what about the orbit pfd in ops 2 ? Does it happen also ?
GinGin
 
Posts: 1580
Joined: Wed Jul 05, 2017 11:41 am
Location: Paris
Callsign: Gingin

Re: Space Shuttle - Display adjustments (PFD, DPS, HUD,...)

Postby eatdirt » Tue Nov 17, 2020 9:31 pm

And what about the orbit pfd in ops 2 ? Does it happen also ?


Yes, it is exactly the same. Don't worry with this, I'll have a closer look; I'll do some diff between versions to see what has been changed. I could try to work on it a bit, making black over white and white over black on the two hemisphere.
eatdirt
 
Posts: 1012
Joined: Wed Aug 15, 2018 3:06 pm

Re: Space Shuttle - Display adjustments (PFD, DPS, HUD,...)

Postby GinGin » Sat Nov 21, 2020 10:42 pm

eatdirt wrote in Tue Nov 17, 2020 9:31 pm:
I could try to work on it a bit, making black over white and white over black on the two hemisphere.


Yes, sure.
That was way to hard for me code wise back then ( and still now ).The ADI and 3D projection is complex, thats why I used the trick of black squares and white letters.


Image


I finished with the SM.
Last one was the Thermal page for the BFS during ascent, showing mainly freon cooling temp and if some heaters are not turned on.
Here the OMS heaters that are useful for a sucessful OMS 2 burn after 40 mn in the freezing space for example.

Image


I changed slightly the Horizontal display ( added some ladder for lateral/ vertical deviation) and time to the HAC also ( I am doing a small video on it)

Image

I think I have more fun by re learning the systems than playing :)
GinGin
 
Posts: 1580
Joined: Wed Jul 05, 2017 11:41 am
Location: Paris
Callsign: Gingin

Re: Space Shuttle - Display adjustments (PFD, DPS, HUD,...)

Postby Hooray » Sun Nov 22, 2020 1:57 pm

GinGin wrote in Sat Nov 21, 2020 10:42 pm:That was way to hard for me code wise back then ( and still now ).The ADI and 3D projection is complex


Don't worry, and welcome to the club: I don't think there are too many folks around who really understand how Thorsten pulled that off - despite knowing Nasal and Canvas pretty well, I still can't wrap my head around the kind of math he is using there. I guess it's one of those instances where it might come in handy to have a PhD in maths/physics :lol:

Personally, I would have found it more obvious to render an actual 3D sphere and transform that, at the cost of extending the Canvas accordingly. Thanks to the recent Compositor work it's actually likely that this is going to become an option over the course of the next couple of months.

In fact, Jules and Fernando have started experimenting with rendering a compositor instance to a Canvas:

http://wiki.flightgear.org/Hackathon_Pr ... and_Canvas
Image

This cannot "only" be used to render exterior views (think shuttle RMS arm), but could be used to render arbitrary scenes, including those consisting of a completely different scene with a custom 3D model:

http://wiki.flightgear.org/Howto:Extend ... _3D_models
Image

To be fair though, Thorsten stated already that he'd be more inclined to use a shader-based approach instead - which will have very much superior performance in comparison, but will obviously only be an option for people with GLSL support, i.e. no legacy hardware. However, thanks to all the recent progress in the rendering department, it's likely that this might also become a real option for the next release.

In the meantime, we're currently discussing a Canvas specific optimization for Canvas-heavy aircraft, i.e. those featuring multiple MFD screens, which should also translate into performance wins for complex airliners or cockpits like the shuttle featuring multiple Canvas MFDs: http://wiki.flightgear.org/Post_FlightG ... ges#Canvas
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: Space Shuttle - Display adjustments (PFD, DPS, HUD,...)

Postby Johan G » Sun Nov 22, 2020 5:22 pm

GinGin wrote in Sat Nov 21, 2020 10:42 pm:That was way to hard for me code wise back then ( and still now ).The ADI and 3D projection is complex

Hooray wrote in Sun Nov 22, 2020 1:57 pm:Don't worry, and welcome to the club: I don't think there are too many folks around who really understand how Thorsten pulled that off - despite knowing Nasal and Canvas pretty well, I still can't wrap my head around the kind of math he is using there. I guess it's one of those instances where it might come in handy to have a PhD in maths/physics :lol:

Personally, I would have found it more obvious to render an actual 3D sphere and transform that, at the cost of extending the Canvas accordingly. Thanks to the recent Compositor work it's actually likely that this is going to become an option over the course of the next couple of months.

It is just that the ADI is not a rendered sphere, it is more complicated than that, most likely for the sake of software simplicity (for the real Space Shuttle back in the day) and legibility of the labels:
Thorsten wrote in Wed May 03, 2017 5:59 am:If you look at the real thing, it projects positions but not textures. If you render a sphere (regardless of whether it's an actual mesh or a function like in the linked article), you see distortions of e.g. text labels at the edges because you see them under a shallow angle.

The Shuttle ADI does the projection math for the position of the label center point, but then draws the text unprojected at that point. Same with lines, there's no change of line thickness done, only the position of the line center is projected.

That's a fairly unusual problem in rendering today (though I believe that was how 3d rendering was done in the 80s). I know how to do it in principle (or at least I think...), but it's not high on the priority list.

AIUI the ADI has since been improved over the years to match the real display.
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: Space Shuttle - Display adjustments (PFD, DPS, HUD,...)

Postby GinGin » Mon Nov 23, 2020 12:23 pm

Don't worry, and welcome to the club: I don't think there are too many folks around who really understand how Thorsten pulled that off [...] I guess it's one of those instances where it might come in handy to have a PhD in maths/physics


Indeed :)
Interesting links and heads up on canvas thing.
GinGin
 
Posts: 1580
Joined: Wed Jul 05, 2017 11:41 am
Location: Paris
Callsign: Gingin

Re: Space Shuttle - Display adjustments (PFD, DPS, HUD,...)

Postby Thorsten » Mon Nov 23, 2020 4:01 pm

I don't think there are too many folks around who really understand how Thorsten pulled that off


Please don't mystify it - it's straightforward math. The code knows the position of coordinate lines in 3d space (that's what spherical coordinate systems do), and it projects them into 2d space (that's basically setting one coordinate zero). There's clipping of invisible surfaces and edge artifacts - that's just comparing vector length against a set limit.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Space Shuttle - Display adjustments (PFD, DPS, HUD,...)

Postby eatdirt » Sun Dec 06, 2020 4:06 pm

Hi guys,
got a font problem with the latest devel pushes:

420.01 [ALRT]:opengl canvas::Text: No such font: LiberationMono-bold.tff

Is this supposed to be installed at the Shuttle level? Unless that is a simple typo? .tff -> ttf?

Cheers,
chris.
eatdirt
 
Posts: 1012
Joined: Wed Aug 15, 2018 3:06 pm

Re: Space Shuttle - Display adjustments (PFD, DPS, HUD,...)

Postby GinGin » Sun Dec 06, 2020 5:27 pm

@Eatdirt: Indeed, simple typo. Well spotted
I mixed tff with ttf.
The mono bold font is a standard font included in fg root that I called specifically for the hook.
That should concern only the hook [ ] mainly in ops 201 and 202.
I will fix that next week end , I am away of the main computer for a while .

Do you see those hook in mentioned dps Pages despite the error ?
GinGin
 
Posts: 1580
Joined: Wed Jul 05, 2017 11:41 am
Location: Paris
Callsign: Gingin

PreviousNext

Return to Spaceflight

Who is online

Users browsing this forum: No registered users and 1 guest

cron