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

MSFS Flag waving in the wind direction

Messages
12
Country
germany
I built my flag with some wind and gravity forces in 3ds max and finaly animated the flag with bones. i think its a good way to have a animated and good looking flag without using tons of bones. Even better than no animation :)


flag.JPG


 
Messages
104
Country
australia
I indeed had the same issue. For me, it disappered when removing "Random" after "AutoPlay" in the model's XML file.


Once I find some free time to cleanup my files a little bit such that other can work with them, I can share them.
Perfect! Thankyou, solved my problem
 
Messages
90
Country
germany
Yes, this is no problem. You make it turn with the wind direction and you can select different animations based on the wind speed. You find the corresponding code further above in this discussion.
 
Messages
233
Country
canada
Well, I tried to do bone animation and although it does kinda work in MSFS it's competely crazy. What am I doing wrong? I haven't touched the wind part yet, just basic flag weave test:
1604429329065.png

In Blender everything looks fine:
1604429375758.png

The animation is looping, and at start and end the flag seems to be in a totally wrong position. Is it some kind of parent relationship etc.?
1604429458232.png
 
Messages
233
Country
canada
Here is what I've done so far:

1. Add an asset group of type "SimObjects" to your scenery, either in dev mode or manually by adding the following to your PackageDefinitions/project-name.xml file:
XML:
        <AssetGroup Name="SimObjects">
            <Type>SimObject</Type>
            <Flags>
                <FSXCompatibility>false</FSXCompatibility>
            </Flags>
            <AssetDir>PackageSources\SimObjects\misc\Model_Name</AssetDir>
            <OutputDir>SimObjects\misc\Model_Name</OutputDir>
        </AssetGroup>
"Model_Name" should be replaced by whatever you are modeling, e.g., "ICAO_WindSock" (in the following as well).

2. Create a directory SimObjects in your PackageSources folder, within that folder create a folder named misc, and within that folder, create a folder named Model_Name.

3. In the folder Model_Name, create an additional folder model (literally) and if your model has textures, also create a folder named texture.

4. Also in the Model_Name folder, create a file named sim.cfg with the following content:
Code:
[VERSION]
Major=1
Minor=0

[fltsim.0]
title=Model_Name
model=
texture=

[General]
category=StaticObject
Again replace "Mode_Name" with whatever you are using.

5. Export your model as usual using Blender2MSFS into the Model_Name folder. If your model has textures, remember to copy them to the texture folder.

6. In the model's XML file, specify the animation as desired, i.e., as you have done it above.

7. In the folder Model_Name, create a file named model.cfg with the following content:
Code:
[models]
normal=Model_Name.xml
The field needs to be adapted according to the name of your XML file. At this point, your file and directory structure should look as shown in my previous post.

8. Open your scenery in dev mode, build the scenery, close everything, copy your scenery to the community folder, and open the scenery in dev mode again. If you now open the scenery editor, your object should be listed in SimObjects and you can place it in the scene.

However, this is the point where I stuck. In particular, the 3D model it self doesn't show up, neither in the scenery editor nor later after building the scenery. I also tried to copy the SimObjects folder created above directly to the created package. Then it looks exactly the same as in the EDLP scenery, but this was unsuccessful as well.

So some of the above mentioned steps is likely not correct or something else is missing. Thank you in advance for your help!

OK, I managed to sort out the non-wind bone animation withe flag and tried to make a SimObject out of it. Doesn't work for me. Please advise:

Here's my file structure:
1604458778015.png

1604458797542.png

Is this right?
Here is my CNC3_Flag-Canada_anim.xml

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



    <ModelInfo guid="{2adf63bb-1c12-4de6-4b4f-2a3964099279}" version="1.1">
  
        <LODS>

            <LOD MinSize="2" ModelFile="CNC3_Flag-Canada_anim.gltf"/>

        </LODS>

        <Animation guid="11a27969-811d-4fba-8eb2-abfc2d6e0d0f" name="boneweave" type="Standard" typeParam="Autoplay"/>
        <Animation guid="11a27969-811d-4fba-8eb2-cbfc2d6e0d0f" length="360" name="pole" type="Sim" typeParam="AutoPlay" typeParam2="wind"/>
        <PartInfo>  
            <Name>pole</Name>
            <AnimLength>360</AnimLength>
            <Animation>
                <Parameter>
                    <Code>(A:AMBIENT WIND DIRECTION, Degrees)</Code>
                </Parameter>
            </Animation>
        </PartInfo>

    </ModelInfo>

model.cfg:
XML:
[models]
normal=CNC3_Flag-Canada_anim.xml

sim.cfg
XML:
[VERSION]
Major=1
Minor=0

[fltsim.0]
title=CNC3_Flag-Canada_anim
model=
texture=

[General]
category=StaticObject

So, what's wrong?
 
Messages
90
Country
germany
Your flag pole's top looks nice. Which parameters are you using?

The animation is looping, and at start and end the flag seems to be in a totally wrong position. Is it some kind of parent relationship etc.?
Let me guess, you didn't apply the transformations before exporting, did you? ;)

Regrading your actual problem: The model.cfg file needs to go to the model directory. Furthermore, there needs to be a file called texture.cfg in the texture directory with the following content (don't know if it is there):

Code:
[fltsim]

fallback.1=..\..\..\..\scenery\global\scenery\TEXTURE

Finally, as far as I know, the "name" parameter for the "PartInfo" in CNC3_Flag-Canada_anim.xml needs to be the same as the the "typeParam2" of the corresponding animation. I use the same values for both the "name" of the animation and the "typeParam2" of the animation just to be sure. But it could be the case that they can be different as long as the animation "name" is the same as in Blender and "typeParam2" is the same as the name of "PartInfo".
 
Messages
233
Country
canada
No luck, the flag just does not appear in the SimObjects list, it's not there, although there are no compilation errors.

Your flag pole's top looks nice. Which parameters are you using?
PBR Materials blender plugin, copper preset, if I'm not mistaken, no changes.
Let me guess, you didn't apply the transformations before exporting, did you?
You guessed right. I remember that it's advised to apply position etc. before export, so I did that for all objects and it started working, when it was saved as a normal scenery object.

I mage changes as you advised, but the object is still not on the list in SimObjects category. I also changed "-" to "_" in filenames, just in case it didn't like "-". No changes. Here are the file structure and code as it is now. Please look and see if something seems to be wrong and prevents MSFS from putting this in SimObjects list:
1604509187035.png

1604509210919.png

1604509231145.png


sim.cfg
Code:
[VERSION]
Major=1
Minor=0

[fltsim.0]
title=CNC3_Flag_Canada_anim
model=
texture=

[General]
category=StaticObject

texture.cfg
Code:
[fltsim]

fallback.1=..\..\..\..\scenery\global\scenery\TEXTURE

model.CFG
Code:
[models]
normal=CNC3_Flag_Canada_anim.xml

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



    <ModelInfo guid="{2adf63bb-1c12-4de6-4b4f-3a3964099279}" version="1.1">
   
        <LODS>

            <LOD MinSize="2" ModelFile="CNC3_Flag_Canada_anim.gltf"/>

        </LODS>

        <Animation guid="21a27969-811d-4fba-8eb2-abfc2d6e0d0f" name="boneweave" type="Standard" typeParam="Autoplay"/>
        <Animation guid="31a27969-811d-4fba-8eb2-cbfc2d6e0d0f" length="360" name="pole" type="Sim" typeParam="AutoPlay" typeParam2="pole"/>
        <PartInfo>   
            <Name>pole</Name>
            <AnimLength>360</AnimLength>
            <Animation>
                <Parameter>
                    <Code>(A:AMBIENT WIND DIRECTION, Degrees)</Code>
                </Parameter>
            </Animation>
        </PartInfo>

    </ModelInfo>
 
Messages
90
Country
germany
PBR Materials blender plugin, copper preset, if I'm not mistaken, no changes.
Thanks for the information. I didn't know about that plugin, looks very promising!

No luck, the flag just does not appear in the SimObjects list, it's not there, although there are no compilation errors.
I checked your files and directory structure and I didn't spot any error. I just noticed that there is a blank line (line 2) in texture.cfg, but I don't think that this is an issue.

Is the SimObjects folder correctly copied to your package folder in Packages? If not, you may have forgotten to add the SimObjects asset group to your package. This is done by adding the following lines to your package's xml file in PackageDefinitions:

XML:
            <AssetGroup Name="SimObjects">
                <Type>SimObject</Type>
                <Flags>
                    <FSXCompatibility>false</FSXCompatibility>
                </Flags>
                <AssetDir>PackageSources\SimObjects\misc\CNC3_Flag_Canada_anim</AssetDir>
                <OutputDir>SimObjects\misc\CNC3_Flag_Canada_anim</OutputDir>
            </AssetGroup>

Make sure you add them at the correct position, i.e., between the <AssetGroups></AssetGroups> tags.

Another thing that you can do for troubleshooting is to generate new GUIDs for your model in case you used the same GUIDs already in your non-simobject test.

Finally, at least for me, it often helps to restart the sim. More precisely, I do the following:
  1. Export model
  2. Start sim and dev mode
  3. Load and build scenery
  4. Exit sim
  5. Delete old package of my scenery from community folder
  6. Copy newly build package of my scenery to community folder
  7. Start sim again
I don't know if there is a better way to do that and/or if it works better with other versions (I've the MS store version) or install locations. But this is what works best and most reliable for me.
 
Messages
233
Country
canada
Thanks for the information. I didn't know about that plugin, looks very promising!


I checked your files and directory structure and I didn't spot any error. I just noticed that there is a blank line (line 2) in texture.cfg, but I don't think that this is an issue.

Is the SimObjects folder correctly copied to your package folder in Packages? If not, you may have forgotten to add the SimObjects asset group to your package. This is done by adding the following lines to your package's xml file in PackageDefinitions:

XML:
            <AssetGroup Name="SimObjects">
                <Type>SimObject</Type>
                <Flags>
                    <FSXCompatibility>false</FSXCompatibility>
                </Flags>
                <AssetDir>PackageSources\SimObjects\misc\CNC3_Flag_Canada_anim</AssetDir>
                <OutputDir>SimObjects\misc\CNC3_Flag_Canada_anim</OutputDir>
            </AssetGroup>

Make sure you add them at the correct position, i.e., between the <AssetGroups></AssetGroups> tags.

Another thing that you can do for troubleshooting is to generate new GUIDs for your model in case you used the same GUIDs already in your non-simobject test.

Finally, at least for me, it often helps to restart the sim. More precisely, I do the following:
  1. Export model
  2. Start sim and dev mode
  3. Load and build scenery
  4. Exit sim
  5. Delete old package of my scenery from community folder
  6. Copy newly build package of my scenery to community folder
  7. Start sim again
I don't know if there is a better way to do that and/or if it works better with other versions (I've the MS store version) or install locations. But this is what works best and most reliable for me.
Success! I didn't rename the file in AssetGroups to the "_" version. After I traced it, I got a compiling error, but after re-export from Blender, it compiled OK. Flag was rotating the opposite way, so I changed the pole animation from 0 to -360 degrees and now it works! I still need to redo weaving animation to look more natural, but it works in principle, so that great! Thank you for your help!
1604594539693.png
 
Messages
90
Country
germany
Great, good to hear that it is working now! Yeah, I had the same problem with the direction in the first place as well (and an offset of 90 degree). The usual problem when converting between heading and mathematically positive rotations around an upwards z-axis ;)

Regarding the waving animation, you could do a Blender clothe simulation to look how your flag behaves and then try to replicate this with your bone animation. You can also do an initial clothe simulation to give your flag sheet a more natural shape as suggested above. I did this with my flag as well (had the idea independent of the post above). Look for example at the loops at the side and the top:
f57df1973911d8e51581477c48692916df12c94a.jpeg
 
Messages
35
Country
denmark
Success! I didn't rename the file in AssetGroups to the "_" version. After I traced it, I got a compiling error, but after re-export from Blender, it compiled OK. Flag was rotating the opposite way, so I changed the pole animation from 0 to -360 degrees and now it works! I still need to redo weaving animation to look more natural, but it works in principle, so that great! Thank you for your help!
View attachment 64840
Congratulations ! What a hard work to get there ;-) Would be great if you are willing to share your work need 10 different to my airport !

Regards
Claus
 
Messages
233
Country
canada
Well, it's far from perfect, so I'm not sure it's worth sharing. Mesh captured from cloth simulation has holes on it in MSFS for some reason, and the animation is not very natural. It's the best I could do, I had to put a stop on the huge amount of time the simple flag was sucking. On top of that there is a new problem: for some reason MSFS does not remember scale and height of the placed flag simobject. I position it, untick "snap to ground", bury it lower so the height is right, and the second flag near the museum I scale 0.5 because it's smaller. I save everything, build package, cop it, close the sim, open it and the flags are huge, everything is ignored. If I load the project and then select the flag, just select it - it suddently snaps to correct size and height. But not before I select it. I then save it - and it loads all wrong again. I'm puzzled. I think I will have to work around that by creating smaller versions. Damn.
I noticed that after I did the video of my scenery. I also noticed many terrain irregularities (cars buried in parking etc.) - I applied "flatten" to the airport and it looks better now than in the video. Still not perfect though.

 
Messages
233
Country
canada
Oh, well, here we go again... Everything was fine, until I made another flag. I can't make it appear in the list. It's not present in the package at all...
 
Messages
233
Country
canada
Congratulations ! What a hard work to get there ;-) Would be great if you are willing to share your work need 10 different to my airport !

Regards
Claus
Can you do an experiment and put another model in Simobjects? I.e. make another flag, or something, and put it together, and see if it's created in package and appears in the list. I don't know what else to try...
 
Messages
233
Country
canada
Here is where I am now, and it doesn't get built:

I created a second model - identical but with a different flag and smaller, because Scenery Editor but where it would not remember flag scale for some reason until I clicked on it, then forget it again. So i can't get the second model to show up in the list, or actually its model to show up in the "package" folder after compiling. It's not clear on what I am doing wrong, please advise.

Based on how a single model worked I tried to devise a way for the second one, apparently wrong. Here is what I have now:

Here is my file structure:

1604509187035.png

This is where the second model file set is added now - 3 more files: CNC3_Flag_anim.gtlf .xml and .bin in addition to these:
1604509210919.png

Texture has the second flag texture added here:
1604509231145.png


sim.cfg:
Code:
[VERSION]
Major=1
Minor=0

[fltsim.0]
title=CNC3_Flag_Canada_anim
model=
texture=

[fltsim.1]
title=CNC3_Flag_anim
model=
texture=

[General]
category=StaticObject

model.CFG
Code:
[models]
normal=CNC3_Flag_Canada_anim.xml
normal=CNC3_Flag_anim.xml

texture.cfg
Code:
[fltsim]
fallback.1=..\..\..\..\scenery\global\scenery\TEXTURE

PackageDefinitions\romandesign-airport-cnc3.xml
XML:
<AssetPackage Name="romandesign-airport-cnc3" ReleaseNotes="PackageDefinitions\romandesign-airport-cnc3\ReleaseNotes.xml" Version="0.1.0">
    <ItemSettings>
        <ContentType>SCENERY</ContentType>
        <Title>CNC3 Brampton Caledon Airport</Title>
        <Manufacturer>RomanDesign</Manufacturer>
        <Creator>RomanDesign</Creator>
    </ItemSettings>
    <Flags>
        <VisibleInStore>false</VisibleInStore>
        <CanBeReferenced>false</CanBeReferenced>
    </Flags>
    <AssetGroups>
        <AssetGroup Name="ContentInfo">
            <Type>Copy</Type>
            <Flags>
                <FSXCompatibility>false</FSXCompatibility>
            </Flags>
            <AssetDir>PackageDefinitions\romandesign-airport-cnc3\ContentInfo\</AssetDir>
            <OutputDir>ContentInfo\romandesign-airport-cnc3\</OutputDir>
        </AssetGroup>
        <AssetGroup Name="MarketplaceData">
            <Type>MarketplaceData</Type>
            <Flags>
                <FSXCompatibility>false</FSXCompatibility>
            </Flags>
            <AssetDir>PackageDefinitions\romandesign-airport-cnc3\MarketplaceData\</AssetDir>
            <OutputDir>MarketplaceData\romandesign-airport-cnc3\</OutputDir>
        </AssetGroup>
        <AssetGroup Name="SimObjects">
            <Type>SimObject</Type>
            <Flags>
                <FSXCompatibility>false</FSXCompatibility>
            </Flags>
            <AssetDir>PackageSources\SimObjects\misc\CNC3_Flag_Canada_anim\</AssetDir>
            <OutputDir>SimObjects\misc\CNC3_Flag_Canada_anim\</OutputDir>
        </AssetGroup>
        <AssetGroup Name="mymodellib">
            <Type>ArtProj</Type>
            <Flags>
                <FSXCompatibility>false</FSXCompatibility>
            </Flags>
            <AssetDir>PackageSources\modelLib\</AssetDir>
            <OutputDir>scenery/global/scenery\</OutputDir>
        </AssetGroup>
        <AssetGroup Name="myscene">
            <Type>BGL</Type>
            <Flags>
                <FSXCompatibility>false</FSXCompatibility>
            </Flags>
            <AssetDir>PackageSources\scene\</AssetDir>
            <OutputDir>scenery/world/scenery\</OutputDir>
        </AssetGroup>
    </AssetGroups>
</AssetPackage>

CNC3_Flag_Canada_anim.xml - that is the first object that works fine:
XML:
<?xml version="1.0" ?>



    <ModelInfo guid="{2adf63bb-1c12-4de6-4b4f-3a3964099279}" version="1.1">

        <LODS>

            <LOD MinSize="2" ModelFile="CNC3_Flag_Canada_anim.gltf"/>

        </LODS>

        <Animation guid="21a27969-811d-4fba-8eb2-abfc2d6e0d0f" name="boneweave" type="Standard" typeParam="Autoplay"/>

        <Animation guid="31a27969-811d-4fba-8eb2-cbfc2d6e0d0f" length="360" name="pole" type="Sim" typeParam="AutoPlay" typeParam2="pole"/>

        <PartInfo>

            <Name>pole</Name>

            <AnimLength>360</AnimLength>

            <Animation>

                <Parameter>

                    <Code>(A:AMBIENT WIND DIRECTION, Degrees)</Code>

                </Parameter>

            </Animation>

        </PartInfo>

CNC3_Flag_anim.xml - this is the object that doesn't show up in package or simobjects list:

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



    <ModelInfo guid="{2adf93bb-2c12-9de6-4b4f-9a3964099279}" version="1.1">

        <LODS>

            <LOD MinSize="2" ModelFile="CNC3_Flag_anim.gltf"/>

        </LODS>

        <Animation guid="21a27969-911d-4fba-9eb2-abfc9d6e0d0f" name="rafweave" type="Standard" typeParam="Autoplay"/>

        <Animation guid="31a27969-911d-4fba-9eb2-cbfc9d6e0d0f" length="360" name="rafpole" type="Sim" typeParam="AutoPlay" typeParam2="rafpole"/>

        <PartInfo>

            <Name>rafpole</Name>

            <AnimLength>360</AnimLength>

            <Animation>

                <Parameter>

                    <Code>(A:AMBIENT WIND DIRECTION, Degrees)</Code>

                </Parameter>

            </Animation>

        </PartInfo>

    </ModelInfo>

Any advice? I tried creating a second SimObjects asset group, but that wouldn't open at all. so I tried adding second object into the same directory and in cfg files, but while there are no compilation errors, it doesn't get built.
 
Messages
75
Country
germany
Hi, the only way I've found is to write it in the PackageDefinitions for every simobject.



XML:
<AssetGroup Name="EDST_SiObjects">
            <Type>SimObject</Type>
            <Flags>
                <FSXCompatibility>false</FSXCompatibility>
            </Flags>
            <AssetDir>PackageSources\SimObjects\Misc\edst_windsock\</AssetDir>
            <OutputDir>SimObjects\Misc\edst_windsock\</OutputDir>
        </AssetGroup>
        <AssetGroup Name="EDST_SiObjects2">
            <Type>SimObject</Type>
            <Flags>
                <FSXCompatibility>false</FSXCompatibility>
            </Flags>
            <AssetDir>PackageSources\SimObjects\Misc\tag\</AssetDir>
            <OutputDir>SimObjects\Misc\tag\</OutputDir>
        </AssetGroup>
 
Messages
233
Country
canada
Hi, the only way I've found is to write it in the PackageDefinitions for every simobject.



XML:
<AssetGroup Name="EDST_SiObjects">
            <Type>SimObject</Type>
            <Flags>
                <FSXCompatibility>false</FSXCompatibility>
            </Flags>
            <AssetDir>PackageSources\SimObjects\Misc\edst_windsock\</AssetDir>
            <OutputDir>SimObjects\Misc\edst_windsock\</OutputDir>
        </AssetGroup>
        <AssetGroup Name="EDST_SiObjects2">
            <Type>SimObject</Type>
            <Flags>
                <FSXCompatibility>false</FSXCompatibility>
            </Flags>
            <AssetDir>PackageSources\SimObjects\Misc\tag\</AssetDir>
            <OutputDir>SimObjects\Misc\tag\</OutputDir>
        </AssetGroup>
Thanks, actually I did just that. It's very inelegant, but it worked. I have 2 simobject groups in the editor now, and both objects are in the list and are working... There should be a way to put multiple simobjects in one group. But I couldn't find any...
 
Top