Board index FlightGear Development Effects and shaders

ALS landing lights

An exciting "new" option in FlightGear, that includes reflections, lightmaps, the particle system etc.. A lot is yet to be discovered/implemented!

Re: ALS landing lights

Postby legoboyvdlp » Sun Oct 26, 2014 12:01 am

Shouldnt landing lights illuminate A LITTLE more? You would think that a landing light should illuminate more than 1m halo. Looks cool though.
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: ALS landing lights

Postby LesterBoffo » Sun Oct 26, 2014 1:32 am

OK, that answers my question Thorsten, thank you.
User avatar
LesterBoffo
 
Posts: 2171
Joined: Sun Oct 02, 2011 5:02 pm
Location: Oregon, USA
Callsign: LesBof
Version: 2018.3.2
OS: Win10 Pro

Re: ALS landing lights

Postby Thorsten » Sun Oct 26, 2014 11:18 am

Shouldnt landing lights illuminate A LITTLE more? You would think that a landing light should illuminate more than 1m halo


Yeah, which is why a single light illuminates almost the whole extent of a 30 m wide runway here... :-) Where's the 1m coming from?

Image
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: ALS landing lights

Postby legoboyvdlp » Sun Oct 26, 2014 12:12 pm

Thats much better than others! Talking about the first ones. Just spotlight size. And some others. I would have expected landing lights to be like headlights, but I suppose a plane is biggger than a car!
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: ALS landing lights

Postby ludomotico » Sun Oct 26, 2014 12:39 pm

GA aircrafts are not really bigger than a car, and they usually have a single landing light that is usually smaller than a regular car headlight!

From my limited experience in real life at night, Thorsten's snapshot is very realistic for GA aircrafts. Unfortunately, I don't have any experience on taxiing larger aircrafts.
User avatar
ludomotico
 
Posts: 1269
Joined: Tue Apr 24, 2012 2:01 pm
Version: nightly
OS: Windows 10

Re: ALS landing lights

Postby Thorsten » Sun Oct 26, 2014 6:09 pm

Thats much better than others! Talking about the first ones. Just spotlight size.


You do know that directional lights illuminate a cone, so when you point them at a nearby surface they illuminate a small area, when you point them at something farther away they illuminate a large area? Because the angular size of the lightspots is precisely the same in each screenshot.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: ALS landing lights

Postby legoboyvdlp » Sun Oct 26, 2014 9:15 pm

Okay. Thanks. Wasn't sure about that. But take the C208 for example, its thing is huge! about the size of the plane itself
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: ALS landing lights

Postby Bjoern » Mon Oct 27, 2014 1:27 pm

legoboyvdlp wrote in Sun Oct 26, 2014 9:15 pm:Okay. Thanks. Wasn't sure about that. But take the C208 for example, its thing is huge! about the size of the plane itself


High wing, rather high gear -> longer distance for the light from the source to the ground -> bigger light splash

The form of the reflector of the landing light and thus the geometry of the resulting light cone also plays a role, but I'm pretty sure that Thorsten does not take this into account.
Bjoern
 
Posts: 484
Joined: Fri Jan 06, 2012 11:00 pm
Location: TXL (RIP)
Version: Next
OS: ArchLinux

Re: ALS landing lights

Postby Hooray » Mon Oct 27, 2014 1:46 pm

Reminder: this is a flight simulator, NOT a "light simulator" :D
Besides, just because ALS happens to be actively maintained doesn't necessarily mean that such things should be added to ALS - once people want to model different kinds of lights by specifying lense effects, reflectors and wattage etc, some kind of deferred scheme makes more sense - otherwise, the "correct" method would be to come up with a framework-agnostic XML config file, that is processed by the corresponding framework (still not saying that this makes sense in the FG context).
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: ALS landing lights

Postby hvengel » Thu Dec 11, 2014 9:13 pm

Just installed the 3.3 snap shot a few days ago and decided to implement a landing light. But I am apparently doing something wrong as all of the lights seem to be acting like a search light (IE. they move as I change the view angle from the cockpit). How do I stop that from happening with the landing lights?

For tail draggers the landing lights default direction is pointing up at the sky when sitting on the ground or in a normal landing touch down rather than sort of at the ground and there is no way to move the lights direction up or down that I can find only side to side.

Changing the landing-light-offset-deg to get the light cone in the right location relative to the actual landing light location results in a fairly high angle for the light (in my case the pilots is only slightly behind the IRL landing light position but is a significant distance to the side and above of the light) which means the illumination is going the wrong direction. That is IRL a landing light under the left wing would be angled slightly to the right in order to get most of the light out in front of the aircraft but in this case the landing light ends up point sharply (20 degrees) to the left.

As I zoom the view in and out the location of the light cone moves for and aft.
hvengel
Retired
 
Posts: 1127
Joined: Sun Dec 24, 2006 5:35 am
Location: Minden Nevada

Re: ALS landing lights

Postby Thorsten » Fri Dec 12, 2014 8:07 am

Some documentation about this here.

How do I stop that from happening with the landing lights?


Chances are you're using the searchlight rather than one of the landing lights - they're behaving fine here.

For tail draggers the landing lights default direction is pointing up at the sky when sitting on the ground or in a normal landing touch down rather than sort of at the ground and there is no way to move the lights direction up or down that I can find only side to side.


But for tail draggers sitting on the ground, the default view axis of the cockpit view should also be up I guess, and since the light is defined to look down relative to the default view axis of the chosen view, that should be okay. Basically if you have the cockpit view such that you can see the runway on approach, the light will point slightly below that and hence illuminate the runway okay.

Changing the landing-light-offset-deg to get the light cone in the right location relative to the actual landing light location results in a fairly high angle for the light


You're positioning a lightspot on the screen using the offset. The code doesn't know or care where the actual landing light is located or how it's pointed. It's not a simulation of an actual lit volume intersecting with terrain as Rembrandt does, it's a much cheaper to compute approximation in 2d screen coordinates.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: ALS landing lights

Postby hvengel » Fri Dec 12, 2014 5:38 pm

I read the documentation before I starting trying to use the feature. I tried all three lights and all of them are moving as the pilot pans his view around. So it appears that there is something wrong with the snap shot I am using (about a week old at this point). I will get a newer version over the week end and re-test. I was very surprised when this happened and I spent some time trying all three lights to make sure that I didn't miss anything. All three lights had exactly the same behavior.

Tail draggers are normally landed close to stall which is very close to the same pitch angle as when sitting on the ground. Landing lights on small singles are generally not used on approach and are there to allow the pilot to see the runway when flaring just before touching down and while taxiing. For many tail draggers alpha at touch down will be around 10 degrees (on some more) so the light needs to be pointed down more than 10 degrees relative to the aircraft axis to be of any use. I didn't check to see how much I had to move the pilots view down to bring the illumination of the light into a useful position so I am not sure how much too high the light is aimed. I will check this over the week end. In any case the elevation of the light relative to the aircraft axis will be different depending on the aircraft.

One other consideration is on some tail draggers the pilot can't see the runway looking straight ahead when on the ground or while flaring for landing and even if the landing light (pointing dead ahead) is pointed down in a direction that illuminates the runway if the beam is too narrow the pilot will never see the area illuminated. That is definitely the case with the P-51 series and this is probably also true for most WWII fighters. If the beam width could be adjusted it might mitigate many of the tail dragger issues.

I realize that the code does not know or care about the position of the IRL landing light and that it is doing an inexpensive 2D approximation. Many airliners have landing lights that are mounted in the wing roots and some GA aircraft have landing lights mounted in the nose which results in a fairly small angular offset from the pilots view and I suspect that your approximation works fairly well for those cases. But to be generally useful it does need to allow for things to be adjusted to get a useful approximation on a wider range of aircraft as it currently does not work for tail draggers (at least those with long noses).
hvengel
Retired
 
Posts: 1127
Joined: Sun Dec 24, 2006 5:35 am
Location: Minden Nevada

Re: ALS landing lights

Postby Thorsten » Fri Dec 12, 2014 7:57 pm

Hm, I can't even start the P51-D I have here (the latest version which was on GIT, probably there's a newer one on SVN?), it quits with

Code: Select all
In file /home/fgfs/fgdata/Aircraft/p51d/p51d-jsbsim.xml: line 579
 Read model 'autopilot' while expecting model 'system'

Aircraft system element has problems in file /home/fgfs/fgdata/Aircraft/p51d/p51d-jsbsim.xml
Unknown exception in the main loop. Aborting...
GUIMgr::shutdown() not running.


so I can't quickly look at this in detail.

Do you have any customized view manager? The shader uses

Code: Select all
/sim/current-view/pitch-offset-deg
/sim/current-view/heading-offset-deg
/sim/current-view/field-of-view


to compensate any movement of the view from the default, if you somehow by-pass them, then they'd be zero and the light would become a searchlight. Could you check what these properties do if you move the view?
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: ALS landing lights

Postby hvengel » Fri Dec 12, 2014 8:25 pm

That's fixed in SVN. 3.3 changed something in the JSBSim interface code that invalidated some syntax that I was using. SVN makes testing by users easier since they can grab a single aircraft and it only takes a few minutes to download. But you will need to have svn installed on your machine.

I will check the view properties but I don't have any explicit code that by passes these.
hvengel
Retired
 
Posts: 1127
Joined: Sun Dec 24, 2006 5:35 am
Location: Minden Nevada

Re: ALS landing lights

Postby Thorsten » Sat Dec 13, 2014 7:49 am

SVN makes testing by users easier since they can grab a single aircraft and it only takes a few minutes to download.


And it makes quick tests for developers harder because I have a near up-to-date FGData GIT anyway but I need to grab any specific plane now :-) Well, all this has been discussed on the devel list..

I will check the view properties but I don't have any explicit code that by passes these.


I assumed they'd be hard-coded anyway, but these somehow not changing is the only explanation I have for what you see.

If the beam width could be adjusted it might mitigate many of the tail dragger issues. (...) But to be generally useful it does need to allow for things to be adjusted to get a useful approximation on a wider range of aircraft as it currently does not work for tail draggers (at least those with long noses).


It's not that this'd be impossible to do, in fact it'd be quite easy and probably cost no more than 1-2 fps.

But...

Rendering models has always an infrastructure part and a model-specific part - the cost of the infrastructure is paid by everyone, the cost for the specific part by people using the model. Rembrandt has sort of the maximal infrastructure cost (a full light volume detecting pass) and so the additional costs of highly customizing any specific model are small - whether you add a simple light or a complex light doesn't slow Rembrandt much in addition.

In ALS, any light customization you ask directly affects the infrastructure (because it is very slim and needs to be broadened to support customization), i.e. the 1-2 fps will have to be suffered by everyone - regardless of what quality level he's using, regardless of whether he's using a light at all.

I'm constantly getting a bunch of similar requests - a third landing light for instance. Control over the haze model independent of general quality level settings. An option to not use the sparkle effect on lights and render them as discs.

Every of these is a small thing, just another conditional here and there, just a few more parameters passed here and there,... but take them together: Currently each of the landing lights passes one parameter - that's a total of two. Following the two landing-light related requests, i.e. making them move vertically, with a different radius and introducing a third one, we have three lights characterized by three parameters each, i.e. we now pass nine parameters. And suddenly the cost is no longer 1-2 fps, it's maybe 3-4 we're talking about.

It'd be okay if that were optional and only people who want to fly a taildragger with detailed light modeling are slowed down - but since it needs to have a broader infrastructure, it is in fact not - everyone will feel it.

So - let me pose the question that way - what framerate loss would you consider acceptable for everyone to get more detailed customization for a specific plane?

(My own criterion usually is - how much time do I spend looking at the affected pixels during a typical flight, i.e. in ALS I tend to priorize resource allocation to 'in air' relevant features (weather, light, haze,...) over 'on ground' features (detailed shadows, and lights a la Rembrandt...), 'cockpit view' over 'external view' and 'always on' over 'used in a specific situation'.).
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

PreviousNext

Return to Effects and shaders

Who is online

Users browsing this forum: No registered users and 10 guests