Ground Polygon Wizard and non ground polygons

A user reported that the ground polygon wizard of ModelConverterX lost some of his polygons while converting them. When I was debugging this issue, I found out that this was because the polygons were not actually on the ground. They were a few centimeters above the ground. The code that makes sure the polygons are sliced correctly for FSX can’t handle such polygons correctly. That’s why some of them got lost.

So to fix such trouble I have made two small changes to the ground polygon wizard. The first is that you get a warning when your model contains such polygons. The second is that there is an additional button now, which when pressed will ensure that all ground polygons are lowered back to ground level.

Hopefully with these changes the ground polygon wizard works correctly in more cases. But let me know if you encounter more issues.

 

 

Autogen suppression

In the previous post about the ground polygon wizard of ModelConverterX I already mentioned that the tool also helps to prevent the exclusion of autogen by your  ground polygons. I forgot to post some screenshots to illustrate this with that post, so here they are.

They show Gilze Rijen airport in the Netherlands as developed by the NL2000 team. And you can clearly see what the benefit is of having autogen on the airport as well.

Ground Polygon Wizard available

I have just released a new version of ModelConverterX. The big change in this new release is that the ground polygon wizard is now included. Before I will go into the details of how to use this wizard, let’s first take a look at the problems it is trying to solve.

When creating ground polygons scenery designers usually encounter these problems:

 

  • You need the FS2002 gamepack, since that is still the preferred way to create ground polygons. Some of the files of the gamepack are only on the FS2002 Pro disks, which means you have to find all kind of work arounds if you don’t have FS2002. And of course not every designer is making scenery since the days of FS2002 already.
  • When you have the FS2002 gamepack and you have exported your ground polygons, you still need to edit the ASM source files. Else the ground polygons will flicker and will not show shadows correctly.
  • After you have finally got your ground polygons into FS you will see that big parts of the autogen around your scenery are gone.

 

The ground polygon wizard of ModelConverterX tries to help with these problems. I am not trying to say it is the magic solution that solves all your ground polygon problems, but hopefully it helps you.

With the wizard you can load your ground polygons from any file format that ModelConverterX can read, for example FSX MDL or COLLADA files. After you specify the options you want, the wizard will create a BGL file with ground polygons that behave like proper ground polygons.

Before using this functionality, make sure that you the path to SCASM specified in your options. The wizard is using SCASM to create the BGL file. Don’t worry if you think SCASM is old, the code generated for the BGL is the same as the FS2002 gamepack would.

So now let me explain which options the wizard has and how to use it. At the top of ModelConverterX you see a button called wizards. Use this to open the ground polygon wizard, it will appear as a separate window. It looks like the one shown on the side here (but empty when first loaded). We’ll now walk through all the options.

Select file to convert: here you select the file that contains your ground polygons and that ModelConverterX should load. This can be any format supported by ModelConverterX. Once you have selected a file here it will be loaded in the background and once that is done the object is shown in the preview and the rest of the form is populated.

Select output BGL file: here you select where ModelConverterX should generate the new BGL file with your ground polygons.

Filter out non-ground polygons: This option will remove any polygons from your loaded object that are not on the ground (z coordinate is zero). It will also filter out polygons that are on the ground, but pointing downwards. This ensures only ground polygons are left.

Layering and visibility: the grid shown here shows all materials used in your object. You should be able to recognize the names of the textures you are using. For each texture you specify at which layer you want it to be and what the visibility of that layer is. The visibility is not specified per texture, but per layer. So if you change the visibility of one texture on a layer, all others on the same layer get the same visibility.

Position: here you specify the position of the reference point of the object. If you import a BGL file, the position will already be read from it. When you are exporting to FSX it is also important to specify the altitude of the point you are exporting to, else the polygons might not connect correctly.

Slice polygons into 100 meter sections: this option slices big polygons into smaller section. This is required when you are exporting to FSX, else the ground polygons will not follow the curved earth correctly.

Divide polygons in 500 meter areas: this option divides the polygons into areas of 500 meter and exports them per area. When exporting from GMax all your ground polygons have the same reference point. This means they are all loaded at once and the scenery engine also has to evaluate all of them to see if they need to be drawn. What this option does is group them in areas of 500 x 500 meter. Each of these areas gets their own reference point. FS can not evaluate per area if it needs to be drawn or not. And the visibility is specified from the center of that area. In general this will give you a performance increase, especially when you only have part of the airport in view.

FSX or FS2004: select for which version you are exporting the BGL file. Due to the different earth model it is not possible to use the same BGL in both FSX and FS2004.

Now press the Convert button and wait until the wizard form closes. Your new BGL file should now be ready at the location you specified.

Besides the options you see two small buttons. These can be used to save and load the ground polygons wizard settings. If you are converting the same airport multiple times, this prevents you from entering all the information every time. Just save it once and reload it the next time you convert the object.

I hope this wizard is useful to you and improves the workflow of generating ground polygons. This is the first release of this feature, so please let me know if you have any suggestions or comments. There are some additional features that I have planned already, mainly the option to add night and seasonal textures with the wizard as well.

Leaking memory

Tonight I have been doing some memory leak hunting in ModelConverterX. I have found (and fixed) a few leaks in the 3D preview of the objects. So from the next development release you should see less memory being used, especially when you make changes in the material editor. Also when browsing through object libraries or making an object report you should see less memory usage. I can’t guarantee that all memory leaks are gone, but at least these are fixed.

Ground polygons and autogen

Just before my vacation I already posted about the ground polygons wizard for ModelConverterX. Since then I have been working more on this feature and it is almost ready for inclusion in the development release. This wizard allows you to export your ground polygons without the FS2002 GMax gamepack, ModelConverterX will take care of converting them to the right format to behave as proper ground polygons. At the moment I am doing the last testing and removing some minor bugs.

Parallel to this I am also enhancing the output of the ground polygons wizard to prevent suppression of autogen by these ground polygons. For this I am using one of the airfields of the NL2000 scenery project as a test case, Gilze-Rijen (EHGR). The basic technique to keep the autogen seems to be working, but there are a few bugs left that I need to fix before this can be released as well. So hopefully I will have more news in a couple of days.

FSDeveloper server performance

Over the last weeks there have been some issues with the performance of the FSDeveloper server. Now and then (but quite regularly), the performance of the server is bad. This means that pages load very slow or not at all. We are sorry for this inconvenience and we are looking into this issue. The problem is that every time our hosting company looks at the issue, everything is running fine. So that makes it hard to pin it down. We hope to solve the problem soon though.

Time for a blog post

Yes, I am still updating this blog. We are back from vacation for one and a half week already, but I haven’t had the time yet to write on this blog.

I guess me writing about bad news just before the vacation was not such a good idea either, because the vacation also started with some bad news. They had some trouble with the snow in London Heathrow and cancelled our flight. Luckily they could rebook us on another flight just a day layer, so it did not influence the vacation too much.

So after being away from home (and flight simulator) for a while, I have no picked up the different project again. But I will report more about that in a few other blog posts.

Video tutorials on Wiki working again

Today we found out that during the server move a few weeks ago, the video tutorials on the FSDeveloper Wiki got broken. They were no longer playing or available for download. It was just a tiny server setting that disallowed the video format, but that has been fixed now. So the video tutorials are available for you again!

Some bad news and some good news (and some more bad news)

Let me start with the bad news, I have decided to stop the development of gPoly for the moment. It seems developing two tools, ModelConverterX and gPoly, at the same time does not work that well. I don’t have enough time available to turn gPoly into a stable and usable tool at the moment. Maybe in the future I will continue on the development.

While working on gPoly I have learning a lot of interesting things, about using GeoTIFF images, about doing boolean operations on ground polygons or about Bezier curves. The good news is that not all of this knowledge goes into the fridge together with the gPoly tool. I have decided to add a ground polygon wizard to ModelConverterX. So this mean you can import a MDL file into ModelConverterX, determine the layering of the textures and then export to a BGL file with the FS2002-style ground polygons. And you don’t need to do any ASM file tweaking for this at all. Actually you don’t need to have the FS2002 gamepack at all.

At the moment I got the basics of the wizard working. You can apply the layers and export the ground polygons. The only part that is not working yet is the code to automatically slice polygons into sections of 100 meters. This is required for FSX.

And now the last part of (bad) news. This new functionality is not yet available in the development release. I had hoped to finish it last weekend, but ran out of time. Since we go on vacation in a few weeks, you will have to wait another month for it. But I didn’t think it is a good idea to release some untested functionality, even to the development release just before my vacation.

Convert Wizard update

I have released an update of the ModelConverterX Convert Wizard functionality. The main changes are:

  • There is now also an option to combine textures while converting, thereby reducing the amount of drawcalls
  • Before starting the conversion the wizard now checks if all compilers (like BGLComp and XtoMDL) can be found. If not the user will get a clear message box to remind that these settings have to be provided first.
  • I have also fixed some other smaller bugs in the wizard.

I hope the wizard proves to be useful to users who just want to convert and place a few objects. If there are any suggestions on how to make it more useful, please let me know.

Just for clarity, this wizard is for scenery objects only. It is not a wizard to convert aircraft models between different FS version or something like that. It can convert scenery objects and place them at a certain location in the world.