plane icon Welcome to Microsoft Flight Simulator’s SDK Q&A Platform!

You have questions regarding the SDK? DevMode Tools? SimConnect? You would like to submit an idea for future improvements, seek help or exchange knowledge? You’re in the right place.

Please take a moment to read the platform’s guidelines before you get started!

question

WombiiActual avatar image
WombiiActual asked WombiiActual commented

Light presets: directional variables for custom VASI lights.

I'm trying to make a custom PLASI light using light presets, but the SDK documentation doesn't seem to be correct about the direction variables for UNIDIRECTIONAL, ANGLEDIRECTIONAL and DOUBLEANGLEDIRECTIONAL lights.

The SDK documentation claims the direction variables are X/Y/Z angles in degrees. My testing suggests the variables are instead coordinates of a point in the center of a cone or on a cutoff plane.

https://docs.flightsimulator.com/html/index.htm#t=Developer_Mode%2FScenery_Editor%2FObjects%2FAirport_Objects.htm

My testing:

UNIDIRECTIONAL:

  • Light cone is about 90 degrees wide
  • Position is position in meter, Y/Z/X with X along light row.
  • Direction is position in meter of a point in the center of the light cone. Y/Z/X with X along light row.

ANGLEDIRECTIONAL:

  • Light cone is about 90 degrees wide
  • Position and direction same as unidirectional.
  • Direction2 is position in meter of a point in the center of the cutoff plane. A/B/C with +B being the distance along center of cone, -C the elevation from center of light. A is the sideways direction which also has the effect of rotating the plane?

DOUBLEANGLEDIRECTIONAL:

  • Light cone is centered either due north or south depending on the direction of the light row. A bit less than 180 degrees wide.
  • Direction is position in meter of a point in the center of the lower cutoff plane. A/B/C. +B is direction along north/south. -C is elevation from center of light. A=?
  • Direction 2 is position in meter of a point in the center of the upper cutoff plane. A/B/C. -B is the direction along north/south (note negative). +C is elevation from center of light. A=?


My questions:

  1. Am I or the documentation or the sim wrong? Is it safe to use these light types or will direction variables be changed to degrees in a later update, breaking them?
  2. Is it possible to turn the DOUBLEANGLEDIRECTIONAL lights to another direction than north/south? And what does the A (first) of the direction variables do for DOUBLEANGLEDIRECTIONAL lights?
  3. Does anyone have an example of a custom VASI/PLASI light configured with light presets?
scenerydevmodelight
10 |10000 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

FlyingRaccoon avatar image
FlyingRaccoon answered WombiiActual commented

Hello Wombii.

Sorry for the delay, I needed some input from our scenery editor dev before I could answer.

- Obviously, the doc saying directions are in degrees is wrong. These are positions in meters. It will be fixed.

- For now the orientation of your LightPreset is done by orienting the LightRow you use it on. I guess the "Has heading" will play that role when it's functional.

- I don't witness the issue you're describing with period and duration adjustments. For exemple, setting a period to 2s and a duration to 1.5s gives the expected result. Are you still having this issue?

Regards,
Sylvain

5 comments
10 |10000 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

If I may, why are we using meters for an angular position? This seems hopelessly counterintuitive since lights in the real world are positioned based on a direction of light (i.e. angle of the light source itself).

0 Likes 0 ·

@FlyingRaccoon Thank you very much for the response.

1: Thanks for confirming the sim is correct and the docs will be updated.

2: DoubleAngleDirectional does not orient itself along the light row like the other lights. The lights are oriented either due north or due south based on if the lightrow points towards a northerly or southerly direction, and can not currently be rotated towards other directions. Unidirectional and angledirectional lights have headings relative to the lightrow like you say, but they also have a relative heading axis value we can set. For doubleangledirectional that value is used for the cutoff plane instead. Is it supposed to work like you describe, should I make a zendesk ticket for that?

I have a slightly related bug ticket open for the light preset mesh rotation being the opposite of what they should be (# 115855)

3: Duration works properly now, thank you!

0 Likes 0 ·

That's right, I thought rotating the object with gizmo was working but it doesn't.
LightPreset are still marked as WIP but I've bumped up the ticket so we don't forget about it.

Regards,
Sylvain

1 Like 1 ·

Could you clarify what the exact definition of "along the light row" for position means? Is the light row taken between the vertices or with respect to the gizmo alignment of the object itself?

For example, in my beautiful paint-sketch that's of course completely clear and not at all crowded (/sarcasm ;) ): the yellow line with red points is a lightrow I made by hand because I can't draw a straight line for the life of me.

Is the dotted blue line what's considered along the lightrow, or is it taken along the solid blue line?

ex.png

Also, it appears to be influenced by the magvar, is this correct?

0 Likes 0 ·
ex.png (47.9 KiB)

By along the light row, for the coordinate system for a unidirectional light, I mean relative to the yellow line between the red vertices. I don't know if it's influenced by magvar, as the airports I'm working on has a reasonably small magvar value.


Here's a lightrow with a unidirectional light with direction -1/0/0, drawn from left to right. The lights are rotated 90 degrees relative to the line between each point.

screenshot-2021-08-27-205859.jpg

1 Like 1 ·
WombiiActual avatar image
WombiiActual answered WombiiActual published

One more question: The lights can only do max 50% duty cycle when flashing, is that correct? For example: for a 2 second Period light any Duration over 1 second is ignored and limited to 1 second. Half time on/half time off. Shorter duration works, but not longer than half.


And to answer my own question number 3:

Here is a mostly working PLASI light preset with 3 flash intensities for the white flashing. The duration of the flash getting longer as you get closer to the glideslope. Unfortunately I can't find a way to rotate it other than due north or due south.

<LightPreset name="PLASI_A" phase="0.000000" mesh="{C8CCB5EB-8AEC-4C40-6855-44006D235CF6}">
<Light relativePosition="0.000000 0.700000 0.000000" direction="0.000000 10.000000 -1.300000" direction2="0.000000 -10.000000 10.000000" type="DOUBLEANGLEDIRECTIONAL" fade="NO_FADE" radius="40.000000" color="255 255 255" intensity="160.000000" duration="0.050000" period="0.600000" phase="0.500000"/>
<Light relativePosition="0.000000 0.700000 0.000000" direction="0.000000 10.000000 -0.817800" direction2="0.000000 -10.000000 1.300000" type="DOUBLEANGLEDIRECTIONAL" fade="NO_FADE" radius="30.000000" color="255 255 255" intensity="100.000000" duration="0.250000" period="0.600000" phase="0.270000"/>
<Light relativePosition="0.000000 0.700000 0.000000" direction="0.000000 10.000000 -0.817800" direction2="0.000000 -10.000000 1.000000" type="DOUBLEANGLEDIRECTIONAL" fade="NO_FADE" radius="30.000000" color="255 255 255" intensity="100.000000" duration="0.300000" period="0.600000" phase="0.000000"/>
<Light relativePosition="0.000000 0.700000 0.000000" direction="0.000000 10.000000 -0.756300" direction2="0.000000 -10.000000 0.817800" type="DOUBLEANGLEDIRECTIONAL" fade="NO_FADE" radius="20.000000" color="255 255 255" intensity="20.000000" duration="0.000000" period="0.000000" phase="0.000000"/>
<Light relativePosition="0.000000 0.700000 0.000000" direction="0.000000 10.000000 -0.725600" direction2="0.000000 -10.000000 0.756300" type="DOUBLEANGLEDIRECTIONAL" fade="NO_FADE" radius="20.000000" color="255 0 0" intensity="50.000000" duration="0.000000" period="0.000000" phase="0.000000"/>
<Light relativePosition="0.000000 0.700000 0.000000" direction="0.000000 10.000000 0.500000" direction2="0.000000 -10.000000 0.725600" type="DOUBLEANGLEDIRECTIONAL" fade="NO_FADE" radius="30.000000" color="255 0 0" intensity="50.000000" duration="0.300000" period="0.500000" phase="0.000000"/>
</LightPreset>


10 |10000 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.