Reading older aircraft MDL files (at least partly)

The screenshot above shows some success with reading the older aircraft MDL files. In this case it is a CFS2 aircraft (they use the same MDL structure as FS98 and FS2000). This models comes out quite good. Unfortunately not all models load that well. Many of them only show partly or not at all after importing. This seems to be caused by the fact that aircraft MDL files have a lot more conditional display than the scenery objects that ModelConverterX normally reads.

So I will first have to think of a best way to handle these conditions, else it is not possible to read aircraft MDL files usefully. Luckily this was already on the wishlist for other objects as well. I would like to add the ability to switch variables on or off from within ModelConverterX and that you then see the object change. If that is not possible I will probably let the user set the value of all variables used before importing. But the first option would be more powerful of course.

So time to do some thinking and hopefully I can implement this feature soon....

Posted by arno | with no comments

Reading FS98 and FS2000 aircraft MDL files

Just a quick update on this ModelConverterX functionality. It is not finished yet, but I have made some progress last week. I can now read the information from the files, but when testing with some aircraft MDL files I still encounter a lot of BGL opcodes that ModelConverterX does not recognise yet. So I am working on adding those before I put this functionality in the development release. Last four days we were away camping in Luxembourg, so I hope to continue programming on it later this week.

Posted by arno | with no comments

Reading section 9 BGL files

This Monday I already blogged about the new feature for ModelConverterX that allows it to read the old section 9 BGL files. This is the kind of files that tools like FSSC, Airport for Windows or GroundMaker make. I have now finished this reader and it will be available in the development release from tomorrow.

Since Monday I have added support for many additional BGL opcodes, so that most of your BGL files should work fine now. I have used some scenery I made more than 5 years ago for FS2002 (or was it FS2000) to test this function and it seems to be working quite good. If you still find some unsupported opcode, please let me know using the FSDeveloper forum.

This new feature might come in handy if you want to port some scenery you made many years ago and of which you lost the sources and only have the BGL files left. With this feature done I hope to give reading FS98 and FS2000 aircraft a try this weekend....

 

Posted by arno | with no comments

FSDeveloper on your smartphone?

Do you want to access the FSDeveloper forum on your smartphone as well? We have installed a plugin so that you can now use the Tapatalk application for the FSDeveloper forum as well. With the free version of this application you can read the forum and with the paid version you can also post new messages easily from your smartphone. Hopefully this is useful to some users.

Posted by arno | with no comments
Filed under:

Reading non library BGL files

ModelConverterX could already read FS2004 and FSX library BGL files, but using the recent improvements I made for the aircraft MDL reader, I have now added another function that was on my todo list for quite some time. I have added support for reading older section 9 SCASM BGL files. This includes the scenery BGL files made with the FS2002 GMax gamepack, but also the older BGL files made by tools like Airport for Windows, FSSC or GroundMaker. It should now be possible to read objects from such files as well. Not all of the files I tested until now work already, some of them still have many unknown BGL opcode, I will try to continue to add these in the next couple of days.

Posted by arno | 1 comment(s)

Aircraft liveries

Today I made some improvements to the aircraft MDL reader of ModelConverterX. It still can't read all MDL files, but much more of them should work now. This should at least give you an idea of the geometry of these models.

The picture above shows an AI 737-300. Now that the geometry seems OK, the thing that bugged me most was the textures not showing. This is because for aircraft MDL files you can't just take the main texture folder, they often have different folders for different liveries. So I decided to add support for that as well. At the top, next to the LOD selection, you can now also select which livery for the textures you want to load. Below are some examples of the same aircraft, but with a different livery.

The performance when switching liveries is not yet perfect, it sometimes takes a few seconds for the preview to refresh. That is something I hope to improve later on. The changes will be available in the development release of tomorrow.

Posted by arno | 1 comment(s)

Some ESP news

Let me just repeat some of the ESP related news that Tim Gregson (Beatle) recently posted on his blog.

ESP is now officially dead, MS has taken the ESP website offline. The SDK pages on the MSDN website are still there though. Tim also reported that he has left MS now and will be working as a consultant for Lockheed Martin on the Prepar3d program (which is what LM is doing with the ESP code they licensed). So good luck with the new job Tim and hopefully we will hear more about Prepar3d in the future.

 

 

Posted by arno | with no comments
Filed under: , ,

Reading aircraft MDL files

This must have been one of the most often requested features for ModelConverterX. And I should directly say that it is not implemented completely yet, but this weekend I started on adding the functionality to read aircraft MDL files from FS2002 and FS2004. Below you can see a screenshot of the default fueltruck MDL that comes with FSX. But in fact it is in the FS2004 aircraft MDL format.

So as you can see this relatively simple object can be imported now, but I should be honest and say that most of the other models I try still fail. This usually happens because some BGL opcode is encountered that ModelConverterX is not aware of yet. So I think some more and better testing is needed before I can put this functionality in the development release.

While working on this feature, I also came across two BGL opcodes that seem to be unknown to the BGLC_9 compiler. These are C9 and CC. Their functionality seems very similar to the VertexList and DrawTriList commands, although some of the parameters are 32 bit, instead of 16 bit long. I do not fully understand yet what the differences are, but hopefully this will also start to make sense soon.

Posted by arno | 2 comment(s)

Improved LOD Creator functionality

Over the last days I worked on the ModelConverterX LOD Creator tool. My first aim was to add another algorithm to calculate the LODs. And besides that I also improved the user interface a bit.

On the right you see a screenshot of the new user interface and since the manual is not yet updated, I will give a brief overview of the changes here.

The selection box at the top right allows you to choose between the different algorithms that are available. At the moment you can choose either vertex clustering or quadratic based error. The last one is the algorithm that was used in the previous version of ModelConverterX and it has not changed in this new update. I hope to improve that algorithm more later on. Below the algorithm selection box you see the different parameters that you can set for each of them.

The remaining changes in the user interface are mainly the buttons on the bottom left. They allow you to remove a LOD, rename a LOD or add an empty LOD. New is the import LOD button which allows you to load another file and that object will then be used for the LOD number indicated next to the button. This should allow people to make for example LODs with SketchUp. By saving them all to different files, you can combine them in one MDL using this tool.

Then to the new algorithm. What vertex clustering basically does is collapse all vertices that are within the same cell of a 3D grid. The resulting vertex position depends on the weight of the original vertices. In the implementation into ModelConverterX you can give vertices a weight based on:

  • The area of the polygons that the vertex is a part of. This means that vertices that are part of a big polygon will have more influence on the new shape. In the properties you can set the influence of the area at a value between 0 and 1. Where 0 means no additional weight and 1 means the maximum additional weight.
  • The angle between the polygons that the vertex is a part of. The idea behind this weight is that polygons on the outside of the object are more likely to have sharp edges. By given them more weight the overall silhouette will be preserved better. This parameter also has a range between 0 and 1.
  • Ground clamping. This gives an additional weight to vertices that are on or below the ground. This is to ensure that you building does not float in the lower LODs.

The two remaining parameters of the algorithm are grid size and floating cells. The first one is quite obvious and determines how big the cells are, within which the vertices are collapsed. The second allows you to choose between uniform fixed cells and floating cells. According to the literature the last option should give better results in general, although I have already seen that it does not apply to every object.

So I hope you enjoy these new LOD functionalities and if you want to see them in action have a look at this demonstration video.

Posted by arno | with no comments

scenery.org

Ever since I started making scenery for Flight Simulator, you could get almost any tool you wanted using scenery.org. That site provided a great overview of tools and tutorials for scenery designers. Sadly last week the site went offline.

This did not come as a huge surprise, since the owner Tom Gregor had already indicated before that running the site was becoming to expensive. After this message the FSDeveloper admins already contacted Tom Gregor to see if we assist in some way. We do have his permission to keep the tools and tutorials alive on FSDeveloper and we also have a backup of all the related files. But before we can put them online again, we need to get permissions from the authors of these tools and tutorials as well. So we are working on that now.

A big thanks to Tom Gregor for running this site for all those years. And we'll do our best to keep as much of the knowledge it contained available.

Posted by arno | 2 comment(s)

Black textures

An often occurring problem when designing scenery is that your object shows with black (or no) textures. There can be many causes for this. For example a  texture that is not a power of two in size, a texture that is in the 24 bit BMP format that FS can not read or just a texture that you forgot to copy to the right texture folder.

Recently I discovered another reason for black textures (and this one took me a little while to figure out). When you apply a bump map to a material, but the polygons that use the material do not have a normal set you will also get black textures. So this is another one to remember when such problems occur again.

Posted by arno | with no comments
Filed under: ,

Attached object orientation

For quite some time already ModelConverterX has the functionality to attach things to your object. For example an effect or another library object. I mainly used this to attach lights to objects and since these shine in any direction I never really bothered to check the orientation properly. Until there were some questions about this on the forum recently. So I took a look and found out the orientation was not really correct.

So in the latest development release of ModelConverterX this has been fixed. The orientation of attached objects is now exported correctly. I have also changed how attached objects are displayed in the preview. They not only show a dot now, but also a line that is the direction in which they are pointing. In the attached object editor you can change this orientation by entering a heading, pitch and roll for the attached object.

Oh and don't ask me why there is a tree attached to that building. It just happened to be a nice library object to test with...

Posted by arno | with no comments
Filed under: , ,

Normal maps for FSX

Today I was experimenting a bit with using normal maps and bump maps in gPoly. So this meant I had to make some bump maps and while doing so it bothered me again that you have to transform the output of the normalmap plugins to work correctly in FSX. Maybe it is my GIMP skills, but I never find it easy to swap channels and do tasks like that in GIMP.

So I decided to add a functionality to ModelConverterX that does all the work for you. You just load the output of the normalmap plugin and it will create the right image for use in FSX. You can find this functionality in the texture converter function of the development release. Below are some screenshots.

 

Posted by arno | with no comments
Filed under: , ,

gPoly status update #11

I have made some progress again on the gPoly tool. The two main features I worked on today are finishing the Bezier curves and extending the user interface so that you can edit the texture mapping of the polygons. Since these feature are difficult to explain with text or pictures, I have made a little preview video showing how you could use them. You can view this video here.

Next item I am going to work on is vertex snapping. When that is done I will start laying down the polygons for my test airport. I am looking forward to actually make some real polygons for a scenery.

Posted by arno | with no comments
Filed under: ,

NL2000 v4.0 release

Over the last three years the NL2000 team has been working hard on making their scenery compatible with FSX and many improvements have been made to the scenery during these years as well. Tonight was finally the moment of the release, the new version is now available for downloading. Given the huge size of 32 GB don't hold your breath while downloading. You can find all details here.

Compared to the previous version I design less parts of the scenery myself. My involved was mainly with technical advice and with converting objects to the FSX format. In the end that was what I started to develop ModelConverterX for.

I hope you enjoy the scenery!

Posted by arno | with no comments
Filed under: ,

gPoly status update #10

This evening I have been working on a feature for gPoly that will make it a lot easier to draw curved edges of your ground polygons. By using Bezier curves you don't have to add many points to get a nice smooth curve. All you have to do is set the begin and end point and use a couple of control points to determine the shape of the curve. In the images below you see a few example I made while testing. The two points at the top are the control points that determine the shape. You can see that by changing their position, the curve has changed.

As you can see from the images I can draw the curves in gPoly now. Tomorrow I will continue working on this feature and check if the texture mapping is assigned correctly and see if exporting works fine. But I am sure this feature will be very useful when drawing your airport layout.

Posted by arno | with no comments
Filed under: ,

ModelConverterX 1.2 released

A new stable version of ModelConverterX has been released. Especially for users converting COLLADA and SketchUp objects this should mean that they can use the stable version again. Since version 1.1 I changed so much, that we always had to tell those users that they needed the development release. Have a look at this post in the forum if you want to see the most important changes in this new version.

At the moment I am focusing a bit more on the gPoly tool, but I still have enough interesting ideas for ModelConverterX as well. So for the short term the amount of updates in the development release will probably be quite low (many bug fixes).

gPoly status update #9

Just a quick status update for the gPoly tool. I think I got the code working now that will ensure that your polygons are automatically sliced into segments of no more than 100 meter. This ensures that there will be no issues with the curve of the earth in FSX. The same code can also be used to divide the polygons of the airport into different segments, so that not everything uses the same reference point and will be rendered at the same time. Especially for big airports I am sure this is important to keep the performance good, although I will have to do more experimenting later on to find the best parameters.

With the exporting side now sort of working, I will move over to the user interface again. Next on my list are improvements to the drawing of polygons (vertex snapping for example) and making it easier to update the texture mapping of the polygons. While working on those features, I will also be drawing the rest of the polygons for my test airport.

Posted by arno | with no comments
Filed under: , , ,

gPoly status update #8

I have now chosen the airport that I will use as a test field for developing the gPoly tool. It is Marshfield Municipal Airport (KGHG) in Massachusetts. So I have drawn some of the aprons and taxiways and am testing now if I can export them correctly to FS.

At first I was exporting with the FS2002 style code used for ground polygons most of the time. As long as I export everything with one reference point things looked fine, but when I divided the polygons over different reference points, to have better control over the performance, I noticed that there are gaps visible between the polygons. In FS2004 the same approach worked fine, so it seems the gaps are caused by the curved earth in FSX. At the moment there is a very useful discussion going on at the FSDeveloper forum about this issue. I still hope that once I understand how FSX corrects the polygons for the curve of the earth, that I can export them again with a compensation so that they line up correctly.

To learn more about this curved earth, I decided to start with exporting the ground polygons as FSX MDL files as well. In these MDL files I am bending the ground polygons so that they follow the curve of the earth. This approach seems to work quite good, although I still have some issues with gPoly not always triangulating the polygons correctly. Between the different MDL files I still see a small gap sometimes, but it is much smaller than in the FS2002 style approach. I hope that by improving my math a bit I can get things aligned correctly again.

The fact that the FSX MDL files seems to work quite well is quite exciting, that would open a lot of possibilities to make better ground polygons. For example with reflection when it is raining or with bump maps. I am looking forward to continue the experimenting.

Posted by arno | with no comments
Filed under: , , ,

Which airport?

Now that I can export some basic polygons from the gPoly tool, I am looking to go one little step further. I am looking for an airport that I can use as a test case to develop the tool further, since there is no better way to find bugs than while actually working with the tool on a project. In the end I will be using the tool for the EHAM Schiphol scenery of NL2000, but that airport is a bit too complex for a test airport.

See this thread on FSDeveloper for a little more background on "my requirements" for the airport. But basically I am looking for an airport that is not too complex and not too simple. And since having imagery available is a must, I am likely to end up in the US with the free USGS data available.

So let me know if you have any suggestions for a nice airport. As a side effect of using it to develop gPoly further I might even finish a scenery of it.

Posted by arno | 1 comment(s)
Filed under: ,
More Posts Next page »