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

resample and "separating LODS"

  • Thread starter Thread starter igr
  • Start date Start date

igr

Messages
113
This topic simply continues from previous post called "How to crop image before resample".

Explanation of the topic:
I will not do export of LODs to separate files, because that would generate thousands of files. I just will covert files by ImageMagick to resize them and join them as I need. Batch file can do this job.


I would resize the files to LODS 5,6,7,8 and maybe 9. This way the files will be bigger, but they will be only a few. I hope this should enhance and short loading process. Whole scenery pack is divided into separate sceneries so when man wants to fly only one scenery, there will not be loaded more more sceneries than this one or the neighbor sceneries.

Dimensions. For LOD8 it should be file 752x1264 (87MB, probably divided in two parts) and for LOD 1504x2528 (cca 174MB, probably divided on more parts). I have no problem with resize of source data and auto-joining the images. I have tables and files with data I need to run resample. So I will make batch file.

Tell me, was my assumption right when I did these calculations of LODS?
Code:
original pack 4096	 LOD5-15	22 858 957	22 323
tile dimension	LOD	total size [KB]	total size [MB]
4096	LOD15	15*238*955	14*882	187*773*747	24*630*171
2048	LOD14	5*714*739	5*581	46*943*437	6*157*543
1024	LOD13	1*428*685	1*395	11*735*859	1*539*386
512	LOD12	357*171	349	2*933*965	384*846
256	LOD11	89*293	87	733*491	96*212
128	LOD10	22*323	22	183*373	24*053
64	LOD9	5*581	5	45*843	6*013
32	LOD8	1*395	1	11*461	1*503
16	LOD7	349		2*865	376
8	LOD6	87		716	94
4	LOD5	22		179	23
	sum	22*858*600

So the data with LODs 5-9 I will move to "common files" scenery. This would enhance performance during loading of the game, because I hope the LODs that are far enough (in other scenery) would not be loaded.

My second question is how to do it with BMP background which is white? I must create blend mask for the white spaces, right? So I should go to editor, open Bitmap, select white color areas by magic wend and then save selection as mask or image... save as tiff. The size would be same as by BMP file, method would be same as the tiff method used in inf files. Coordinates will be the same as by BMP file and xdim and ydim should be also the same... Am I right?
 
Last edited:
You know,

I looked at this some time ago, then someone who knows much more about this than I do pointed out that FSX reads the headers of large photoreal bgl files, then reads only the bits it needs.

The oft maligned FSX engine is actually pretty efficient in some ways.

The main reason to break up files is to keep under the 2Gb filesize limit, rather than any performance benefit.


Sent with Tapatalk for iPhone
 
So your opinion is that this will not effect loading of bgl files? FSX loads all bgls during starting scenery, regardless if it needs this for starting location?

Does somebody know when FSX starts to use some LOD tile? I mean for example distance of aircraft or altitude of aircraft when FSX starts to load and use LOD8 or LOD9. This point of my interest. Because I calculated the size of tite for this two should be 16x16 and 32x32 px. That is just a little icon, so what if FSX misses some LOD tile? Does he open the bigger tiles (higher LODs) and blures them?
 
Last edited:
Hi,

I agree with what Ian said (and I already mentioned that in another thread of you as well). I would try to put as much in one BGL as possible, that seems the most efficient way. If the size (2 GB) is an issue, resample has an option to automatically split different areas in different files. But all LODs of that area still end up in the same file.

The rendering engine will read the parts it needs. And it seems having everything in one file only makes that more efficient.

When a certain LOD is read depends on a lot of things. It depends on your position (distance to the piece of scenery), on the screen resolution, on the settings of FSX, etc. So there is no easy answer for that.
 
In addition to what Arno has written, the zoom level of your viewport will affect which LOD is used.

The changing position or view would require constant disk-drive loading if you were to try to separate LODs... which is why you would want as few files as possible.

There is no need to pre-size source files. Resample does the processing when you specify destination LOD and dimensional bounds.

Dick
 
Hi,
I would try to put as much in one BGL as possible, that seems the most efficient way. If the size (2 GB) is an issue, resample has an option to automatically split different areas in different files. But all LODs of that area still end up in the same file.

I could join areas of the dimmensions of QMID Level 11 (LOD9) together. That is 3x3 files together. Could be 75 MB files. User should have the possibility to use just one region (1GB) if he wants. QMID 10 (LOD8) seems to mee too big. It is more simple to work with less size files.

When Ian spoke about headers. Does it mean: the more files, the more headers? So if there is less files, then less header data?
 
Last edited:
Thanks for your reply (and to all previous senders).

In addition to what Arno has written, the zoom level of your viewport will affect which LOD is used.

The changing position or view would require constant disk-drive loading if you were to try to separate LODs... which is why you would want as few files as possible.
I don't undrstand why. When the file with LODs Would have 164MB, so the file is still in memory. It should not reload the file again and again. You probably mean higher LODS like LOD9(?) and LOD10 and higher. In this case, yes. When the view changes so FSX must load some of the LOD9 files. Thats the reason to keep the filesize not too much big. On the other side, two guys here say "keep the filesize under 2GB". So what should I choose? I think that the best way is to make (first method) two 32MB files for LOD5-8 textures, Some 32MB files for LOD9 textures and then (second method) to create files at area size QMID level 12 (LOD10) which will contain LOD10-LOD15. The reason for this is, that it is simple to manipulate with textures and bgl files with size of QMID level 12.

If I would choose to generate e.g. 1GB bgl file for every scenery region, that would be effecient, but harder to work with it.

There is no need to pre-size source files. Resample does the processing when you specify destination LOD and dimensional bounds.

Dick

There is more reasons why I want to do the presize. First the time periods will be much shorter. Else I would must wait really long to finish this demanding tasks.

The second reason, I think it would take too long. Maybe the resample would have problem to load all 80GB (or more?) of BMP data to proccess them in input. With ImageMagick I can do it by directories. I can do it by 1GB blocks.
 
Last edited:
The data within a single bgl (apparently) tells FSX which bits are where, so it doesn't need to load the entire file. It only loads the LOD levels it needs for the regions it needs.

This is more efficient than the windows file system, so it is better to have less files.

The maximum bgl output you may have is 2gb, so 80gb of source will likely need to be broken up into smaller chunks.

If I was doing this, I would be using Globalmapper, or similar, and compiling all the LOD levels into a single file, for a single region.


Sent from my iPad using Tapatalk HD
 
Unfortunately, I have two big mistakes in my calculations!

1) File size is not x/2 but x/4
2) I cannot calculate file size for lods5-14 because I know only total size for all lods, not size of LOD15, but LOD5-15.... This was my mistake. Is here any great mathematician, that would be calculate the sizes for next LODS?

The data within a single bgl (apparently) tells FSX which bits are where, so it doesn't need to load the entire file. It only loads the LOD levels it needs for the regions it needs.

This is more efficient than the windows file system, so it is better to have less files.

The maximum bgl output you may have is 2gb, so 80gb of source will likely need to be broken up into smaller chunks.

If I was doing this, I would be using Globalmapper, or similar, and compiling all the LOD levels into a single file, for a single region.


Sent from my iPad using Tapatalk HD

Thanks! This helps a lot.
 
Last edited:
calculated

I've calculated the correct sizes for every LOD. This time it should be correct, because I divided numbers by 4 (check first post). The size of LOD5-10 surprised. I should insert all to LOD 10 into one file which will be common for complete scenery pack.
Code:
LOD5-10		29	MB
LOD11		87	MB
LOD12		349	MB
LOD13		1395	MB
This is for 22 GB scenery (LOD5-15)
 
Last edited:
Back
Top