Good old scanner

This week I have been cleaning my computer room a bit and I came across my old flatbed scanner. You know, such a thing that was used before we had digital cameras to get a photo onto the computer as a digital file. I think I bought this one about 10 years ago, when I had loads of photos I wanted to scan so I could use them for my scenery design activities. A few years later I got my first digital camera and from that moment on the scanner has mainly been collecting dust.

Now when cleaning the room I came across it again. And as I have not used it for years, I think I will do it away this time, it is just taking up space. But just finding this old piece of hardware reminded me of all the changes in scenery design in those 10 years. Now with digital photography it is some much easier to make good looking textures and photoreal objects. You start wondering how we will make scenery in 10 years from now…

ModelConverterX alpha 04

This evening I have uploaded a new alpha version of the ModelConverterX tool. It contains all the new stuff I have already blogged about in the last week or two. So if you are interesting in converting some of your old API macros to a FSX MDL file (or maybe an OpenFlight file), give this latest version a try. And let me know if you have any problems or suggestions, so that I can further improve the tool.

Scale it!

Today I made some nice progress again on the ModelConverterX tool. One of the new features I added is the option to scale your object, so that you can get the desired default size when placing your object with the XML code. Below you see a screenshot of the scale dialog. On the right you also see the toolbar with options that can be applied to the object.

 

There are still some bugs in the batch conversion functionality left, but once these have been solved I will upload a new version for you to play with.

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!