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 7:34 am

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

Scenery designer, basic livery maker, aircraft developer (current project: F-16).
Using Thrustmaster FCS Flight Pack.
Follow me also on Instagram & Twitter @j_maverick16, Google+ and YouTube.
User avatar
J Maverick 16
 
Posts: 749
Joined: Sat Feb 01, 2014 6:26 pm
Location: Northern Italy
Callsign: J-Mav16, OPFOR96
Version: 2018.2.1
OS: macOS 10.12

Re: ALS aircraft lights

Postby Thorsten » Wed Aug 03, 2016 5: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: 10641
Joined: Mon Nov 02, 2009 8:33 am

Re: ALS aircraft lights

Postby legoboyvdlp » Wed Aug 03, 2016 6: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: 6731
Joined: Sat Jul 26, 2014 1:28 am
Callsign: YV-LEGO
Version: 2018.3.1
OS: Windows 10 HP

Re: ALS aircraft lights

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

Wow, Thorsten, that is incredible. ALS rocks! 8)
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4691
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: ALS aircraft lights

Postby radi » Thu Aug 04, 2016 1: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: 640
Joined: Mon Aug 25, 2008 4:24 pm
Location: YMML, EDDC

Re: ALS aircraft lights

Postby Thorsten » Thu Aug 04, 2016 4: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: 10641
Joined: Mon Nov 02, 2009 8:33 am

Re: ALS aircraft lights

Postby lomar » Fri Apr 14, 2017 10: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: 214
Joined: Mon Jun 30, 2014 1:38 am
Callsign: lomar
Version: nightly
OS: win 10

Re: ALS aircraft lights

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

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

Re: ALS aircraft lights

Postby Thorsten » Sat Apr 15, 2017 4: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: 10641
Joined: Mon Nov 02, 2009 8:33 am

Re: ALS aircraft lights

Postby Necolatis » Sat Apr 15, 2017 12: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


Hangar: https://sites.google.com/site/fghangar/
User avatar
Necolatis
 
Posts: 1907
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2018.3.2
OS: Windows 10

Re: ALS aircraft lights

Postby Thorsten » Sat Apr 15, 2017 1: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: 10641
Joined: Mon Nov 02, 2009 8:33 am

Re: ALS aircraft lights

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

sanhozay wrote in Fri Apr 14, 2017 10: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: 477
Joined: Sun Dec 16, 2012 10:04 am
Location: Uppsala, Sweden
Version: 2017.3.1
OS: Ubuntu 16.04

Re: ALS aircraft lights

Postby Necolatis » Sun Apr 16, 2017 3: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


Hangar: https://sites.google.com/site/fghangar/
User avatar
Necolatis
 
Posts: 1907
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2018.3.2
OS: Windows 10

Re: ALS aircraft lights

Postby jam007 » Sun Apr 16, 2017 5: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: 477
Joined: Sun Dec 16, 2012 10:04 am
Location: Uppsala, Sweden
Version: 2017.3.1
OS: Ubuntu 16.04

Re: ALS aircraft lights

Postby Necolatis » Sun Apr 16, 2017 5: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


Hangar: https://sites.google.com/site/fghangar/
User avatar
Necolatis
 
Posts: 1907
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2018.3.2
OS: Windows 10

PreviousNext

Return to Effects and shaders

Who is online

Users browsing this forum: No registered users and 1 guest