• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

PAPI lights with Separation plane

José Bourgoignie said:
Hi,

I wonder if these objects are made in GMAX. Normally it should not intervene with other items.
If I made this objects again without making an API of it... maybe it works normally ? There must be happend a fault during the operation GMAX - FSRegen - API.

Greetz. José.

I made BGL lights and i converted them to a library BGL. After that i replaced the IDs in the SCASM code with my objects IDs (lights) but it didn't work. But maybe i missed something.
 
lambda said:
I made BGL lights and i converted them to a library BGL. After that i replaced the IDs in the SCASM code with my objects IDs (lights) but it didn't work. But maybe i missed something.

Hi,

If I am not wrong: BGL lights are only used in FS9.
I am using now the Special Effect Placer from the FS2002 Effect SDK.
For the rest I am a newbie in this matter. I tried to use FSRegen for using and placing light effects, but till now I couldn't export from GMAX to FSRegen. And as I didn't like to loose time because I am making an airport scenery... I am waiting do try again. Waiting for a good step-by-step explanation how to do it.

Greetz. José.
 
knnygar said:
If you use SEPARATION_PLANE nolgt_4, 0, -32767(x), 0(z), 32767(y), it will be visible only when you are above the light.
If you use SEPARATION_PLANE nolgt_4, 2387, -32659, 1164, 32767 the plane will be tilted aprox. 3deg as you asked for.

This is correct, but one little correction. The first three parameters are the x, z and y. The last one is the length of your vector and not the y thus.

Also note that the second line as gotten an additional rotation. So the seperation place is not only tilted, but also rotated a bit.
 
Last edited:
José Bourgoignie said:
If I am not wrong: BGL lights are only used in FS9.

No, that is not correct. The BGL_LIGHT commands works fine in Fs2002 as well. Actually it works even better, as you do not have the tweak the GMax output to get the light to show correctly :).
 
Sorry, I skipped the first zerow :(
This should be correct: SEPARATION_PLANE nolgt_4, 0(x), -32767(z), 0(y), 32767

My excample is for rwy 06/24 so it is rotated 64deg and tilted approx 3deg.

The Light_land and Light_taxi does not work in FS2004 SDK, but Light_nav and Light_beacon does work with the asm tweaking.
 
Hi ppl,
I've posted a custom PAPI example last month. Have a look, I was succesfull but with strange problems, such my aircraft model...disappeared :confused:
 
Hi there,

This might be a slightly different type of light than that which the original poster described, but here it goes...

A couple weeks ago, I made a custom PAPI-4 light for my runway. In my case, I needed to make a total of 4 different PAPI lights, since my runway has PAPI-4 on each side, and at each end of the runway. Also, for each PAP-4, I needed a total of 8 lights (4 white, 4 red). I started by creating the visual model of the lighting system, and then I coded the lights later as a seperate model.

PAPI1.jpg


There are several checks in place. The first is to see whther you are on the correct side of the PAPI to see the lights or not. In my case, the runway runs north/south, so my math is easier, but there are plenty of posts here that tell you how to calculate the values.
Code:
SEPARATION_PLANE nolgt_1, 0,0,-32767, 32767

Next comes the tricky part. Not all PAPI systems are the same, your mileage may vary, etc. I went online and check with the manufacturers of airport lighting to find out what the various angles were on the lights. Usually, at a 3.00 degree slope, we will see the 2 white/2 red pattern. But this doesn't mean that any of the lights will be set to 3 degrees, since this is actually the middle of the PAPI pattern.

PAPI4.jpg


So, from the manufacturer, the lights needed to transition from white to red at 2.5, 2.83, 3.17 and 3.5 degrees, in order to have a 3 degree slope. Different manufacturers had slightly different numbers, but you get the idea. So, in my example, as I am facing north, the left light on the left hand side of the runway needs to transition at 2.5 degrees:

PAPI2.jpg

PAPI3.jpg


Here's the code for the white light:
Code:
SEPARATION_PLANE nolgt_2, 0,32736,1429, 32767
BGL_LIGHT LIGHT_NAV, -13.500, 0.600, 0.100, 0, 0.0, 0.0, 000FFFFFFh, 0.0, 0.0, 0.0
nolgt_2 label BGLCODE
... and the red:
Code:
SEPARATION_PLANE nolgt_6, 0,-32736,-1429, 32767
BGL_LIGHT LIGHT_NAV, -13.500, 0.600, 0.100, 0, 0.0, 0.0, 000FF0000h, 0.0, 0.0, 0.0
nolgt_6 label BGLCODE

So, then it's just a matter of repeating the process for the other 3 lights. Of course, this only worked for the left hand side of runway 36, and I needed to complete the process another 3 times for the other PAPIs. This meant recalculating, and trying not to get things mixed up, and more than once, I had to stop and do "Karate" with my hands in the air as I simulated the seperation planes in my mind. Even then, I got it mixed up somehow, and my runway 18 PAPIs somehow got mixed up - an easy fix.

Here's the entire code for this one PAPI - I based the macro off of one of Dick's BGL_Light tutorials - thanks again, Dick.

Code:
db 'R','I','F','F'
dd bgl_data_end - $ - 4
db 'M','D','L','9'

db 'M','D','L','H'
dd visual_model_header_end - $ - 4
dd visual_model_header_end - $ - 4
dd 0
dd 0
dd 2
dd 0
dd 0
dd 156
db 'F','S','8','0'
dd 2304
visual_model_header_end label dword

db 'B','B','O','X' 
dd bounding_box_riff_end - $ - 4
real4 -100.000, -100.000, -100.000 
real4 100.000, 100.000, 100.000 
bounding_box_riff_end label word 

db 'E','X','T','E' 
dd exterior_riff_end_0 - $ - 4
db 'B','G','L',' '
dd bgl_riff_end_DicksLight - $ - 4

;first check - are we even on the right side to see the lights?
SEPARATION_PLANE nolgt_1, 0,0,-32767, 32767

    ;white lights
    SEPARATION_PLANE nolgt_2, 0,32736,1429, 32767
        BGL_LIGHT LIGHT_NAV, -13.500, 0.600, 0.100, 0, 0.0, 0.0, 000FFFFFFh, 0.0, 0.0, 0.0
    nolgt_2 label BGLCODE
    SEPARATION_PLANE nolgt_3, 0,32727,1618, 32767
        BGL_LIGHT LIGHT_NAV, -4.500, 0.600, 0.100, 0, 0.0, 0.0, 000FFFFFFh, 0.0, 0.0, 0.0
    nolgt_3 label BGLCODE
    SEPARATION_PLANE nolgt_4, 0,32717,1812, 32767
        BGL_LIGHT LIGHT_NAV, 4.500, 0.600, 0.100, 0, 0.0, 0.0, 000FFFFFFh, 0.0, 0.0, 0.0
    nolgt_4 label BGLCODE
    SEPARATION_PLANE nolgt_5, 0,32706,2000, 32767
        BGL_LIGHT LIGHT_NAV, 13.500, 0.600, 0.100, 0, 0.0, 0.0, 000FFFFFFh, 0.0, 0.0, 0.0
    nolgt_5 label BGLCODE

    ;red lights
    SEPARATION_PLANE nolgt_6, 0,-32736,-1429, 32767
        BGL_LIGHT LIGHT_NAV, -13.500, 0.600, 0.100, 0, 0.0, 0.0, 000FF0000h, 0.0, 0.0, 0.0
    nolgt_6 label BGLCODE
    SEPARATION_PLANE nolgt_7, 0,-32727,-1618, 32767
        BGL_LIGHT LIGHT_NAV, -4.500, 0.600, 0.100, 0, 0.0, 0.0, 000FF0000h, 0.0, 0.0, 0.0
    nolgt_7 label BGLCODE
    SEPARATION_PLANE nolgt_8, 0,-32717,-1812, 32767
        BGL_LIGHT LIGHT_NAV, 4.500, 0.600, 0.100, 0, 0.0, 0.0, 000FF0000h, 0.0, 0.0, 0.0
    nolgt_8 label BGLCODE
    SEPARATION_PLANE nolgt_9, 0,-32706,-2000, 32767
        BGL_LIGHT LIGHT_NAV, 13.500, 0.600, 0.100, 0, 0.0, 0.0, 000FF0000h, 0.0, 0.0, 0.0
    nolgt_9 label BGLCODE

nolgt_1 label BGLCODE

bgl_riff_end_DicksLight label word
exterior_riff_end_0 label word
bgl_data_end label word

PAPI2.jpg

PAPI3.jpg

PAPI4.jpg

PAPI5.jpg

PAPI6.jpg


This isn't perfect. I find that at the transition, sometimes one light will simply go out, before the other one comes one. I blame this on the precision of the integers we are using. The effect is subtle, but it might bother the nitpickers out there. A solution would be to cause a small amount of overlap.... but I just can't be bothered. Also, the BGL lights aren't as visible at long range as are standard AFCAD-made PAPI lights. Again, you could probably add some more lights that would make it brighter, but I personally like the subtle effect it captures.

Everything in this macro was taken from these boards, mostly from Dick's BGL lighting article, and from various threads about the care and maintenance of the seperation plane. It was a bit of work for my to understand this, but once I got it working, it felt like I had just pulled off some sort of magic trick. There might be an easier way to do this, but I'm pretty happy with it this way.

- Martin
 
Last edited:
Very good thx :) i'm working on the same method and i'm also planning a program where you have to add the runway headings, glidslope and it automatically calculate the vectors for separation plane. If it will be ready maybe it creates also the asm code so you have to do nothing :) but first of all i have to get it work. I'll try the method tomorrow.
 
You dont need to have two sep_planes for each light.
If you are above the plane you see the white light, if not you see the red light.
The code should be something like this:
Code:
;first check - are we even on the right side to see the lights?
SEPARATION_PLANE nolgt_1, 0,0,-32767, 32767

    SEPARATION_PLANE nolgt_2, 0,32736,1429, 32767
    ;white light
        BGL_LIGHT LIGHT_NAV, -13.500, 0.600, 0.100, 0, 0.0, 0.0, 000FFFFFFh, 0.0, 0.0, 0.0
    ;skip the red light if the white is used
    BGL_JUMP_32 nolgt_21
    nolgt_2 label BGLCODE
    ;red light
        BGL_LIGHT LIGHT_NAV, -13.500, 0.600, 0.100, 0, 0.0, 0.0, 000FF0000h, 0.0, 0.0, 0.0

    nolgt_21 label BGLCODE
    SEPARATION_PLANE nolgt_3, 0,32727,1618, 32767
    ;white light
        BGL_LIGHT LIGHT_NAV, -4.500, 0.600, 0.100, 0, 0.0, 0.0, 000FFFFFFh, 0.0, 0.0, 0.0
    BGL_JUMP_32 nolgt_31
    nolgt_3 label BGLCODE
    ;red light
        BGL_LIGHT LIGHT_NAV, -4.500, 0.600, 0.100, 0, 0.0, 0.0, 000FF0000h, 0.0, 0.0, 0.0

    nolgt_31 label BGLCODE
    SEPARATION_PLANE nolgt_4, 0,32717,1812, 32767
    ;white light
        BGL_LIGHT LIGHT_NAV, 4.500, 0.600, 0.100, 0, 0.0, 0.0, 000FFFFFFh, 0.0, 0.0, 0.0
    BGL_JUMP_32 nolgt_41
    nolgt_4 label BGLCODE
    ;red light
        BGL_LIGHT LIGHT_NAV, 4.500, 0.600, 0.100, 0, 0.0, 0.0, 000FF0000h, 0.0, 0.0, 0.0

    nolgt_41 label BGLCODE
    SEPARATION_PLANE nolgt_5, 0,32706,2000, 32767
    ;white light
        BGL_LIGHT LIGHT_NAV, 13.500, 0.600, 0.100, 0, 0.0, 0.0, 000FFFFFFh, 0.0, 0.0, 0.0
    BGL_JUMP_32 nolgt_51
    nolgt_5 label BGLCODE
    ;red light
        BGL_LIGHT LIGHT_NAV, 13.500, 0.600, 0.100, 0, 0.0, 0.0, 000FF0000h, 0.0, 0.0, 0.0

    nolgt_51 label BGLCODE
nolgt_1 label BGLCODE
 
knnygar said:
You dont need to have two sep_planes for each light.
If you are above the plane you see the white light, if not you see the red light.

You're right - I only did it this way to keep it easy for me to understand, but I could have used fewer seperation_plane commands.

- Martin
 
Hi guys,

I see that you are working well through this item.
I am a newbie and if I see those codes, I even don't know where I should put them en how to work with it. Maybe some more explanation for non specialists ?
I have meanwhile nearly achieved my first airport design (see further: Ostend, EBOS/OST Belgium) and use the AFW approach lights. This scenery is rather become heavy and detailed and fear that no much more objects to place is advisable.

Keep up the good faith. José. :)
 
Hello again,

i tried what you suggested and i have successfully made a workable PAPI :) but just for left side. To make the right side PAPI i inverted the separation plane vectors at the lights and it works but a bit different from the left side papi. I'm sure that i don't changed the vectors correctly please help me a guru :)

Here is the original code:

Code:
;first check - are we even on the right side to see the lights?
SEPARATION_PLANE nolgt_1, 0,0,-32767, 32767

    SEPARATION_PLANE nolgt_2, [SIZE=3][B]0,32736,1429, 32767[/B][/SIZE]
    ;white light
        BGL_LIGHT LIGHT_NAV, -13.500, 0.600, 0.100, 0, 0.0, 0.0, 000FFFFFFh, 0.0, 0.0, 0.0
    ;skip the red light if the white is used
    BGL_JUMP_32 nolgt_21
    nolgt_2 label BGLCODE
    ;red light
        BGL_LIGHT LIGHT_NAV, -13.500, 0.600, 0.100, 0, 0.0, 0.0, 000FF0000h, 0.0, 0.0, 0.0

    nolgt_21 label BGLCODE
    SEPARATION_PLANE nolgt_3, [SIZE=3][B]0,32727,1618, 32767[/B][/SIZE]
    ;white light
        BGL_LIGHT LIGHT_NAV, -4.500, 0.600, 0.100, 0, 0.0, 0.0, 000FFFFFFh, 0.0, 0.0, 0.0
    BGL_JUMP_32 nolgt_31
    nolgt_3 label BGLCODE
    ;red light
        BGL_LIGHT LIGHT_NAV, -4.500, 0.600, 0.100, 0, 0.0, 0.0, 000FF0000h, 0.0, 0.0, 0.0

    nolgt_31 label BGLCODE
    SEPARATION_PLANE nolgt_4, [SIZE=3][B]0,32717,1812, 32767[/B][/SIZE]
    ;white light
        BGL_LIGHT LIGHT_NAV, 4.500, 0.600, 0.100, 0, 0.0, 0.0, 000FFFFFFh, 0.0, 0.0, 0.0
    BGL_JUMP_32 nolgt_41
    nolgt_4 label BGLCODE
    ;red light
        BGL_LIGHT LIGHT_NAV, 4.500, 0.600, 0.100, 0, 0.0, 0.0, 000FF0000h, 0.0, 0.0, 0.0

    nolgt_41 label BGLCODE
    SEPARATION_PLANE nolgt_5, [SIZE=3][B]0,32706,2000, 32767[/B][/SIZE]
    ;white light
        BGL_LIGHT LIGHT_NAV, 13.500, 0.600, 0.100, 0, 0.0, 0.0, 000FFFFFFh, 0.0, 0.0, 0.0
    BGL_JUMP_32 nolgt_51
    nolgt_5 label BGLCODE
    ;red light
        BGL_LIGHT LIGHT_NAV, 13.500, 0.600, 0.100, 0, 0.0, 0.0, 000FF0000h, 0.0, 0.0, 0.0

    nolgt_51 label BGLCODE
nolgt_1 label BGLCODE

And here is what i did:

Code:
;first check - are we even on the right side to see the lights?
SEPARATION_PLANE nolgt_1, 0,0,-32767, 32767

    SEPARATION_PLANE nolgt_2, [SIZE=3][B][COLOR=Red]0,32706,2000, 32767[/COLOR][/B][/SIZE]
    ;white light
        BGL_LIGHT LIGHT_NAV, -13.500, 0.600, 0.100, 0, 0.0, 0.0, 000FFFFFFh, 0.0, 0.0, 0.0
    ;skip the red light if the white is used
    BGL_JUMP_32 nolgt_21
    nolgt_2 label BGLCODE
    ;red light
        BGL_LIGHT LIGHT_NAV, -13.500, 0.600, 0.100, 0, 0.0, 0.0, 000FF0000h, 0.0, 0.0, 0.0

    nolgt_21 label BGLCODE
    SEPARATION_PLANE nolgt_3, [SIZE=3][B][COLOR=Red]0,32717,1812, 32767[/COLOR][/B][/SIZE]
    ;white light
        BGL_LIGHT LIGHT_NAV, -4.500, 0.600, 0.100, 0, 0.0, 0.0, 000FFFFFFh, 0.0, 0.0, 0.0
    BGL_JUMP_32 nolgt_31
    nolgt_3 label BGLCODE
    ;red light
        BGL_LIGHT LIGHT_NAV, -4.500, 0.600, 0.100, 0, 0.0, 0.0, 000FF0000h, 0.0, 0.0, 0.0

    nolgt_31 label BGLCODE
    SEPARATION_PLANE nolgt_4, [SIZE=3][B][COLOR=Red]0,32727,1618, 32767[/COLOR][/B][/SIZE]
    ;white light
        BGL_LIGHT LIGHT_NAV, 4.500, 0.600, 0.100, 0, 0.0, 0.0, 000FFFFFFh, 0.0, 0.0, 0.0
    BGL_JUMP_32 nolgt_41
    nolgt_4 label BGLCODE
    ;red light
        BGL_LIGHT LIGHT_NAV, 4.500, 0.600, 0.100, 0, 0.0, 0.0, 000FF0000h, 0.0, 0.0, 0.0

    nolgt_41 label BGLCODE
    SEPARATION_PLANE nolgt_5, [SIZE=3][B][COLOR=Red]0,32736,1429, 32767[/COLOR][/B][/SIZE]
    ;white light
        BGL_LIGHT LIGHT_NAV, 13.500, 0.600, 0.100, 0, 0.0, 0.0, 000FFFFFFh, 0.0, 0.0, 0.0
    BGL_JUMP_32 nolgt_51
    nolgt_5 label BGLCODE
    ;red light
        BGL_LIGHT LIGHT_NAV, 13.500, 0.600, 0.100, 0, 0.0, 0.0, 000FF0000h, 0.0, 0.0, 0.0

    nolgt_51 label BGLCODE
nolgt_1 label BGLCODE
 

Attachments

  • papi_error.jpg
    papi_error.jpg
    37 KB · Views: 616
Why would you not use the same code for the left and the right side? I would say that should work fine, as they both have the same heading.
 
No. The left side PAPIs lights switch to red from the right side. The right side PAPIs start to switch red from the left side when you are under the glideslope. But i tried the same code as well but they don't change the colors together.
 
That is weird, I would not expect that the vector change due to this. If the lights change colors in a different order, you only have to apply the SEPERATION_PLANE commands in a different order, but the vectors should remain the same. They only depend on the runway heading and the glide slope angle. These two should be the same for both sides of the runway of course :).
 
Where is your refpoint (0,0,0 in Gmax)?

If this point is at the centerline of the runway it should not be a problem to place the lights on either side of the runway.
 
There seems to be a little confusion here. Maybe there is a better way of doing this, and part of what we do here is improve on each other's work. I'm all in favour of finding better ways to do things.

To start with, it is important to remember that there are four seperate objects - one for each set of PAPI lights, left and right of each runway end. The left side lights at runway 36 are a seperate object from the right side lights at runway 36. The reason we can not use the same object is that the lights change from red to white in reverse order. We can't use the same code because it will simply look wrong.

If there's a better way to do this (as knnygar showed us) then I am all in favour of adopting this instead.

The second question is where our ref point in GMAX i. Well, there is none, since the object wasn't created in GMAX - it was hand coded. The physical object that houses the PAPI lights was created as a standard GMAX/FSDS3 object, but the lights themselves are a seperate object. I just found it easier to do it this way. I made a note in GMAX as to the elevation and seperation form the centerline each light would be, and then I placed them within my maco as BGL lights. Since each BGL light has it's own seperation plane, there is no need to calculate the offset from the reference point. The reference point for each light is 0,0,0. This seems to work fine.

Like I said, if there's a better way of doing this, I would like to know. I am always interested in learning how other people have tackled the same problems that I have.


- Martin
 
Shakakoz said:
Since each BGL light has it's own seperation plane, there is no need to calculate the offset from the reference point. The reference point for each light is 0,0,0. This seems to work fine.
The separation_plane is placed at the coordinates given in the xml file, it does not follow the bgl_light point.
All the separation planes in your file are placed at the same place.
 
knnygar said:
The separation_plane is placed at the coordinates given in the xml file, it does not follow the bgl_light point.
All the separation planes in your file are placed at the same place.

Ah yes, my mistake. Only the BGL lights themselves are offset. In any case, the reference point is not the centerline of the runway, but it is actually in the center of the PAPI lights. I could have created the left and right sides together as one object instead of two, but it was just easier for me when I created it to do it this way. Also, not all runways have PAPI on both sides, and I might want to reuse this one day.

- Martin
 
arno said:
That is weird, I would not expect that the vector change due to this. If the lights change colors in a different order, you only have to apply the SEPERATION_PLANE commands in a different order, but the vectors should remain the same. They only depend on the runway heading and the glide slope angle. These two should be the same for both sides of the runway of course :).


Yeah, i actually don't changed the vectors, i have just commuted them. But they don't change their colors together. The runway heading is the same and everything are the same as you can see in the code but maybe i coded something wrong. Is it normal that when i faceing to the PAPIs and moveing from left to the right or from right to left the lights change their colors like when i move above or under the glideslope? Its a bit strange. The left and right side papis are separated so they are in different gmax files but the models are together with BGL lights. They compiled with FS2004 gamepack and placed with object placer xml.

papi_error2.jpg
 
Back
Top