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

Could someone please post a 'generic package'

Messages
1,833
Country
australia
I am trying to create a library containing a number of scenery objects I have created and have found that the tool fspackagetool is used (please advise if this is untrue).

I have also followed a YouTube video MSFS SDK Tutorial - How to build your packages outside of the sim. and I hope I am not wasting my time using this to learn how to create a library (.bgl) containing scenery objects.

I have used an existing 'ADE project' as the basis for this 'project' changing filenames, folder names and relevant data in the top .xml file however when I execute fspackagetool it results in error "provided project definition file does not exist".
I have checked everything but obviously missed something.

I have found samples in SDK but not sure if it is the SAMPLEMATERIALS or SIMPLESCENERY I should use as the 'bones' for my project (I think the SimpleScenery is that correct)?

Thanks
 
Last edited:
I am trying to create a library containing a number of scenery objects I have created and have found that the tool fspackagetool is used (please advise if this is untrue).

I have also followed a YouTube video MSFS SDK Tutorial - How to build your packages outside of the sim. and I hope I am not wasting my time using this to learn how to create a library (.bgl) containing scenery objects.

I have used an existing 'ADE project' as the basis for this 'project' changing filenames, folder names and relevant data in the top .xml file however when I execute fspackagetool it results in error "provided project definition file does not exist".
I have checked everything but obviously missed something.

I have found samples in SDK but not sure if it is the SAMPLEMATERIALS or SIMPLESCENERY I should use as the 'bones' for my project (I think the SimpleScenery is that correct)?

Thanks

Hi John:

IMHO, it may prove important to specify that the 3D models are intended to be glTF rather than MDLs and thus not utilized in FSX Compatibility Mode. ;)

GaryGB
 
Last edited:
Hi Gary

Yes they are all giTF BUT (hold on) after I created the thread I remembered that I recently created a 3d satellite image (from maps.google) and I got tips etc from some video tutorials from FLYING THESTON who also showed how to set up the required folder structure and files using the Simplescenery sample from SDK (changing necessary 'things' in xml files and also filenames) and I am now thinking that I should do similar for my group of (.glTF models).

Would that be the go?

I never try and use MDLs now and if I want to I convert them with MCX.

John
 
Perhaps Dick and/or Jon might advise on an updated course of action for this (multiple) "library objects" BGL work-flow, since Dick's worked example using FSX Compatibility Mode also uses the ArtProj Asset Group type which, IIRC, Jon has stated to now be deprecated in the SDK by Asobo. :scratchch

https://www.fsdeveloper.com/forum/threads/fsx-objects-in-

https://www.fsdeveloper.com/forum/t...een-artproj-and-modellib-asset-groups.452289/msfs.448976/



GaryGB
 
Last edited:
It worked! I used the SimpleScenery sample and changed the things which needed changing and it compiled.
I now have my library .bgl file which contains only the scenery objects/models I want.

ALTHOUGH

Could someone please advise why the output library file (in Packages\\\) has been named Modellib.bgl

I would have thought the name would be set from the .xml file in the PackageDefinitions folder all I can find is the line
<AssetGroup Name="mymodellib">
which has mymodellib and not modellib as in the output .bgl filename.
Does it matter if I simply RENAME this file (from modellib.bgl) to "what ever name I like" .bgl?
 
Last edited:
It worked! I used the SimpleScenery sample and changed the things which needed changing and it compiled.

Moderator Please mark as solved

Hi John:

While I am glad you have resolved a challenge for your project, there are others who would welcome your explanation of a worked example posted here in this thread, which could be cited- and linked to- in the preceding related thread ...here:

https://www.fsdeveloper.com/forum/threads/hf2-libraries.453417/page-2#post-889185


Thanks in advance for sharing your insights with the rest of us. ;)

GaryGB
 
Last edited:
It worked! I used the SimpleScenery sample and changed the things which needed changing and it compiled.
I now have my library .bgl file which contains only the scenery objects/models I want.

ALTHOUGH

Could someone please advise why the output library file (in Packages\\\) has been named Modellib.bgl

I would have thought the name would be set from the .xml file in the PackageDefinitions folder all I can find is the line

which has mymodellib and not modellib as in the output .bgl filename.
Does it matter if I simply RENAME this file (from modellib.bgl) to "what ever name I like" .bgl?
You can just rename the modellib.bgl file as long as you change it in the layout.json file.

This needs to be done so that MSFS doesn't get messed up with too many modellib files.

Sent from my SM-G935F using Tapatalk
 
I think the filename is defined by the folder name for your library models, at least that's how mine worked.
 
Hi Gary
It is best to watch the the video tutorial (MSFS SDK Tutorial - How to build your packages outside of the sim.) which I did to work out how to set up the project package using the SimpleScenery (folder) sample in SDK which is copied to wherever you want to work on your package.
Following the video tutorial the foldernames are changed and TWO xml file are modified.
It is a lot easier to just watch the video than to try and explain everything which needs to be done and how.

Once that is done -

Copy fspackagetool from C:\MSFS SDK\Tools\Bin to where your 'project' is.
Then it is easier to run a BATch file to do the work.

This is the .BATch file I created (I have also attached it). PLEASE NOTE lines beginning with title are not executed. If you want the commands highlighted to execute then remove 'title' from the start of the line

title The next line will Delete the old package from where your project
title rmdir /Q /S "H:\PROJECT_FOR_DOCKS_library\Packages\my_docks"

title The next line will Delete the old package from the community folder
title rmdir /Q /S "C:\Users\John\AppData\Roaming\Microsoft Flight Simulator\Packages\Community\mydocks"

title The next line will Build the Package - it can take some time check for errors at the end
fspackagetool H:\tutorials\scenery\FloatingDocks\FloatingDocks.xml -outputdir "H:\tutorials\scenery\FloatingDocks" -tempdir c:\temp

title The next line will copy contents of the output (in the Packages folder) to the MSFS Commuinity folder
title xcopy "H:/project_for_docks_library\Packages\*" C:\Users\John\Appdata\Roaming\Microsoft Flight Simulator\Packages\Community" /s /i

OF COURSE you will need to edit and modify the .BATch file for your own purposes (username etc)


Hope this helps.
 

Attachments

Thanks John:

As you may now know, Jon directed us to recent info in the ADE docs online, regarding, AFAIK, how to create Scenery Object Libraries:

https://www.fsdeveloper.com/forum/threads/hf2-libraries.453417/post-889185

https://www.scruffyduck.org.uk/ade_2020_help/BuildingLibraries.html


You stated above that you had used the MSFS SDK Simple Scenery Sample to create a "Library".

[MSFS SDK 0_14_0_0 install path]\Samples\ ...does not provide a "Simple Scenery Object Library" worked example. :pushpin:


I believe it could be helpful if you would clarify "what" you changed in Simple Scenery Sample ...to create a "Library". :scratchch

Thanks again in advance for sharing your insights with the rest of us here. :)

GaryGB
 
Last edited:
To clear any confusion, the SimpleScenery sample compiles using FSPackagetool.exe into a model library of two objects.

library.JPG
 
The Simple Scenery sample dumps the model as modelLib.BGL. That has been proven to be a big No-No. They never corrected it. It also has a placement BGL, which no one wants in a Library only package.

The example I gave creates a folder named My-modelLibrary_001, and that has a file named My-modelLibrary_001.BGL Change "My" to the creator's name and you have a unigue folder and file in the package, such as rhumbaflappy-modelLibrary_001. The next library could be rhumbaflappy-modelLibrary_002...
 
Ok, great. I had really been addressing the statement that there is no model library in the SimpleScenery sample and I think, given the respected reputation of the source, combined with the fact that what people see is an example of a model library, could confuse some and almost certainly would me.
However, I tend to take things very literally and don’t intend to project that gullibility into the general populace.

With that said, my simple mind studied your, I believe, Lakelawn scenery and also the SimpleScenery sample and by adding the name for my scenery location “sansha,” I came up with a working sanshamodelib, that I use to this day - and not to say there is anything wrong with Lakelawn, there wasn’t, but it was actually too well composed, imo, you obviously understand MSFS very well and it shows in your offerings. For example, you have all your asset packages compiled into a neat compact file structure that differs so greatly from the MSFS standard, I couldn’t figure it out, back when I was first starting MSFS scenery development.

it is probably that I am too literal and not intuitive enough, I want my solutions handed to me, but maybe even this account, offers enough bread crumbs for someone to pick their way through this MSFS scenery developing “adventure.”
 
Not sure about the replies. All I know is that using the SimpleScenery sample AND watching the video which explains FULLY exactly how and what to modify in the folders and .xml files AND adding your models to the PackageSources folder (as you do even in ADE) AND either manually executing the fspackagetool (requires you to have a CMD window open) or setting it up to execute in a .BATch file it produced for me a SINGLE .BGL file which contains all the models which I had placed in the PackSources folder.

In case it helps I will start explaining how to set up a project with the SimpleScenery sample from SDK.
COPY SimpleScenery(folder) sample from SDK samples to where you want to work with it. I chose the root directory of my H: drive to make it a bit easier
RENAME SimpleScenery (folder) to whatever you want to call your project eg MYDOCKS
'Open' MYDOCKS where you will find 2 folders and 1 .xml file
example1.jpg

RENAME the .xml from SceneryProject to your project name in this example MyDocks
EDIT MyDocks.xml using NOTEPAD and CHANGE mycompany-scenery-simple to your project name in this example MyDocks - refer below
example2.jpg


SAVE file
Open the PackageSouces folder
There are two sub folders ModelLib and Scene
Open the Scene folder and DELETE any files in there (eg DELETE Objects.xml)
Return back to the PackageSources folder
Open (folder) ModelLib
There three folders Light_Sample, SampleMyBox and Texture. DELETE the first 2 folders keeping the Texture folder
Return back to the PackageSources folder
RENAME the Modellib folder to your preference I changed mine to MyDocks-ModelLib
Return back to the top level
Open (folder) PackageDefinitions
You will see a folder and .xml file as below
example3.jpg

RENAME each one by changing mycompany-scenery-simple to your project name in this example MyDocks
EDIT the .xml file (eg MyDocks.xml) using NOTEPAD and change values underlined in different color as follows
Underlined in RED from mycompany-scenery-simple to your project name eh MyDocks
Underlined in GREEN to the name you gave the modellib folder in PackageSources in this example MyDocks-ModelLib
The others aren't critical however you might like to change them as follows
Underlined in BLUE <Creator> from MyCompany to your name or initials
Underlined in PINK <title> to a description title of your project eg My awesome docks
Underlined in light blue from mycompany to say MyDocks

[added later] please note that Asset Group TYPE should be ModelLib not ArtProj. This was pointed out later by tobrob (see following post)



example4.jpg

SAVE

That's about it apart from COPYing your models to the PackaSources\??????Modelib folder and their associated textures to the texture subfolder and then using fspackagetool to compile/build your .bgl library.

I hope this helps. It certainly worked for me as I now have a SINGLE .BGL file which contains all the models I placed into the ????modellib folder which I can open using MCX and view them.
 

Attachments

  • example4.jpg
    example4.jpg
    251.8 KB · Views: 168
  • example4.jpg
    example4.jpg
    252.4 KB · Views: 163
Last edited:
I hope this helps. It certainly worked for me as I now have a SINGLE .BGL file which contains all the models I placed into the ????modellib folder which I can open using MCX and view them.
Note, though, that the Artproj asset group shouldn't be used now, you can replace this with the ModelLib asset group.
 
Thanks for that. I saw something about that recently. I have updated my method and image of the .xml (above) and I will update my .xml and rebuild my library.
I wonder if and when MS get around to changing the .xml in their 'samples'?
 
Last edited:
Hi again:

A Scenery Object Library typically contains multiple 3D models inside (1) BGL ...which does not contain any placement info. :pushpin:

This has been the case since at least FS2000 (and perhaps even in rudimentary form, since FS98), via special source coding structures compiled into BGLs that changed from original ASM / SCASM languages to various XML types ...over time.


A Scenery Object Library BGL is compiled by the SDK in such a way that it contains the actual 3D model inside it.

A 'placement' BGL is intended to be compiled by the SDK such that it contains only the code required to place 3D models ...located elsewhere.


Unfortunately, MSFS SDK chose to use ModelLib as a Folder chain name to identify whereabouts of any / all 3D models within PackageSources code. :banghead:


We must take care with how we use the term "library" in the context of FS development, so that we do not confuse a PackageSources folder path (regardless of any unique name we give it to avoid MSFS VFS ModelLib naming conflicts), with a type of BGL containing (multiple) 3D models ...that are intended to be 'placed' via an entirely separate BGL that contains only placement code.

PS: I also would rather NOT see the FSDeveloper community once again make matters more complicated, by using "hybrid" BGLs that contain both multiple 3D models and their placement code inside the very same BGL, or to then make matters even more complicated by using those 3D models in "geo-locked" mode to prevent them from being placed outside a very small Geographic area. :alert:

GaryGB
 
Last edited:
You've lost me. I am not trying to do anything just reiterate what I have seen in a youtube tutorial. Please "don't shoot the messenger"
 
Last edited:
Back
Top