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.
Perfect! Thankyou, solved my problemI 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.
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 yourPackageDefinitions/project-name.xml
file:
"Model_Name" should be replaced by whatever you are modeling, e.g., "ICAO_WindSock" (in the following as well).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>
2. Create a directorySimObjects
in yourPackageSources
folder, within that folder create a folder namedmisc
, and within that folder, create a folder namedModel_Name
.
3. In the folderModel_Name
, create an additional foldermodel
(literally) and if your model has textures, also create a folder namedtexture
.
4. Also in theModel_Name
folder, create a file namedsim.cfg
with the following content:
Again replace "Mode_Name" with whatever you are using.Code:[VERSION] Major=1 Minor=0 [fltsim.0] title=Model_Name model= texture= [General] category=StaticObject
5. Export your model as usual using Blender2MSFS into theModel_Name
folder. If your model has textures, remember to copy them to thetexture
folder.
6. In the model's XML file, specify the animation as desired, i.e., as you have done it above.
7. In the folderModel_Name
, create a file namedmodel.cfg
with the following content:
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.Code:[models] normal=Model_Name.xml
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 theSimObjects
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!
<?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>
[models]
normal=CNC3_Flag-Canada_anim.xml
[VERSION]
Major=1
Minor=0
[fltsim.0]
title=CNC3_Flag-Canada_anim
model=
texture=
[General]
category=StaticObject
Let me guess, you didn't apply the transformations before exporting, did you?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.?
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):[fltsim]
fallback.1=..\..\..\..\scenery\global\scenery\TEXTURE
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".PBR Materials blender plugin, copper preset, if I'm not mistaken, no changes.Your flag pole's top looks nice. Which parameters are you using?
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.Let me guess, you didn't apply the transformations before exporting, did you?
[VERSION]
Major=1
Minor=0
[fltsim.0]
title=CNC3_Flag_Canada_anim
model=
texture=
[General]
category=StaticObject
[fltsim]
fallback.1=..\..\..\..\scenery\global\scenery\TEXTURE
[models]
normal=CNC3_Flag_Canada_anim.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>
Thanks for the information. I didn't know about that plugin, looks very promising!PBR Materials blender plugin, copper preset, if I'm not mistaken, no changes.
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.No luck, the flag just does not appear in the SimObjects list, it's not there, although there are no compilation errors.
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
: <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>
<AssetGroups></AssetGroups>
tags.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!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 inPackages
? 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 inPackageDefinitions
:
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:
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.
- Export model
- Start sim and dev mode
- Load and build scenery
- Exit sim
- Delete old package of my scenery from community folder
- Copy newly build package of my scenery to community folder
- Start sim again
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 !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
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...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
[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
[models]
normal=CNC3_Flag_Canada_anim.xml
normal=CNC3_Flag_anim.xml
[fltsim]
fallback.1=..\..\..\..\scenery\global\scenery\TEXTURE
<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>
<?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>
<?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>
<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...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>