• 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.

Separation_plane

Hi you all!
I' ve just completed my custom ground, so I've started making runway and lights. Everything was ok until I met the SEPARATION_PLANE...
My goal is to make those double sided lights at both end of the runway (something like this http://www.lambert-pmo.org/photogallery/Timeless/sunlight1105.gif)
In a graphical representation, I made this BGL_LIGHT with gmax

GGGGGGG !!! view_rwy_18
RRRRRRR
|
|
|
.........
|
|
|
RRRRRRR
GGGGGGG !!! view_rwy_36

G stands for a green light , R stands for a red light . As you can see, green lights should point out of the runway, and red lights should point to the middle of the runway.
Mmmm...time to code something down!

Code:
LIDT_luci_testate_Alpha label BGLCODE

SEPARATION_PLANE view_rwy_36, 0, 0, -32767, -19987870
    ; green lights on runway edge 36
    BGL_LIGHT LIGHT_NAV, 160.442, 0.000, -1208.032, 20, 0.60, 0.40, 0FF00B900h, 0.000000, 0.000000, 1.000000 ; source poly num = 8
    BGL_LIGHT LIGHT_NAV, 172.442, 0.000, -1208.032, 20, 0.60, 0.40, 0FF00B900h, 0.000000, 0.000000, 1.000000 ; source poly num = 9
    BGL_LIGHT LIGHT_NAV, 184.442, 0.000, -1208.032, 20, 0.60, 0.40, 0FF00B900h, 0.000000, 0.000000, 1.000000 ; source poly num = 10
    BGL_LIGHT LIGHT_NAV, 196.442, 0.000, -1208.032, 20, 0.60, 0.40, 0FF00B900h, 0.000000, 0.000000, 1.000000 ; source poly num = 11
    BGL_LIGHT LIGHT_NAV, 208.442, 0.000, -1208.032, 20, 0.60, 0.40, 0FF00B900h, 0.000000, 0.000000, 1.000000 ; source poly num = 12
    BGL_LIGHT LIGHT_NAV, 220.442, 0.000, -1208.032, 20, 0.60, 0.40, 0FF00B900h, 0.000000, 0.000000, 1.000000 ; source poly num = 13
    BGL_LIGHT LIGHT_NAV, 148.442, 0.000, -1208.032, 20, 0.60, 0.40, 0FF00B900h, 0.000000, 0.000000, 1.000000 ; source poly num = 14
; red lights on runway edge 18 
    BGL_LIGHT LIGHT_NAV, 160.442, 0.000, 1252.444, 20, 0.60, 0.40, 0FFFD0000h, 0.000000, 0.000000, 1.000000 ; source poly num = 15
    BGL_LIGHT LIGHT_NAV, 172.442, 0.000, 1252.444, 20, 0.60, 0.40, 0FFFD0000h, 0.000000, 0.000000, 1.000000 ; source poly num = 16
    BGL_LIGHT LIGHT_NAV, 184.442, 0.000, 1252.444, 20, 0.60, 0.40, 0FFFD0000h, 0.000000, 0.000000, 1.000000 ; source poly num = 17
    BGL_LIGHT LIGHT_NAV, 196.442, 0.000, 1252.444, 20, 0.60, 0.40, 0FFFD0000h, 0.000000, 0.000000, 1.000000 ; source poly num = 18
    BGL_LIGHT LIGHT_NAV, 208.442, 0.000, 1252.444, 20, 0.60, 0.40, 0FFFD0000h, 0.000000, 0.000000, 1.000000 ; source poly num = 19
    BGL_LIGHT LIGHT_NAV, 220.442, 0.000, 1252.444, 20, 0.60, 0.40, 0FFFD0000h, 0.000000, 0.000000, 1.000000 ; source poly num = 20
    BGL_LIGHT LIGHT_NAV, 148.442, 0.000, 1252.444, 20, 0.60, 0.40, 0FFFD0000h, 0.000000, 0.000000, 1.000000 ; source poly num = 21
view_rwy_36       label BGLCODE
SEPARATION_PLANE view_rwy_18, 0, 0, 32767, 20807045
; green lights on runway edge 18
    BGL_LIGHT LIGHT_NAV, 172.442, 0.000, 1255.012, 20, 0.60, 0.40, 0FF00B900h, 0.000000, 0.000000, 1.000000 ; source poly num = 22
    BGL_LIGHT LIGHT_NAV, 184.442, 0.000, 1255.012, 20, 0.60, 0.40, 0FF00B900h, 0.000000, 0.000000, 1.000000 ; source poly num = 23
    BGL_LIGHT LIGHT_NAV, 196.442, 0.000, 1255.012, 20, 0.60, 0.40, 0FF00B900h, 0.000000, 0.000000, 1.000000 ; source poly num = 24
    BGL_LIGHT LIGHT_NAV, 208.442, 0.000, 1255.012, 20, 0.60, 0.40, 0FF00B900h, 0.000000, 0.000000, 1.000000 ; source poly num = 25
    BGL_LIGHT LIGHT_NAV, 220.442, 0.000, 1255.012, 20, 0.60, 0.40, 0FF00B900h, 0.000000, 0.000000, 1.000000 ; source poly num = 26
    BGL_LIGHT LIGHT_NAV, 148.442, 0.000, 1255.012, 20, 0.60, 0.40, 0FF00B900h, 0.000000, 0.000000, 1.000000 ; source poly num = 27
    BGL_LIGHT LIGHT_NAV, 160.442, 0.000, 1255.012, 20, 0.60, 0.40, 0FF00B900h, 0.000000, 0.000000, 1.000000 ; source poly num = 28
; red lights on runway edge 36
    BGL_LIGHT LIGHT_NAV, 148.442, 0.000, -1205.843, 20, 0.60, 0.40, 0FFFD0000h, 0.000000, 0.000000, 1.000000 ; source poly num = 1
    BGL_LIGHT LIGHT_NAV, 160.442, 0.000, -1205.843, 20, 0.60, 0.40, 0FFFD0000h, 0.000000, 0.000000, 1.000000 ; source poly num = 2
    BGL_LIGHT LIGHT_NAV, 172.442, 0.000, -1205.843, 20, 0.60, 0.40, 0FFFD0000h, 0.000000, 0.000000, 1.000000 ; source poly num = 3
    BGL_LIGHT LIGHT_NAV, 184.442, 0.000, -1205.843, 20, 0.60, 0.40, 0FFFD0000h, 0.000000, 0.000000, 1.000000 ; source poly num = 4
    BGL_LIGHT LIGHT_NAV, 196.442, 0.000, -1205.843, 20, 0.60, 0.40, 0FFFD0000h, 0.000000, 0.000000, 1.000000 ; source poly num = 5
    BGL_LIGHT LIGHT_NAV, 208.442, 0.000, -1205.843, 20, 0.60, 0.40, 0FFFD0000h, 0.000000, 0.000000, 1.000000 ; source poly num = 6
    BGL_LIGHT LIGHT_NAV, 220.442, 0.000, -1205.843, 20, 0.60, 0.40, 0FFFD0000h, 0.000000, 0.000000, 1.000000 ; source poly num = 7
view_rwy_18       label BGLCODE
    BGL_END
    BGL_RETURN

I've attached a pict of my gmax project

some problems:
-flying north lights switch from view_rwy_36 block to view_rwy_18 about 100 meters before the end of the runway (instead of AT the end)
-flying south lights shitch from view_rwy_18 to view_rwy_36 block near the middle of the runway (where the ref point is)
secondary problem:
how to display the red lights only, at both end of the runway, while I'm between the two separation planes?

Thx in advance for your help!
 

Attachments

  • separation_plane.gif
    separation_plane.gif
    7.5 KB · Views: 485

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Hi,

I think this code should work:

Code:
LIDT_luci_testate_Alpha label BGLCODE

SEPARATION_PLANE view_rwy_36_red, 0, 0, -32767, 39584793
    ; green lights on runway edge 36
    BGL_LIGHT LIGHT_NAV, 160.442, 0.000, -1208.032, 20, 0.60, 0.40, 0FF00B900h, 0.000000, 0.000000, 1.000000 ; source poly num = 8
    BGL_LIGHT LIGHT_NAV, 172.442, 0.000, -1208.032, 20, 0.60, 0.40, 0FF00B900h, 0.000000, 0.000000, 1.000000 ; source poly num = 9
    BGL_LIGHT LIGHT_NAV, 184.442, 0.000, -1208.032, 20, 0.60, 0.40, 0FF00B900h, 0.000000, 0.000000, 1.000000 ; source poly num = 10
    BGL_LIGHT LIGHT_NAV, 196.442, 0.000, -1208.032, 20, 0.60, 0.40, 0FF00B900h, 0.000000, 0.000000, 1.000000 ; source poly num = 11
    BGL_LIGHT LIGHT_NAV, 208.442, 0.000, -1208.032, 20, 0.60, 0.40, 0FF00B900h, 0.000000, 0.000000, 1.000000 ; source poly num = 12
    BGL_LIGHT LIGHT_NAV, 220.442, 0.000, -1208.032, 20, 0.60, 0.40, 0FF00B900h, 0.000000, 0.000000, 1.000000 ; source poly num = 13
    BGL_LIGHT LIGHT_NAV, 148.442, 0.000, -1208.032, 20, 0.60, 0.40, 0FF00B900h, 0.000000, 0.000000, 1.000000 ; source poly num = 14
    BGL_JUMP32 rwy18
view_rwy_36_red label word
    BGL_LIGHT LIGHT_NAV, 148.442, 0.000, -1205.843, 20, 0.60, 0.40, 0FFFD0000h, 0.000000, 0.000000, 1.000000 ; source poly num = 1
    BGL_LIGHT LIGHT_NAV, 160.442, 0.000, -1205.843, 20, 0.60, 0.40, 0FFFD0000h, 0.000000, 0.000000, 1.000000 ; source poly num = 2
    BGL_LIGHT LIGHT_NAV, 172.442, 0.000, -1205.843, 20, 0.60, 0.40, 0FFFD0000h, 0.000000, 0.000000, 1.000000 ; source poly num = 3
    BGL_LIGHT LIGHT_NAV, 184.442, 0.000, -1205.843, 20, 0.60, 0.40, 0FFFD0000h, 0.000000, 0.000000, 1.000000 ; source poly num = 4
    BGL_LIGHT LIGHT_NAV, 196.442, 0.000, -1205.843, 20, 0.60, 0.40, 0FFFD0000h, 0.000000, 0.000000, 1.000000 ; source poly num = 5
    BGL_LIGHT LIGHT_NAV, 208.442, 0.000, -1205.843, 20, 0.60, 0.40, 0FFFD0000h, 0.000000, 0.000000, 1.000000 ; source poly num = 6
    BGL_LIGHT LIGHT_NAV, 220.442, 0.000, -1205.843, 20, 0.60, 0.40, 0FFFD0000h, 0.000000, 0.000000, 1.000000 ; source poly num = 7

rwy18 label word
SEPARATION_PLANE view_rwy_18_red, 0, 0, 32767, 41040085
    ; green lights on runway edge 18
    BGL_LIGHT LIGHT_NAV, 172.442, 0.000, 1255.012, 20, 0.60, 0.40, 0FF00B900h, 0.000000, 0.000000, 1.000000 ; source poly num = 22
    BGL_LIGHT LIGHT_NAV, 184.442, 0.000, 1255.012, 20, 0.60, 0.40, 0FF00B900h, 0.000000, 0.000000, 1.000000 ; source poly num = 23
    BGL_LIGHT LIGHT_NAV, 196.442, 0.000, 1255.012, 20, 0.60, 0.40, 0FF00B900h, 0.000000, 0.000000, 1.000000 ; source poly num = 24
    BGL_LIGHT LIGHT_NAV, 208.442, 0.000, 1255.012, 20, 0.60, 0.40, 0FF00B900h, 0.000000, 0.000000, 1.000000 ; source poly num = 25
    BGL_LIGHT LIGHT_NAV, 220.442, 0.000, 1255.012, 20, 0.60, 0.40, 0FF00B900h, 0.000000, 0.000000, 1.000000 ; source poly num = 26
    BGL_LIGHT LIGHT_NAV, 148.442, 0.000, 1255.012, 20, 0.60, 0.40, 0FF00B900h, 0.000000, 0.000000, 1.000000 ; source poly num = 27
    BGL_LIGHT LIGHT_NAV, 160.442, 0.000, 1255.012, 20, 0.60, 0.40, 0FF00B900h, 0.000000, 0.000000, 1.000000 ; source poly num = 28
    BGL_JUMP_32 rwy_end
view_rwy18_red label word    
    ; red lights on runway edge 18
    BGL_LIGHT LIGHT_NAV, 160.442, 0.000, 1252.444, 20, 0.60, 0.40, 0FFFD0000h, 0.000000, 0.000000, 1.000000 ; source poly num = 15
    BGL_LIGHT LIGHT_NAV, 172.442, 0.000, 1252.444, 20, 0.60, 0.40, 0FFFD0000h, 0.000000, 0.000000, 1.000000 ; source poly num = 16
    BGL_LIGHT LIGHT_NAV, 184.442, 0.000, 1252.444, 20, 0.60, 0.40, 0FFFD0000h, 0.000000, 0.000000, 1.000000 ; source poly num = 17
    BGL_LIGHT LIGHT_NAV, 196.442, 0.000, 1252.444, 20, 0.60, 0.40, 0FFFD0000h, 0.000000, 0.000000, 1.000000 ; source poly num = 18
    BGL_LIGHT LIGHT_NAV, 208.442, 0.000, 1252.444, 20, 0.60, 0.40, 0FFFD0000h, 0.000000, 0.000000, 1.000000 ; source poly num = 19
    BGL_LIGHT LIGHT_NAV, 220.442, 0.000, 1252.444, 20, 0.60, 0.40, 0FFFD0000h, 0.000000, 0.000000, 1.000000 ; source poly num = 20
    BGL_LIGHT LIGHT_NAV, 148.442, 0.000, 1252.444, 20, 0.60, 0.40, 0FFFD0000h, 0.000000, 0.000000, 1.000000 ; source poly num = 21

rwy_end label word

    BGL_END
    BGL_RETURN
 
Yes, it does!

well, my BGLG doesn't know the BGL JUMP32 command, but a simple JUMP works great! (JUMP32 was scasm, wasn't it?)

a few thoughts (for a wiki tutorial maybe?):
- the last parameter in the SEPARATION_PLANE command must be positive
- its value has nothing to do with the 'vector' i put in my gmax picture. It is simply the distance between 0,0 and the object, on Y axis, multiplied by 32767 (wich is the fourth parameter in the BGL_LIGHT command)
- the FS2002 compiler doubles all the coordinates you read in gmax :scratchch

Thank you again Arno! I should put a poster with your avatatar's pict into one of my hangers!
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Hi,

well, my BGLG doesn't know the BGL JUMP32 command, but a simple JUMP works great! (JUMP32 was scasm, wasn't it?)

It is better to use BGL_JUMP_32, as the BGL_JUMP command can only jump over a smaller amount of data (16 vs 32 bit addresses used for the jump destination). But it is BGL_JUMP_32 and not BGL_JUMP32.

- the last parameter in the SEPARATION_PLANE command must be positive

No, it does not have to be. It is the length of your vector and it could be negative, but it is easier to just define the normal direction the other way around in that case (which are the three parameters before the length).

- its value has nothing to do with the 'vector' i put in my gmax picture. It is simply the distance between 0,0 and the object, on Y axis, multiplied by 32767 (wich is the fourth parameter in the BGL_LIGHT command)

It is the length of the vector. Because in your case you are interested in a vector that has the direction of your runway, it only has a component in one direction and the length is the distance to your lights along the runway. If your runway would not be orientated north-south, more math would be needed.

- the FS2002 compiler doubles all the coordinates you read in gmax :scratchch

Yes, the Fs2002 MakeMDL always uses a reference point scale of 0.5 for the objects. That means that all coordinates are doubled.
 
Top