plane icon Welcome to Microsoft Flight Simulator’s SDK Q&A Platform!

You have questions regarding the SDK? DevMode Tools? SimConnect? You would like to submit an idea for future improvements, seek help or exchange knowledge? You’re in the right place.


Please take a moment to read the platform’s guidelines before you get started!


question

DrzewieckiDesign avatar image
DrzewieckiDesign asked Sasa commented

CGLs vs 1GB file size limit [Xbox]

Hi.

If the max file size for Xbox is 1GB then how can we include our CGLs, which are often >1GB?

We can split a CGL into several parts indeed, however for this to work, all those BGLs must be put in separate packages. As far as we (and other users) have tested, multiple CGL files can not be present in one package.

https://forums.flightsimulator.com/t/two-packages-using-the-same-cgl-tile/244335

https://forums.flightsimulator.com/t/how-to-have-more-than-one-cgl-in-a-folder/400821

Of course, the obvious solution is to go down with the quality but is this the only solution?

scenerydevs
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

FlyingRaccoon avatar image
FlyingRaccoon answered TerraBuilderTeam commented

Hello.

I don't know what kind of project you're working on but there are 2 ways to solve this:
- split your cgl in multiple non conflicting packages
- reduce the quality

The former is more adapted if you plan to cover large areas with your aerials, the latter for a localized aerial.
Allowing multiple CGL in a single package wouldn't solve the root problem that is the amount of available disk and ram space on an xbox.
If you feel it is impossible to reach acceptable quality with this limit, don't hesitate to provide more feedback.

Regards,
Sylvain

1 comment
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

TerraBuilderTeam avatar image TerraBuilderTeam commented ·

"- split your cgl in multiple non conflicting packages"

What exactly is a "non conflicting package"?

0 Likes 0 ·
Orcusiok avatar image
Orcusiok answered TerraBuilderTeam commented

Hi,

we're facing the same problem. Our CGL file is > 1 GB, so we cannot publish our add-on for the Xbox and reducing the quality is not an option. We already reduced the quality to be able to meet the 4 GB limit.

Someone on the Marketplace team told us that they've seen other developers split the CGLs into multiple files to work around the file size limit. While we can split the files, it remains unclear how to put them in the same package. Has something about this changed since July?

Kind regards

1 comment
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

TerraBuilderTeam avatar image TerraBuilderTeam commented ·
Hi, please check out my post below on how to split CGLs within the same project
0 Likes 0 ·
Sasa avatar image
Sasa answered Orcusiok commented

Following. Additionally it would help a lot not to be stuck to LOD20 in terms of aerial imagery, so the filesize of the CGL could be reduced considerably for some projects - particularly away from the immediate airport vicinity.

1 comment
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Orcusiok avatar image Orcusiok commented ·

Yes, that alone would likely solve our problems with meeting the file size limits altogether. Our CGL files would be much smaller in the first place and we wouldn't even have to think about splitting them up.

1 Like 1 ·
rotornut44 avatar image
rotornut44 answered rotornut44 commented

Just curious, I've been trying to find the limitations that references this. Is this limit still a thing, and if so, does anyone have a link? I assume this file size is of the extracted package as well.?

2 comments
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

DrzewieckiDesign avatar image DrzewieckiDesign commented ·

Hi. This is not a package limitation - it is a single-file limit. You cannot have a single file larger than 1GB and, apparently, for Xbox, you would not want that. There are lots of OOM issues with Xbox so we tend to reduce many textures in size to avoid that.

0 Likes 0 ·
rotornut44 avatar image rotornut44 DrzewieckiDesign commented ·
Thank you for the clarification! That changes everything.
0 Likes 0 ·
Sunay avatar image
Sunay answered TerraBuilderTeam commented

Hi all,

Can anyone please elaborate on these two choices indicated earlier;

-splitting into two separate packages, means we need to publish two scenery packages (ie, as A-West, A-East) ?

That doesn't seem preferable for an airport project. Is there another way to do that?

-reducing quality of what exactly in order to reduce cgl size, how?

Thank you

4 comments
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Sasa avatar image Sasa commented ·
Reducing quality is indeed difficult if everything is upsampled to LOD20...
1 Like 1 ·
DrzewieckiDesign avatar image DrzewieckiDesign commented ·
You can reduce the resolution and the file gets smaller. That seems to be the best solution.
0 Likes 0 ·
Sasa avatar image Sasa DrzewieckiDesign commented ·
Yes, but the final result will still be upsampled to LOD20. I understand that the filesize will get smaller because we have lost detail in the process but a direct conversion to a lower LOD would certainly be preferrable as the filesize will be even smaller than with the upsampled variant.
0 Likes 0 ·
TerraBuilderTeam avatar image TerraBuilderTeam commented ·

Hi, please check out my post below on how to split CGLs within the same project

0 Likes 0 ·
TerraBuilderTeam avatar image
TerraBuilderTeam answered Sasa commented

Hi!

We are also stuck on this. Does anyone have a clear explanation of whether splitting one large aerial imagery CGL into several adjoining ones (forming a mosaic of CGLs) works?

We have a large aerial imagery covering 170 sq.km., for a total CGL size of 4.4GB.

  • This works fine for non-Marketplace vendors, in fact, our product is out already with 2 3rd party vendors.
  • The problem is that when we try to create a package for MSFS2020 Marketplace, we get the "over 4GB limit" error.
  • To address this, we can split the scenery into 2 (or more if needed) components which are within the SAME package (@Orcusiok @Sunay, to answer your question, you don't need 2 separate packages, all you do is, set up your project to contain 2 or more CGL asset groups, with the output pointing to different folders whose names MUST contain "CGL", in our case "CGL_NORTH" and "CGL_SOUTH") (this "MUST contain CGL in the name" requirement popped up as an error in the console while we were figuring out how to do this)
  • This project set up results in a single package, containing two CGL components in separate folders. The RESULTING layout.json then looks like this:

    {
      "content": [
        {
          "path": "CGL_NORTH/300/sai110.cgl",
          "size": 182002528,
          "date": 133113881906400486
        },
        {
          "path": "CGL_SOUTH/300/sai110.cgl",
          "size": 325773245,
          "date": 133113882842953733
        },
        {
          "path": "ContentInfo/photoreal-project/Thumbnail.jpg",
          "size": 118977,
          "date": 133107878906204924
        }
      ]
    }

While this works on the compiler side (as in "Build All" command produces the package without any errors), the produced scenery package simply does not work, either causing a freeze, CTD or no-show in the area.

We've seen users successfully splitting their CGLs as per above, but we are unsure if these were aerial imagery projects or something else. So, does anyone know if there are any limitations on multiple aerial imagery CGLs existing side-by side, as a mosaic, comprising a large coverage scenery area?

Thanks!

4 comments
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Verticalsim avatar image Verticalsim commented ·
I honestly would just recommend making a projected mesh. You can play a lot more with it, and reloads are a TON quicker.
0 Likes 0 ·
TerraBuilderTeam avatar image TerraBuilderTeam Verticalsim commented ·
What exactly is a projected mesh? 3D topography object mapped with aerial imagery placed on top of default mesh?
0 Likes 0 ·
Verticalsim avatar image Verticalsim TerraBuilderTeam commented ·
Basically take your .tif or image, split it into how many tiles you want. Then replicate the amount of tiles in your 3D modeling program (such as Blender). I just do it using simple loop cuts. Then, you'll want to unwrap your tiles so it covers the whole of each of the tile images. After it's all done, you export it as one big object. Then switch to projected mesh in the SDK, and place it down. And slowly scale it in Blender over and over till you get it right.
1 Like 1 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 19.1 MiB each and 23.8 MiB total.