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

To make it easier for you, here is the complete folder except the PNG files of the stock textures. If you would contact me on deiscord, I would also send you the blender file. My user is GuidoH #4520
 

Attachments

  • SimObjects.zip
    2.6 MB · Views: 34
Hi.

Try a different name for Component ID. As far as I know, the names for Component ID and Node must not be identical!


Maybe this code will help:

<Component ID="CubeAction_Test" Node="CubeAction">
I'm not seeking to contradict you, Christian, but I was having troubles with Component ID and Node names when setting up visibility conditions, so I've been trying quite a lot of combinations and came to quite the opposite conclusion :
If the node/container/group is named "my_cube" in 3DSMax, the conditional visibility will work nicely if I set <Component ID="my_cube" Node="my_cube">.
If for any reason I need to edit the gltf object with MCX, then the nodes will be automatically renamed by MCX => I must set <Component ID="node0" Node="node0"> (or node1, node2, etc.. if more nodes defined)

My 2 cents
Antoine
 

rhumbaflappy

Administrator
Staff member
Resource contributor
I tried the GuidoH example, and it didn't work in that the hangar door continually loops. I played with the XML code a bit and came up with this:

XML:
<?xml version="1.0"?>

<ModelInfo guid="{9b731e6d-f594-48ab-dfbf-00c4625e06be}" version="1.1">

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

    <Animation guid="873FC11A-74DE-47c0-88B9-B3A21AFEFB76" length="100" name="Lamelle1" type="Sim" typeParam="AutoPlay" typeParam2="Lamelle1"/>
    <Animation guid="2BA02658-BC28-40FE-BFA5-885B0715B1B5" length="100" name="Lamelle2" type="Sim" typeParam="AutoPlay" typeParam2="Lamelle2"/>
    <Animation guid="A9893281-9135-4E85-AF78-E9D9F581E6B0" length="100" name="Lamelle3" type="Sim" typeParam="AutoPlay" typeParam2="Lamelle3"/>
    <Animation guid="3F1A43C3-6704-46BA-BDF1-5A87F96ACE29" length="100" name="Lamelle4" type="Sim" typeParam="AutoPlay" typeParam2="Lamelle4"/>
    <Animation guid="541DAAE9-D7BA-46AA-97B5-F669E862D294" length="100" name="Lamelle5" type="Sim" typeParam="AutoPlay" typeParam2="Lamelle5"/>
    <Animation guid="40D136BD-ED83-43DC-B408-7926FAAE3EBD" length="100" name="Lamelle6" type="Sim" typeParam="AutoPlay" typeParam2="Lamelle6"/>


    <DefaultState name="Hangar_NW2Lo2_Close"/>

    <AnimGraph>
        <DefaultState name="Hangar_NW2Lo2_Close"/>
        <BlendTreeState name="Hangar_NW2Lo2_Close">
          <Animations>
            <Animation guid="873FC11A-74DE-47c0-88B9-B3A21AFEFB76" loop="False" speed="1"/>
            <Animation guid="2BA02658-BC28-40FE-BFA5-885B0715B1B5" loop="False" speed="1"/>
            <Animation guid="A9893281-9135-4E85-AF78-E9D9F581E6B0" loop="False" speed="1"/>
            <Animation guid="3F1A43C3-6704-46BA-BDF1-5A87F96ACE29" loop="False" speed="1"/>
            <Animation guid="541DAAE9-D7BA-46AA-97B5-F669E862D294" loop="False" speed="1"/>
            <Animation guid="40D136BD-ED83-43DC-B408-7926FAAE3EBD" loop="False" speed="1"/>
          </Animations>
        </BlendTreeState>
    </AnimGraph>

    <PartInfo>
        <Name>Lamelle1</Name>
        <AnimLength>100</AnimLength>
        <Animation>
            <Parameter>
                <Code>
                (L:XMLVAR_YokeHidden1) 1 == if{ 50 } els{ 0 }
                </Code>
                <Lag>10</Lag>
            </Parameter>
        </Animation>
    </PartInfo>
    <PartInfo>
        <Name>Lamelle2</Name>
        <AnimLength>100</AnimLength>
        <Animation>
            <Parameter>
                <Code>
                (L:XMLVAR_YokeHidden1) 1 == if{ 50 } els{ 0 }
                </Code>
                <Lag>10</Lag>
            </Parameter>
        </Animation>
    </PartInfo>
    <PartInfo>
        <Name>Lamelle3</Name>
        <AnimLength>100</AnimLength>
        <Animation>
            <Parameter>
                <Code>
                (L:XMLVAR_YokeHidden1) 1 == if{ 50 } els{ 0 }
                </Code>
                <Lag>10</Lag>
            </Parameter>
        </Animation>
    </PartInfo>
    <PartInfo>
        <Name>Lamelle4</Name>
        <AnimLength>100</AnimLength>
        <Animation>
            <Parameter>
                <Code>
                (L:XMLVAR_YokeHidden1) 1 == if{ 50 } els{ 0 }
                </Code>
                <Lag>10</Lag>
            </Parameter>
        </Animation>
    </PartInfo>
    <PartInfo>
        <Name>Lamelle5</Name>
        <AnimLength>100</AnimLength>
        <Animation>
            <Parameter>
                <Code>
                (L:XMLVAR_YokeHidden1) 1 == if{ 50 } els{ 0 }
                </Code>
                <Lag>10</Lag>
            </Parameter>
        </Animation>
    </PartInfo>
    <PartInfo>
        <Name>Lamelle6</Name>
        <AnimLength>100</AnimLength>
        <Animation>
            <Parameter>
                <Code>
                (L:XMLVAR_YokeHidden1) 1 == if{ 50 } els{ 0 }
                </Code>
                <Lag>10</Lag>
            </Parameter>
        </Animation>
    </PartInfo>
</ModelInfo>

The important change is (L:XMLVAR_YokeHidden1) 1 == if{ 50 } els{ 0 }

When set to 100, the whole 100% keyframes play. When set to 50, the keyframes stop at 50%. The yoke toggle toggles the open or close state. Attached is a zip with the alteration I made to Guido's code. Many thanks Guido.
 

Attachments

  • SimObjectTest.zip
    2.6 MB · Views: 23
Last edited:
If I want the entire model to disappear, (Which has about 50 Objects and 3 separate animations,) do I just leave out the <Component><Component\> ?
I can't seem to get it to work, but I have managed to get one of my objects going invisible.
 
Hey guys any idea why this is not working?
<?xml version="1.0" ?>
<ModelInfo guid="{55d2870f-e330-454a-b702-52b7882b0f72}" version="1.1">
<LODS>
<LOD ModelFile="StrahlerRotWeiss.gltf" minSize="0"/>
</LODS>
</ModelInfo>
<ModelBehaviors>
<Include Path="Asobo\Misc\SimObjects.xml"/>
<Component ID="Strahler" Node="Spot">
<Visibility>
<Parameter>
<Code>
(E:TIME OF DAY, enum) 1 == (A:AMBIENT PRECIP STATE, mask) 2.0 &lt; and if{ 0 } els{ 1 }
</Code>
</Parameter>
</Visibility>
</Component>
</ModelBehaviors>
 
<Component ID="Strahler" Node="Spot">

Try to give both the same name as the node in Blender/3DSMax has.
I'll give it a try and I assume you are right. It makes sence if the node is the node of blender in my case. Like the animation names are the same in blender and in the XML as well. If You get my Like, it works...
Thx Senchay for your answer anyway...
Best regards Guido
 
I'm using this in my test nowand it doesn't work. I will now change the data of the folder in SimObjects the same name and I'll try SpotNight
1622792995253.png

<Component ID="SpotLight" Node="SpotLight">
 
Didn't work but I changed the parent child relation that was missing and try it again now with name="SpotNight"
So the best way to do it is using the same name/ID/filename/folder name for the simobject. So I used SpotNight for all the identifiers that have to be used for the simobject in XML and files and folders.
<?xml version="1.0" ?>

<ModelInfo guid="{ec38ac37-e9e8-46ea-2bda-35735fcdf5be}" version="1.1">
<LODS>
<LOD ModelFile="SpotNight.gltf" minSize="0"/>
</LODS>
</ModelInfo>
<ModelBehaviors>
<Include Path="Asobo\Misc\SimObjects.xml"/>
<Component ID="SpotNight" Node="SpotNight">
<Visibility>
<Parameter>
<Code>
(E:TIME OF DAY, Enum) 1 == if{ 1 } els{ 0 }
</Code>
</Parameter>
</Visibility>
</Component>
</ModelBehaviors>
 
Last edited:
Didn't work but I changed the parent child relation that was missing and try it again now with name="SpotNight"
I'm not sure for Blender, but I reckon it might be the same as in 3DSMax : lights are by default only visible by night.

In 3DSMax there's however an "automatic day/night switch" for lights, I haven't tried it out, I assume there could be a similar switch in Blender too.

Otherwise, even if you set visibility to 1 during daytime your lights won't be visible in the sim...

Hint : reduce the complexity by first setting a "straightforward" visibility condition until the Simobject correctly shows up/disappears, then only work on the conditions themselves.
E.g. I use codes like (E:LOCAL MONTH OF YEAR, Number) 4 == if{ 1 } els{ 0 } so that my Simobject is only visible if I set the sim in April.

My 2 cents
Antoine
 
Last edited:
Top