• 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 BGL asset groups

Messages
4
Country
germany
Hi everyone,

first of all, thanks for approving my account so quickly! I'm glad to have found this forum :)

So – during the last week or two I've been learning about the MSFS SDK. I had to start from scratch but managed to import custom aerial imagery and create a runway at a small airport nearby my location.
While browsing through some of the threads here, I read this comment about scenery/global/scenery and scenery/world/scenery. I don't have any custom models/textures yet, so I guess I won't need global as of now, but I'm unsure about "polygons and scene" (which are supposed to output into the world directory). So here's my question:

Are you supposed to create different BGL asset groups for polygons and scenery? If you look at my screenshot, you can see that I have only one BGL asset group that contains the airport and runway. At which point would I have to create another BGL file (if at all), and what would it typically contain? Or do you just use one BGL asset group for everything?

Looking forward to you answers!
Screenshot 2021-02-25 160724.png
 
Hello:

Welcome to FSDeveloper. :)


While I am not prepared to reply to your question regarding whether one may consolidate different scenery content BGL Assets, I do have a quick question.


In your screenshot above, you show Windows File - Folder Path syntax that uses both a "/" (aka 'slash') and a "\" (aka 'back-slash') character.

AFAIK, although technically Windows has the ability to process either of those Path definition characters in certain operations, I am not certain MSFS can do so.


Normally one would only use "\" (aka 'back-slash') Path definition characters in most Windows-based application operations.

Are you seeing successful results when working with the MSFS-2020 SDK using both the Path definition characters shown in your screenshot above ? :scratchch


GaryGB
 
Last edited:
Hello:

Welcome to FSDeveloper. :)


While I am not prepared to reply to your question regarding whether one may consolidate different scenery content BGL Assets, I do have a quick question.


In your screenshot above, you show Windows File - Folder Path syntax that uses both a "/" and a "\" character.

AFAIK, although technically Windows has the ability to process either of those Path definition characters in certain operations, I am not certain that MSFS can.


Normally one would only use "\" (aka 'back-slash') Path definition characters in most Windows-based application operations.

Are you seeing successful results when working with the MSFS-2020 SDK using the Path definition characters shown in your screenshot above ? :scratchch


GaryGB
Hey Gary,
thanks for your answer!
Actually I didn't pay attention to the Windows back slash at all – thanks for pointing it out. I've had no errors so far and compiling works without problems, so I guess MSFS regards both types of slashes as one?
 
Hi again:

Specifically, the .\ or ..\ (Dot and Backslash) characters are good old DOS - Windows parlance as Directory (aka "Folder") Path hierarchy designations



Although Windows reportedly can support either a Slash or Backslash delimited path format, IMHO with the rapidly growing number of custom applications being created for use in Windows, use of a 'Slash' (/) Folder and File path delimiter character is asking for trouble.

https://blogs.msdn.microsoft.com/ie/2006/12/06/file-uris-in-windows/

https://stackoverflow.com/questions...ween-forward-slash-and-backslash-in-file-path


I hope this helps in future endeavors. ;)

GaryGB
 
Just look at the samples in the SDK. You don't need scenery\world\scenery. You should use {yourcompany}\scenery as in rhumbaflappy\scenery. Also, don't use modelLib as the name of your object library. Use {yourcompany}-{airportID}-modelLib. I use rhumbaflappy-c59-modelLib for my library name at airport c59. This avoids confusion among packages.
 
Just look at the samples in the SDK. You don't need scenery\world\scenery. You should use {yourcompany}\scenery as in rhumbaflappy\scenery. Also, don't use modelLib as the name of your object library. Use {yourcompany}-{airportID}-modelLib. I use rhumbaflappy-c59-modelLib for my library name at airport c59. This avoids confusion among packages.
Thanks for your advice and sorry for not being completely clear in the first place. I simply used these world/global scenery folders to illustrate how I came up with my question. The specific phrase in the linked comment that started this was: "polygons and scenery should go into [whatever folder]". To me that sounded somewhat as if scenery and polygons should be separate, and would each get their own BGL asset group (which then outputs into [whatever folder]).

So I merely wanted to ask whether more experienced scenery builders here usually keep everything in one BGL asset group, and if not, what the reasons would be to create multiple BGLs.
As I said, I'm a total greenhorn, so please do tell me if I'm not making sense/getting your point😅
 
Here's a example of a definition:
XML:
<AssetPackage Name="rhumbaflappy-airport-c59-lakelawn" Version="0.1.0">
    <ItemSettings>
        <ContentType>SCENERY</ContentType>
        <Title>Lake Lawn Airport</Title>
        <Manufacturer>rhumbaflappy</Manufacturer>
        <Creator>rhumbaflappy</Creator>
    </ItemSettings>
    <Flags>
        <VisibleInStore>false</VisibleInStore>
        <CanBeReferenced>false</CanBeReferenced>
    </Flags>
    <AssetGroups>
        <AssetGroup Name="ContentInfo">
            <Type>Copy</Type>
            <Flags>
                <FSXCompatibility>false</FSXCompatibility>
            </Flags>
            <AssetDir>PackageDefinitions\rhumbaflappy-airport-c59-lakelawn\ContentInfo\</AssetDir>
            <OutputDir>ContentInfo\</OutputDir>
        </AssetGroup>
        <AssetGroup Name="myairport">
            <Type>BGL</Type>
            <Flags>
                <FSXCompatibility>false</FSXCompatibility>
            </Flags>
            <AssetDir>PackageSources\rhumbaflappy-c59-airport\</AssetDir>
            <OutputDir>scenery\rhumbaflappy\LakeLawn\</OutputDir>
        </AssetGroup>
        <AssetGroup Name="mymaterials">
            <Type>MaterialLib</Type>
            <Flags>
                <FSXCompatibility>false</FSXCompatibility>
            </Flags>
            <AssetDir>PackageSources\rhumbaflappy-c59-materials\</AssetDir>
            <OutputDir>MaterialLibs\rhumbaflappy\</OutputDir>
        </AssetGroup>
        <AssetGroup Name="mymodellib">
            <Type>ArtProj</Type>
            <Flags>
                <FSXCompatibility>false</FSXCompatibility>
            </Flags>
            <AssetDir>PackageSources\rhumbaflappy-c59-modelLib\</AssetDir>
            <OutputDir>scenery\rhumbaflappy\LakeLawn\</OutputDir>
        </AssetGroup>
        <AssetGroup Name="myscene">
            <Type>BGL</Type>
            <Flags>
                <FSXCompatibility>false</FSXCompatibility>
            </Flags>
            <AssetDir>PackageSources\rhumbaflappy-c59-scene\</AssetDir>
            <OutputDir>scenery\rhumbaflappy\LakeLawn\</OutputDir>
        </AssetGroup>
        <AssetGroup Name="myshapes">
            <Type>BGL</Type>
            <Flags>
                <FSXCompatibility>false</FSXCompatibility>
            </Flags>
            <AssetDir>PackageSources\rhumbaflappy-c59-shapes\</AssetDir>
            <OutputDir>scenery\rhumbaflappy\LakeLawn\</OutputDir>
        </AssetGroup>
        <AssetGroup Name="mysimobjects">
            <Type>SimObject</Type>
            <AssetDir>PackageSources\rhumbaflappy-c59-SimObjects\SimObjects\Animals\rhumbaflappy-c59-Bears\</AssetDir>
            <OutputDir>SimObjects\Animals\rhumbaflappy-c59-Animals\</OutputDir>
        </AssetGroup>
    </AssetGroups>
</AssetPackage>

PackageSources:
PackageSources.png


Package output:
Packages.png


If you organize this way, everyone using your package will know exactly where everything is, and it's unique name. And you'll know where everything is in your sources when you work on the project. And yes, try to keep everything in the package in as few folders as you can.
 
The above is just how I organized that project. The important thing is to try to get descriptive names in the output, so anyone using that scenery knows what the BGLs are. Microsoft, for example, organizes well, but all their model libraries are named modelLib.BGL. Not a good idea. They have several of these in several sceneries. <company name>-<airport>-<type> keeps the output recognizable. The package source files aren't that important as long as you know where things are (but watch the source name for the modellibs as it controls the package name.
 
Thank you for sharing this Rhumba. My package magically stopped producing me a layout.json and manifest.json file when cleaning/building. See my screenshot. Have any idea as to why? I use to be able to (lol!).

I have to use the .json validator everytime and then it seems to work, if I dont do this then every modelLib is UNKNOWN in scenery editor and scenery is all empty.

Same thing happens when following your definition hierarchy. I was excited to test it to see if it would solve but still does not generate them! lol

Maybe you can chime in a help me out.


Screenshot_24.jpg




Here's a example of a definition:
XML:
<AssetPackage Name="rhumbaflappy-airport-c59-lakelawn" Version="0.1.0">
    <ItemSettings>
        <ContentType>SCENERY</ContentType>
        <Title>Lake Lawn Airport</Title>
        <Manufacturer>rhumbaflappy</Manufacturer>
        <Creator>rhumbaflappy</Creator>
    </ItemSettings>
    <Flags>
        <VisibleInStore>false</VisibleInStore>
        <CanBeReferenced>false</CanBeReferenced>
    </Flags>
    <AssetGroups>
        <AssetGroup Name="ContentInfo">
            <Type>Copy</Type>
            <Flags>
                <FSXCompatibility>false</FSXCompatibility>
            </Flags>
            <AssetDir>PackageDefinitions\rhumbaflappy-airport-c59-lakelawn\ContentInfo\</AssetDir>
            <OutputDir>ContentInfo\</OutputDir>
        </AssetGroup>
        <AssetGroup Name="myairport">
            <Type>BGL</Type>
            <Flags>
                <FSXCompatibility>false</FSXCompatibility>
            </Flags>
            <AssetDir>PackageSources\rhumbaflappy-c59-airport\</AssetDir>
            <OutputDir>scenery\rhumbaflappy\LakeLawn\</OutputDir>
        </AssetGroup>
        <AssetGroup Name="mymaterials">
            <Type>MaterialLib</Type>
            <Flags>
                <FSXCompatibility>false</FSXCompatibility>
            </Flags>
            <AssetDir>PackageSources\rhumbaflappy-c59-materials\</AssetDir>
            <OutputDir>MaterialLibs\rhumbaflappy\</OutputDir>
        </AssetGroup>
        <AssetGroup Name="mymodellib">
            <Type>ArtProj</Type>
            <Flags>
                <FSXCompatibility>false</FSXCompatibility>
            </Flags>
            <AssetDir>PackageSources\rhumbaflappy-c59-modelLib\</AssetDir>
            <OutputDir>scenery\rhumbaflappy\LakeLawn\</OutputDir>
        </AssetGroup>
        <AssetGroup Name="myscene">
            <Type>BGL</Type>
            <Flags>
                <FSXCompatibility>false</FSXCompatibility>
            </Flags>
            <AssetDir>PackageSources\rhumbaflappy-c59-scene\</AssetDir>
            <OutputDir>scenery\rhumbaflappy\LakeLawn\</OutputDir>
        </AssetGroup>
        <AssetGroup Name="myshapes">
            <Type>BGL</Type>
            <Flags>
                <FSXCompatibility>false</FSXCompatibility>
            </Flags>
            <AssetDir>PackageSources\rhumbaflappy-c59-shapes\</AssetDir>
            <OutputDir>scenery\rhumbaflappy\LakeLawn\</OutputDir>
        </AssetGroup>
        <AssetGroup Name="mysimobjects">
            <Type>SimObject</Type>
            <AssetDir>PackageSources\rhumbaflappy-c59-SimObjects\SimObjects\Animals\rhumbaflappy-c59-Bears\</AssetDir>
            <OutputDir>SimObjects\Animals\rhumbaflappy-c59-Animals\</OutputDir>
        </AssetGroup>
    </AssetGroups>
</AssetPackage>

PackageSources:
View attachment 69707

Package output:
View attachment 69708

If you organize this way, everyone using your package will know exactly where everything is, and it's unique name. And you'll know where everything is in your sources when you work on the project. And yes, try to keep everything in the package in as few folders as you can.
 
After you load a Cleaned project, do you use 'Build All' in the Project Editor? Or do you use 'Build' in the inspector? I use 'Build All' after I load a project. Seems to work. But, truthfully, there have been the unknown objects at unpredictable times. That's a good catch to generate the JSON files.
 
I actually just added a creator and manufacturer, clicked it again and now it is building with the build all button :eek:😂 - ill report back to tell you if they are now there when done. Lots of models and textures and CGL so will be 10 mins for sure.
 
So, unfortunately still no layout.json and manifest.json with the build all button as well. I removed the CGL definition for giggles so now I see a ton of XML errors. I'm sure this is the root issue of my problem. These validation errors now of course brought a ton of texture warnings as well now.

Im wondering if you can reverse engineer this console for me.



Screenshot_27.jpg
.


k. But, truthfully, there have been the unknown objects at unpredictable times. That's a good catch to generate the JSON files.
 
Oh my goodness. They are there now! One of the red errors on my console gave me an XML line error. I went to my airport.xml and I deleted it. The error got removed and then BOOM! Layout.json and Manifest.json got generated....

I "CTRL+Z'd" the line and the error was able to replicate telling me WHATEVER in GODS name was in that painted element entry the MSFS God's didn't like it 😂 .

Screenshot_28.jpg


Can't believe this....there they are now! lol zero red errors. :D

Happy camper. I can finish my first payware project now.

Screenshot_29.jpg
 
Whew. Glad you found where the error was. Did you ever discover what the illegal character was at position 98 of that line?
 
Whew. Glad you found where the error was. Did you ever discover what the illegal character was at position 98 of that line?
I inspected the actual syntax - no errors, however I think I had some elements that where associated with a material that wasn't to the power of 2 and i had deleted it but somehow that remained? Or SOMETHING along those lines. I get nice clean/builds now with no problem. So until my next issue Ill be okay to continue progressing lol

thanks rhumba!
 
Back
Top