Board index FlightGear Development Scenery

The landing strip lights are barely visible ...

Questions and discussion about enhancing and populating the FlightGear world.

Re: The landing strip lights are barely visible ...

Postby Thorsten » Thu Oct 03, 2019 5:40 pm

ALS doesn't show the animated lights (sequenced flasher and pulsing lights) if 'Use point sprites for runway lights' isn't set.
Is there a quick fix or a massive code rewrite?


Actually it does - but only once, it never repeats. Basically I have no idea what is going on with that - so I can't say whether it's a small or massive fix.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: The landing strip lights are barely visible ...

Postby WoodSTokk » Sat Oct 05, 2019 5:00 am

Thorsten wrote in Thu Oct 03, 2019 5:40 pm:
ALS doesn't show the animated lights (sequenced flasher and pulsing lights) if 'Use point sprites for runway lights' isn't set.
Is there a quick fix or a massive code rewrite?


Actually it does - but only once, it never repeats. Basically I have no idea what is going on with that - so I can't say whether it's a small or massive fix.


Update: i have now noticed that ALS with point sprites show the animated lights, but extremly weak.
Here is the same section of a screenshots with a little bit time difference.
Image
If you look carefully at the taxiway in the front, you will see a difference where the holding short lines are.
One line can be found simply between the red dots (the RWY signs). There is a second line closer to the runway.
Can you see the changes?
If you see what i mean, you can also see it on the neighbour taxiway, also two lines.
I dont know why the effect is so dark. If you want to test it, stay away from the lines. If you come closer, the effect will stop. Also if you zoom in.
It looks for me that the shader calculate something in reverse distance. Normally, the lights should become brighter if you come closer, but in this case it is reversed.
Its also possible that this happens with the rapid lights. But the rapid lights are so close to the approach lights that nobody can see this small effect.
I hope you have now new anchor points to investigate this problem.
WoodSTokk
 
Posts: 1077
Joined: Tue Oct 17, 2017 3:30 pm
Location: Milky Way/Sol/Earth/Europe
Callsign: SX-W57
IRC name: WoodSTokk
Version: 2020.4.0
OS: Debian Bullseye

Re: The landing strip lights are barely visible ...

Postby Thorsten » Sat Oct 05, 2019 8:24 am

Can you see the changes?


After some help from my wife, I managed to spot this also in a running FG instance...

It looks for me that the shader calculate something in reverse distance


Problem is, the lights go all via the same shader, so if an attenuation is with one of them, it is with all of them, I can for instance instruct the shader to draw all lights 10 times larger, and I get this:

Image

Relative size of lights is pretty much unaffected and so is the fact that they get smaller with distance. Note that I do not see the blinking yellow lines even here.

I can also instruct the shader to draw all lights at a constant size of 20, and interestigly enough I get this looking at the missing lights

Image

Now I do see the line blinking like this, but it is not actually being processed by the fragment shader, unlike the other lights which have a tight core and a faint halo here the whole square of the point sprite is drawn in a homogeneous color.

So it would seem the problem is with the input parameters - when not instructed to draw at constant size, the vertex shader doesn't really know what square to make - max-size, size and min-size don't seem to be set, which explains the weird distance behavior - the code has invalid parameters to compute size.

There might be more parameters missing because obviously the fragment shader also does not know what to do with the sprite, so it appears as a homogeneous square even when drawn at constant size.

(Edit: Actually there's not more missing - with the given input, the fragment shader believes that we're smaller than a single pixel and hence colors the whole surface in uniform color - if I disable that size check, the light is drawn fine - so it is really only the input size definitions which do not appear as they're needed).

My conclusion is that this is not an issue with the GLSL code but with the C++ part which sets the parameters for these effects (unlike in many other cases, here size, min-size, max-size and attenuation are not filled by the effect file but directly set by the C++ code), and something seems to go wrong for these lights.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: The landing strip lights are barely visible ...

Postby Thorsten » Sat Oct 05, 2019 5:19 pm

Okay, thanks to some help from Jonathan I think I understand the issue now - the lights are smaller than the rest and create numerical issues in the shader code - I have a shader-side fix and thanks to Jonathan's tests I'm now convinced that this is the correct place to apply the fix, so I'll do that soonish.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: The landing strip lights are barely visible ...

Postby Thorsten » Sun Oct 06, 2019 9:38 am

And it should be fixed now.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: The landing strip lights are barely visible ...

Postby WoodSTokk » Sun Oct 06, 2019 9:36 pm

One problem found in 'simgear/scene/tgdb/pt_lights.cxx' in the function 'SGLightFactory::getLightDrawable(const SGDirectionalLightBin::Light& light)'.
this function work with the lights and add it as triangles insteed of points. Therefore all directed lights are effected.
I dont know why static directed lights are not effected, but only animated directed lights.
Line 187-188 is:
Code: Select all
  drawArrays = new osg::DrawArrays(osg::PrimitiveSet::TRIANGLES,
                                   0, vertices->size());

Should be:
Code: Select all
  drawArrays = new osg::DrawArrays(osg::PrimitiveSet::POINTS,
                                   0, vertices->size());


With this changes, i can see the REILs and rapit lights.
To make it more visible, i have enlarged the size, minsize and maxsize.
Line 376-377 is:
Code: Select all
  Effect* effect = getLightEffect(10.0f, osg::Vec3(1.0, 0.0001, 0.00000001),
                                  6.0f, 10.0f, true, options);

Changed to:
Code: Select all
  Effect* effect = getLightEffect(20.0f, osg::Vec3(1.0, 0.0001, 0.00000001),
                                  12.0f, 20.0f, true, options);

Now i see it clearly, but only if i'm inside a ~3400m (1.9nm) radius.
Jumps everything in your mind by that digit???

Without pointsprites, the light discs are much bigger.
It seems there is everything in the code that shrink the size of animated lights.

~~~ EDIT ~~~
Have now seen you opened a thread on the dev-list.
I have sent my fixes to the mailing list.
The change from TRIANGLES to POINTS make the lights omnidirectional, so i leave it unchanged.
WoodSTokk
 
Posts: 1077
Joined: Tue Oct 17, 2017 3:30 pm
Location: Milky Way/Sol/Earth/Europe
Callsign: SX-W57
IRC name: WoodSTokk
Version: 2020.4.0
OS: Debian Bullseye

Re: The landing strip lights are barely visible ...

Postby abassign » Mon Oct 28, 2019 10:10 am

Despite the fact that someone said that the problem did not exist, that it was the fault of the fog or an inability to see reality ... The problem existed and fortunately it was solved by those who wanted to investigate the code and make the necessary corrections.
FGFS will exist as long as there are programmers and enthusiasts who want to solve problems and make FGFS a great program to fly.
I thank all those who have actively and intelligently collaborated, because finally the light of the airports is turned on again at night!

Las Vegas airports at night :)

Image
Image

This last image reminds us that something must still be done, the halo of blue light is very evident on the ground and makes the scene a little unreal, it is possible to make it more adherent to reality ...
Forgive me, I'm the usual perfectionist ...

Image
Developer of the program https://wiki.flightgear.org/Julia_photoscenery_generator
FDM developer of the G91R1B aircraft https://wiki.flightgear.org/FIAT_G91R1B
JSBSim collaborator
abassign
 
Posts: 947
Joined: Mon Feb 27, 2012 6:09 pm
Location: Italy (living 5 Km from airport LIME)
Callsign: I-BASSY
Version: 2020.4
OS: Ubuntu 20.10

Re: The landing strip lights are barely visible ...

Postby Thorsten » Mon Oct 28, 2019 11:21 am

Despite the fact that someone said that the problem did not exist, that it was the fault of the fog or an inability to see reality ...
The problem existed and fortunately it was solved by those who wanted to investigate the code and make the necessary corrections.


You really should stop living in your own world - nobody said 'the problem doesn't exist' - the statement was that 'no one except you seems to see it'.

A problem was solved by a collaboration of people which started from a reproducible bug report (very faint blinking lights), continued via an investigation of possible cause on both GLSL and C++ side (Jonathan was kind enough to test my theories) and then continued from the knowledge gained there.

If 'a problem' happened to be 'your problem', you're just in luck as it was apparently fixed accidentially.

There's a lesson here if you care to learn it (but I have a hunch you do not).
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: The landing strip lights are barely visible ...

Postby legoboyvdlp » Mon Oct 28, 2019 12:54 pm

abassign wrote in Mon Oct 28, 2019 10:10 am: The problem existed and fortunately it was solved by those who wanted to investigate the code and make the necessary corrections.



The only problems fixed was that dynamic lights would not work. The static approach lights and runway / taxiway lights.... are just the same as they were.

Strange how it works now, even though nothing changed :D

This last image reminds us that something must still be done, the halo of blue light is very evident on the ground and makes the scene a little unreal, it is possible to make it more adherent to reality ...


This I agree with, to be fair.
User avatar
legoboyvdlp
 
Posts: 7981
Joined: Sat Jul 26, 2014 2:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: The landing strip lights are barely visible ...

Postby WoodSTokk » Mon Oct 28, 2019 2:11 pm

abassign wrote in Mon Oct 28, 2019 10:10 am:This last image reminds us that something must still be done, the halo of blue light is very evident on the ground and makes the scene a little unreal, it is possible to make it more adherent to reality ...

As i have said previously, the scenery tool chain has a bug and sometimes it places multible blue lights insteed of one.
I found blue lights that are 18 times placed. Therefor some blue lights are extremely bright.
This bug must be fixed in the scenery tool chain, not in FGFS.
abassign wrote in Mon Oct 28, 2019 10:10 am:Forgive me, I'm the usual perfectionist ...

Me too. I understand you. ;)
WoodSTokk
 
Posts: 1077
Joined: Tue Oct 17, 2017 3:30 pm
Location: Milky Way/Sol/Earth/Europe
Callsign: SX-W57
IRC name: WoodSTokk
Version: 2020.4.0
OS: Debian Bullseye

Re: The landing strip lights are barely visible ...

Postby GinGin » Wed Nov 27, 2019 9:01 am

Question for you Abassign, would you say that those screenshots represent what you are seeing now in game after bug fix ( Las Vegas )?



Image


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

Re: The landing strip lights are barely visible ...

Postby GinGin » Sat Dec 14, 2019 6:51 pm

Still dont want to anwser Abassign ?
GinGin
 
Posts: 1580
Joined: Wed Jul 05, 2017 11:41 am
Location: Paris
Callsign: Gingin

Re: The landing strip lights are barely visible ...

Postby wkitty42 » Sat Dec 14, 2019 7:38 pm

GinGin wrote in Sat Dec 14, 2019 6:51 pm:Still dont want to anwser Abassign ?

might be best ;)
"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

Previous

Return to Scenery

Who is online

Users browsing this forum: No registered users and 8 guests