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

Decompiling a BGL File

Status
Not open for further replies.

Hi Lane:

Indeed, the optional steps cited in your post above merit consideration for a (future) expanded tutorial. :pushpin:


The guide I posted above was intended to assist Ken with gaining an initial familiarity with only the most 'basic' of procedures, as IMHO, they may be most pertinent to this 'current' phase of the learning process.

http://www.fsdeveloper.com/forum/threads/decompiling-a-bgl-file.434183/page-5#post-718999



Since Ken had indicated that he was only in the early phases of building his own "KBHM Terminal B-C", I thought it best to await his further development of the model ...before proposing that he:

* disable export of 2-Sided faces during export by Sketchup, or via MCX Material Editor

* implement draw call batching of all mapped textures via MCX

...as I had previously presented to Ken the option of using "transparent" / "translucent" materials for the Window panes.

http://www.fsdeveloper.com/forum/threads/decompiling-a-bgl-file.434183/page-5#post-717092


So, one may have cause to not disable export of 2-Sided faces during export by Sketchup in the event that Ken opts to create "transparent" / "translucent" Window panes within 3D walls.


IIRC, one may also have cause to distinguish textures which use such "transparent" / "translucent" material attributes, and to ensure they are grouped together onto separate texture sheets from those materials that do not require transparency (...especially if Draw Call Batching is implemented).



Certainly, if / when Ken asks me to present additional detail on other aspects of the scenery creation procedures under discussion in the "current" context of this (evolving) thread, I'd be glad to allocate some more of my limited available free time to try and help him further. :)

GaryGB
 
Last edited:
Hi Gary and Lane,
I found both of your posts interesting and I think I should bring up some points that may explain some things. I now have my new KBHM Terminal installed, and it looks pretty good. I did had to delete the file bhm_a.bgl because that file contained the old mail or freight building which is no longer there. But I did run into one problem. For some reason, some of the aprons and tarmac were removed, but that should be no problem to fix and I assume I would use ADE to correct that.

The thing I wanted to bring up is that when I clicked on the button "Resize All to a Power of 2," in the Material Editor in MCX, it did resize some of them, but not all of them, and I think I may know why, but correct me if I'm wrong. By the way, what exactly does it mean when these textures are in powers of 2? Does that have something to do with the number of pixels or the aspect ratio? When I was applying textures to my terminal in Sketchup, I may not have sized them correctly, if that is required. Recall that I had problems trying to texture an entire section of the terminal because I did not have a photo or image of that particular side? There were a couple of options. I could take that one image, or texture, and stretch it across the entire surface. One person suggested that, but the problem with that is the proportions would not be correct. So, the only way I could think of is so make copies of that one texture along the entire side of the terminal, if you understand what I mean. I would take the texture and size it vertically until it snapped to the top. Then I would crop it using the yellow pins and made sure the windows looked as close to the original as possible, and then applied it. Then I used the Move Tool in Sketchup to make copies until the entire surface was textured. But the problem is that if one looks close enough, one could see where the textures had been butted to another texture, but this was the only thing I could think of for the time being. Now in the process of doing that, could I have sized my textures in-correctly, and this would be the reason why MCX could not resized them into powers of 2s? I also wondered if it would be better to crop my textures using an image editor, like Gimp, instead of Sketchup. Another thing I though about is that I never did go back and erase or delete all of those lines that needed to have been erased. You see, one problem I ran into while creating the model is that when I would draw using the Line Tool, I found out that sometimes, it wasn't snapping onto the correct line because I had either moved a line or made some changes, or any number of things. But from watching some of the Sketchup videos, I've learned these things, and they can really cause issues if you don't do it right from the beginning. These are some of the things I've thought about that I thought ya'll needed to know.

One more thing, since I plan to go back and re-do the apron and everything, should I start from scratch or should I use the main airport bgl file I was working with? Or, could I re-install the main airport file, AF2_KBHM.bgl from the BHM2008? I didn't know if this file would write over my new airport file.

Ken.
 
Last edited:
Lots of questions, I will take a stab at them.
I did had to delete the file bhm_a.bgl because that file contained the old mail or freight building which is no longer there. But I did run into one problem. For some reason, some of the aprons and tarmac were removed, but that should be no problem to fix and I assume I would use ADE to correct that.
Not sure what happened to the aprons, I see nothing in bhm_a.bgl except the building object. ADE should fix it.

By the way, what exactly does it mean when these textures are in powers of 2? Does that have something to do with the number of pixels or the aspect ratio?
Pixel count. The dimensions for FS textures must be a power of two along both sides, though both sides do not have to be the same.

2x2=4, x2=8, x2=16, x2=32...., so the other sizes are, 64, 128, 256, 512, and 1024 for FS9. FSX and P3D can use 2048 and 4096.

So your textures could be 1024x1024, 64x256, etc.

If MCX didn't resize some of your textures, either they were correctly sized to begin with or they are not being used by the model in question.

When I was applying textures to my terminal in Sketchup, I may not have sized them correctly, if that is required.
It is not required, MCX will resize them for you. If you make textures that are already sized correctly you will not need MCX to do it for you.

Nothing against MCX, I try to do all of the texture work myself so I am responsible for the final quality.

Recall that I had problems trying to texture an entire section of the terminal because I did not have a photo or image of that particular side? There were a couple of options. I could take that one image, or texture, and stretch it across the entire surface. One person suggested that, but the problem with that is the proportions would not be correct. So, the only way I could think of is so make copies of that one texture along the entire side of the terminal, if you understand what I mean. I would take the texture and size it vertically until it snapped to the top. Then I would crop it using the yellow pins and made sure the windows looked as close to the original as possible, and then applied it. Then I used the Move Tool in Sketchup to make copies until the entire surface was textured.
Whatever you can do to make them work. Sometimes you have to fuss with the positioning a bit.

If your windows run from side to side on the texture they will tile across a poly that is larger than one texture wide.

Now in the process of doing that, could I have sized my textures in-correctly, and this would be the reason why MCX could not resized them into powers of 2s? I also wondered if it would be better to crop my textures using an image editor, like Gimp, instead of Sketchup.
You can't really size them wrong if you use MCX to resize them. Either way should work.

Another thing I though about is that I never did go back and erase or delete all of those lines that needed to have been erased.
FS has to process all geometry so you should try to be efficient as possible in your modeling.

...since I plan to go back and re-do the apron and everything, should I start from scratch or should I use the main airport bgl file I was working with? Or, could I re-install the main airport file, AF2_KBHM.bgl from the BHM2008? I didn't know if this file would write over my new airport file.
I would continue on with your previous work, if you are happy with it.

If you do use a file you create in ADE make sure that AF2_KBHM.bgl is not in an active scenery folder.

cheers,
Lane
 
http://www.fsdeveloper.com/forum/threads/decompiling-a-bgl-file.434183/page-6#post-719229

For some reason, some of the aprons and tarmac were removed, but that should be no problem to fix and I assume I would use ADE to correct that.

One more thing, since I plan to go back and re-do the apron and everything, should I start from scratch or should I use the main airport bgl file I was working with? Or, could I re-install the main airport file, AF2_KBHM.bgl from the BHM2008? I didn't know if this file would write over my new airport file.

You can use ADE or AFX to import a copy of the original FS9 airport file AF2_KBHM.bgl from the BHM2008 package.

You can then edit that copy as desired, and output a fully FSX-compatible version of that airport ...for use in FSX.

If you opt to output a fully FSX-compatible version of KBHM derived from the original FS9 AF2_KBHM.bgl, you must also disable loading of the original FS9 airport file AF2_KBHM.bgl from the BHM2008 package, when that new FSX-compatible version of KBHM is loaded ...in FSX.

FYI: Any file may over-write another file if it has the same identical name.

So one should ensure that any new FSX-compatible version of KBHM has a file name which is different (by at least one character) when creating / copying / moving / saving a file into a folder ...which already contains a file with the same identical file name.

You can avoid these potential complications in your \Scenery sub-folder for your project that is used when set active in the FS Scenery Library, by simply archiving a copy of the original FS9 airport file AF2_KBHM.bgl from the BHM2008 package inside a ZIP file, then deleting the original (while still retaining the ZIP archive).


The thing I wanted to bring up is that when I clicked on the button "Resize All to a Power of 2," in the Material Editor in MCX, it did resize some of them, but not all of them, and I think I may know why, but correct me if I'm wrong. By the way, what exactly does it mean when these textures are in powers of 2? Does that have something to do with the number of pixels or the aspect ratio?

Arno has implemented functions in ModelConverterX (aka "MCX") to semi-automatically:

* Re-size textures to "Powers of 2" (make texture pixel row and column dimensions multiples of values divisible by 2)


Here's an excellent tutorial on "Powers of 2", and why this is important to performance:

"What is the power of two rule ^

In short, it's a simple set of criteria applicable to all game related images that makes sure they conform to a series of regular dimensions. Typically this means doubling up or dividing down by two. So texture sizes that have or are limited to "8", "16", "32", "64", "128", "256", "512", "1024", "2048" (or higher for more modern games) in one or more width/height direction are regarded as being valid and properly optimized for quick loading into a game and processing into memory.
"

http://www.katsbits.com/tutorials/textures/make-better-textures-correct-size-and-power-of-two.php



When I was applying textures to my terminal in Sketchup, I may not have sized them correctly, if that is required. Recall that I had problems trying to texture an entire section of the terminal because I did not have a photo or image of that particular side? There were a couple of options. I could take that one image, or texture, and stretch it across the entire surface. One person suggested that, but the problem with that is the proportions would not be correct. So, the only way I could think of is so make copies of that one texture along the entire side of the terminal, if you understand what I mean. I would take the texture and size it vertically until it snapped to the top. Then I would crop it using the yellow pins and made sure the windows looked as close to the original as possible, and then applied it.

[EDITED]

It is not (yet) necessary to utilize textures pre-sized to "Powers of 2" when applying materials to faces within Sketchup itself, as the Sketchup workspace on-screen rendering engine is typically not adversely affected by texture dimensions during the 3D modeling process.

However, it is important to still re-size textures after they have been exported from Sketchup, and have been imported into MCX.

[END_EDIT]


Your method is one of several ways one can texture faces in Sketchup; it works OK to initially "project" the texture by sizing it, and correcting any distortion of shapes in the original image ...as needed to fit the face.

Then I used the Move Tool in Sketchup to make copies until the entire surface was textured. But the problem is that if one looks close enough, one could see where the textures had been butted to another texture, but this was the only thing I could think of for the time being. Now in the process of doing that, could I have sized my textures in-correctly, and this would be the reason why MCX could not resized them into powers of 2s? I also wondered if it would be better to crop my textures using an image editor, like Gimp, instead of Sketchup.

Because you have textured a face, made that face into a group or component, then 'copied' it using the Move tool, you have pasted such copies into position on the 'KBHM Terminal BC' exterior wall surface.

Depending on how that original textured group or component face was aligned relative to the plane of the 'KBHM Terminal BC' exterior wall surface when it was created, this will determine whether the copies made using the Move tool pasted into position on top of the wall surface are actually going to be pasted into the same Geometric 'plane' of the 'KBHM Terminal BC' exterior wall surface.

One can most likely ensure precision alignment of such copies made using the Move tool relative to the plane of the 'KBHM Terminal BC' exterior wall surface, by carefully hovering the Tape Measure tool over the middle of an exterior wall surface Edge, and waiting until a "Midpoint" 'inference' is seen ...before dragging a Guide or Construction Line into a measured position on that exterior wall surface.

When the creation of the Guide or Construction Line in a measured position on that exterior wall surface is done 'properly', alignment of such copies made using the Move tool relative to the plane of the 'KBHM Terminal BC' exterior wall surface will be 'proper' as well.



Another thing I though about is that I never did go back and erase or delete all of those lines that needed to have been erased. You see, one problem I ran into while creating the model is that when I would draw using the Line Tool, I found out that sometimes, it wasn't snapping onto the correct line because I had either moved a line or made some changes, or any number of things. But from watching some of the Sketchup videos, I've learned these things, and they can really cause issues if you don't do it right from the beginning. These are some of the things I've thought about that I thought ya'll needed to know.
Ken.

'Properly aligned' copies of the original textured group or component face made using the Move tool relative to the plane of the 'KBHM Terminal BC' exterior wall surface can be "Combined" in Sketchup to merge them into a single 1-piece texture.

When such copies made using the Move tool are "Combined" in Sketchup to merge them into a single 1-piece texture, one may also delete the interposed 'edges' between the copies of the original textured group or component face, thereby reducing the complexity of the model's Geometry for that 'KBHM Terminal BC' exterior wall surface, while still retaining the positioning / sizing / mapping of images from those sub-faces made using the Move tool.

[EDITED]

Alignment of all sub-faces made using the Move tool relative to the exact same plane of the 'KBHM Terminal BC' exterior wall surface is referred to as being "Co-Planar", and applies only to surfaces which are flat and 'square' to all corners formed by edges of that wall.

If the multiple adjacent sub-faces are "Co-Planar" to the 'KBHM Terminal BC' exterior wall surface, when selected with the Arrow/Pointer tool while holding down the {Ctrl} key, one can then right-click, and in the context menu, choose "Combine" to merge the individual textured sub-faces into a single 1-piece textured face; if prompted, 'interior' Edges between adjacent sub-faces should be deleted. ;)


CAVEAT: AFAIK, "Combine" will not work on faces which are not "Co-Planar", or which are 'skewed' from the Blue vertical axis; so be sure the 3D building is extruded vertically from an outline of the building drawn on the ground over the Geo-located "Google Snapshot" aerial imagery. :alert:


I have unexpectedly been called out of town, and will be traveling for a few days, so as soon as I return (probably Monday), I can provide you with some additional guidance on use of the Sketchup default tools and/or alternative methods using add-on plugin Ruby scripts, to process textures with either their original- or another assigned- resolution, while also "baking" their 'projected' image appearance (aka "distortions") into a "Unique" derived texture material ...which can more reliably:

* be "Combined" when mapped onto multiple sub-faces within Sketchup

* retain UVW mapping when inter-converted between Sketchup and MCX or other 3D applications

[END_EDIT]


Hope this helps with this current phase of the development process. :)

GaryGB
 
Last edited:
Hi Ken:

Here's some additional info regarding your options to reduce complexity in your model.


Further to the current topic of attempting to "Combine" the "Co-Planar" multiple adjacent sub-faces used via the Move tool to make the windows for the flat 'KBHM Terminal B-C' exterior wall surface.


You may also wish to:

1.) "Export" your own new 'KBHM Terminal B-C' model as a KMZ file

2.) In a blank 'new' Sketchup project

a.) "Import" that KMZ file with the [Options] button dialog box set so that both following check-boxes are checked:

(1) "Validate COLLADA File"

...and:

(2) "Merge Coplanar Faces"


After KMZ import, Sketchup should automatically eliminate any extra faces which it is 'able' to work with, including:

* multiple adjacent sub-faces used to make windows for the 'KBHM Terminal B-C' exterior wall surface

* multiple adjacent sub-faces due to "triangulation" by inter-conversion of exported / imported 3D model content



PS: I also edited my latter post immediately above:

http://www.fsdeveloper.com/forum/threads/decompiling-a-bgl-file.434183/page-6#post-719239


Hope this helps a bit more ! :)

GaryGB
 
Last edited:
Hi Gary,
Thanks for all your help and the tutorials. You said it wasn't necessary to pre-sized my textures so that they're "Powers of 2." In the Power of Two Rule tutorial, it said that the solution is to pay greater attention to image dimensions so properly comply with "Power of Two." What do they mean by this if it's not necessary for me to comply with the power of two rule with my textures?

Also, why are some of my textures not being converted to power of 2s when I click on the button Re-size to Power of 2, in MCX? It should re-size all of them, should it? There must be a reason why some of them are not being converted.

Ken.
 
Hi Gary,

Thanks for all your help and the tutorials.

You said it wasn't necessary to pre-sized my textures so that they're "Powers of 2." In the Power of Two Rule tutorial, it said that the solution is to pay greater attention to image dimensions so properly comply with "Power of Two." What do they mean by this if it's not necessary for me to comply with the power of two rule with my textures?

Hi Ken:

To quote my post above (now edited on a computer ...rather than a "smart" phone with a low IQ :laughing:):
http://www.fsdeveloper.com/forum/threads/decompiling-a-bgl-file.434183/page-6#post-719239

It is not (yet) necessary to utilize textures pre-sized to "Powers of 2" when applying materials to faces within Sketchup itself, as the Sketchup workspace on-screen rendering engine is typically not adversely affected by texture dimensions during the 3D modeling process.

However, it is important to still re-size textures after they have been exported from Sketchup, and have been imported into MCX.


Also, why are some of my textures not being converted to power of 2s when I click on the button Re-size to Power of 2, in MCX? It should re-size all of them, should it? There must be a reason why some of them are not being converted.

If you send me a link either via this thread- or via a PM- to a freely accessible web site from which I can download a copy of the latest version of your 'KBHM terminal B-C' (exported from your installation of Sketchup into a KMZ file or a Sketchup version 8 SKP file), I'll be better able to determine what may need to be done to ensure that you can personally get all of the textures for that model converted to "Powers of 2" ...on your own development computer.

Hope this helps ! :)

GaryGB
 
Last edited:
Hi Ken:

If you package the file inside a ZIP file, mapped texture materials and 3D data stored inside either the KMZ or Sketchup version 8 SKP file ...may be further compressed with a (temporary and non-lossy) compression method to minimize the original file size.


Depending on the resulting ZIP file size, it may still be small enough to simply upload at FSDeveloper as an "attachment" to either this thread ...or a PM.

This may be done when composing a thread post or PM ...via the [More Options] > [Upload a File] buttons. ;)


If the resulting ZIP file size is too large to be uploaded as an "attachment" at FSDeveloper, there are multiple file sharing websites with free basic membership storage sizes:

http://www.fsdeveloper.com/forum/threads/file-sharing-options.232721/


If use of a file sharing site is necessary, I'd personally consider one of the larger, well-established, and reputable sites such as: Dropbox, MediaFire, Microsoft Skydrive, Google Drive etc. :idea:


Let me know if you have any further questions on this file submission process. :)

GaryGB
 
Last edited:
Hi Gary,
Here's the KBHM New Terminal using the Sketchup kmz file. You can import this one right into MCX. I think this is the file you wanted.

Ken.
 

Attachments

Hi Ken:

I have downloaded your KBHM Terminal.KMZ file attached above, and imported it into Sketchup version 8 via:


Sketchup Menu > File > Import {set Import type to "Google Earth File (*.KMZ)"}

...with the [Options] button dialog box set so that both following check-boxes are checked:

(1) "Validate COLLADA File"

...and:

(2) "Merge Coplanar Faces"


After KMZ import, Sketchup automatically eliminated any extra faces which it is 'able' to work with, including:

* multiple adjacent sub-faces used to make windows for the 'KBHM Terminal B-C' exterior wall surface

* multiple adjacent sub-faces due to "triangulation" by inter-conversion of exported / imported 3D model content



My workflow was as follows
:


1.) After Import and initial inspection of your KBHM Terminal.KMZ file attached above, navigate:

Sketchup Menu > Window > Model Info > [Model Info dialog] > {Statistics} > {Entire Model}


2.) Again, in:

Sketchup Menu > Window > Model Info > [Model Info dialog]

a.) click ["Fix Problems" button]

b.) click ["Purge Unused" button]

Exit [Model Info dialog]


3.) Back in the Sketchup workspace:

a.) Sketchup Menu > File > Save

b.) Sketchup Menu > File > Export > 3D Model... {set export type to "Google Earth File (*.KMZ)"}; click [Export]


NOTE
: For continuity in the following excerpt of my previously posted workflow above, I will refer to your "KBHM Terminal.KMZ file attached above ...as:

"[your KBHM_terminal_BC_Model_file_name.KMZ]"



CAVEAT: Be sure the entire FSX SDK is properly installed and configured on your development computer.




Download and install the latest "development version" of MCX:


http://www.fsdeveloper.com/forum/resources/modelconverterx.92/


CAVEAT: Be sure MCX is properly installed and configured on your development computer as described at:

http://www.fsdeveloper.com/forum/threads/decompiling-a-bgl-file.434183/page-5#post-718999



When MCX is properly installed and configured on your development computer:


1.) MCX Menu > Import > [Open dialog]

a.) Set import type to {"Google Earth File (*.KMZ)"}

b.) Browse / Select / Open ex: [your KBHM_terminal_BC_Model_file_name.KMZ] ...just exported from Sketchup above


< MCX should now import the model and eventually display a 3D preview with textures >



2.) MCX Icon Bar 'Top Row' > click 7th Icon from Left end > [Material Editor dialog]


a.) In [Material Editor dialog] > [Properties Tab] > Material Editor Menu > click ["All" button]


NOTE: [Material Editor dialog] > [Properties] [Textures] [Draw Calls] [ Optimize] tabs ...are all at the bottom;


b.) In [Material Editor dialog] > [Textures Tab] > Material Editor Menu > set Texture Folder output path ex:

[FSX install path]\Addon Scenery\[your KBHM_terminal_BC_Model_file_name]\Texture


c.) In [Material Editor dialog] > [Textures tab] > Material Editor Menu > set Texture type to {"DDS}


d.) In [Material Editor dialog] > [Textures tab] > Material Editor Menu > click ["Resize all to Power of 2" button]


e.) In [Material Editor dialog] > [Textures tab] > Material Editor Menu > click ["Save Textures" button]



3.) Close [Material Editor dialog]


4.) MCX Menu > Export Scenery > [Save as dialog]

a.) set Scenery Folder output path ex:

[FSX install path]\Addon Scenery\[your KBHM_terminal_BC_Model_file_name]\Scenery



b.) set Save As 'Type' to: {FSX BGL file (*.BGL)}

c.) set Save As 'File name' to ex: [your KBHM_terminal_BC_Model_file_name].BGL


< You have now exported your KBHM terminal model to be displayed in FSX > :cool:



NOTE
: If you wish to inspect (within MCX) the resulting exported / converted KBHM terminal model inside ex:

[FSX install path]\Addon Scenery\[your KBHM_terminal_BC_Model_file_name]\Scenery\[your KBHM_terminal_BC_Model_file_name].BGL


1.) MCX Menu > Import > [Open dialog]

a.) Set import type to {"FS BGL object (*.BGL)"}

b.) Browse / Select / Open ex: [your KBHM_terminal_BC_Model_file_name.BGL] ...just exported from Sketchup


< MCX should now import the 'converted' model and display a 3D preview with textures (with no errors !) >


Let me know how the above process works for you. :)

GaryGB


 
Last edited:
Hi Gary,
I'm not sure if I explained myself correctly. I still get those warnings in MCX, after clicking the "Resize All to Power of 2 button." But these warnings are at the bottom of MCX, not in the Material Editor dialog box. As I said earlier, it did resize, but I may be confusing the textures in the Material Editor dialog box with the information given at the bottom. At the bottom of MCX, there are 4 tabs that say, Time, Sender, Message, and Level. Under the Message tab, and starting from the top, I scroll down and I finally come to a message that says: Loaded texture: C:\Users\Kenneth\AppData\Local\Temp\ModelConverterX\models\untitled\texture.jpg. Under the Level Tab it says Information. So this must be the information line. The next line, or level down is a warning containing to the information on the previous or first line. It says: The size of untiled\texture.jpg is not a power of 2. this is required by FS. But I did noticed that these warnings are saved to my: C\Users \Kenneth\AppData\Local\Temp\ModelConverterX\models\untitled\texture.jpg. But in the Material Editor dialog box, it has a file with the same name, "untitled texture," and it is in a power of 2. This seems to suggest to me that it did resize the texture and it saved those that were not in the power of 2 in the folders I've mentioned above. Here's a screen shot below. This is after I click on the "Resize All to Power of 2 button."

MCX Warnings Informaion.png


Ken.
 
Hi Ken:

Indeed, one will see the 'Error' messages you reported while still working with- and/or when re-importing- the not-fully-converted (or "not-yet-exported") ...KMZ file.


FYI: While still working with- and/or when re-importing- the not-fully-converted (or "not-yet-exported") ...KMZ file inside MCX, the original JPG and PNG file texture mappings are still intact on the 3D model.

Thus, MCX still loads the JPG and PNG files etc. which have not yet been fully-replaced by the converted DDS files (re-sized to "Powers of 2") ...and re-mapped onto the UVW texture vertices by MCX.


However, I believe that you will not see those 'Error' messages (nor any 'other' error messages) when you import the fully-converted model from the ("Exported") BGL ...as I described above:

NOTE: If you wish to inspect (within MCX) the resulting exported / converted KBHM terminal model inside ex:

[FSX install path]\Addon Scenery\[your KBHM_terminal_BC_Model_file_name]\Scenery\[your KBHM_terminal_BC_Model_file_name].BGL


1.) MCX Menu > Import > [Open dialog]

a.) Set import type to {"FS BGL object (*.BGL)"}

b.) Browse / Select / Open ex: [your KBHM_terminal_BC_Model_file_name.BGL] ...just exported from Sketchup


< MCX should now import the 'converted' model and display a 3D preview with textures (with no errors !) >


Again, please let me know how the above process works for you. :)


PS: When you have completed your MCX import tests of [your KBHM_terminal_BC_Model_file_name.BGL] just exported from Sketchup, IMHO, we should also go back and do a 'closeup' inspection of your KMZ model in Sketchup for any outstanding issues of non-coplanar faces which were not able to be 'merged' by Sketchup during import of the KMZ file ..on some of the flat 'KBHM Terminal B-C' exterior wall surfaces. ;)

GaryGB
 
Last edited:
Hi Gary,
Okay, now I understand. I was able to export the model into FS2004 and I also imported the model back into MCX and it showed no errors. Here's a screenshot:

KBHM New Terminal.png



But I noticed that it has a lot of magenta squares.. Gary, in your instructions you were using FSX and the converted DDS files. But I'm using FS2004. In the dropdown, I selected DTXBMP as the texture format. I assume I've selected the correct ones. By the way, when working with textures in sketchup, what format should I use, jpeg, png, bmp, ext, or does it really matter? Yes, we can go back and do a close-up inspection as you suggested. But there's one thing I want to explain before we do so, and you might feel that it would be better to wait. I created another model of the new terminal and now that I have some more photos and that 3D view that was released of the Google KBHM terminal, I plan to make mine look a lot better. For one thing, the height of the terminal and the parking deck are too low and I got their dimensions from that Google 3D model. I assume it pretty accurate. I've been trying to lower the middle section that goes around the terminal with the MOVE tool in Sketchup and I'm really having a problem doing that. I used the Arc tool as well as the Push Pull tool. I drawed a line where the section is supposed to move down but when I try to move it down, it makes a bunch of lines and stretches other areas of the terminal. I guess I should have done this sooner. I know about the component and groups but it doesn't seem that would make any difference since I'm using the same face. I'll post it later to show you what I mean.

Ken.
 
Hi Ken:

Just to confirm... Which version of FS did you want the scenery object exported and placed for: FS9, FSX, or both ? :scratchch

The version I'm working on is FS9.

Gary, in your instructions you were using FSX and the converted DDS files. But I'm using FS2004.

OOPS ...after the current cumulative duration of 114 posts in this thread, I'd forgotten your FS output format ! :laughing:


Okay, now I understand. I was able to export the model into FS2004 and I also imported the model back into MCX and it showed no errors.

But I noticed that it has a lot of magenta squares.

I had also seen some during initial inspection of your KMZ file; I'll look into what the cause (and solution) may be. :pushpin:


In the dropdown, I selected DTXBMP as the texture format. I assume I've selected the correct ones. By the way, when working with textures in Sketchup, what format should I use, jpeg, png, bmp, ext, or does it really matter?

I'd use PNG or TIF which can utilize non-lossy compression, and allows an alpha channel for when transparency is desired.

Yes, we can go back and do a close-up inspection as you suggested. But there's one thing I want to explain before we do so, and you might feel that it would be better to wait. I created another model of the new terminal and now that I have some more photos and that 3D view that was released of the Google KBHM terminal, I plan to make mine look a lot better. For one thing, the height of the terminal and the parking deck are too low and I got their dimensions from that Google 3D model. I assume it's pretty accurate.

You may wish to open the 3D Warehouse KBHM model in another "instance" of Sketchup, which can also run in Windows concurrent with your new 'KBHM Terminal B-C' ...opened in yet another 'instance' of Sketchup.

Note
: Although the above cited 3D Warehouse KBHM model is "close" to real world size, you may find that by measuring the height of any 'personnel-sized' doorways seen in the texture materials, it will actually still need to be re-sized; so I'd recommend that you check that model over with the Sketchup Tape Measure tool and adjust your own measurements accordingly. ;)


You may find the 'KBHM Terminal B-C' size estimates already discussed in this post might also be rather close to real life: :idea:

http://www.fsdeveloper.com/forum/threads/decompiling-a-bgl-file.434183/page-5#post-717092



I've been trying to lower the middle section that goes around the terminal with the MOVE tool in Sketchup and I'm really having a problem doing that. I used the Arc tool as well as the Push Pull tool. I drawed a line where the section is supposed to move down but when I try to move it down, it makes a bunch of lines and stretches other areas of the terminal. I guess I should have done this sooner. I know about the component and groups but it doesn't seem that would make any difference since I'm using the same face. I'll post it later to show you what I mean.

Always be certain to save out the last version of your model as a "backup" each time you work on it via:

Sketchup Menu > File > Save As...

...and give the model a slightly newer "sequential" name such as:

[your KBHM_terminal_BC_Model_file_name-2.KMZ]

The current loaded model to be further edited is then renamed, and the last version of your model kept as a backup.


If you find that during editing with the ex: Move or Push-Pull tool in Sketchup, you have "skewed" the model, immediately UNDO any changes repeatedly until you have safely regressed the editing session to the point that the model is not "skewed".


When you have another prototype model ready, feel free to send me a link either via this thread- or via a PM- from which I can download a copy of the latest version of your 'KBHM terminal B-C' (exported from your installation of Sketchup into a KMZ file or a Sketchup version 8 SKP file). :)

GaryGB
 
Last edited:
The magenta boxes are the crash boxes.

You can turn them off in the MCX display if you like...

cheers,
Lane

Hi Lane:

Certainly what Ken shows in his latter screenshot attached immediately above are "crash boxes", and I was so busy addressing multiple other issues in my reply, that I did not respond in sufficient detail to explain what was so obvious in that screenshot.


Sorry I didn't explain this in more detail in my post above, but what I personally saw was quite different, and may actually have been more of a Red color on certain faces, seen when initially inspecting the underside of his model.

BTW: I have yet to successfully display any Crash Boxes in MCX ...for Kens last attached model above, on either of 2 computers. :scratchch


I will have to retrace my steps in Sketchup and MCX to see if I can replicate the Red rectangles I saw yesterday. :coffee:


GaryGB
 
Last edited:
I don't see crash boxes in any KMZ file loaded into MCX, maybe they don't exist until the model has been processed by bglcomp.exe or xtomdl.exe.

cheer,
Lane

[edit]
sorry, forgot this is for FS9. I should add makemdl.exe to the list.
[/edit]
 
Last edited:
Hi Ken:

Is the model seen in your latter screenshot attached immediately above taken in MCX using the same model you attached in your post above ? o_O

http://www.fsdeveloper.com/forum/threads/decompiling-a-bgl-file.434183/page-6#post-719613

http://www.fsdeveloper.com/forum/attachments/kbhm-terminal-zip.24124/


Also, I must ask whether the last attached model above is a 'hybrid' of your own edits applied to the 'KBHM Terminal B-C' imported to Sketchup from the original FS9 "BHM2008" package cited in the earlier post of this thread ?

Although IIRC, you previously indicated you already had the Mach-1 Design Group author's permission to modify the 'BHM terminal BC' model as needed, at this point in time, I am concerned about the practicality of mixing any 3D model geometry from that original 3D model, with any new 3D model geometry resulting from your own efforts ...as this may ultimately complicate troubleshooting issues which may arise that are "inherited" from the Mach-1 Design Group author's MDL. :alert:

That may also complicate troubleshooting issues which may arise during the course of your own learning process.


The reason I asked about whether this latest model may be a a 'hybrid' of your own edits applied to the 'KBHM Terminal B-C' imported to Sketchup from the original FS9 "BHM2008" package cited in the earlier post of this thread, is because I am trying to sort out the method by which this 3D model was created, and whether it may explain the curious lack of displayable "Crash Boxes" when imported into MCX. :scratchch

Possible clues as to how and why this anomaly is seen in your model are discussed here:

http://www.fsdeveloper.com/forum/threads/crash-box.106345/

http://www.fsdeveloper.com/forum/threads/how-to-delete-crash-boxes-in-bgl.361815/

http://www.fsdeveloper.com/forum/threads/still-having-invisible-crash-boxes.407962/



Although I understand that you already have begun to create yet another version of this 'KBHM Terminal B-C' in Sketchup, I would like to underscore the importance of making your "newest" build of this object ...using the more commonly emphasized methods which appear in most Sketchup tutorials.

Bearing in mind that this exploration of various ways to create faces and sub-faces may commonly be seen during the learning process, the specific workflow I would personally encourage you to consider allows maximum use of default and 3rd party add-on Ruby scripts in Sketchup.

I believe the specific workflow I am encouraging you to consider, might also help minimize the work required to make your model, and may allow better compatibility with Sketchup's default tools and 'graphical' functions, as well as those of external graphics applications ...to yield the enhanced appearance of a textured model that you seem to have as a goal for this project. :idea:

Additionally, by using the workflow I am encouraging you to consider, you increase the options by which you can produce a 3D scenery model which will have a good impact on 'performance' ...when rendered and displayed in a run time flight session within FS.


When building this model, I am again encouraging you to:

1.) Apply a maximum zoom within the "Geo-location" dialog to import the aerial imagery (and initially 'hidden' terrain mesh) tiles onto the ground in Sketchup via:

Sketchup Menu > File > Geo-location > Add Location..
.


...and to assist with visualizing any additional contiguous areas as needed, add more such 'tiles' via:

Sketchup Menu > File > Geo-location > Add More Imagery...


2.) Make only "Layer0" and the 'flat' "Google Earth Snapshot" Visible via:

Sketchup Menu > Window > Layers > [Layers dialog]


3.) Draw an outline of the 'KBHM Terminal B-C' building base directly on the 'flat' "Google Earth Snapshot" to form a 'face' in Sketchup

4.) Use the "Push-Pull" tool to extrude that face of the 'KBHM Terminal B-C' building base to the maximum required height of the entire building ...along the Blue (vertical) axis (ex: 38 Feet - as previously discussed here):

http://www.fsdeveloper.com/forum/threads/decompiling-a-bgl-file.434183/page-5#post-717092


NOTE: Using the Push-Pull tool, one can simply begin extruding a face aligned along the Blue (vertical) axis by any amount, release the Left Mouse button, type on the keyboard the desired units for the maximum extrusion distance (...such as 38'), then press the "Enter" key.

You may also note that when one types ex: 38' on the keyboard, it will appear within the Sketchup "Value Control Box" (aka "VCB") ...before one presses the "Enter" key, and that assigned unit value will be applied to the current 'extrude' operation.

FYI: This process of using the "Push-Pull" tool to extrude that face of the 'KBHM Terminal B-C' building base to the maximum required height of the entire building ...along the Blue (vertical) axis will create a "closed Solid" (which is alternatively referred to as a "manifold" 'air-tight' or 'water-tight' 3D object).[

[EDITED]

The "closed Solid" (which is also alternatively referred to as a 'primitive' for any 3D object
to be derived from it via editing) is ideal for most subsequent modeling in Sketchup.

Working with a "Solid" primitive might help minimize the work required to make a 3D model, and may allow better compatibility with more of Sketchup's default tools, 3rd party add-on Ruby plugin scripts, and Sketchup's built-in 'graphical' functions, as well as those of any external graphics application linked to Sketchup as a designated editor for textures.


BTW: Such an extruded 3D "Closed Solid" will have a bottom surface, which should remain intact throughout the Sketchup 3D modeling process with that object.

When that 3D model of that object is finished, and the model has had its texturing and geometry optimized (and optionally processed with ex: thomthom's "Cleanup" add-on Ruby plugin script) ...the 'bottom' surface of the object can either be:

* retained for reported "realism" benefits via rendering 3D scenery object "shadow volumes" versus "shadow mapping"

...or:

* removed for purported performance benefits via reduced 3D geometry vertex complexity

...when exported from Sketchup ...for import to MCX ...and eventual use in FS

[END_EDIT]


5.) Use the "Axes" tool to temporarily align the Sketchup R-G-B "0,0,0, origin of 3D world axes" at the corner of a long edge of each section for that building (...wherever you will be currently working locally).

6.) Use the "Measuring Tape" tool to create Guide / Construction lines in required positions on faces before drawing any new lines / edges / faces with either the "Pencil" or "Rectangle" tools


CAVEAT: When using the Measuring Tape tool to create Guide / Construction lines in required positions on faces, and prior to drawing any new lines / edges / faces on ex: a exterior wall or other model 'surface' with either the "Pencil" or "Rectangle" tools, be certain to:

* carefully hover the Tape Measure tool over a middle area of an exterior wall surface Edge; wait until a "Midpoint" 'inference' appears

* when a "Midpoint" 'inference' is seen, use the Left Mouse button to click-hold-drag exactly on a perpendicular plane to the Edge from the "Midpoint" 'inference' is derived


7.) To create the desired exterior wall or other model 'surface', consider using multiple default and 3rd party textures applied to precisely drawn sub-faces created on top of Guide / Construction lines pre-drawn with the Tape Measure

8.) After creating the desired precisely drawn and textured sub-faces on top of a exterior wall or other model 'surface':

a.) Select each sub-face

b.) Right-click > select "Make Unique Texture"

...to then make all such sub-face textures "unique"


9.) After making all such sub-face textures "unique" on ex: a flat exterior wall 'surface':

a.) {Ctrl+Left-click} to select all of the multiple sub-faces with unique textures on ex: a (single) flat exterior wall 'surface'

b.) Right-click > select "Combine Textures"

(1) When Sketchup prompts "Do you want to erase interior Edges ?), click ["Yes" button]

......to then make all such sub-face textures "Combine" into a 1-piece texture ...on a 1-piece wall 'surface'


CAVEAT: If Sketchup does NOT submit the prompt "Do you want to erase interior Edges ?", there may be a 3D modeling issue which prevents normal operation of that default "Combine" script, and which must be manually inspected / fixed in order to properly "Combine" the selected 'unique' sub-faces.

IMHO such 3D modeling issues which prevent normal operation of that default "Combine" script must be manually inspected / fixed immediately and before proceeding further, or one may not be able to:

* reduce complexity of model Geometry and texturing with mapped materials

* properly fix other 3D modeling issues via thomthom's "Cleanup" add-on plugin Ruby script (before exporting a file to be imported into MCX)

* implement efficient draw call batching of textures (when exported from Sketchup and imported into MCX)


Hope this helps with the building of your next KBHM Terminal BC model prototype ! :)

GaryGB
 
Last edited:
Is the model seen in your latter screenshot attached immediately above taken in MCX using the same model you attached in your post above ?

Yes.

Also, I must ask whether the last attached model above is a 'hybrid' of your own edits applied to the 'KBHM Terminal B-C' imported to Sketchup from the original FS9 "BHM2008" package cited in the earlier post of this thread ?

I'm not sure what you mean by "is the last model a hybrid," but based on what I understand from reading further down, I think what you might be asking is that did I used the original BHM2008 file to make or create this model? No, I did not use the BHM2008 or any of it's files. I created this model from scratch using the GEO Location of Google Earth. The only time when I used the BHM2008 is when I exported my model to the file bhm_bc.bgl. If I don't have that correct, let me know.

Although IIRC, you previously indicated you already had the Mach-1 Design Group author's permission to modify the 'BHM terminal BC' model as needed, at this point in time, I am concerned about the practicality of mixing any 3D model geometry from that original 3D model, with any new 3D model geometry resulting from your own efforts ...as this may ultimately complicate troubleshooting issues which may arise that are "inherited" from the Mach-1 Design Group author's MDL.

Well I noticed you said, "any 3D model geometry from that original 3D model." Since I did not use the original BHM2008 model when working on my new model, could there still be issues? But what you said gives me something to think about when mixing 3D models.

If there're any other questions, or if I did not understand you correctly, let me know.

Ken.
 
Status
Not open for further replies.
Back
Top