• 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 Ken:

Google is your friend (sometimes):

http://www.google.com/search?q=airport designing using Sketchup&client=ms-opera-mini-Andre&channel=new&hl=en&sa=X&as_q=&nfpr=&spell=1&ved=0CAoQvwVqFQoTCJ-7u_zY48YCFQk1iAodzt0IWA


Again, you may wish to import a model of KBHM terminal into Sketchup and see how it was made ...as previously cited here:

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


...and here:

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


Hope this helps you get started; I'll post more on this later. :)

GaryGB
 
Last edited:
Hi Gary,
I tried those instructions you posted and here's what I found out about how the model was put together:

KBHM 3D Model.png


What I noticed about the model is that it has a lot of lines and triangles. I thought I would create a new terminal as it looks today instead of the BHM2008 since I've been working with Sketchup and learning how to use it. Below is a satellite view of what the terminal looks like today:

KBHM Terminal Satelitte View.png



I'm not sure if I'm doing it correctly but here's the model I created using Sketchup:


:
KBHM Terminal 1.png



KBHM Terminal 2.png



Notice that mine doesn't have all those lines and triangles so are they necessary?


Ken.
 
Hi Ken:


Looks like you're off to a good start ! :)

The "triangulation" seen in exported / imported models is commonly imposed by the export / import routines to increase the likelihood that texture mapping will be retained during inter-conversion.

As with most 3D world / simulation software, MSFS / P3D via Windows DirectX sub-system uses triangles to render textured DirectDraw surfaces in 3D objects (IIUC, including so-called QMID terrain grid "quads" etc.).


See: http://www.fsdeveloper.com/forum/threads/dx-10-tweaks-wireframe-cool-stuff-from-paul-roussin.432720/


IMHO, those diagonal lines which form triangles on faces in Sketchup are not required (in most cases) during the modeling process, and they may be deleted if desired / if possible, ...from 'imported' models. ;)


If 1 or more edges of a face is/are not closely in alignment with the 3D geometric 'planes' of vertices (aka "end points") on neighboring edge lines, and a face is "lost" after deleting a diagonal line used to form a triangle on the surrounding larger face, immediately "undo" that operation via: :pushpin:

Sketchup Menu > Edit > Undo

...or hold down {Alt} and tap the {Backspace} key


Hope this helps ! :)

GaryGB
 
Last edited:
Hi,
Here's my KBHM airport, the way it looks now, and I thought I would add the parking deck:


KBHM 3D Model with Parking Deck.png



I have no way of knowing exactly if I have the height of the buildings correct but it's as close as I can get it. Notice the lines on the side of the parking deck. I've tried to remove or delete these lines but when I do, it removes the face, I think it's called, in other words, you can see inside. I think these lines exists because I drew triangles and used the arc and move tools to make the circular section of the parking deck. I guess that's not important because I'm going to add the textures. Now, that's my next project, but I'm having a hard time figuring out how to add those textures. Below are some of the photos I found for this new terminal:


-7dd2880761ef2111.png



11578489-standard.png



bhmconstructionmar2014-7jpg-da9afa7628f810c5 2.png



I'm not sure if these are good photos that I can use to add textures. This last photo shows that the terminal is being constructed with all of the building materials laying on the apron. I've watched some of the Sketchup videos on adding textures but I can't seem to get just the terminal portion and without all the other stuff in the photo, if you understand what I mean. I've been watching videos on adding textures but I can't seem to get it right.

Ken.
 
Looking good!

I have no way of knowing exactly if I have the height of the buildings correct but it's as close as I can get it.
Nobody will know if they are a bit off. About the best you can do is look at pictures for clues, like man doors are ~7 feet tall. So if a wall has a door on it and looks about 4 doors tall, 28 feet would get you close.

I use Photoshops measure tool and a bit of math to geusstimate wall height.

Notice the lines on the side of the parking deck. I've tried to remove or delete these lines but when I do, it removes the face, I think it's called, in other words, you can see inside.

That happens because the adjoining faces are not perfectly planar, or in layman's terms, they have a slight dogleg to them. The edges don't show in the sim, they only complicate texturing a bit.

As for using those pictures for textures, try turning off "fixed pins" which will give you four yellow pins. You move them on the texture to a corner, then drag them to the corner of the building. You will get some distortion and the end result will depend a lot on the resolution of the pictures.

cheers,
Lane
 
Hi,
Well, I've been trying to texture the terminal but I'm not sure if this photo image will work when the area of this side of the terminal is much longer than the image. When I snap the texture to the corner of the builder and size it and then release the mouse button, it makes 7 or 8 of these same textures. I did figure out how to line the pins with the corners of the building, and that was no problem. Now the problem is to make ONE continuous texture on this side of the terminal. You can see that this side of the terminal is much longer than the image and what happens is that it repeats those images until it fills that entire side of the terminal. I did try to draw a vertical line at each section prior to the next image so that it would stop repeating the images. Although it does stop the textures from repeating themselves, you can still tell that the images repeat themselves, even without the lines. Will Sketchup allow me to place these textures as though it was a photo of that side of the terminal, and without it repeating it self? Here's the photo below:

KBHM Texturing.png
 
Last edited:
better you should edit those images in any image editor, make a texture sheet. it's a work we have to master. figure out how the texture will work in the model. it is so in any modelling tool, be skecthup, gmax or any other. yes a dirty and tedious work but it's an important part of this business.
For exemple, the front of the building, you have to think if is good to make a texture that cover the entire object. or make a tile which will repeat iself along the object, Sekecthup I think tile the texture automatically, but in gmax you have to apply the tiling whit the tools for this task. and so happen with many objects. another exemple. in a Wall is good to tile the textue along his face. (it's a repetitive pattern).
 
Last edited:
You really haven't explained anything to me nor given me any instructions, other than editing the images. I know that's what I need to do but I need detail instructions on how to edit the images to make it work, if it can be done. The instructions found in the Help menus do not cover this topic. What image editor are you referring to? I've just started doing this and all of this is still new to me. I've tried using Paint and Gimp and I don't see any tool that I can use to make this work. I guess the only way I can do this is to go to the airport and get the photos I need of each side of the terminal, that is, if they allow me access. Will the Follow Me tool in Sketchup do the job? I've tried it but I can't seem to make it follow around the building. I know it works when modeling but I guess it doesn't work with textures, unless I'm doing something wrong.

Ken.
 
Last edited:
The only way I know of to make that texture work with that wall is to use the yellow pins.

The downside is that SU will make all of the unique textures.

When you process the .dae file with MCX you can run the drawcall minimizer and see if MCX can consolidate those textures a bit, to reduce drawcalls.

If you have Photoshop you can crop the texture to perspective and sort of pre-distort it before using it in SU. I do not know if Gimp can do that.

Unless you can get good clean, evenly lit, straight on pictures of every wall you are going to have to accept some compromise in quality when using photos as textures.

GMax does give you some more flexibility in mapping textures such as the one you have here, at the cost of being a major PITA to work with IMHO.

cheers,
Lane
 
Hi Ken:

The modeling and texturing process in Sketchup can be 'relatively' simple when compared to the manual preparation of images of ex: a building in a graphics application such as Paint.Net, GIMP, Adobe Photoshop, Corel PhotoPaint, Corel PaintShop Pro etc.


However, Sketchup has some unique graphics capabilities which can be very helpful for creation of images from individually textured 'faces' that may be captured to a screenshot of ex: each wall of one's textured 3D model within the Sketchup workspace in a full-frame "Parallel' view.

Those "1-piece" non-distorted images of each wall of one's textured 3D model can then be imported into Sketchup as a Material to be applied to the corresponding wall face in another un-textured copy of that 3D model.

Thus, one can can build an original "work" copy of a 3D model to assemble textures etc., take a screenshot of the finished wall, then apply that wall image to another copy of the model which has had the extra edge lines and sub-faces removed ...so the wall is "1-face" and the texture is "1-piece".


I would recommend that in Sketchup, you first configure for use of textures at full resolution:

Sketchup Menu > Window > Preferences > [System Preferences dialog] > OpenGL > OpenGL Settings

* Check "Use Hardware Acceleration"

* Check "Use Maximum Texture Size"

* Check "Use Fast Feedback"


Then, when working with texture image files (JPG / JPEG, PNG, BMP, TIF, TGA, etc.) observe these Caveats:

* Be aware that JPG / JPEG format is nearly always going to be a "lossy" file format; if a typical graphics application reads and opens these files, and the image is re-saved after opening, progressive loss of resolution and sharpness, "halo scatter" etc. may occur with each and every "save" operation. :redflag:


So, IMHO, it is best to always:

* immediately make back-ups of all original source files

* immediately make a copy of those files "converted" to a non-lossy LZW-compressed file format ex: PNG, TIFF

* only work with copies of those files ("converted" again to a non-lossy LZW-compressed file format ex: PNG, TIFF ) for editing.


Although it is possible to do most if not all texture image preparation for 3D modeling in a stand-alone graphics application such as Paint.Net, GIMP, Adobe Photoshop, Corel PhotoPaint, Corel PaintShop Pro etc., IMHO, it is easier and more precise to compose one's needed textures using imported texture images mapped onto one's 3D model in Sketchup itself.

Then as described above, one exports a 2D image of the final textured and non-distorted 3D model ex: wall face(s), and applies that 1-piece texture to the 1-face (or at least a comparatively 'lesser' number of faces) ...on the corresponding wall surface in a un-textured copy of that 3D model. ;)


Hope this helps with getting oriented for the initial texture preparation learning curve ! :)

GaryGB
 
Last edited:
Hi Ken:


In further reply to some of your questions above:

As Lane suggested above, the over-all building height and width can be established from known door heights, as is the case with other details of windows and line distances between pre-fabricated wall construction or surface covering materials etc..


I find a 3-sided engineers scale with various divisions per inch super-imposed over a image viewed on screen can help gauge lengths and/or distances, as well as proportional differences in size between objects in a scene. ;)

As Birmingham Alabama USA is in North America, construction is typically going to be based on inches and feet.


BTW: It can certainly be helpful to use any available photo-real images taken straight-on during a bright (but overcast) day.

But since most such photos are hard to acquire, and since airport structures such as the KBHM terminal building use pre-fabricated wall construction or surface covering materials, you could also use 3rd party generic texture materials (rather than images of the actual KBHM building) to texture the faces you draw to represent wall sections, window panes, framing around doors and windows etc..

The latter process could provide a easier workflow, and perhaps even a more satisfactory visual result. :idea:


After an initial prototype of the building wall is sized and shaped correctly, an available photo of the wall can be applied to the over-all wall surface, and projected / corrected to eliminate "perspective distortion" using the "Texture Position" Pins in either Fixed and/or non-Fixed mode.


Positioning such a photo texture of the wall which has been applied to the over-all wall surface and projecting / correcting it to eliminate "perspective distortion" may involve IMHO, first using the "fixed pins" mode to approximate desired texture position ex:

1.) 'Anchor' bottom Left corner of texture on wall face with Red Pin

2.) Rotate / Size width of entire texture on wall face with Green Pin

3.) Size height of entire texture on wall face with Blue Pin

4.) Align vertical axis of texture on wall face / minimize "skewing" with Yellow Pin


Then, IMHO, one "fine-tunes" texture positioning / eliminates "perspective distortion" in non-fixed pin mode (aka "Yellow Pins" mode)


Next, various sub-faces can be pre-measured for size / shape from wall edge "Mid-Points" using the "Tape Measure" tool, then drawn over resulting "Guide Lines"/ "Construction Lines" with the "Pencil" and/or "Rectangle" tools.

[EDITED]

FYI: Tom Gibson has posted a detailed tutorial which explains many of the above concepts[/U] ...here:
http://www.calclassic.com/sketchup_tutorial.htm

[END_EDIT]


Arno has also posted a nice tutorial which explains some of the above concepts[/U] ...here:

http://www.fsdeveloper.com/wiki/index.php?title=Build_your_house_using_SketchUp


Additional detailed tutorials on the above Sketchup 3D modeling and texturing procedures can be found here:

http://courses.washington.edu/udpddp/exercises/tu2.shtml

http://courses.washington.edu/udpddp/exercises/tu53.shtml

http://courses.washington.edu/udpddp/exercises/tu52.shtml


http://courses.washington.edu/udpddp/index.shtml



Hope this helps a bit more with the learning process ! :)

GaryGB
 
Last edited:
AFAIK you can use the pins to stretch that one texture across the entire terminal, if you like, then use them to adjust the incorrect perspective to fit the building. To get the pins, right click on the textured face and use Texture/Position.

To move the texture, just drag it.

1. Use the green pin to scale the image so the largest width fills the horizontal dimension of the building
2. Use the blue pin so the largest height fills the vertical dimension
3. Use the yellow pin to change the perspective so the top and bottom are parallel
4. Use the green pin to rotate the image so the top and bottom are horizontal
5. Use the green and blue pins to restore the correct horizontal and vertical sizes
6. Use the blue pin to get the angle of the windows vertical.
7. Use all the pins to tweak it so it's perfect.

Hope this helps,
 
Hi Gary,
You mentioned that you use a 3-sided engineers scale superimposed over an image. Where do you get that tool, or is that in Sketchup?

Ken.
 
Hi Ken:

I use a hand-held 3-sided engineering ruler in position over my monitor (available online or in office / art suppy stores):

https://www.google.com/#q=3 sided engineering ruler


If you open a photo image in ex: Windows Photo Viewer, you can roll the mouse wheel to scale the image so that a reference object (such as the height of a door frame) closely aligns with 1 or more division markings on the top or bottom scale of one of the 3 sides of the engineering ruler, you can determine its relative size in "units". :idea:


Then, keeping the size of the photo image 'zoom level' the same in ex: Windows Photo Viewer, you can gauge the size of other objects nearby (if they appear to be at the same approximate distance from the camera position at which that same photo was taken). ;)


There are software digital ruler utilities which may also be used, but IIRC, most require 'calibration' for each individual image viewed; in most cases, I find a physical ruler and the mouse wheel zoom level quicker and more practical. :twocents:



BTW: As an example, if I open "bhmconstructionmar2014-7jpg-da9afa7628f810c5-2-png.23624.png" which you posted above:

http://www.fsdeveloper.com/forum/at...ionmar2014-7jpg-da9afa7628f810c5-2-png.23624/


...in ex: Windows Photo Viewer, I can roll the mouse wheel to scale the image so that a reference object (such as the 7 foot height of a 'personnel' door frame) closely aligns with 7 division markings on the "10 units per inch" scale of my engineering ruler.


Now I can determine the relative size in {1-Foot} "units" of other objects nearby to the 7-Foot personnel 'door'.


The height of the inset area where the personnel door and pillars are seen is 12 Feet (from ground to ceiling).


The overall height of the wall surface (above the inset area where the personnel door and pillars are seen) is 28 Feet.

The height of the wall surface section above the rows of large window panes in the wall is 6 Feet.

The height of the wall surface section below the rows of large window panes in the wall is 4 Feet.


The height of the rows of large window panes in the wall above the inset area where the and pillars are seen ...appear to be (from top to bottom ):

4 Feet

3 Feet

6 Feet

2 Feet
______
15 Feet = total

Thus, the overall height of all 4 rows of those large window panes in the wall is 15 Feet.


The width of each of the 28 columns of those large window panes in the wall appears to be 5 Feet per 'column' of windows.



In Sketchup you can draw a virtual sub-face pre-measured for size / shape / position from wall edge "Mid-Points" using the "Tape Measure" tool.

Then, then you can draw over the resulting "Guide Lines"/ "Construction Lines" with the "Rectangle" tool ...to create the overall 'window area' at 15 Feet high by 140 Feet wide.

At this point the large 'window area' sub-face on the wall ...can be textured with the window area of the photo image cited above. :pushpin:



Alternatively, the large 'window area' sub-face on the wall ...can be textured with one of the "Translucent" window 'glass' materials available via the Sketchup "Paint-Bucket" Material pick-list.


Then, that large 'window area' can then be sub-divided into 4 sub-faces of rows at the heights specified above.


Next, that large 'window area' can be further sub-divided into 28 sub-faces of columns at the 5 Feet width specified above.


Those row and column sub-faces can be modified using the Sketchup "Offset" tool to create the ex: 6 Inch thick window frames into which the glass is mounted, resulting in individual "window panes".


The 6 Inch thick window 'frames' into which the glass is mounted, can be 'cleaned up' to isolate their inner edges from the window 'panes', then they can be textured with the ex: 'Metal_Aluminum_Anodized' "Metal" material available via the Sketchup "Paint-Bucket" Material pick-list.



FYI: If the left-most column of individual window panes are pre-assembled in Sketchup with adjacent inter-posed window frame sections, when "grouped", that selected, 'grouped' column object can be copied and moved semi-automatically as an "Array" ...to simplify creating the 'window area':

http://help.sketchup.com/en/article/94867

http://www.thesketchupessentials.co...eating-copies-with-the-move-and-rotate-tools/




PS: For greater control over mouse wheel 'zooming' and/or the number of lines moved by the mouse wheel, while also enabling "X-Mouse"-type 'mouse-over' focus and mouse wheel scroll-able control in some dialog boxes / lists etc. ...I use the excellent freeware "KatMouse" utility:

http://ehiti.de/katmouse/


Hope this helps with establishing some methods for creating a custom KBHM building in Sketchup. :)


GaryGB
 
Last edited:
Hi Gary,
Well, I finally got my KBHM model created and it looks fairly okay. I'm not really satisfied with some of the textures but these were the only photos I could find. I've been watching a lot of sketchup tutorials and learned some great things about sketchup. When I first started my model, there was one thing I did not do that I was supposed to have done, and that is to line up the axes with my terminal. Not doing so has made it take longer to put the model together. And I would have to go back and re-texture, delete lines, or something, or something would not work right. Anyway, here's my model below:

KBHM New Terminal.png



It doesn't look all that great now and I'll be going back and putting more details into it later. I've mentioned that I did not line up my axes when I first started working on my model but you'll noticed that they're lined up now. That's because after I found out that was the first thing to do before doing anything else, I just re-lined them.

I went over that PDF about building a house and placing that into flight simulator and learned quite a bit. But when it comes to using Model ConverterX to export the model into flight simulator, that tutorial does not give the correct information since it is way out of date. I think this tutorial was put out in 2012, and this is not going to work because it explains or tells me things to do that is not found in Sketchup 2015. I even went on YouTube and tried to find a video that explains exporting the models to flight sim using Sketchup 2015 and there's not one. I assume you know all the new procedures for exporting my model into flight simulator so could you explain them. I also supposed to make sure that the textures are 2X2, reduce drawcalls, and these things before exporting the model. I was confused here and thought that this model would be converted to an XML file but it must be converted to a MDL file, or am I correct?

Ken.
 

Attachments

  • KBHM New Terminal.png
    KBHM New Terminal.png
    432.1 KB · Views: 1,592
Last edited:
http://www.fsdeveloper.com/forum/threads/decompiling-a-bgl-file.434183/page-5#post-718812

Hi Gary,
Well, I finally got my KBHM model created and it looks fairly okay. I'm not really satisfied with some of the textures but these were the only photos I could find. I've been watching a lot of Sketchup tutorials and learned some great things about Sketchup.

When I first started my model, there was one thing I did not do that I was supposed to have done, and that is to line up the axes with my terminal. Not doing so has made it take longer to put the model together. And I would have to go back and re-texture, delete lines, or something, or something would not work right.

Anyway, here's my model below:

It doesn't look all that great now and I'll be going back and putting more details into it later. I've mentioned that I did not line up my axes when I first started working on my model but you'll noticed that they're lined up now. That's because after I found out that was the first thing to do before doing anything else, I just re-lined them.

Looks like you're making some good progress ! ;)


Indeed, it is helpful to temporarily re-position the world "Axes" (plural for the Green 'N-S' axis, Red 'E-W' axis, and Blue 'Up-Down' axis which all meet at the '0,0,0' coordinate (aka "Origin of the 3D world axes") ...locally along along one corner base of the model where one is presently working.

This is done via the Sketchup "Arrow / Pointer cursor":

Sketchup Menu > Tools > Axes

Simply left mouse click once on a local base corner of the model where one is presently working, then without holding either mouse button, move the mouse cursor to the opposite 'end-point' along a line for one of the longer edges which meets at the corner just clicked, then triple-click to set the new (temporary) 3D world Axes position.


FYI: The original orientation and location of the 3D world axes is always 'remembered internally' by Sketchup for each model based on its very first "Geo-location" when assigned by downloading aerial imagery and terrain mesh (or when assigned manually via the model / entity properties dialog for Geo-location).


[EDITED]

NOTE: You may also notice that the position of the 3D world axes is always 'remembered internally' by Sketchup for each individual "Group" and/or "Component" within a model ...based on how and where it was originally created.

When one 'exits' each individual "Group" and/or "Component", the 3D world axes immediately returns to the position last assigned within that local context of the 3D model in Sketchup.


So, if one is working deep within the context of nested Groups or Components within a model, one may encounter unique and differing local 3D world axes at each level of a local Group or Component "context", until one is fully exited back to the "outside" of the overall model in Sketchup.

[END_EDIT]

Thus, when one is finished working on one wing of the terminal with the world axes temporarily aligned along one local corner base, one can "zoom to extents" for the entire model, then place the Sketchup "Arrow / Pointer cursor" over one of the temporarily re-located Red, Green, or Blue (aka "R-G-B") 3D world axes, then right-click and select "Reset"... to restore the 3D "R-G-B" world axes to original orientation and location of the 3D world axes.

The "R-G-B" 3D world axes can then, of course, be temporarily re-aligned along yet another local corner base of the model where one is presently working. :idea:


I went over that PDF about building a house and placing that into flight simulator and learned quite a bit. But when it comes to using Model ConverterX to export the model into flight simulator, that tutorial does not give the correct information since it is way out of date. I think this tutorial was put out in 2012, and this is not going to work because it explains or tells me things to do that is not found in Sketchup 2015. I even went on YouTube and tried to find a video that explains exporting the models to flight sim using Sketchup 2015 and there's not one.

Indeed, Arno's excellent tutorial was among some of the earliest made available for use of Sketchup with MSFS, and since that time Sketchup has discontinued availability of the "Photo Match" tool in all versions of Sketchup


I assume you know all the new procedures for exporting my model into flight simulator so could you explain them. I also supposed to make sure that the textures are 2X2, reduce draw-calls, and these things before exporting the model. I was confused here and thought that this model would be converted to an XML file but it must be converted to a MDL file, or am I correct?

Ken.

Simply export your precisely Geo-located model from Sketchup as a KML / KMZ to retain its "placement information" along with the textured 3D model, when it is subsequently imported by Arno's ModelConverterX (aka "MCX"):

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



NOTE: If you wish to preview your model in Google Earth (aka "GE") before importing to MCX, simply double-click the model in Windows explorer to open it inside Google Earth.

The detailed workflow for this in GE is via:

Google Earth Menu > Tool > Options... > Google Earth Options dialog > [3D View Tab] > {Terrain section}:

* Set "Elevation Exaggeration" to 1.2

* Check "Use high-quality terrain"

* 'Un-Check' "Use 3D Imagery" (this allows legacy / KMZ Sketchup model display in GE)

...Then click [Apply] and [OK] buttons

Next, in GE, hover the "Hand" cursor over the existing KBHM terminal 3D model (seen in legacy 3D model display mode), right-click, then choose "Hide Building" ...so that it will not interfere with display of your own KBHM model.

Finally:

Google Earth Menu > File > Open... > Open dialog > browse / select / open your just-exported 'KBHM' KMZ file



BTW: I shall first review for any possible changes in the menu system of the latest "development version" of MCX, and will then post more (later today) regarding the workflow for import, conversion, and re-sizing of textures to "Powers of Two" aspect ratio within the MCX dialog boxes, prior to export by MCX of your model ...as a MSFS "MDL" file.

The MDL file can be exported via more than 1 method, and Arno has provided a convenient "Wizard" for export of an already "Geo-located" Sketchup model imported as a KMZ file, so I will primarily explain that option as an example workflow (later today) ...when I have had a chance to examine the latest "development version" of MCX.


In the mean time, you may wish to review the manual for version 1.3 of MCX ...here:

http://www.fsdeveloper.com/wiki/index.php?title=ModelConverterX


Keep up the nice work ! :)

GaryGB
 
Last edited:
Hi Ken:

I have downloaded and reviewed the menus and dialogs in the latest "development version" of MCX dated 08-13-2015.

When I finally got some free time available late this (Sunday) evening to test this on a laptop computer, unfortunately my 'attempted' workflow for export (of a large 'example' KBHM terminal model) from that latest "development version" of MCX failed with an unusual error I've not seen previously, and I was unable to verify a successful workflow. o_O


I will troubleshoot this with Arno, and if there is not a prompt resolution feasible by tomorrow (Monday) afternoon, I'll try instead using a "stable" MCX release version 1.4 with the same model, to see if I can verify a successful workflow for you to use.

Once I have a successful workflow verified for the example model using a specific version of MCX, I'll post a step-by-step guide in this thread. ;)


GaryGB
 
Last edited:
Hi Ken:

I have identified a workaround for my earlier problems with MCX apparently failing to read the entire length of "long UNC paths" (...which may be an issue only for those with a comparable Windows network security configuration). :scratchch


So now I'll post a more generic workflow to import your Sketchup model into MCX, then export it for display in FSX.:teacher:


This assumes you have already Exported your precisely Geo-located model from Sketchup as a KML / KMZ to retain its "placement information" along with the textured 3D model, when it is subsequently imported by Arno's ModelConverterX (aka "MCX"):

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



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/



In MCX Menu > Options > [Options
dialog] > {Exporter Settings} > {BGLWriter} configure:

* FS2004_BGLCompPath

(ex: [FS2004 SDK install path]\BGLCOMP_SDK\BglComp.exe)


* FSX_BGLCompPath

(ex: [FSX SDK install path]\Environment Kit\BGL Compiler SDK\BglComp.exe)



In MCX Menu > Options > [Options Dialog] > {Exporter Settings} > {MDLWriter} configure:

* MakeMDLPath

(ex: [FS2004 SDK install path]\MakeMDL_SDK\MakeMDL.exe)


* FSX_XtoMDLPath

(ex: [FSX SDK install path]\Environment Kit\Modeling SDK\FSX_GmaxGamePack\Plugins\XToMdl.exe)



In MCX Menu > Options > [Options dialog] > {Texture Settings} > {TextureWriter} configure:

* ImageToolPath

(ex: [FSX SDK install path]\Environment Kit\Terrain SDK\ImageTool.exe)



In MCX Menu > Options > [Options dialog] > {FS Related Settings} configure:

* ModelDefPath

(ex: [FSX SDK install path]\Environment Kit\Modeling SDK\bin\ModelDef.xml



When all the above is properly completed:


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


< 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]


NOTE: Do not confuse with Star Trek's "7-of-9"; :laughing:

Please, Arno, consider creating (additional) text pull-down menu entries for these MCX tool Icons ! :idea:


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;

Please, Arno, consider putting the tabs at the top of MCX [Material Editor Dialog] Left Pane "Texture Column" ! :idea:


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:


PS
: Be sure to add a new active "Area" in the FSX Scenery Library ...for your new scenery export folders ex: ;)

[FSX install path]\Addon Scenery\[your_KBHM_terminal_BC_Model_file_name]\Scenery



Hope this helps guide you through the next steps satisfactorily ! :)

GaryGB



 
Last edited:
Gary,

You might want to add a couple steps to your workflow.

When you export an SU file as a KMZ, by default it will export with all surfaces as double-sided. This can as much as double the poly count and texture vertex count, and add drawcalls. This will have a negative impact on performance.

There are a couple ways to deal with this.

One method is done in SU before exporting and involves painting all "back side" surfaces (the default SU blue material) with a unique color. That color can be removed in the MCX Material Editor before being exported from MCX. Any SU default surfaces will pick up their texture/color from the opposite face making them hard to get rid of in MCX.

My preferred method is to export the SU model as both a KMZ and a Collada file. I then use the placement info from the KMZ model to place the Collada model, using the MCX Object placement menu. (Tip: I do this with two MCX Windows open side by side to facilitate copy/paste.)

Also, somewhere in your step #2, either before or after resizing textures to a power of 2, all SU models should be run through the drawcall minimizer. Especially models that use a bunch of small textures, such as those models downloaded from the 3D Warehouse.

I have seen many small scenery objects made in SU that have been released with huge drawcall counts which hurt performance.

Lastly, while in the Material Editor, don't forget to apply night textures to any materials that you want to have them.

cheers,
Lane
 
Status
Not open for further replies.
Back
Top