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

How to make a neon sign glow in daylight - MSFS2020

Messages
1,773
Country
australia
I have a neon sign object (Blender) which I have made into a simobject with a script to add emission during the day (there is no emission set in Blender). The building is only open during the day and even if it wasn't it would not be open 24/7.

Problem I have found is that unless the sign is in 'sunlight' it does not stand out very well. Is it possible to set up my object to really stand out when in the shade?

Note the following image. The Open sign is not as bright as when not in the shade.

sechelt_shed_open_sign_emissve.jpg


Here is the xml which adds emission during the day. I was advised to use 10 as the value for emission refer to (E:Time of Day,enum) 1 == if{10} els{0}

-
<?xml version="1.0" encoding="utf-8"?>
<ModelInfo guid="{947f4688-fd7a-4d70-b29d-38250f30784b}" version="1.1">
<LODS>
<LOD minSize="0" ModelFile="open_sign.gltf"/>
</LODS>

<Behaviors>

<Include ModelBehaviorFile="Asobo\Generic\Emissive.xml"/>

<Component ID="opensign.007" Node="opensign.007">

<Parameter>

<UseTemplate Name="ASOBO_GT_Material_Emissive_Code">
<EMISSIVE_CODE>
(E:Time of Day,enum) 1 == if{10} els{0}
</EMISSIVE_CODE>
</UseTemplate>

</Parameter>

</Component>

</Behaviors>

</ModelInfo>
 
Increase the emission value. You can find that in the glTF file, and edit it with text editor. Start with 100. MSFS2024 uses 1000 by default.
 
Hi.

Unfortunately, I haven't had much time the last few days, otherwise I would have replied sooner :)
As Dick correctly points out, it's the emissive color value that determines the strength of the effect. However, the emissive color also needs to be changed from black to white.
The examples show MSFS24 material, but it should be very similar in MSFS.

neon_lights_no_day_effect.jpg

Here, the emissive color is black; no effect is displayed during the day.


neon_lights_day_effect.jpg

Here, the emissive color is white; during the day, an effect is displayed.


At night, it looks like this:
neon_lights_night_effect.jpg



You can also give the letters their own colors, and you only need a single LIGHTS material for that! This is done with Vertex Color:

neon_lights_vertex_color.jpg


You're working with Blender, John? There should be very similar settings there.
 
Hello Christian
Thanks for your response and images. Yes I am using Blender.
Firstly my neon sign has two colors eg
1770013917310.png

I set the emission to white for both the 'red' material and the 'white' material.
What happened then was that the white part ONLY of the sign became illuminated however my simobject script did not work ie it did not set it to 0.

Also I am using 2020 not having upgraded to 2024 as yet.

I have attached zip file containing the glTF, Bin and xml files. If you get a chance maybe you could import the glTF into autodesk and have a look?
 

Attachments

Last edited:
Hello Dick, I edited the glTF file and could not see any statement for emission even though I have Emission under the MSFS Material (type) Standard set to white.

I have attached my model folder and the blender file in case you have time to have a look.
 

Attachments

Last edited:
I don't have a lot of time but loading your last ZIP in Blender 3.6.23 and plugin 1.3.3, I can see that a part of your "object" is mapped on a MSFS material Standard (not the white part which is Disabled) and the Emissive Color parameter is set to black !!!
This parameter should be white to be emissive if i remember.

1770022773744.png
 
I have attached zip file containing the glTF, Bin and xml files. If you get a chance maybe you could import the glTF into autodesk and have a look?
I have no way to import a GLTF file into 3dsm; that's only possible with paid plugins.

However, I did load the file into Arno's Model Converter, and I think the material wasn't assigned correctly, and the emissive color wasn't white either. The Base Color must be white and the Emissive Color must also be white.

My advice would be to create the object as a scenery object and experiment with that. A SimObject is (perhaps) too complicated for this. Later, once the lighting is set up correctly, you can move the GLTF file into your SimObject Model folder, and then you'll have a SimObject that can be controlled via code. Does your sign not light up at all, or only not during the day, or does it light up at night?
 
Thanks Didier, yes the (assignment of the) materials seems to be all mixed up and I'm trying to correct them. The object was actually created by someone else for me and at that time I was just wanting an object to look like a neon sign. As the building I attach it to in real life only opens during the day I then decided to try and set it up so that it only appears during the day (TIME OF Day = 1) and that was successful.
Then I found that the neon sign does not glow and as such isn't very noticeable when shaded and that is the reason for this post/thread.
In attempts to get it working correctly from assistance from all those who responded I did get the white part of the sign to glow and be seen easily even when in the shade however then the XML script did not work in that the white part displayed during the day and the night.
I also may have including the incorrect Blender file or model folder in my zip files as I was in the middle of trail and error.
Maybe I have overstepped my capabilities and I should just leave it without emission.
However I will have another attempt at sorting the materials out and then setting the emission to white. Not a lot for me to do at present and so I will plod along and maybe give up in the end as the sign would possibly be never seen from the cockpit of an aircraft.
Thanks for your help.

Thanks too Christian and once again I may be just chasing my tail (as the saying goes) for something which may never be noticed from a cockpit. And as mentioned to Didder I will try and sort out the way that materials have been assigned.

I have attached a blender file which has been corrected by someone else.
 

Attachments

Last edited:
Hi John.

Please check if the signal is okay. You can copy the files directly into your SimObjects folder and assign your code to them.
It's important that there are two objects: the outer ring and the text. The ring has a white vertex, and the text has a red vertex. Both objects are assigned the same material.

The material settings and the signal in MSFS look like this; the crucial parameters are highlighted in red:

neon_sign.jpg
 

Attachments

This is my solution (attached). I made a duplicate of your model and assigned a new material to it. I made sure the node names were day and night for the different models.
XML:
<ModelInfo guid="{947f4688-fd7a-4d70-b29d-38250f30784b}" version="1.1">

    <LODS>
        <LOD minSize="0" ModelFile="open_sign.gltf"/>
    </LODS>

    <Behaviors>

        <Component ID="day" Node="day">
            <Visibility>
                <Parameter>
                    <Code>
                        (E:LOCAL TIME, hours) 6 &gt;=
                        (E:LOCAL TIME, hours) 18 &lt;
                        and
                        if{ 1 } els{ 0 }
                    </Code>
                </Parameter>
            </Visibility>
        </Component>

        <Component ID="night" Node="night">
            <Visibility>
                <Parameter>
                    <Code>
                        (E:LOCAL TIME, hours) 6 &gt;=
                        (E:LOCAL TIME, hours) 18 &lt;
                        and
                        if{ 0 } els{ 1 }
                    </Code>
                </Parameter>
            </Visibility>
        </Component>

    </Behaviors>

</ModelInfo>

The day node shows between 6am and 6pm. The night node shows between 6pm and 6am. The emissive value I used was 25 for the day materials. No emissive for the night material.
 

Attachments

Hi Dick:

Looks good; I get a Red color in the sign at 41WI after 6 A.M.. :wizard:

I could not see it at first because IIUC it was outside the LOD visibility radius.

It is off my Left wing from the 41WI Start Position. ;)

41WI_Red_Sign_Color_After 6 AM.jpg



So, I guess the closest spot for Breakfast is KwikTrip in Elkhorn ? :)

GaryGB
 
Last edited:
Thanks Dick and Christian for taking this up and offering suggestions.
I will try them out a little later.

Firstly my script for turning emission on and off does work, I now have the problem of the RED part of the sign displaying as white when emission is on but someone in Discord has explained that could be the result of the 'brightness level' of the emission which I will try later - I note that it seems that Dick uses 25 (instead of 100? - and is that the Emissive Value or V value for HSV? - see image below). It seems that using full brightness can 'wash out' the emission color. I am just guessing Dick as I won't be able to check out your files until later.
1770152849289.png


It its a little difficult for me to work out exactly what Christian explains as he uses Autodesk but I get think I understand he is getting at.

I like the script Dick has put together which uses two different nodes in Blender one with emission set to black it seems (I will know when I check out his files). His test for time of day is good but probably doesn't take into consideration of the season and latitude of where the object is eg. in some places in the world the sun would set at say 4pm in winter and say 6pm in summer (and the sun would rise at a different time in the day between summer and winter). I am a bit of a perfectionist and if the open sign is 'lit' say at 5pm and it is dark then that is not correct as the building would not be open (as it is on the docks where the floatplanes go and they don't operate after dark).
Maybe I could use Dick's idea of having the Blender object have two different nodes and my code of texting for TIME OF DAY. And Dick's idea of having the emissive value (in Blender I assume) at 25 is great for reasons already mentioned.

I will check out your files.

Thanks again.

John
 
I didn't need to go out and so have checked out your ideas.

Well done Dick, I dropped your model folder into my project and the object (open sign) works perfectly, well done and thanks.
I might change the xml file to test for TIME OF DAY (ie DAY = 1) allows for seasons eg in Winter in some parts it is dark before 1800 and as such your xml code results in the sign being 'lit' when it is dark and the business is only open during daylight hours (and I try to be a perfectionist). See images below taken at 1403 and 1733 (when it was dark).

I changed the xml to test TIME OF DAY (equal to 1 or greater than 1) which worked. I then noticed that the open sign changed to a gray color all over which I guess is how a neon sign looks when not lit? They are made from glass tubing, that is all I know. Anyway the main thing is that it glows during the day.

That begs the question what does MSFS do when the day/night cycle (in Blender) is ticked (for objects to be lit at night only)? Does it just use LOCAL TIME or TIME OF DAY?

Thanks again to both of you.

1770158708049.png

1770158738373.png
 
Last edited:
Not sure if this matters, but I noticed Red flickering as a bleed-through the top White color in MCX' 3D preview mode.

Nonetheless, it looks great in MSFS. :)

GaryGB
 
Yes I see that too but in MSFS it seems ok in the day time anyway when uses of my scenery will use it.
 
Just for fun, I ran the model through MCX (the latest development version) to make LODs:

Untitled.png


It worked OK. Here's the XML:
XML:
<?xml version="1.0" encoding="utf-8"?>
<ModelInfo guid="{947f4688-fd7a-4d70-b29d-38250f30784b}" version="1.1">
  <LODS>
    <LOD minSize="5" ModelFile="open_sign_LOD0.gltf"/>
    <LOD minSize="4" ModelFile="open_sign_LOD1.gltf"/>
    <LOD minSize="3" ModelFile="open_sign_LOD2.gltf"/>
    <LOD minSize="2" ModelFile="open_sign_LOD3.gltf"/>
    <LOD minSize="1" ModelFile="open_sign_LOD4.gltf"/>
    <LOD minSize="0" ModelFile="open_sign_LOD5.gltf"/>
  </LODS>
  <Behaviors>
    <Component ID="custom_vis_LOCAL_TIME_00_mcx_VC_0_Vis_custom_vis_LOCAL_TIME_00_mcx" Node="custom_vis_LOCAL_TIME_00_mcx_VC_0">
      <Visibility>
        <Parameter>
          <Code>(E:LOCAL TIME, hours) 6 &gt;=
      (E:LOCAL TIME, hours) 18 &lt;
      and
      if{ 1 } els{ 0 }</Code>
        </Parameter>
      </Visibility>
    </Component>
    <Component ID="custom_vis_LOCAL_TIME_00_mcx_VC_1_Vis_custom_vis_LOCAL_TIME_00_mcx" Node="custom_vis_LOCAL_TIME_00_mcx_VC_1">
      <Visibility>
        <Parameter>
          <Code>(E:LOCAL TIME, hours) 6 &gt;=
      (E:LOCAL TIME, hours) 18 &lt;
      and
      if{ 1 } els{ 0 }</Code>
        </Parameter>
      </Visibility>
    </Component>
    <Component ID="custom_vis_LOCAL_TIME_01_mcx_VC_Vis_custom_vis_LOCAL_TIME_01_mcx" Node="custom_vis_LOCAL_TIME_01_mcx_VC">
      <Visibility>
        <Parameter>
          <Code>(E:LOCAL TIME, hours) 6 &gt;=
      (E:LOCAL TIME, hours) 18 &lt;
      and
      if{ 0 } els{ 1 }</Code>
        </Parameter>
      </Visibility>
    </Component>
  </Behaviors>
</ModelInfo>

I tweaked the minsize values as per Asobo. Straight from MCX, it displays fine. I see the emissives twinkle from a far distance. Don't know if that's ok. MCX did a great job preserving the coloring and the visibility conditions.
 

Attachments

Thanks Dick.

I assume that you created the LODs to reduce/eliminate the bleed through reported by Gary in MCX. I did notice that when illuminated and it is dark the sign is a bit overpowering and the edge of the white neon is not smooth (see my previous post with images) although I don't see that during the day when the sun is shining and TIME OF DAY fixes that.

I scale the open sign to maybe 15% of it's 'native' size (maybe 50cm wide in MSFS) and at approximately 100 meters away the sign disappears and so maybe using LODs is not necessary for me.

Once again my grateful thanks to you.

BTW here is my xml which uses TIME OF DAY (before your addition of LODs) which takes into consideration when the sun is shining not what the time is. I am still trying to determine why the double equal sign eg == in (E:Time of Day,enum) 1 == if{1} els{0} so please explain someone.

<ModelInfo guid="{947f4688-fd7a-4d70-b29d-38250f30784b}" version="1.1">

<LODS>
<LOD minSize="0" ModelFile="open_sign.gltf"/>
</LODS>

<Behaviors>

<Component ID="day" Node="day">
<Visibility>
<Parameter>
<Code>

(E:Time of Day,enum) 1 == if{1} els{0}

</Code>
</Parameter>
</Visibility>
</Component>

<Component ID="night" Node="night">
<Visibility>
<Parameter>
<Code>

(E:Time of Day,enum) 1 != if{0} els{1}

</Code>
</Parameter>
</Visibility>
</Component>

</Behaviors>

</ModelInfo>
 
Last edited:
Thanks Gary. Basic (computer language) and even assembler language is a lot easier. Maybe if I was to 'code' in XML and learn it I might think differently.
You seem to have a lot of stuff at your fingertips as I searched the internet for XML == and didn't find what you did.
Thanks to you I see that my XML script using TIME OF DAY is not strictly correct. It seems that it doesn't check for dawn (TIME OF DAY 0). I will test first in MSFS and if necessary modify my xml.
[added later)
Is the correct way to add a comment or a remark (not to be executed) in an xml file to place the text within <!-- --> eg <!-- this is a remark --> ?
 
Last edited:
Back
Top