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

MSFS20 Visibility

Maybe of interest, periodic display every 30secs displayed for 15 seconds, works, modulo operator used. Can be easily varied.

View attachment 87456

Regards
Jörg
Thank you, I,m always Interested in these kind of things because I can't figure out things like that on my own, it might seem simple but for people like me without any IT or programming background it's still black magic 😁
 
Played with another variable. SURFACE TYPE:
XML:
<?xml version="1.0" encoding="utf-8"?>
<ModelInfo guid="{4dd44ba9-e506-441d-ae0e-2937ca2d877b}" version="1.1">
    <LODS>
        <LOD minSize="0" ModelFile="SnowPlow.gltf"/>
    </LODS>
</ModelInfo>
<ModelBehaviors>
    <Include Path="Asobo\Misc\SimObjects.xml"/>
        <Component ID="SnowPlow" Node="SnowPlow">
            <Visibility>
                <Parameter>
                    <Code>(A:SURFACE TYPE, Number) 8.0 == if{ 1 } els{ 0 }</Code>
                </Parameter>
            </Visibility>
        </Component>
</ModelBehaviors>
If the surface type is snow, it will show. You can set the surface type of an apron or polygon with a material. Attached is a transparent snow material.
 

Attachments

I see ProjectedMesh also allows the setting of SURFACE TYPE. And you could have a SImObject appear only when over snow (or asphalt, or cement...) on the ProjectedMesh. This might work with scripting, but I haven't tried that. When a script moves a simobject over a specific SURFACE TYPE.

Note: this only works with 'Independant Projected Mesh' Also Placing the projected mesh over a polygon with it's material set as SURFACE TYPE doesn't work, as the type seems to be already set. Polygons of one type inside different type will use Priority to determine type of that area. Material of poly layer 1 reacts over Material of poly layer 0.
Surface Type Project
 
Last edited:
Great thead! Thanks to all. Question : Can we put these lines in the scenery XML instead of the object XML ? It would be easier to control, for instance when you want to have default MSFS objects, or animation (smoke) during certain months only. My attempt didn't work writen this:

</SceneryObject>
<SceneryObject groupIndex="1660" lat="46.89720730617088" lon="-71.77890250310381" alt="0.89977629017085" pitch="0.000642" bank="-0.000642" heading="125.451123" imageComplexity="VERY_SPARSE" altitudeIsAgl="TRUE" snapToGround="FALSE" snapToNormal="FALSE">
<SimObject containerTitle="Pilot_Female_Glider" scale="1.000000"/>
<Visibility>
<Parameter>
<Code>(E:LOCAL MONTH OF YEAR, Number) 7 == if{ 1 } els{ 0 }</Code>
</Parameter>
</Visibility>
</SceneryObject>
 
No, this code can not be used in the bglcomp xml. It has to go in the modeldef.xml file and is then compiled into the mdl object.
 
Ok, thanks Arno. So how can we do the same with smoke effect that would come from a freeware library or with a character from Asobo collection (ex.: pilot or marshaler) ?
 
All the code in this 3d works in Simboject only.

Inviato dal mio Mi 9 Lite utilizzando Tapatalk
 
Ok, thanks Arno. So how can we do the same with smoke effect that would come from a freeware library or with a character from Asobo collection (ex.: pilot or marshaler) ?
You can't. You would have to make your own model with the right visibility conditions in there.
 
All the code in this 3d works in Simboject only.
In recent P3D versions some of the variables also work in normal scenery objects. But not all indeed.
 
In recent P3D versions some of the variables also work in normal scenery objects. But not all indeed.
The 3d has the MSFS tag 😅

Actually, @gouaill you can use others VFX with a simple "dummy" Simobject (like an invisible cube), and spawn the vfx from there
However you can't attach to your Simboject (or Scenery object) anything more that a Beacon (attachedObject tag work with them only)
 
The 3d has the MSFS tag 😅
My mistake, there is a similar thread for P3D as well. But for MSFS the restriction is true of course.
 
Thanks Folks. So I do a scenery for summer and a separate version for winter (removing MSFS objects).
 
Has anyone been able to get SURFACE TYPE to work for a SimObject? I've been trying to figure it out for some snow berms, but there seems to either be something that I'm missing, or this is the one instance where my SimObject cannot read a value (I know you cannot set values, but I have never heard of not being able to read one).

When I use the Behaviors Debug tool, the correct surface type shows up, but it's as if, even though the object can read the value, it just ignores it and stays hidden all the time. I have also tried setting the SimObject to the MISC, Landmarks, and Humans category, as there are some category limitations when trying to do different things, but still I have not been able to make this one work.

I have tested this using (A:AMBIENT TEMPERATURE, celsius) 0 &lt;= and it works as expected using that method. This is what I have used to date for winter specific stuff, but it would be nice to tie it into the Snow Depth slider...

Has anyone had any luck?

Edit: I see Dick's example above, but I still haven't been able to make it work. The SDK says to use Enum, though I have tried "Number" as stated in that post. Though, that is also using the legacy code layout.
I have also tried that exact legacy code and have been unable to make it work...

@rhumbaflappy What SimObject folder and category (sim.cfg) did you use to get that to work?

XML:
<Behaviors>
    <Include ModelBehaviorFile="Asobo\Common.xml"/>
    <Component ID="Snow_Berm" Node="berm">
        <UseTemplate Name="ASOBO_GT_Visibility">
            <VISIBILITY_CODE>
                (A:SURFACE TYPE, Enum) 8 ==
            </VISIBILITY_CODE>
        </UseTemplate>
    </Component>
</Behaviors>

debug.PNG
 
Last edited:
Surface Type Project
This project explores how a surface type polygon can influence the visibility of a SimObject. Load the project in DevMode (go to c59) and select the "SnowPlow" SimObject. As you move it around, it will display in the polygon with the mysnow material. It disappears everywhere else.
The mysnow material has the Surface Type set to snow.
 
Hi guys. Is there any way to make a light source disappear? It seems like the "node" entry from the code does note recognize spot lights as nodes. I spawned a cube and a few spot lights around it but that does not seem to work. I am trying to make seasonal/occasional lights (e.g. red ambient lighting during xmas and NY time etc.) Thanks
 
Hi guys. Is there any way to make a light source disappear? It seems like the "node" entry from the code does note recognize spot lights as nodes. I spawned a cube and a few spot lights around it but that does not seem to work. I am trying to make seasonal/occasional lights (e.g. red ambient lighting during xmas and NY time etc.) Thanks
Parent the spots to mesh, or a empty (spots are the child)

Inviato dal mio Mi 9 Lite utilizzando Tapatalk
 
Surface Type Project.
This project explores how a surface type polygon can influence the visibility of a SimObject. Load the project in DevMode (go to c59) and select the "SnowPlow" SimObject. As you move it around, it will display in the polygon with the mysnow material. It disappears everywhere else.
The mysnow material has the Surface Type set to snow.
Sorry it took me a while to circle back to this. Was saving it for last as I focused on the priorities of my project.
I just had a chance to open up and try out your example and I think I see what it's doing.

Asobo has told me that non-user simobjects simply cant read the value, which I have seemingly been able to confirm, as this code does not work when using the snow depth slider, even though it technically does become a snow material and the value does change when playing with the slider. Though, for whatever reason, if you force it with a ground material, as you did in your example, it does read the value.

So, I guess it partially works.. unfortunately not in the way I need it to, though. Too bad you cant force a material based on season.

 
Hello guys,

I'm new here and have a problem right away.
I have created the airfield EDQC. Another creator has created liveries of aircraft that are home to this airfield. The same models are available in my scene as static sim objects. Depending on the time of day or the weather, they are sometimes inside, sometimes outside.
Now I want that aircraft to disappear on the ground when I use the same one to fly. I have tried it with the "ATC ID", but the string is not read.
What am I doing wrong?

<?xml version="1.0" ?>



<ModelInfo version="1.1" guid="{c2472383-eaa0-4911-ad44-30dfd1aa5d39}">

<LODS>

<LOD minSize="0" ModelFile="D-EFUK_out.gltf"/>

</LODS>

</ModelInfo>

<ModelBehaviors>

<Component ID="D-EFUK" Node="D-EFUK">

<Visibility>

<Parameter>

<Code>

(A:ATC ID, string) 'D-EFUK' scmp 0 == if{ 0 } els{

(E:TIME OF DAY, enum) 1 == (E:TIME OF DAY, enum) 2 == or if{

(E:LOCAL DAY OF WEEK, Number) 1 == (E:LOCAL DAY OF WEEK, Number) 2 == or (E:LOCAL DAY OF WEEK, Number) 3 == or (E:LOCAL DAY OF WEEK, Number) 4 == or (E:LOCAL DAY OF WEEK, Number) 5 == or if{

(E:LOCAL TIME, Seconds) 32600 &gt;= (E:LOCAL TIME, Seconds) 57400 &lt;= and (A:AMBIENT PRECIP STATE, mask) 3.0 &lt; and (A:AMBIENT TEMPERATURE, celsius) -10.0 &gt; and if{ 1 } els{ 0 }

} els{

(E:LOCAL DAY OF WEEK, Number) 6 == (E:LOCAL DAY OF WEEK, Number) 0 == or if{

(E:LOCAL TIME, Seconds) 32600 &gt;= (E:LOCAL TIME, Seconds) 50200 &lt;= and (A:AMBIENT PRECIP STATE, mask) 3.0 &lt; and (A:AMBIENT TEMPERATURE, celsius) -10.0 &gt; and if{ 1 } els{ 0 }

} els{ 0 }

}

} els{ 0 }

}
</Code>

</Parameter>

</Visibility>

</Component>

</ModelBehaviors>
 
You can remove the static versions and create flight plans for AI versions of your livery aircraft. Not only will they populate the tarmac, they will idle, taxi, fly and defer parking assignments to the user just like any other AI.
 
Back
Top