• 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 Converting P3D library to MSFS

MatthiasKNU

Resource contributor
Messages
962
Country
germany
Hello together!

First of all, I have to get rid of the following:
I don't have created anything for the MSFS yet, I don't even really understand the MSFS scenery package system.
I am an absolute beginner here in MSFS, so please forgive my perhaps stupid questions...

So what do I want to do now?

I have created a "Static Aircraft" library in P3D from AI aircraft (Only for myself, without sharing of course, before someone asks about copyright).
This library now contains many thousands of aircraft/livery combinations and is about 16 GB in size.
I already have the Static Aircrafts from LatinVFR for the MSFS, but I simply like mine from the P3D better, which is why I would very much like to have them in the MSFS as well.

For P3D I have a scenery folder here with bgls for each aircraft type, in this bgl there are then different numbers of library objects with the different liveries.
This looks - here as an example for the Airbus A321 - as follows:
zwischenablage016zd9f.png


I then placed the models quite classically in ADE, and then created a bgl for each airport, which only contains the placement of the aircraft.

Sooo, my simple question is now the following:
How can I now bring this library into the MSFS?

I imagine here - ideally - 2 folders in the community folder:
- "static-aircraft-library" (Where the bgls and textures for all the models are located)
- "static-aircraft-placements" (where the placement bgls for all the airports end up)

But what I don't know now:
1. how do I convert these folders with all the bgls as shown in the screenshot above so that I can use the models in MSFS. (Ideally with the MCX, that's where I know best...).
2. does the structure as I imagine it in MSFS work at all?

I'm sure there is already information on this, but either I'm not finding it, or I'm just not getting along with it yet either.
I have also read through the MSFS SDK, but I can't do anything with it, sorry. Just a beginner.

Thank you all so much in advance!

Best regards
Matthias
 
Hi Matthias,

I think you would want an automatic or semi-automatic method but I don't think you can find it easily.

1) I had a similar problem in Jan 21, with a library of some objects (airport vehicules objects).
I had to transform them one by one with MCX and then I created a project in the sense of the MSFS SDK to include all the gtlf with the transformed textures in png which allowed me to create a new MSFS library.

For the placement, via the DEV MOD one calls the library and one places graphically the objects rather easily. The result is compiled in a new BGL.

2) Yes, this structure can be used but with the methodology described above, you obtain one entry in the Community folder

For exemple, I prepared for you a ZIP file which content the necessary directories and the BAT compilation file.
To use it, read the Sample directory of the SDK, read then the XML files that I have prepared, change "my names" in XML files and create your object in MSFS format (a bin + a gltf and a xml for each object).
Take care of GUIDs : one GUID for each object and library.
 

Attachments

Hi Didier!

Well, of course it doesn't have to be fully automatic, I don't have a problem converting each bgl individually.
As long as I don't have to convert each model individually, almost any solution would be fine with me.

I have already managed to convert the Gulf-V into the gtlf format with the MCX Batch Convert tool.
When I add the textures, the model is then displayed in the MCX as it should be.

zwischenablage01h2fme.png


What I don't know yet, however, is how to get it into the MSFS...
 
What I don't know yet, however, is how to get it into the MSFS...
If you look at the SDK samples, the SimpleScenery example has the exact file structure you need to adopt, with the exception that it contains two objects and yours will contain several. Scenery placement is accomplished with the exact same pattern as FSX/P3D, you register, or load a scenery library, then you place the objects in a placement file.
it doesn't have to be fully automatic, I don't have a problem converting each bgl individually.
As long as I don't have to convert each model individually, almost any solution would be fine with me.
You may want to augment your models, to incorporate PBR features into them. The virtual files system makes it easy to update a library, you can start with a library of geometric shapes. I exaggerate for demonstration. After placing 20 or 30 basic cubes, cylinders etc, you can save your scenery. Now, you can edit one, or two objects, replace them with detailed models or, models with PBR and the next time you load the scenery, those objects will already be placed.
 
Hi,

MCX can export to the MSFS package structure directly as well. So it might be a worth a try to export your library in that format and see if the MSFS package tool compiles it fine. Usually I also convert the textures to PNG in that case, but it might also work without that step.
 
Sooo, my simple question is now the following:
How can I now bring this library into the MSFS?
To make a true glTF library for MSFS...

First, you need to make a Project folder. I attached such a folder as a zip file. You can unzip it on your desktop, or anywhere.
Inside the PsckageSources folder, you'll find this:

folders.png


Converted MDLs will go into static_aircraft, and textures will go into texture.
Now you need to use MCX. First, set the options for exporting the MSFS models as glTF:

options.png


Then, use MCX Wizards | Batch Convert...

convert.png


Textures go into the \P3dSceneryLibrary\PackageSources\modelLib\texture folder and glTFs go into \P3dSceneryLibrary\PackageSources\modelLib\static_aircraft

Now the Project can be compiled through the DevMode or the fspackagetool. The result is a model library package that can be placed into the Community folder.
 

Attachments

Hello Mathhias,

The ZIP that I have send above contains a entire project (it is a copy of Sample directory from the SDK).

All you need is :
- to edit and modify the XML file to map your projet (change "frenchvfr" expressions for "matthias" for exemple),
- drag and drop yours aircraft files (in gltf format) in the directory where you find "Object-one" and "Object-two",
- drag and drop textures in the Texture directory at the same level that Object-one,
- and launch the BAT to compile the project to obtain in the Package directory the root directory that you copy in Community.
 
Thank you all, I have already managed to create a package that I can add to MSFS!

But now I have two problems...
1. I still have a bit of trouble with the textures - I just took the DDS textures, packed them into the texture folder, and used them to create the package. It worked, and if you mirror the textures (which is no problem) the result doesn't look too bad. But it still doesn't look right, because the textures have a strong grey colour:
clipboard01f6du9.png


2. I have named the models all after the respective airline (e.g. FAIB_A320_CFM_ohy). However, these names were not taken over, instead the names were simply numbered (FAIB_A320_lib_001...). Is there a chance to take over the names here?
clipboard01tjftl.png
 
Hi Matthias:

MCX makes an attempt to emulate the display one may have in P3D and/or MSFS at run time with PBR via OpenGL shaders.

The 3D preview is only "approximate", and only actual run time display will let us see what the FS rendering engine will show us.

One may be able to optimize the MCX preview for 3D models that do not have PBR textures, by toggling the 'TeaPot' icon OFF.

Additionally, one may be able to optimize the MCX preview for 3D models that do not have PBR textures, by toggling the 'Adjust Light Direction' icon ON, and changing the Azimuth etc.

In some cases, one may be able to optimize the MCX preview for 3D models that do not have PBR textures, by toggling the 'Light From Camera' icon ON.

Of course, the best way to see how FS will actually render a 3D model is within the sim itself, as no 'external' preview is perfect.


Be aware that MCX uses Binary counting, so object #1 is counted as "000", thus MCX may number objects according to their sequence within a BGL or MDL file.

I'm not sure, but AFAIK, MCX does the same with listed MDLs based on their sequence in Aircraft.Cfg files.

But, I agree with the importance of having a new option to keep the original object name from the MDL file OR using the name it derives from within a MDL or its legacy Objects.txt file ...without being forced to accept that derived from the Aircraft.Cfg file.

I hope this info might prove helpful. :)


GaryGB
 
Last edited:
Hi,

When the object names are not taken over, from which format did you read the library?

For the look of the textures, is the library you converted using pbr materials already? If not, that's like an influence.
 
Thank you all, I have already managed to create a package that I can add to MSFS!

But now I have two problems...
1. I still have a bit of trouble with the textures - I just took the DDS textures, packed them into the texture folder, and used them to create the package. It worked, and if you mirror the textures (which is no problem) the result doesn't look too bad. But it still doesn't look right, because the textures have a strong grey colour:

Yes, I'd re-export those textures as .png, before running the operation, but I'm kind of methodical that way. Gary is right, MCX does not display MSFS transparency and the work space render does not accurately match the MSFS render. Arno works very hard, but the view port is adequate for alignment and placement only, you have to "proof" graphics in the simulator, but, check this out:

Say you are in a DevMode session and you come across a model you don't like. No problem, open up Photoshop, or Blender or whatever, do your edits, run it through the exporter and now it's a "ModelLib package," or whatever convention you are calling it. If you're editing a texture, the process may take a minute or two. Back in the simulator DevMode session that you never closed, simply apply "Build all" and your edit will be available for placement, or will have replaced an already placed model. The build operation will run quickly, depending on the number of edits you've made. If you use "Clean all," it will completely refresh the virtual cache, but it will also delete the "packages" folder in your project directory, this is important to remember if you save sequential package builds, I do.

If you use "Clean all," it will increase the time required to build the package, but it will also remove instances of placed models you've edited, in case you wanted to see those changes immediately.
 
Hello all!

I have now managed to convert a small library with 5 models. I could have tested the textures in MSFS beforehand, because it works.

I could not take over the names so far - so far I use the MCX Batch-Convert-Wizard, put all (P3D-) bgls in, and export them as MSFS Scenery Package.
However, since the GUIDs are taken over, this is probably not quite so tragic for the time being.

Since the small library has now worked, I have now simply converted all the bgls, so that in the end there were 3049 models in gltf format. I then tried to compile them with the fspackagetool - just as I did with the small library. This actually worked as far as it could. In the packages folder I have my folder "static-aircraft-library" with the subfolder ContentInfo and scenery. Unlike my small library, however, the files layout.json and manufest.json are missing, although the fspackagetool runs without errors and also exits.
For this reason, the library is not recognised/not read by the MSFS.

So what am I doing wrong here, or how do I create the two json files?

The second: I would like to take over the Placement-bgls from the P3D - I know that this is possible and that I actually only have to add 180° to the headings of the models.
Now I have the "new" bgls for the MSFS, so to speak, but how can I add them so that I don't have to (ideally) recompile them every time?

I am adding new airports bit by bit, so it would be ideal for me to have a folder "static-aircraft-placements" in the community folder, where I can simply save the bgls one after the other...

Again, Thank you all very much for your really excellent help!
 
The reason the manifest.json and the layout.json weren't generated is because of a compiler failure of some sort. The fspackagetool should have reported the failure.
The manifest.json is pretty simple. It can be made with a text editor. Here's an example:
JSON:
{
  "dependencies": [],
  "content_type": "MISC",
  "title": "Basic Lake Lawn",
  "manufacturer": "",
  "creator": "rhumbaflappy",
  "package_version": "0.1.0",
  "minimum_game_version": "1.26.5",
  "release_notes": {
    "neutral": {
      "LastUpdate": "",
      "OlderHistory": ""
    }
  }
}
The content_type could be scenery as well for your purpose.

The layout.json is a list of the package contents. Inside your package, make a blank layout.json file, then you can use MSFSLayoutGenerator to fill that blank file (drag'n'drop onto the app).
 
The reason the manifest.json and the layout.json weren't generated is because of a compiler failure of some sort. The fspackagetool should have reported the failure.
The manifest.json is pretty simple. It can be made with a text editor. Here's an example:
JSON:
{
  "dependencies": [],
  "content_type": "MISC",
  "title": "Basic Lake Lawn",
  "manufacturer": "",
  "creator": "rhumbaflappy",
  "package_version": "0.1.0",
  "minimum_game_version": "1.26.5",
  "release_notes": {
    "neutral": {
      "LastUpdate": "",
      "OlderHistory": ""
    }
  }
}
The content_type could be scenery as well for your purpose.

The layout.json is a list of the package contents. Inside your package, make a blank layout.json file, then you can use MSFSLayoutGenerator to fill that blank file (drag'n'drop onto the app).
Thanks a lot, that worked!
Now the library appears in the MSFS.

Nevertheless, the textures do not really look right, they are displayed as grey in the end, just like in MCX. But the P3D library already uses PBR textures...
 
the P3D library already uses PBR textures...
I believe the P3D convention is different from MSFS. My mnemonic is "ARM," for the red/green/blue channels: Anisotropic Occlusion, Roughness and Metallic.
 
I believe the P3D convention is different from MSFS. My mnemonic is "ARM," for the red/green/blue channels: Anisotropic Occlusion, Roughness and Metallic.

Yes P3D and MSFS use the channels of the composite PBR texture different. The material convert function in the material editor can change P3D PBR textures into MSFS PBR textures.
 
Yes P3D and MSFS use the channels of the composite PBR texture different. The material convert function in the material editor can change P3D PBR textures into MSFS PBR textures.
Is it possible to do this as a batch job for all 3000+ models?
 
Yes, it should be available as a batch operator as well, but I can't remember exactly where :)

Edit: just checked, it is the operator called Convert Materials that does this. You need to make sure that you save the textures afterwards of course as they will be updated.
 
Back
Top