I have added a new function to ModelConverterX. It can now also read X files. This can be a X file generated by the FS2004 or FSX gamepack, but also a X file generated by another tool that does not contain the FS specific information. The following features will be read from the X file:
Geometry, normals and texture coordinates
Material settings (including FSX specific material settings)
This new functionality is in the latest development release. Let me know if you have any issues with this feature.
Just to let you know this blog is still alive. Just recently I did not have too much time to post interesting things here. But that does not mean I haven’t been (silently) working on new things. Here are some of the things I have been working on recently and once they are finished you will read more about them on this blog as well:
Improving the reading of aircraft MDL files in ModelConverterX, especially when it comes to the animations of the aircraft.
Improving the ModelConverterX preview. I have been experimenting with using shaders and that seems to be a great way to allow reflections, bump mapping and that kind of advanced features to show in the preview as well. I might even get the skin and bone animations working in the future.
I have also been doing some scenery design with SketchUp, working on some new objects for the NL2000 scenery.
Oh, and last but not least, we have been preparing for the baby that can be born any day now.
That should be enough to dust off this blog for now. When I have finished some of the items listed above, you will be able to read all the details here again.
I have update the Animation Editor in ModelConverterX. Before this form could only be used to remove all animations from your object, but now it can do more. The following features have been added:
Select which animations are active and shown in the preview.
Examine only sections of an animation, for example by looping only a subset of all frames.
Remove the selected animations. These will then be “frozen” to the animation frame you have selected. This is similar to the function to remove all animations before, but now it can be done per animation.
I have made a quick video tutorial to show you how it works.
I have just added a new feature to the ModelConverterX development release. It is a MDL Tweaker that you can find in the special tools menu.
Let me first explain how this tweaker differs from loading a MDL into ModelConverterX itself. When you import a MDL into ModelConverterX the object is read and stored in an internal representation. ModelConverterX then works with this internal representation when you make changes. In the end this internal representation is exported again to a MDL file.
The MDL Tweaker works differently, it directly manipulates the binary code of the MDL file, without decoding it to an internal representation first. This means that you can for example make small modifications without loosing animations or other elements that are in the MDL file. But it also means you are more restricted in the kind of manipulations you can make.
So what can this new MDL Tweaker do? At the moment it supports the following tweaks:
Change MDL name
Change MDL GUID
Change radius as stored in the MDL file (this is similar to the function of the RADItor tool I made a while ago)
Change the bounding box values of the MDL
Add a custom shadow model
Below you see a screenshot of the form. After you have made the changes you want, you need to click Save MDL to saves the changes to disk. When you click the Insert custom shadow model button you will get a file selection dialogue where you can select the MDL file that should be used for the shadow model.
I would like to stress that at this moment the tweaker only works for FSX MDL files. I still need to test and adapt it to work with FS2004 MDL files as well. Also at the moment the tool might not be super robust yet, I am still working on that as well.
A recent question by Don Grovestine on the FSDeveloper forum made me look more at the shadows of FSX models. As everybody knows, turning on the shadows in FSX can have a considerable influence on the performance. But the FSX MDL format also does allow you to specify a custom model that is used to render the shadow. I did some testing today to determine how big the performance difference can be.
I started by making a rather complex object, with almost 6000 triangles. And I placed many instances of it at my favourite test location. The screenshot below shows how the scene looks with shadows. Without shadows I got a framerate of 22. When I turned on the shadows the framerate dropped to 15.
So next I made a simplified version of the model. Instead of 6000 triangles it uses only 250 triangles. And I inserted this model into my MDL as the shadow model. In this case I got 20 frames for the scene, so that is only a minor performance drop, especially compared to the original drop. The screenshot below shows the result. As you can see the shape of the spheres is less smooth in the shadow now.
In my test scene I placed a lot of objects and the object I used was rather complex. I am not sure if the performance benefit would be that big for an airport as well. But at least it shows that using a simplified shadow model can help improve the performance.
To insert the shadow model into the MDL, I used an experimental function in ModelConverterX. I will develop it further to make it useful for general usage and then put it on the development release version. Hopefully it should be available in a few days.
I have just put the first version of the Animation Tweaker in the ModelConverterX development release. You will find it in the Wizards menu. This first version can do two things (or actually it does those two automatically to all files you process with it):
Make FS2004 animations with more than 1024 frames
Update the animation to use local variables
As input to the wizard you should use FSX MDL files. I did test this new function with some test files here, but please let me know if you have issues with your files. It is a first beta, so might be a little buggy.
One of the first tool I made for scenery designers was the Conditional Animation Tool, CAT. The first version of this tool was released in 2003 and I mainly started making it because I grew tired of tweaking animations by hand (and I got tired of explaining people how to tweak them by hand). After the release of FSX, the development on CAT sort of stopped. The new native FSX format does not allow that kind of tweaking and for FS2004 the tool had most needed functionality already.
But since then there is another kind of animation tweak that I made a tutorial about, the tweak to get animations with more than 1024 frames into FS2004. For this tweak there is no tool yet and on the FSDeveloper forum the tweaking required is discussed now and then. I always hoped to make a tool for this tweaking as well one day.
Two weeks ago I got a good idea. Why not use the FSX gamepack to make long animations and then convert them to FS2004 MDL for people using FS2004? That way you can overcome the limitations of the FS2004 gamepack. The only thing you need to do is write the correct ASM code for the long animation. Since ModelConverterX can already convert objects from FSX to FS2004, I thought it would be nice to add this animation functionality as well.
So you can say that there will be a new version of CAT. It is now called the Animation Tweaker and it will be a wizard in ModelConverterX. But the icon will still be the cat you are all familiar with. I have been coding on this new wizard in the last days and I have got the basics working now. I just need to do a little more testing before I include the functionality in the development release as well.
At the moment the wizard does two things:
Make sure that the animation does not use the user variables of FS2004 anymore. By default MS uses usrvar, usrvr2 and usrvr3 to store the frame number of the animation. By using these variables you can get conflicts with other tools or sceneries that also want to use the same variables. That’s why I prefer to make animation using local variables inside the MDL. The wizard will perform this tweak to any animated object you process with it.
Tweak the ASM code to get correctly working animations with more than 1024 frames. This means that no more ASM tweaking is needed to get them working. The only limitation I have found until now is that the total animation can not be more than 32768 frames. But that is around 30 minutes of animation already, I think that should be fine for almost everybody.
In the future I also want to add the original functionality of CAT, so the possibility to apply triggers and conditions to your animation. Since I made this tool 9 years ago I have learned more about how the animations work. So I think by now I can make the conditional animations even more efficient. For example without the problems that CAT has when you have many animations in your object. But I will only start on this part of the Animation Tweaker when the long animations tweak is working.
Just to be clear, let me stress one point. This Animation Tweaker can only export FS2004 MDL files, since that is the only format that allows such animation tweaks. So they can not be used in a FSX MDL file. The tweaker will read FSX MDL files, since they allow you to define longer animations without problems.
Remember the limitation in the FS2004 GMax for the length of animations? The tool does not allow us to export animations longer than 1024 frames. This is quite annoying, since that limits your animation length to only 55 seconds. Luckily the FSX gamepack does not have that limitation.
I have written down how to tweak the ASM code to get longer animations. But I’ll be honest, it’s quite complex code and you need to know quite a lot about how the animation code works to make the tweaks. So I can understand that it is not so appealing to many developers.
This morning I woke up with a good idea (why did I not try this before?). What would happen if I would make a long animation in the FSX gamepack and then convert it with ModelConverterX to a FS2004 MDL file? Guess what, the 1024 frames limitation is not completely in MakeMDL, a big part is in the gamepack DLE file. So that means that my new FS2004 MDL files contains all 33334 frames I put in the animation. The only problem I noticed is that the interpolation logic above is still written for 1024 frames. So that part still has to be tweaked. But at least you don’t loose any of the keyframes.
So I think I should add a tool to ModelConverterX that can automatically do the remaining tweaking. If all the keyframes are preserved, that is not so much work anymore in the first place.
It just puzzles me why I only think about this so many years after FSX has been released…
I am working on a ModelConverterX update that will include better support for the placement of objects. One thing that will change is that placement information will be read from BGL files. But I am also changing the functionality in ModelConverterX that allows you to place objects. One of the main changes there is that you will be able to place multiple instances of the object, instead of only one at the moment. The screenshot below shows the new object placement form that I am working on. It will still take some time though before this functionality will be in the development release, at the moment it is still too buggy.
I have just made a small update to the DrawCallMonitor tool. The change is that the user interface now has a status bar that will show you some additional information. The two main things are does this object have drawcall batching and does it have working levels of details. These two are related, but with this update you can quickly see how your object will perform. If the levels of details will not work, the text is red, if they will the text is green. Similar for the drawcall batching.