Importing into GMax

Today I was trying to import an object into GMax again. As usual I used ModelConverterX to make a 3DS file and then imported that one. But, also as usual, that meant a lot of trouble with the textures. Especially since the 3DS format can only store short DOS filenames, it can be quite some trouble to get everything imported correct.

I had heard of scripts to import Wavefront OBJ files before, so I decided to look around a bit. In the end I found this script. Using it, it became a lot easier to import my objects I have to say. There were only two things I had to figure out first (and I’ll share them with you).

 

  • To run the script go to the Utilities tab of the command panel. Press the MAXScript button there. Then run the ms file you downloaded with run script. After that you can select Wavefront OBJ Importer from the Utilities dropdown box. This will give you the GUI to load OBJ files.
  • When the texture files are not found (which usually means they need to be in the same folder as the OBJ file), they are removed from the material on import. So make sure the textures are there, since else you get a material with only the colour.

 

But for the rest this is a much easier way to get your object into GMax than using the 3DS file. I should have found this out earlier.

Level of detail for FS2004 models

Tonight I have been improving how ModelConverterX reads levels of detail from FS2004 MDL files. The LOD values are now calculated more accurately. Since I spend quite some time figuring out some details I had figured out last year already (but forgot since then), let me sum up my main findings about levels of detail:

  • The LOD switching distance is determined by the object radius and the LOD value. For example a LOD value of 40 means that the object will switch when 2.5 times the radius of the object covers 40 pixels.
  • The LOD value of the highest LOD is not relevant, since this LOD is never tested. So when you have an object with LOD_010, LOD_040 and LOD_100, it will display the same as that object with LOD_010, LOD_040 and LOD_200. For ModelConverterX this means it can not accurately read the highest LOD value, since it is not stored in the MDL. ModelConverterX will assume it is twice the LOD value below it.
  • The radius of the object used for LOD calculations is a sphere fitting tightly around the object, so it is not the radius of the bounding box.

FSX AGN files

On the FSDeveloper Wiki we have a page describing the FSX autogen (AGN) file format. Today I have been experimenting with AGN files a bit, so I have added more information to this page. Polygonal buidlings, library objects and row houses are not also described. For the other sections I have added some extra explanation as well.

Why did I do this? I wanted to see if I can create AGN files based on shapefile footprints of buidlings. So understanding the AGN format was the first step in that process. I have now made a small tool that can decompile a AGN file into a text file. My next step will be to make a compiler to do the reverse step. The last step would then be to make a small tool to turn the shapefile information into such a text file for my compiler.

I am not sure if compiling and decompiling AGN files is useful to other developers. If you think it might be useful let me know.

Saving your library

One of the items I am changing in the new Library Creator XML 3.0 is how you save your library. Before you had to save the XML and compile the library to a BGL. Now those two actions are combined in one form that saves your library. You can choose if you want to save BGL, XML or both. Below you see the current version of this save library form. I am still tuning the user interface a bit, so in the released version there are probably some small changes.

The good news is that the first (beta) release of the new version is getting close, I have almost finished the features and only need to do some additional testing to make sure there are as little bugs as possible. The new version will be included in the development release packages, that also contains the latest ModelConverterX and FXEditor. The first version will have the improved user interface, the option to open your objects in ModelConverterX from Library Creator XML and the option to list all textures used in a library. The features to read BGL files directly or to add objects directly from ModelConverterX to a library will be added later.

Library Creator XML 3.0

I am working on an updated version of Library Creator XML. Not that there is much wrong with the current version, but I would like to add a few new features. And to be able to add them easier I decided that I would first cleanup and optimize the current code a bit. So that’s what I am doing at the moment. I will also give the tool a new user interface that is more in line with my recent tools. Below you see a first screenshot of this new user interface.

So what kind of features do I plan to add? Here are the ones that are at the top of my wishlist:

  • Export list of textures used by library
  • Open BGL library files in LibraryCreator XML
  • View an object from the library in ModelConverterX
  • Add objects to a library directly from ModelConverterX

Let me know if you have ideas for other interesting features. Not all of the feature above will be available in the next release by the way, I am going to add them gradually.

Another object placement tool?

For a while I am thinking about how to integrate the different tools I have made better. An example of this integration would be to open objects from Library Creator XML directly into ModelConverterX or easily insert an object from ModelConverterX directly into a library. While playing with those integration idea I had another idea. ModelConverterX already has a simple object placement function, so why not extend it with a proper object placement tool? Like a FSX update of ObPlacer XML. Below is a quick video of a prototype tool I made for this.

My question is would yet another object placement tool be useful or not? We already have Instant Scenery and WhisPlacer. And a tool like ADE can also place objects at your airport already.

I am not planning to give my tool full live preview capabilities like Instant Scenery or WhisPlacer. Many because personally I never use that feature. As you can see in the video I have been experimenting with using background images like OpenStreetMap or Bing to show reference maps you can place the object on.

Let me know what your ideas are about such a tool and maybe in the future this tool can be added to the suite. But don’t hold your breath for it, this video is just a prototype and I have no fixed plans yet to make it a full tool.

SceneryDesign.org is back

 In 2004 I started a community website for scenery designers and I called it SceneryDesign.org. In 2006 we decided to rebrand this site to FSDeveloper and expand it to discuss all kind of addons. All the time I still kept the SceneryDesign.org domain as well, it was just pointing to FSDeveloper.

On the right you see the origional SceneryDesign.org logo, it might look familiar to you. That’s because I am also using it as the icon for (almost) all of the tools I make for FS. So I have now decided to re-use the SceneryDesign.org domain as a central place to get information about my tools. So on this new website you will find the following:

 

  • An overview of all the tools I made, with links to manuals, downloads and support forums
  • The latest development release of ModelConverterX, FXEditor and DrawCallMonitor
  • An overview of the recent changes made in the development release

 


Adding objects to FlightGear

This evening I took my first (baby) steps into scenery design for FlightGear. Having done scenery design for Microsoft Flight Simulator for such a long time, it takes a little time to get used to the differences. Let me start with the good news, in the end I was able to see my objects. In this blog I will describe some of the things I came across.

Getting the objects in a format that FlightGear can read was quite easy. I was using two models I had made before for FSX. So I just imported their MDL files into ModelConverterX, saved all textures as PNG and exported the model to the AC3D format. This only took me a few minutes to do.

Next I had to figure out how to place them in the scenery. In the end I succeeded, with help from the FlightGear Wiki, that has some interesting articles. Below are the things I liked and the things I didn’t like that much in the process.

Pros

 

  • The AC3D model files are just placed in a scenery or model folder, you don’t need to use another compiler to put them in some binary format.
  • The placement information is simply entered in a text file in the scenery folder, no need to compile to a binary format.

Cons

  • There is no slew mode, so I had quite some trouble to view my objects after placing. There is an UFO aircraft that has dynamics that come close to slewing, but I still find it hard to control.
  • When placing the object you need to enter the altitude above MSL. So for one object it took a bit of trial and error to get this right. An option to just place them at terrain altitude would be useful.
  • I could not find a way to place my objects in their own scenery package, the placement information goes into the same tiles as the global scenery. With just a few objects this is not too bad, but I can imagine it because a mess if you have to install a lot of scenery (on the other hand, it seems almost all scenery comes with the global package, so maybe it is not such a big issue).
  • The placement information needs to go into tile files with a very specific filename. I had to go into FlightGear to find the name for the location of my object, I would find it easier if you could just specify a position of an object. Maybe there are some tools that assist with this, I still have to look at that.
  • I couldn’t find a way to start FlightGear at a specific latitude and longitude, it seems you can only start at an airport.

It was a nice experience to add some objects tonight, I am sure I will be exploring FlightGear development more. Maybe not to make full addons for it, but it is interesting to see how the development processes for different simulators are.

On the other hand there is enough room for improvement of the FlightGear scenery, the default scenery reminds me of how FS looked when I started to make scenery. For example, I placed an watertower near Hoogeveen in the Netherlands and the airfield there was represented with an asphalt runway, while in real life it is just a grass runway. And the landclass terrain scenery is also not so accurate. The second church I placed it supposed to be in the city centre, not in some green fields.

 

Coordinate confusion – part 2

After all the theory I blogged about yesterday, I thought it might be a good idea to illustrate the difference today. So let’s take a quite common example. I have taken the threshold coordinates of runway 06-24 from Amsterdam Airport Schiphol. And I have chosen the reference point to be near the middle of the runway. What are my XY coordinates of the threshold when I am modelling the runway in my 3D editor?

The two screenshots above show the XY coordinates for the threshold of 06 (top picture) and 24 (bottom picture). In the screenshots you can see both the flat earth coordinates (as used by FS2004) and geocentric coordinates (as used by FSX). Let’s ignore the Z component of the geocentric coordinates for now, although that shows that at the distance of this runway (1.5 kilometre for the reference point on each side) the elevation difference due to the curve is about 20 centimetres already.

But what do the other coordinates tell us? You can see there is around 1 to 2 meter difference in the values in both X and Y direction. And the geocentric coordinates have a bigger values than the flat earth ones. So that means that if something is modelled in the FS2004 coordinates, that it will appear slightly smaller in the FSX world. That’s why ground polygons with different reference points that fit exactly in FS2004, will  have some gaps between them in FSX.

The little converter that I show the screenshots from will be part of the next development release of ModelConverterX by the way, you can find it in the Special Tools menu.