Tango Desktop Project

Today I was looking around on the web for some icons to use in the ModelConverterX tool. Of course there are a lot of places where you can buy very expensive icons to use in your application, but that was not really what I was looking for. In the end I came across the Tango Desktop Project, a project with the aim to help create a consistent graphical user interface experience for free and Open Source software. They have a nice set of icons and I think you will see some of them appear in my tools in the future.

OpenFlight exporter for ModelConverterX

I can remove the first item from my “what I would like to do during the Christmas vacation” list. Today I finished the OpenFlight exporter functionality of the ModelConverterX tool. With this functionality it is possible to save the loaded objects in the OpenFlight format that is often used in image generators of professional flight simulators. The object shown in the picture below is an old API macro of a museum that I exported to OpenFlight and then loaded into OpenSceneGraph to visualize it.

 

The exporter is not yet perfect of course, it only supports static objects at the moment. And also levels of details are not yet supported. But that are things on my wish list and now that the basic functionality is there it is a lot easier to add new things to it.

I have also made progress on improving the SCASM reader in the last days. Especially the part that processing the old SCASM Poly and TexPoly commands has been improved a lot, so that more macros can be read correctly now. There are still some minor problems I need to fix, but I feel I am getting closer to a next alpha version that will be released to the public.

Blog theme (changed again)

You might have noticed that over the last days I changed the theme a few times. Yesterday I thought I had found the one I liked most (the white one), but today I found out that it does not list the links to the ohers blogs. So I switch back to another theme again. But don’t worry, I don’t plan to keep switching daily. Or maybe I should try to make my own FSDeveloper style theme once…

Bye bye ObPlacer XML, welcome WhisPlacer

With FSX MS shipped a tool that allows you to place objects (and design mission), the Object Placement Tool (OPT). But because the interface is not really easy to use, alternative placement tools have appear, as they also did in FS2004. For FS2004 you had for example Rwy12, EZ-Scenery or ObPlacer XML. Now for FSX we also have Whisplacer or Instant Scenery. Some of these tools are freeware, other are payware, and also the features they contain can differ a bit.

For a while I have been planning to make an updated and improved version of ObPlacer XML for FSX. But when I today checked out the latest version of WhisPlacer I realized that I don’t have to do that anymore. That is because with WhisPlacer there already is a good, freeware tool that allows you to place your scenery objects in an easy way. And not only scenery objects, it also allows you to make Generic Buildings for example, with a preview similar to the one ObPlacer XML has.

And the good news is that you can just load your object library BGL files in it and open the XML file that ObPlacer XML made. After that you can continue your development in WhisPlacer, without having to start completely from scratch. So I would advice everybody looking for a good, freeware replacement for the OPT tool in FSX, to give WhisPlacer a try. And then I did not even mention the best part, it also has the Live Preview functionality of the OPT tool, yippee!

Merry Christmas!

Christmas is almost there, so I would like to take this opertunity to wish you all a Merry Christmas.

Of course I will spend the Christmas days with my family, but for the rest this time of year is a good opportunity to catch up with some of the things I want to do for a long time already. So those two weeks without having to go to work are already quite full with plans for things to do. I guess the best thing I could wish from Santa Claus (apart from the fact we already celebrated Sinterklaas, so no Santa for me) is some more time to spend on all this. Here is just an overview of some of the things I have in mind, don’t pin me down on this as I will probably not be able to finish it all:

  • Finish a new version of ModelConverterX and release it. Over the last week I have been running a test project to convert the objects from a certain airport and that has resulted in a lot of improvements to the SCASM reader functionality of the tool. Once I can convert all objects I want to convert, I will release a new version.
  • Add OpenFlight funtionality to the ModelConverterX tool. With my MDL Tweaker II tool I could already write out OpenFlight versions of my MDL objects. I want to add the same functionality to ModelConverterX. That would allow me to convert SCASM objects to OpenFlight and later also MDL objects when I can read them in again. And even more interesting I am also thinking about an OpenFlight reader, so that you can put OpenFlight models into FSX MDL objects.
  • I want to study the SimConnect SDK a bit more, to get a better understanding of what can and cannot be done with it. As part of this I will probably try to write a little tool to drive FSX with external data (that could be useful later at work if we want to use FSX as a visual for our simulations).
  • I want to look into the conditional display of scenery objects. At the DevCon in November I got some interesting suggestions that might allow (some) conditions to work again. As the MDL format does not allow it directly, most suggestions involve using Missions and/or SimConnect. So that will be two fields I will be diving into a bit.

As you can see the list is quite long, let’s see how far I can come. At least it seems I do not have to be bored during my Christmas holidays…

Modelling and texturing for performance

Of course every designer has read the excellent blog posts by Adrian Woods on how to optimize your performance by now. If not I would say do so now: part 1, part 2, part 3, part 4

So after having read that you know that polygons do not matter so much, it is the amount of texture vertices that the graphical card has to draw that matters. And also the amount of drawcalls is very important, so we need to minimize them. That means putting all your textures on one sheet if possible and don’t change the shader parameters (material settings) when that is not needed. So also for just a colour surface where we used to use a material sometimes, it is better to use a piece of your texture.

But that is all theory you might think, what will it bring me if I model like that? I had the same question, so today I tried to figure out what the benefits could be. So what I did is that I took a model of a church that I made 2 years ago or so. Recently I had updated it to FSX materials already, but I did not change the amount of materials. So it was using 8 textures for this church and besides that also 3 coloured materials. So in total it would need 11 drawcalls just to draw this church.

So today I tried to optimize this church based on all the tips Adrian provided (and on the DevCon he also gave a interesting presentation about this). So I combined all my textures in one big 1024×512 sheet (I did not need the size of a 1024×1024 for this one). In there I also added some coloured areas to replace the materials I used before. So now I could draw my entire building with this single texture, so it needs only 1 drawcall.

So then it was time to measure the performance difference. Because one church does not really hurt my PC (although I tested it on my 3 year old laptop), I decided to place 25 of them in a nice 5×5 grid. I did place these churches in the middle of the ocean so that I was only measuring my churches. So here are the results:

Empty sea: 17.0 frames
25x Non-optimized church: 12.2 frames
25x Optimized church: 15.0 frames

The performance gain was a lot bigger than I had actually expected and this clearly shows that following the tips of Adrian is a very wise thing to do. As I tested this with Acceleration installed, I guess the batching of objects that is contained in Acceleration/SP2 might also show its power here.

A funny fact is even that my “optimized” model has more polygons than the old one. In the old model I used a few repeating textures, but now I decided to add a few more polygons for that, so that everything fitted better on my texture sheet. So this shows that the amount of polygons is not the most important part when it comes to performance, the drawcalls that is what matters. So watch your drawcalls from now on!

Jason leaves ACES

You might already have read this on his blog, but Jason Waskey is leaving the ACES team (and MS as well). This happens more often of course, so why do I blog about it this time? That is because Jason was the first ACES team member that I ever had contact with. A few years ago now, I suddenly got a PM at a forum if I was interested to betatest FS2004. This PM was send by Jason and of course you can understand that I was very happy with this offer at that time.

So Jason, good look with your new job in art.

(Finally) another ModelConverterX update

It has been much too long ago that I wrote about the ModelConverterX tool. Or actually it was also much too long ago that I programmed on the tool. But since last week I have been making some progress again. That is partly because I have a little more time now that all the travelling for work (and for vacation) has finished. And also because I need to tool for a little test case I am working on.

For that test case I am trying to convert all the 3D API objects of an old scenery into the FSX MDL format with this tool. To make my life easier I have also added a function to make a XML placement file from the old SCASM file that contains all the Macro calls. Other improvements I have added are direct export to MDL format (XtoMDL is called for you by the tool) and the ability to batch convert objects, so that you do not have to load them all manually.

In the next days I will have to test this new functionality a bit more and I guess during that testing I will hit some new bugs as well. But I expect a new alpha release somewhere during the Christmas vacation.

More on SP2

After making my last post, I realized some information was still missing. So here are two interesting things:

  • Jon Patch put a nice overview of the changes on his blog (thanks to the information Phil provided as well).
  • I did not see an SDK update that goes with SP2, so the developers out there might want to wait a while, or else if will break stuff like your Object Placement Tool.