FSX Help with Approach Lights using a Separation Plane

#1
Hi all

I've now converted all my airport lighting to pilot/dawn/dusk/night activated, and it looks fantastic - many thanks to everyone here on this site who've made this possible.

One final major problem exists though, which I can't seem to resolve. I've made a set of CALVERT approach lights, and using the separation plane, I cannot see the lighting from behind point 0, 0 (in GMAX). However, once I'm beyond that, it doesn't matter which way I face, the lights still show. I've tried making point 0,0 the other end of the lights, but that makes it that a pilot past that point facing the runway cannot see the lights. Likewise I've made a Z angle separation plane of both 9* and 4.5*, but they still show when directly above 0,0, no matter what heading I face.

Is there a way to stop the lighting showing when facing the opposite direction to the lights, even when I'm past the 0,0 point?

As a smaller question, is there any way of getting all the lights at the airport to show past 200m away? I think it's something to do with LODs but not sure.

Many thanks in advance

Will
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#2
Hi,

Are your lights located at the 0,0 point in GMax or not? If that is not the case you will have to adapt the SEPARATION_PLANE command so that the plane is positioned correctly. Maybe you can show your code for the SEPARATION_PLANE command?
 
#3
Hi Arno

The very 1st light from the runway is at 0,0 in GMAX, and behind that point the lights don't show, but but facing out from the runway the other way past that point the lights show up:

Facing the runway heading:


Facing the opposite way before point 0,0:


Facing the opposite way after point 0,0:



My separation plane code is as follows:

Z plane at 0 (which I normally use):
Code:
SEPARATION_PLANE WrongDirection, 27605, 0, -17654, 32768
Z plane at 4.5 degrees (test):
Code:
SEPARATION_PLANE WrongDirection, 27605, 32667, -17654, 32768
Thanks

Will
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#4
Hi,

The last parameter in the SEPARATION_PLANE command is the distance along the vector that you specify (the three parameters before are the direction of that vector). To get the lights to display correctly you will have to place a SEPARATION_PLANE command around each row, where the distance (last parameter) matches their distance from the origin (measured along the direction vector).

Does this make sense or is it too technical?
 
#5
Hi Arno

Yes I think I understand - basically the 32768 is the distance vector, and each row of lights need their own separation plane. However how would I go about calculating their distances? Also currently I've got the separation plane wrapped around a NAV2 freq check and dusk/night checks - would adding multiple separation planes affect this, or would you put those checks outside the separation planes (which thinking about it now yes you would!)?

Thanks

Will
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#6
Hi,

Yes, you would only need one check for time of day and frequency. The distance is simply the distance value multiplied by 32768 (which is the length of the normal vector).
 
#7
I think I'm starting to border on what I can successfully work out :)

My understanding now is that the Distance Vector is the distance between 0,0 and the light, multiplied by 32768.

I've now changed the 1st 3 lights to be on separate planes.

The new vectors for the 1st 3 are 32768, 3276800, and 327680000, based on being 100 apart - is that correct, or have I lost it somewhere?

Using these figures, I didn't recalculate the X and Y, and in FSX the lights were appearing all together instead of one row at a time. I then recalculated the X and Y, and that would not compile (getting initializer magnitude too large for specified size error).

Clearly I've gone off track somewhere!

Will
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#8
Hi,

If they are 100 meters apart I would expect the distances to be 0, 3276800, 6553600 (for 0, 100 and 200 meters). The XYZ components of the normal vector don't have to be recalculated indeed.
 
#9
Knew I was being stupid and couldn't do simple maths - that has worked excellently! Turns out that they are approximately 27m apart so my 100m estimate was a little off :).

Works perfectly now though, thanks Arno.
 
#10
Is there any chance to build a calculator that makes all the mathematics for the runway lights and approach lights?
For example, I want to build a runway with a given lenght and width, approach lights of a given system (HIALS in my case)
I know all the measurements between lights and their heights, and of course the colour of the light.
My dream is to put all the data into a program that will give me a resulting file with all the lightboxes and "separation_plane" applied.
Is there any volounteer to make such a thing?
 
Top