• 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

No luck. Tried to apply a 9X9 rectangle, tried to add some LODS. The same happens.
Any ideas how to increase loading distance?
 
No luck. Tried to apply a 9X9 rectangle, tried to add some LODS. The same happens.
Any ideas how to increase loading distance?
I'm not sure but I think I heard that the asobo lights are based in LOD 11 of 14 available LODs. If you give that a shot it might be the solution. Maybe somebody else can confirm the LOD structure or you find something in the present sdk documentation. Good luck
 
I'm not sure but I think I heard that the asobo lights are based in LOD 11 of 14 available LODs. If you give that a shot it might be the solution. Maybe somebody else can confirm the LOD structure or you find something in the present sdk documentation. Good luck
Nevermind, got it to work. I draw a 20X20 rectangle 1.5 m below my light model. Created LOD by using MCX. Now it works!
 
For future reference, if anyone Is interested in, i have made a tutorial video including lot of the content that has been discussed in this 3d

Thanks to all the taletend guys here


Inviato dal mio Mi 9 Lite utilizzando Tapatalk
 
yesterday I also started to play with <modelbehaviors>, love it already!

you have to add a "simobject" asset into your scenery, setup sim.cfg and model.cfg in models folder(s).
for folder structures I recommend to have a look at "MSFS SDK\Samples\WindsockSample\"


example xml code:

XML:
<?xml version="1.0" encoding="utf-8"?>
<ModelInfo guid="{8d9d2120-a6dd-4c30-b0f4-bf67378809cc}" version="1.1">
<LODS>
<LOD MinSize="0" ModelFile="gokart_1.gltf"/>
</LODS>
</ModelInfo>

<ModelBehaviors>
<Component ID="node1" Node="node1">
<Visibility>
<Parameter>
<Code>(E:LOCAL TIME, Seconds) 36000 &gt;= (E:LOCAL TIME, Seconds) 64800 &lt;= and (A:AMBIENT PRECIP STATE, mask) 4.0 &lt; and (A:AMBIENT TEMPERATURE, celsius) 10.0 &gt; and (E:Time of Day, enum) 2 &lt; and if{ 1 } els{ 0 } </Code>
</Parameter>
</Visibility>
</Component>
</ModelBehaviors>


Hi,

sorry to reactivate an old thread, but I´m trying to use your visibility code for one of my sim objects, and your code works fine but I´d like to add another parameter to make the object only show up between March and October and to disappear from November to February. Could you show me how the xml should look like to achieve this?
 
Code:
<Code>(E:LOCAL MONTH OF THE YEAR, Number) 2 &gt;
 (E:LOCAL MONTH OF THE YEAR, Number) 11 &lt; and if {1} els {0} </Code>

@fabs79


Correct syntax to use Is in the image


df9ad16ff7abf8948a395181ec0ea25e.jpg
 
Last edited:
Ah ok thanks. should probably read the sdk documentation more often;)
All I can do is give you one of my xml which is working. Maybe something is weong with your node name?
XML:
<?xml version="1.0" ?>



   
    <ModelInfo guid="{f3c59f69-a2a8-443b-aba3-dfe6b6ec9ee7}" version="1.1">

        <LODS>

            <LOD MinSize="0" ModelFile="steffhundEND.gltf"/>

        </LODS>

        <Animation guid="f111307b-0e32-4e24-8a77-9e4d21d6a781" name="Action" type="Standard" typeparam="AutoPlay" typeparam2="Action"/>

    </ModelInfo>
   
   
   
   
    <Behaviors>

<Component ID="hund" Node="hund">
<Visibility>
<Parameter>
<Code>(E:LOCAL TIME, Seconds) 36000 &gt;= (E:LOCAL TIME, Seconds) 64800 &lt;= and (A:AMBIENT PRECIP STATE, mask) 3.0 &lt; and (E:Time of Day, enum) 2 &lt; and if{ 1 } els{ 0 } </Code>
</Parameter>
</Visibility>
</Component>

</Behaviors>

As per the above example, let's say I wanted an object to be visible only during the morning between 10h and 11:30h and then again in the afternoon between 15h and 17:45h, I tried the following code:

<Visibility>
<Parameter>
<Code>(E:LOCAL TIME, Seconds) 36000 &gt;= (E:LOCAL TIME, Seconds) 41400 &lt; and (E:LOCAL TIME, Seconds) 54000 &gt;= and (E:LOCAL TIME, Seconds) 63900 &lt;= and if{ 1 } els{ 0 }</Code>
</Parameter>
</Visibility>

Unfortunately this doesn't work at all, and I've resorted to having two separate SimObjects now of the same exact model, resting_horse_a and resting_horse_b:

<?xml version="1.0" encoding="utf-8" ?>
<ModelInfo guid="{967e3c27-6153-48ae-9acf-040ea80d1abc}" version="1.0">
<LODS>
<LOD MinSize="0" ModelFile="resting_horse_a.gltf"/>
</LODS>
</ModelInfo>

<ModelBehaviors>
<Component ID="resting_horse_a" Node="resting_horse_a">
<Visibility>
<Parameter>
<Code>(E:LOCAL TIME, Seconds) 36000 &gt;= (E:LOCAL TIME, Seconds) 41400 &lt;= and if{ 1 } els{ 0 }</Code>
</Parameter>
</Visibility>
</Component>
</ModelBehaviors>

and

<?xml version="1.0" encoding="utf-8" ?>
<ModelInfo guid="{f9b7f015-bf81-4396-bbd4-bc5ab73d8512}" version="1.0">
<LODS>
<LOD MinSize="0" ModelFile="resting_horse_b.gltf"/>
</LODS>
</ModelInfo>

<ModelBehaviors>
<Component ID="resting_horse_b" Node="resting_horse_b">
<Visibility>
<Parameter>
<Code>(E:LOCAL TIME, Seconds) 54000 &gt;= (E:LOCAL TIME, Seconds) 63900 &lt;= and if{ 1 } els{ 0 }</Code>
</Parameter>
</Visibility>
</Component>
</ModelBehaviors>

Is there an elegant way of combining this in one SimObject with one single time-related visibility statement, so that resources are not duplicated?

Any guidance on this is very welcome!

Anna
 
Code:
<Code>(E:LOCAL TIME, Seconds) 36000 > (E:LOCAL TIME, Seconds) 41400 < and (E:LOCAL TIME, Seconds) 54000 > (E:LOCAL TIME, Seconds) 63900 < and or if{ 1 } els{ 0 } </Code>

Try this @AnnaM

Inviato dal mio Mi 9 Lite utilizzando Tapatalk
 
Code:
<Code>(E:LOCAL TIME, Seconds) 36000 > (E:LOCAL TIME, Seconds) 41400 < and (E:LOCAL TIME, Seconds) 54000 > (E:LOCAL TIME, Seconds) 63900 < and or if{ 1 } els{ 0 } </Code>

Try this @AnnaM

Inviato dal mio Mi 9 Lite utilizzando Tapatalk

Thank you Mamu, that's splendid!

The 36000 > and 41400 < threw up an error, I changed it to the following and got it working:

<Code>(E:LOCAL TIME, Seconds) 36000 &gt;= (E:LOCAL TIME, Seconds) 41400 &lt;= and (E:LOCAL TIME, Seconds) 54000 &gt;= (E:LOCAL TIME, Seconds) 63900 &lt;= and or if{ 1 } els{ 0 }</Code>

Really appreciate the guidance, thanks again!

Anna
 
Thank you Mamu, that's splendid!

The 36000 > and 41400 < threw up an error, I changed it to the following and got it working:

<Code>(E:LOCAL TIME, Seconds) 36000 &gt;= (E:LOCAL TIME, Seconds) 41400 &lt;= and (E:LOCAL TIME, Seconds) 54000 &gt;= (E:LOCAL TIME, Seconds) 63900 &lt;= and or if{ 1 } els{ 0 }</Code>

Really appreciate the guidance, thanks again!

Anna
ahh yeah Anna, the reason why it was not working is because I was writing from mobile, and the forum translates "greater" and "less than" operator

in the xml files the "greater than", ">" should be written as "&gt;" and "less than", "<", should be written as "&lt;"
(this is the reason why in two posts above i took a screenshot of the correct xml syntax)


Your former code wasn't working because, translated in a more common programmin style, it was:

IF
10 > LOCAL TIME > 11.30
AND <--- this is the error
15.00 > LOCAL TIME > 17.45
RETURN TRUE ( 1 )
ELSE
RETURN FALSE ( 0 )

local time will never be in both of the two conditions (between 10/11.30 AND between 15/17.45), so you can't never have 2 TRUE values,

so i have only changed the "and" with the "or"

now that the horse is resting correctly between his rest hours, I'm curious to see him running :D
 
any luck with SURFACE TYPE or SURFACE CONDITION?
i would like to show a sledge when the ground has snow on it.
already tried with these, without any success

Code:
<Component ID="node1" Node="node1">
<Visibility>
<Parameter>
<Code>
(A:SURFACE TYPE, enum) 8 == if{ 1 } els{ 0 }
</Code>
</Parameter>
</Visibility>
</Component>

and with this

Code:
<Component ID="node1" Node="node1">
<Visibility>
<Parameter>
<Code>
(A:SURFACE CONDITION, enum) 3 == if{ 1 } els{ 0 }
</Code>
</Parameter>
</Visibility>
</Component>

without any success. :(

according to the behavior debug window, it should work, as a simple scenery objects its loads.

1650708774021.png
 
Hey did you double check that the name of your sledge object in blender/3DS is called "node1"? I assume that is not the case but the reason. As indicated on your behaviour screen, your statement itself is ok. So my advice, check the name!
Regards Guido
 
Hey did you double check that the name of your sledge object in blender/3DS is called "node1"? I assume that is not the case but the reason. As indicated on your behaviour screen, your statement itself is ok. So my advice, check the name!
Regards Guido
thanks, yes, sadly its "node", checked several times. i dont know what happens, the asset loads (I can clearly see as its hitbox changes), but the item stays hidden.
 
(A:AMBIENT PRECIP STATE, mask) 4.0 >

Should work


This contains a sample with rain


Ciao !

Inviato dal mio Mi 9 Lite utilizzando Tapatalk
 
grazie @mamu
I didn't want to disturb you on discord again ;)

I made the snowman, edited everything, now you i see when it snows!
can i make it appear even if it's not snowing but on the ground it's snowing?
in the sdk it doesn't mention it, it makes me think that the only way would be with the temperature like in your video
 
Back
Top