Over the weekend I have been continuing with the ModelConverterX tool again. A while ago I improved the FSX MDL importer so that it could read levels of details and animations, but at that moment I did not update the different exporters to handle these more advanced features as well. So now I decided it was a good moment to address these issues. I should mention right away that getting animations to work in the exporter is a step that I did not try to take yet, now I focussed on getting the static transformations and the levels of detail right.
For the X file exporter, which is used to make FS2004 and FSX MDL files, it was relatively easy to add the support for these features. And also for the OpenFlight exporter it did not give me too much trouble. I was actually quite pleased to see that my translation from the FSX level of detail numbers to distances, as used in the OpenFlight file format, worked out very well. After I loaded the object with the OSG viewer, the transition between the different levels of detail was very smooth. So that indicates the distances were choosen quite well.
But for the 3DS file format things were not as easy unfortunately. The more I look at that format, the more I start to wonder why it is used so much to interchange models between different formats. I know the answer in this case is that 3DS is the only format GMax can import, so that is why I am bothering myself with trying to implement it. But the format has some quite annoying drawbacks. The texture names in the materials can only be in the old 8.3 format from the DOS days for example and not so many people seem to restrict themself to using only eight characters at the moment. Another annoying one is that the part names can only be 10 characters. Giving the fact that FS uses a LOD naming schema like _LOD_100 you can do the math yourself to figure out how much characters are left to name the part apart from the LOD part.
But the good news in the end is that I also got the 3DS exporter to work relatively well, considering all these limitations. Now the next item on my todo list is to look at the code to automatically generate lower detail version of your model for the levels of detail.
I don’t use .3ds format for importing my models to Gmax, I’ve found several months ago an .obj import script. It works well, and it’s far better 3d format than .3ds.
I will take a look at the obj format as well then, might be a nice addition to the tool.
Hey Arno!
If you manage to get that auto-LOD working, I’ll be all over this tool! 😉 Read the papers you gave the links to some posts ago and the technique looks promising!