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

Messages
180
Country
us-california
Alright, I have been working on a MALSR light system for a scenery I am working on. However, I have run into an issue when it comes to the Separation_Plane's.

For some reason, the lights don't go off as I fly over them. I thought I had set the planes up right, but it seems that I might have done my vector calculations wrong (Vector x displacement...I have no clue where I came up with that).

Here is my code:

Code:
SEPARATION_PLANE nolght_1, -30792, 0, -11207, -3996811							
    BGL_LIGHT LIGHT_NAV, 7.848, 1.577, 121.973, 20, 0.60, 0.40, 0FFF6F5D3h, 0.000000, 0.000000, 1.000000 ; source poly num = 2
    BGL_LIGHT LIGHT_NAV, 8.533, 1.577, 121.973, 20, 0.60, 0.40, 0FFF6F5D3h, 0.000000, 0.000000, 1.000000 ; source poly num = 3
    BGL_LIGHT LIGHT_NAV, 9.263, 1.577, 121.973, 20, 0.60, 0.40, 0FFF6F5D3h, 0.000000, 0.000000, 1.000000 ; source poly num = 4
    BGL_LIGHT LIGHT_NAV, 9.959, 1.577, 121.973, 20, 0.60, 0.40, 0FFF6F5D3h, 0.000000, 0.000000, 1.000000 ; source poly num = 5
    BGL_LIGHT LIGHT_NAV, 7.130, 1.577, 121.973, 20, 0.60, 0.40, 0FFF6F5D3h, 0.000000, 0.000000, 1.000000 ; source poly num = 6
    BGL_LIGHT LIGHT_NAV, -9.234, 1.577, 121.973, 20, 0.60, 0.40, 0FFF6F5D3h, 0.000000, 0.000000, 1.000000 ; source poly num = 7
    BGL_LIGHT LIGHT_NAV, -8.549, 1.577, 121.973, 20, 0.60, 0.40, 0FFF6F5D3h, 0.000000, 0.000000, 1.000000 ; source poly num = 8
    BGL_LIGHT LIGHT_NAV, -7.819, 1.577, 121.973, 20, 0.60, 0.40, 0FFF6F5D3h, 0.000000, 0.000000, 1.000000 ; source poly num = 9
    BGL_LIGHT LIGHT_NAV, -7.123, 1.577, 121.973, 20, 0.60, 0.40, 0FFF6F5D3h, 0.000000, 0.000000, 1.000000 ; source poly num = 10
    BGL_LIGHT LIGHT_NAV, -9.952, 1.577, 121.973, 20, 0.60, 0.40, 0FFF6F5D3h, 0.000000, 0.000000, 1.000000 ; source poly num = 11
    BGL_LIGHT LIGHT_NAV, -1.450, 1.577, 121.973, 20, 0.60, 0.40, 0FFF6F5D3h, 0.000000, 0.000000, 1.000000 ; source poly num = 32
    BGL_LIGHT LIGHT_NAV, 1.378, 1.577, 121.973, 20, 0.60, 0.40, 0FFF6F5D3h, 0.000000, 0.000000, 1.000000 ; source poly num = 33
    BGL_LIGHT LIGHT_NAV, 0.682, 1.577, 121.973, 20, 0.60, 0.40, 0FFF6F5D3h, 0.000000, 0.000000, 1.000000 ; source poly num = 34
    BGL_LIGHT LIGHT_NAV, -0.048, 1.577, 121.973, 20, 0.60, 0.40, 0FFF6F5D3h, 0.000000, 0.000000, 1.000000 ; source poly num = 35
    BGL_LIGHT LIGHT_NAV, -0.733, 1.577, 121.973, 20, 0.60, 0.40, 0FFF6F5D3h, 0.000000, 0.000000, 1.000000 ; source poly num = 36
nolght_1 label word

SEPARATION_PLANE nolght_2, -30792, 0, -11207, -11984372							
    BGL_LIGHT LIGHT_NAV, -1.450, 0.521, 365.734, 20, 0.60, 0.40, 0FFF6F5D3h, 0.000000, 0.000000, 1.000000 ; source poly num = 12
    BGL_LIGHT LIGHT_NAV, 1.378, 0.521, 365.734, 20, 0.60, 0.40, 0FFF6F5D3h, 0.000000, 0.000000, 1.000000 ; source poly num = 13
    BGL_LIGHT LIGHT_NAV, -0.733, 0.521, 365.734, 20, 0.60, 0.40, 0FFF6F5D3h, 0.000000, 0.000000, 1.000000 ; source poly num = 14
    BGL_LIGHT LIGHT_NAV, -0.048, 0.521, 365.734, 20, 0.60, 0.40, 0FFF6F5D3h, 0.000000, 0.000000, 1.000000 ; source poly num = 15
    BGL_LIGHT LIGHT_NAV, 0.682, 0.521, 365.734, 20, 0.60, 0.40, 0FFF6F5D3h, 0.000000, 0.000000, 1.000000 ; source poly num = 16
nolght_2 label word


SEPARATION_PLANE nolght_3, -30792, 0, -11207, -9988932
    BGL_LIGHT LIGHT_NAV, -1.450, 0.728, 304.838, 20, 0.60, 0.40, 0FFF6F5D3h, 0.000000, 0.000000, 1.000000 ; source poly num = 17
    BGL_LIGHT LIGHT_NAV, 1.378, 0.728, 304.838, 20, 0.60, 0.40, 0FFF6F5D3h, 0.000000, 0.000000, 1.000000 ; source poly num = 18
    BGL_LIGHT LIGHT_NAV, -0.733, 0.728, 304.838, 20, 0.60, 0.40, 0FFF6F5D3h, 0.000000, 0.000000, 1.000000 ; source poly num = 19
    BGL_LIGHT LIGHT_NAV, -0.048, 0.728, 304.838, 20, 0.60, 0.40, 0FFF6F5D3h, 0.000000, 0.000000, 1.000000 ; source poly num = 20
    BGL_LIGHT LIGHT_NAV, 0.682, 0.728, 304.838, 20, 0.60, 0.40, 0FFF6F5D3h, 0.000000, 0.000000, 1.000000 ; source poly num = 21
nolght_3 label word


SEPARATION_PLANE nolght_4, -30792, 0, -11207, -7993328
    BGL_LIGHT LIGHT_NAV, -1.450, 0.829, 243.937, 20, 0.60, 0.40, 0FFF6F5D3h, 0.000000, 0.000000, 1.000000 ; source poly num = 22
    BGL_LIGHT LIGHT_NAV, 1.378, 0.829, 243.937, 20, 0.60, 0.40, 0FFF6F5D3h, 0.000000, 0.000000, 1.000000 ; source poly num = 23
    BGL_LIGHT LIGHT_NAV, -0.733, 0.829, 243.937, 20, 0.60, 0.40, 0FFF6F5D3h, 0.000000, 0.000000, 1.000000 ; source poly num = 24
    BGL_LIGHT LIGHT_NAV, -0.048, 0.829, 243.937, 20, 0.60, 0.40, 0FFF6F5D3h, 0.000000, 0.000000, 1.000000 ; source poly num = 25
    BGL_LIGHT LIGHT_NAV, 0.682, 0.829, 243.937, 20, 0.60, 0.40, 0FFF6F5D3h, 0.000000, 0.000000, 1.000000 ; source poly num = 26
nolght_4 label word


SEPARATION_PLANE nolght_5, -30792, 0, -11207, -5998412
    BGL_LIGHT LIGHT_NAV, -1.450, 1.144, 183.057, 20, 0.60, 0.40, 0FFF6F5D3h, 0.000000, 0.000000, 1.000000 ; source poly num = 27
    BGL_LIGHT LIGHT_NAV, 1.378, 1.144, 183.057, 20, 0.60, 0.40, 0FFF6F5D3h, 0.000000, 0.000000, 1.000000 ; source poly num = 28
    BGL_LIGHT LIGHT_NAV, 0.682, 1.144, 183.057, 20, 0.60, 0.40, 0FFF6F5D3h, 0.000000, 0.000000, 1.000000 ; source poly num = 29
    BGL_LIGHT LIGHT_NAV, -0.733, 1.144, 183.057, 20, 0.60, 0.40, 0FFF6F5D3h, 0.000000, 0.000000, 1.000000 ; source poly num = 30
    BGL_LIGHT LIGHT_NAV, -0.048, 1.144, 183.057, 20, 0.60, 0.40, 0FFF6F5D3h, 0.000000, 0.000000, 1.000000 ; source poly num = 31
nolght_5 label word


SEPARATION_PLANE nolght_6, -30792, 0, -11207, -1995768
    BGL_LIGHT LIGHT_NAV, -1.450, 1.577, 60.906, 20, 0.60, 0.40, 0FFF6F5D3h, 0.000000, 0.000000, 1.000000 ; source poly num = 37
    BGL_LIGHT LIGHT_NAV, 1.378, 1.577, 60.906, 20, 0.60, 0.40, 0FFF6F5D3h, 0.000000, 0.000000, 1.000000 ; source poly num = 38
    BGL_LIGHT LIGHT_NAV, 0.682, 1.577, 60.906, 20, 0.60, 0.40, 0FFF6F5D3h, 0.000000, 0.000000, 1.000000 ; source poly num = 39
    BGL_LIGHT LIGHT_NAV, -0.048, 1.577, 60.906, 20, 0.60, 0.40, 0FFF6F5D3h, 0.000000, 0.000000, 1.000000 ; source poly num = 40
    BGL_LIGHT LIGHT_NAV, -0.733, 1.577, 60.906, 20, 0.60, 0.40, 0FFF6F5D3h, 0.000000, 0.000000, 1.000000 ; source poly num = 41
nolght_6 label word


SEPARATION_PLANE nolght_7, -30792, 0, -11207, 5145
    BGL_LIGHT LIGHT_NAV, -1.450, 1.577, -0.157, 20, 0.60, 0.40, 0FFF6F5D3h, 0.000000, 0.000000, 1.000000 ; source poly num = 42
    BGL_LIGHT LIGHT_NAV, -0.733, 1.577, -0.157, 20, 0.60, 0.40, 0FFF6F5D3h, 0.000000, 0.000000, 1.000000 ; source poly num = 43
    BGL_LIGHT LIGHT_NAV, 1.378, 1.577, -0.157, 20, 0.60, 0.40, 0FFF6F5D3h, 0.000000, 0.000000, 1.000000 ; source poly num = 44
    BGL_LIGHT LIGHT_NAV, 0.682, 1.577, -0.157, 20, 0.60, 0.40, 0FFF6F5D3h, 0.000000, 0.000000, 1.000000 ; source poly num = 45
    BGL_LIGHT LIGHT_NAV, -0.048, 1.577, -0.157, 20, 0.60, 0.40, 0FFF6F5D3h, 0.000000, 0.000000, 1.000000 ; source poly num = 46
nolght_7 label word

Any help is greatly appreciated...as custom with me, it is probably something really simple that I missed.

Merry Christmas, and happy holidays!
 
Hi David,

I did not check the math to calculate the X, Y positions, but what I noticed is that your length parameter (the last one) is negative. That would mean that the direction of the vector you determined with the XYZ coordinates is reversed again. Could that be the mistake?
 
Well, what was confusing to me was that when the value was positive, the lights turned on after I flew "past" them, which was not what they were supposed to do.

Here's both .asm files so that you can maybe see what happened with these lights.
 

Attachments

Hi,

If they turn of at the wrong side you need to flip both the normal vector and the length (so all 4 parameters).
 
Well I did that before, and the lights go off in the correct order, but I think I messed up the magnitude of the normal vector.

Let me try to explain the issue more clearly (sorry if I confuse you more)...

lightsissue.jpg


So the lights "turn off" in the correct order (1 > 2 > 3 > 4). However, the lights are supposed to turn off as the aircraft flies past them, but instead they turn off at the marked positions (1, A > 2, B> 3, C> 4, D). So as you can see, the position keeps getting further and further from the light it turns off. By the time you get to the end of the string of lights, you are practically halfway down the runway.

I got the magnitude of the normal by multiplying the displacement by the original normal (32767). I am not sure if I am doing that correctly, or if I am supposed to add 32767 + displacement.
 
Hi David,

Multiplying is normally correct, but is the line of your lights going through the origin of the scene? If that is not the case you can not simply take their distance to the origin as the length.
 
Well the lights do go through the middle of the scene, along the y-axis (in gmax). So what would I use instead of distance to origin?
 
Hi,

That looks good. But if they are aligned along the Y axis, why does your SEPARATION_PLANE command then have a normal vector that is not along this axis as well?
 
Well can I do that? The y-axis is pointing to 340 deg. where my object is placed...but if I make a separation_plane along the y, will that be perpendicular to the y-axis?

For this object, what would one of the separation planes be?
 
So it is not pointing along the global Y axis. Or do you mean you added a rotation on export?
 
And when placing it in the XML file? Because from the source code I do not see that 340 degree rotation you mention. But if you apply it in the XML you indeed need to take it into account for the SEPARATION_PLANE command.
 
On export, I did not add any rotation to the object, and I didn't in the XML either. So, by default, the object is oriented to 340.
 
Humm, that did not look what I saw in the ASM file. Maybe you can send me the GMax file to take a look at?
 
Hi David,

When I see the object, it is nicely rotated in the north south direction. So I have no idea where the heading of 340 comes from. If you do not enter any heading when placing the MDL object, then it seems to me the heading is 360 degrees and that is what should be used on the SEPARATION_PLANE command as well then.
 
Hey it worked! Thanks Arno.

Looks like you were right on the rotation, I was just confused on N/S in gmax, and magnetic headings in FS. Lights look great though.
 
Back
Top