• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Wasting performance

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
34,536
Country
netherlands
With the new LOD system in MSFS 2024 I did notice that more users are using the LOD Creator tool of ModelConverterX as well to add levels of details to their models. So this triggered me to look at a number of issues and feature requests for the LOD Creator that were still on the TODO list.

The first one I looked at is the performance of the LOD Creator. When using a complex object with many triangles it takes a lot of time to calculate the LOD. So I used a profiler this time to have a look which steps of the algorithms take most time. And as usual, it is not where you think the complexity should be of course. The vertex clustering LOD creator was for example wasting a lot of time by updating the slider in the editor user interface at a much too high rate.

In my mind it was not that long ago that I implemented these algorithms, but it turns out that it was 15 years ago already. And I must say that in those 15 years I did learn quite a bit more about programming as well. So the code that I made back then did not look that good anymore with my current standards. I thus took some time to cleanup the code and structure it better.

The results of this are quite stunning if you ask me. An object with 8000 triangles took just over 90 seconds with the old code to calculate a new LOD. After all the changes I have made now it takes less than 2 seconds. Sometimes it is impressive how much performance you can waste in places where you don’t expect it. These performance improvements will be part of the next development release.

Continue reading...
 
Back
Top