Hi Curt,

On Wed, Jul 30, 2014 at 4:35 PM, Curtis Olson wrote:
Hi Thorsten,

There is a direction vector available for each runway light.  This is stored inside the airport .btg file along with the location and type for each light.

The original implementation used a cube map aligned with the direction vector, along with a "cleverly" designed texture to produce the desired intensity in the desired direction, along with smooth fading as you moved away from the optimal view direction.  The center of the cube map texture was the brightest (viewed straight on from the ideal approach path) and the edges were dimmest (viewed from a perpendicular direction.)

The end result was that runways were actually pretty dim when viewed from the side, but as you flew around to the ideal approach path, they smoothly became brighter and brighter.

For taxi edge lights we gave a direction vector that is straight up, and then designed our cube map so the center was darkest (i.e. when viewed from above) and the edges were brightest (viewed from ground level.)  So as you overflew an airport, you could hardly see the taxi lights, but from the ground they were very visible.

So my main point is that the light direction is encoded in the .btg file for each light, but off the top of my head, I can't say exactly how far up the call chain that information propagates ... much (all?) of that code has changed substantially since I originally wrote it, but the direction information is there to be used.

I suspect that the cube-map was lost in the move from plib to OSG a number of years back.  Certainly I don't recall seeing any evidence of it when I enabled Effects for the runway and taxiway lights fairly recently.

However, that the information is in the .btg file is very interesting. I'll look it up and should be able to pass it through the Effects framework as a Uniform for a shader to pick up.

Now all I need to do is work out why the GUI on my Ubuntu installation has disappeared...

-Stuart