Board index FlightGear Development Effects and shaders

ALS aircraft 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 aircraft lights

Postby J Maverick 16 » Tue Aug 02, 2016 8:34 am

Wow very nice!
Regards, Mav
Breakin' the sound barrier every day!

Scenery designer, basic livery maker, aircraft developer (KC-137R, F-16, A330, C-32J, MH-60)
Flying with Thrustmaster FCS Flight Pack + MFD Cougar
Aviation media on IG at: @j_maverick16.aviation
User avatar
J Maverick 16
 
Posts: 910
Joined: Sat Feb 01, 2014 7:26 pm
Location: Northern Italy
Callsign: J-Mav16
Version: 2020.3.19
OS: macOS

Re: ALS aircraft lights

Postby Thorsten » Wed Aug 03, 2016 6:54 pm

After watching some night landing imagery of the Shuttle, the way this is done is that the touchdown zone is illuminated by floodlights from behind.

Here we go - a nicely lit runway:

Image

As the Shuttle gets caught in the floodlight, its rear section lights up:

Image

And during rollout it all disappears into darkness again (I'll spare you the picture of that one - you can guess how it looks like...)
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: ALS aircraft lights

Postby legoboyvdlp » Wed Aug 03, 2016 7:10 pm

Whoa. That is absolutely crazy. If I can't have the nice ALS lights at least I can enjoy your screenshots!
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 aircraft lights

Postby wlbragg » Wed Aug 03, 2016 7:43 pm

Wow, Thorsten, that is incredible. ALS rocks! 8)
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7588
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: ALS aircraft lights

Postby radi » Thu Aug 04, 2016 2:08 am

Amazing!

So I (think I) understand how the ALS landing lights are done conceptually: Because my head (the camera) is close to the light source, the lit region in screen space never changes and you only need depth information such that distant pixels are darker than near ones. (Unless I turn my head, in which case the lit region is probably just translated and not stretched? Thinking of if -- what happens if I turn my head around the longitudinal axis? Head trackers might allow for this?)

How are the aircraft lights done conceptually?
OSM buildings for LOWI, EDDC
Custom scenery for VHXX YMML
Edit .stg via the FG Object Placement Tool
radi
 
Posts: 659
Joined: Mon Aug 25, 2008 5:24 pm
Location: YMML, EDDC

Re: ALS aircraft lights

Postby Thorsten » Thu Aug 04, 2016 5:40 am

Conceptually what you're seeing is two things acting together:

One is a change to the runway shader which allows to instruct it to display lightspots (well, really the intersections with light ellipsoids). By instructing it to render them to a fixed position, you can simulate illumination with external floodlights. By instructing to render them to an aircraft-relative position you can get landing light, strobe and position lights showing in external and internal views.

The second is a model-coordinate geometry based illumination for the model shaders (currently only implemented for the space shader family for testing purposes). It's similar in that it also computes the intersection of a light sphere with an object.

It's all tied together by a light manager which flicks the various switches for the shader parameters.

It has a few nice features - you can do smooth lighting transitions in color and position for instance (the SRB separation sequence), and the light has a configurable ambient component within the sphere, so we can take into account that the Shuttle in the landing sequence is not only lit by the direct floodlight but also by reflected light from the runway - so shadows don't appear pitch black (same for the SRB flame illuminating the Shuttle - this is a very extended light source and poorly captured by a point light simulation).

It's still a bit rough around the edges (for instance, in principle the exhaust and vapour trails should pick up illumination as well, but the code currently doesn't forward the information), but it satisfies basically all lighting needs of the Shuttle - floodlights on the pad, SRB flame, reflected light from Earth during the day, engine flames at night, entry plasma and floodlights for night landings.

The ALS landing light from interior view is another technique (not useful for the Shuttle because it has no landing light) which is more powerful in that it will illuminate nearly everything everywhere. The light ellipsoid intersection can be rigged to do that as well in principle, but I have some concerns that illuminating trees in particular might not be cheap - so at least the first version of this shader will be restricted to runway and airport keep only.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: ALS aircraft lights

Postby lomar » Fri Apr 14, 2017 11:11 pm

well, i know that this is an old thread, but it would be nice if there was some information about this rendering technique at the wiki. Me and lots of other developers would like to start implementing this on some aircraft, but need some more information
lomar
 
Posts: 479
Joined: Mon Jun 30, 2014 2:38 am
Location: Rio de Janeiro, Brazil
Callsign: lomar
Version: nightly
OS: win 10

Re: ALS aircraft lights

Postby sanhozay » Fri Apr 14, 2017 11:59 pm

sanhozay
 
Posts: 1207
Joined: Thu Dec 26, 2013 12:57 pm
Location: EGNM
Callsign: G-SHOZ
Version: Git
OS: Ubuntu 16.04

Re: ALS aircraft lights

Postby Thorsten » Sat Apr 15, 2017 5:00 am

well, i know that this is an old thread, but it would be nice if there was some information about this rendering technique at the wiki. Me and lots of other developers would like to start implementing this on some aircraft, but need some more information


Fair enough... Originally I've been waiting for feedback from the C-172p and the F-14 developers, but the C-172p seems to be working fine at least.

So I guess I ought to prepare a writeup.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: ALS aircraft lights

Postby Necolatis » Sat Apr 15, 2017 1:53 pm

I just installed this as navigation lights, I think it looks rather good.
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2233
Joined: Mon Oct 29, 2012 1:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2020.3.19
OS: Windows 10

Re: ALS aircraft lights

Postby Thorsten » Sat Apr 15, 2017 2:14 pm

The point here is not the visible green light

Image

but rather the way it illuminates the runway. And to point out that I have not published the description how to achieve that is quite correct.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: ALS aircraft lights

Postby jam007 » Sun Apr 16, 2017 4:45 pm

sanhozay wrote in Fri Apr 14, 2017 11:59 pm:http://wiki.flightgear.org/ALS_technical_notes#ALS_procedural_lights

I'm trying to use a property to change intensity scale but can not get it to work. What am I doing wrong?
Code: Select all
        <intensity_scale>
          <property>/rendering/nav-lights-factor</property>
        </intensity_scale>
jam007
 
Posts: 579
Joined: Sun Dec 16, 2012 11:04 am
Location: Uppsala, Sweden
Callsign: LOOP
Version: 2020.4.0
OS: Ubuntu 22.04

Re: ALS aircraft lights

Postby Necolatis » Sun Apr 16, 2017 4:48 pm

Instead of <property>, you should use <use>
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2233
Joined: Mon Oct 29, 2012 1:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2020.3.19
OS: Windows 10

Re: ALS aircraft lights

Postby jam007 » Sun Apr 16, 2017 6:08 pm

Thanks!

But there is something else that is wrong too. I now think it doesn’t use the effect I think it is using. setting intensity scale by hand does not result in any change. These are my codes:
nav-light-left.xml
Code: Select all
<?xml version="1.0"?>
<PropertyList>

  <path>/Models/Effects/procedural_light.xml</path>

    <animation>
      <type>select</type>
      <object-name>procedural_light</object-name>
      <condition>
          <greater-than>
          <property>systems/electrical/outputs/inst_ac</property>
          <value>30</value>
        </greater-than>
      </condition>
    </animation>

    <effect>
        <inherits-from>Model/Effects/draken-light-nav-left</inherits-from>
        <object-name>procedural_light</object-name>
    </effect>

</PropertyList>

It does show the light only after it has power so so far it is as expected.

draken-light-nav-left.eff
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<PropertyList>

    <name>draken-light-nav-left</name>
    <inherits-from>Effects/procedural-light</inherits-from>

    <parameters>
        <light_color_base_r type="float">1.000</light_color_base_r>
        <light_color_base_g type="float">0.320</light_color_base_g>
        <light_color_base_b type="float">0.320</light_color_base_b>
        <light_color_center_r type="float">1.0</light_color_center_r>
        <light_color_center_g type="float">1.0</light_color_center_g>
        <light_color_center_b type="float">1.0</light_color_center_b>
        <intensity_scale>
          <use>/rendering/nav-lights-factor</use>
        </intensity_scale>


        <pointing_x type="float">0.7002075382097097</pointing_x>
        <pointing_y type="float">1.0</pointing_y>
        <pointing_z type="float">0.0</pointing_z>

        <is_directional type="bool">true</is_directional>
        <is_strobe type="bool">false</is_strobe>

        <inner_angle type="float">0.96</inner_angle>
        <outer_angle type="float">1.04</outer_angle>
        <zero_angle type="float">1.13</zero_angle>
        <outer_gain type="float">0.1</outer_gain>
    </parameters>

</PropertyList>

I did also try to change the colour settings but nothing happens. So something does not work as it should.
jam007
 
Posts: 579
Joined: Sun Dec 16, 2012 11:04 am
Location: Uppsala, Sweden
Callsign: LOOP
Version: 2020.4.0
OS: Ubuntu 22.04

Re: ALS aircraft lights

Postby Necolatis » Sun Apr 16, 2017 6:38 pm

Should

<path>/Models/Effects/procedural_light.xml</path>

not be

<path>Models/Effects/procedural_light.ac</path>

Or something like that? Else you attempt to apply the effect 2 times.
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2233
Joined: Mon Oct 29, 2012 1:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2020.3.19
OS: Windows 10

PreviousNext

Return to Effects and shaders

Who is online

Users browsing this forum: No registered users and 3 guests