Reading of textures

A little while ago I already wrote about the fact that I was working on my own texture loaders for the ModelConverterX tool. I have now finished the first versions of the loaders I find most important for the tool. I say first, as I am sure some bugs will be surfacing when they are used by more users. So I have now made loaders for the DDS, BMP and R8 format.

The DDS format is common in FSX and I can now read DXT1, DXT3 and DXT5 variants. Figuring out what their difference on the binary level are was very interesting to understand how the compression of those files work by the way. I think I should make a little Wiki or blog article about the things I learned, as that would help a lot of other users as well in understanding which format to choose in which case.

For the BMP format I can read the normal 8, 24 and 32 bit BMP files, but also the ones with DXT compression that were used in previous version of Flight Simulator. I am sure there are some other compressions that are sometimes used for FS as well, but I did not yet encounter these in my own collection of test models.

Finally there is the R8 format. If you still remember these textures you are around for a while, as it is the format used by FS5. Basically it is a RAW file with indices into the FS5 colour palette. A wide range of extensions was used for these textures, not only R8, but also PAT, 0AF, 1AF, …, or any other extension the designer could think of. I can now read those textures in ModelConverterX and display them in the preview for old API macros that still use them. Maybe it would be a good idea to convert these old textures to a more modern format when you export to FSX MDL again.

So that is an update on my texture reading progress, I am now looking forward to tackle some of the other wishes still on my wishlist for the next version.

FSDeveloper site is down

While the flu kept me in my bed, it seems something else also affected the webserver of the FSDeveloper website. I just noticed it today when I sat behind my computer again and I have informed support about it. So hopefully the site will be running soon again. As this kind of problems seem to happen semi-regular we will already try to investigate the sources of it.

But if you excuse me now, I will retreat from the PC back into the bed, as I am not fully recovered yet.

EDIT: By now the site is up and running again.

Ground polygon tutorial

Making ground polygons with GMax always seems to be a hot issue, especially the fact that you have to use the FS2002 gamepack and apply some tweaks to make things work. So this challenging part of scenery design gets discussed a lot on the forums. But now there is a new tutorial that might help you. In it Bill Womack explains how he made the runway for his Plum Island scenery. So have a look at this nice tutorial.

Public transport

First, sorry for this rant, but at the moment I am just to annoyed by it.

Since a few moments the public transport company of Amsterdam already decided to make it more difficult for me to get to work. They are renovating some stations, including the one I have to depart from. To make that work easier they decided to cancel half of the metros (including the one I have to take of course), forcing me to change metros at another station.

That alone is something that I have to accept of course, but this week it seems they are really messing things up. There hasn’t been a day yet this week that the metros that are still running didn’t have an extra delay or one of them was cancelled as well. So I am getting used now to spend quite long every morning on the platform, hoping that a metro will arrive soon.

Would this be their revenge for the fact that I bought a car recently? Who knows, at least I am counting down the days that I still have to travel by metro to work every day. Soon I will be joining the traffic jam on the highway in the morning…

Texture file formats

Loading the textures files into the ModelConverterX tool is something that has given me quite some challenges already. I have used different libraries for it already and all of them gave me some trouble. At the moment I am using the library by Martin Wright and although this one can read all the files I want, it is not a very fast library. So this makes the loading of models relatively slow.

That is why I decided to have a look at how the different texture formats exactly work and see if I could create my own texture file loaders. At the moment I have been studying the BMP and DDS formats. Creating a loader for those formats was not so hard, so at the moment I can read these formats. This should allow loading most of the texture formats used by Flight Simulator.

Only the R8 format is still on my todo list, as this is still used by older API macros that the tool should be able to convert. Maybe it is a good idea then to convert the textures to the DDS format when exporting to FSX MDL files.

I still have to test my new loaders with some more models, to see if there are not some “exotic” variants in use that I can not yet read at the moment. But all together it has been quite interesting to study those formats and gave me a lot of useful background information on how they work.

ESP Developers Conference

I am a bit late, so you might already have read this somewhere else. Microsoft is organising an ESP Developers Conference in both Orlando and London. For more details check the ESP blog.

The one in London is at the 19th of November and I am tempted to go there myself as well. At the moment I am looking for affordable travelling options. So maybe I will see you there.

Getting up to speed

One of the problems with the latest release of ModelConverterX is that the preview image can be a bit slow when a big model is loaded. And with a bit slow I mean that it can take a second or so to update while you are rotating around. This is a bit annoying to say the least.

So solving this problem was quite high on my todo list and today I decided to take a look at it. The good news is that the preview works a lot faster now, I just had to optimize the OpenGL code used a bit more. I have now made use of draw lists and vertex arrays and that gave a big boost to the performance. Now even with the most complex default models I could find, rotating around and running the animations goes smooth. So the leason learned for today is that it is very easy to slow your graphics down by just sending unoptimized code to the graphics card. And in the next release you will also be able to enjoy this improvement.

Back from vacation, but…

I am back from vacation now for almost a week, but today I finally had the time to get up to date with all the posts on the FSDeveloper forum. This was partly because I had to go to Paris on bussiness trip two days this week and also because there were just to many things to catch up with. For example when I got back there were first some spammer problems on the forum that had to be addressed. Luckily it seems we solved that problem for the moment.

While on vacation I did some thinking about a new tool to make the creation of ground polygons easier. It seems that is still a big issue for many users. So I think I will create a tool that can do the ASM tweaks for you and also automatically split up your polygons in smaller pieces so that the curvation of the earth in FSX does not give trouble. I hope to start working on this tool soon. Another feature I have in mind is allowing to split big airports up into several reference points. This is good for the performance and should also reduce the deformation that sometimes appears when the polygons are too far away from the reference point.

And of course I am also still working on the ModelConverterX tool. I want to continue on the new features for version 1.0 soon as well. When I think about all the things I want to do, I almost need a new vacation right away…

Vacation

Just to let you all know that I will not be writing on this blog in the next three weeks. The simple reason for that is that I will be on vacation. So see you again in three weeks time.

Phil Taylor is leaving ACES

If you have not heard it already, Phil Taylor is leaving ACES, check out this post at Phil’s own blog.

I wish him luck and a lot of fun in his new job. And a big thanks for all the work he did for FS in the past. Especially the role he played in opening up the ACES team more to the public is something that should be much appreciated. It must have been hard sometimes for him to deal with the community, especially the part that are never satisfied with the product, but in the end it is great that we have more interaction with the team now. So once again a big thanks for your part in that Phil.