Animation progress

Yesterday I made some progress again in reading and understanding the animation code. I can now succesfully read the scenegraph information as well. This information determines how the different transformations and animations relate to each other (child and peer relations). This makes sure they are added together in the correct way, to get the desired result.

If I now read in most of the default objects they look quite good. For example the default Elephant looks like one now, while before it more looked like a lump of polygons when I read in that model. The skin and bone animations are not supported yet in ModelConverterX though, so the animation still looks a bit funny. Also it seems there are still some minor bugs in the rotations I have to check. But overall I am quite happy with the progress. I will try to post some more pictures this evening.

First animation test

I am quite happy that I (sort of) got animations to work in ModelConverterX now. It is just a very simple test animation I made and there are some bugs in it left. But this is quite a big step. I never got this far in MDL Tweaker before. See a small video capture below.

[View:http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Components.PostAttachments/00.01.64.52.71/modelconverterx_5F00_anim.swf:412:334]

From the old shoebox (1)

Today I was cleaning out some old stuff in my computer room, when I came across some old sketches I made when designing scenery objects for FS98. Since then things have changed a bit, so I thought it would be funny to show them to you.

I should start by mentioning that at that time I was not using any GUI to design my scenery objects. I wrote the SCASM API code by hand, using a plain text editor, some pieces of paper and a pencil. That is where these sketches come from thus.

This first sketch gives a quick outline of a windmill object I was making. For all parts the diameter and the height is mentioned in meter (or SCASM units, as things were still integer point coordinates in that time). Those familiar with Dutch will see that I wrote a comment below saying that all cylinders should be eight sided.

This second sketch is from the control tower and hangar at Texel airport. Because I was writing all SCASM code by hand, I needed a reference which vertex had which number, so that I could define the polygons between the correct vertices. In this sketch you see that I made two 3D views of the building (from the front and back), where I added the numbers of all the vertices. This allowed me to define the polygons a lot quicker.

The last sketch is from the control tower at Hoogeveen. Also in this case you can see that I wrote all the vertex numbers in the sketch. When two numbers are listed the first one is for the ground level and the second one for the roof. The green numbers also indicate the height that the roof was supposed to get.

When I find more interesting sketches or documents from my history of scenery design I will post them here again.

The animation puzzle

This evening I continued with the FSX MDL reader for ModelConverterX. With the LODs done, my next challenge was to read the transformations correctly as well, as some objects now show displaced parts. This was easier said than done, as understanding the way transformations are assigned, also means understanding how the animations work.

Luckily, after making the CAT tool and doing a lot of animation tweaking in FS2004, I understand a bit how this process is done. In FSX things have been changed of course (bone animations are new for example), but with what I knew I could get started quite well. I think I now understand most of the animation puzzle from the MDL files, there are only some missing pieces that still have to fall in place. But with the progress I made today I am quite pleased already and that gives good hope I can extend the MDL reader soon with more cool features. And of course I will also update the Wiki article about the FSX MDL format once I found those missing pieces.

Objects with a LOD

I have added another improvement to ModelConverterX, it can now read the levels of detail from a MDL file and also display them. This is nice to see how Microsoft has made their LODs. At the moment this functionality only works for the FSX MDL reader, as there is not a very structured way in SCASM macros to define LODs. Hopefully I can later add support for reading conditions from the SCASM macros that also define the levels of detail.

Another feature I have in mind for a future version (not the next release yet) is to add an ability to ModelConverterX to automatically create a lower detail model for you. That would allow to easily add LODs to models that do not have them. But that are all plans for the future.

Below you see two screenshots of one of the default cars in FSX, one showing LOD_010 and the other LOD_100. With the combobox at the top you can select with level of detail you would like to see.

Shadow model

While working on the FSX MDL reader for ModelConverterX I came across something interesting. I had some models that showed up a bit weird to say the least. It turned out that I was reading both their exterior model and their shadow model. But wait, did you say shadow model there?

In the MDL format it is possible to define a special shadow model, with its own vertices, triangles, etc. For complex models this can be used to improve the performance, by using a less complex model for the shadow calculations. In the FS2004 format this was also possible already now that I think of it, but it was not a very accesible option. I am not sure if it is easier to add your own shadow model with the new gamepack, I can’t remember seeing much about it in the SDK. Maybe this can be a nice new feature for ModelConverterX later on.

OpenStreetMap rocks!

I had came across the OpenStreetMap project before, but only when I revisited it earlier this week the reail power of it struck me. Let me start with a little explanation about what OpenStreetMap is. It is a free Wiki world map as their slogan says. I has been created by people collecting GPS tracks and combining that with other copyright free GIS data to get a really free world map. On their website you can browse to all the data in a similar way as Google Maps.

But that is not all, the real powerful thing is that you can also download this data. That is what I took a look at earlier this week. I came across some shapefile version of the data and looked at their OSM XML format. Then I realized that this data could be very useful for FSX as well. Because it does not only contain vector data about roads and railways, but it also contains information about the location of bridges. And not the speak about all the point features that are included. If I would like to put mailboxes for the Netherlands in a scenery I could do that.

So I have started writing a little tool now that will take the OSM XML data and turn that into shapefiles with the correct information for shp2vec. And the tool also writes the XML style ExtrusionBridges for BGLComp. That way I am trying to get better looking rail and road data in FSX now. I am doing the tests on a small scale now (only one country), but I guess there is no limit later to extend it to entire Europe to improve the default FS scenery. And I am sure I will come across some other nice features in the dataset that can be used for FS as well.

Sneak preview

Since I released alpha version 13 of ModelConverterX, I have been working on the next version. For that release I have mainly planned improvements to the usability of the tool. So that means the user interface gets cleaned up a bit, functions are made more logical etc. Another example of the things I am implementing is that the import and export processes will be running on a separate thread, so that the user interface will no longer appear locked up.

But while working on all this, I also realised that the old user intreface was not always very logical. Some functions were hidden quite deep in the menus, requiring quite some mouse clicks to get to. So therefore I decided to change the user interface a bit as well. Below you find a first sneak preview of how it will look now.

As you can see I removed the menus and added all functionality in toolstrips that are more accessible. Also the event log has got its own tab now, instead of being only part of the screen. I have some more ideas on the event log, but I still have to work on that.

Another example of a change is that the different colours of the 3D preview can now be configured by the user. See the screenshot below for an example of those options. And did you also notice that you can now toggle a grid in the preview as well to get a better impression of the size of things?