The AI Aircraft Evolution is coming
There is something interesting going on and it has been noticed by some of us in the AI aircraft modeling community. Years ago LOD (Levels of Detail) models were needed to improve the performance of Microsoft Flight Simulator. This assumption has been carried forward since then and was continued into the Lockheed-Martin fork of MSFS, Prepar3D. The issue appears to be now that the graphics processing and/or the graphics engine in MSFS/Prepar3D has advanced to the point that the overhead from handling LODs impacts performance more than just not having LODs in the first place. This is a more indepth look into how LODs affect performance and if/when they should be used as well as identify which items impact performance the most.
Equipment and procedure Used
Frame Rate Recording Program (Wrote my own using FSUIPC as the interface to access the FPS Count in Prepar3D)
Windows 10 PC
Intel i7 Quad Core @ 2.8 GHz
16 GB DDR3 System RAM
Nvidia GEFORCE GTX1050Ti w/ 4GB Video RAM
Samsumg NVMe SSD
Raven FS Labs Embraer E-175 New Winglets model compiled with the FSX SDK in various configurations using 2048x2048 DDS Textures
All test were performed using the above equipment. Experiments consisted of 5 Trials in each configuration. Each Trial consist of the default FSX 737-800 starting from 16.8nm out of KPHX @3400ft and flying the Runway 8 ILS until touching down and then going past Terminal 4 ending after it lifts back off and no AI Aircraft are visible. KPHX has been populated with 119 Embraer E175 aircraft in the given test configuration scattered across parking locations in the default Prepar3D scenery. The recording program takes a snapshot of the frame rate that FSUIPC is reporting every 1/10 second and is averaging all the snapshots every 2.5 seconds and recording it to a CSV File.
This is the chart of all the configurations that were used during testing. One thing interesting is that even after averaging the framerates into 2.5 second chunks there is still a large swing in the values. Luckily we can still see trends well with the graph. 0 on the time scale denotes first FPS calculation performance once on the runway.
The Baseline Reading
These trials are with no traffic.
THe LOD Models Raw
The three worst performing models are LOD 1, 2, and 3. They hold the Draw Calls constant at 66 and only goes down in Polygons. There is an improvement but not by a large margin. LOD 4 is the first model that shows major improvement; the polygon count goes down in about the same margin but the Draw Calls are now at 39. LOD 5 and 6 only has 1 Draw Call and has negligible performance difference.
LOD 1 Low draw call model
This is the LOD 1 model but with all animations removed so Draw Calls are reduced to 13 from 66. Performance is only slightly worse to practically matched. Only 3 trails ran to get representative data.
LOD 1 + 5
With this configuration I used LOD1 at 160 and LOD5 at 70. Performance sits right between the two raw models. Interesting thing to note is the performance dropoff is actually shifted to the right. Lets use this configuration as the baseline for judging the next few configurations.
LOD 1 + Blank
LOD 1 + 5 v2
With this configuration LOD1 is at 160 and LOD5 is at 10. Results appear to show that there is no appreciable difference closer to the airport but some improvement at a distance even though we are having LOD1 rendered at a further distance. This will become the new base model for the remaining comparison.
LOD 1 + 4
With this configuration LOD1 is at 160 and LOD4 is at 10. LOD4 is a 39 Draw Call model. Performance is largely the same until we get to 50 seconds from touchdown where is drops to match or is worse than the LOD1 only model. Stopped after 3rd trial run as it is clear this configuration is not ideal.
LOD 1 + 4 + 5
With this configuration LOD1 is at 160, LOD4 is at 70, and LOD5 is at 10. Better performance than 1+4 model but still is worse than 1+5. Dropped after third trial for the same reason above.
LODs are not dead, but they are not nearly as important as they used to be. The biggest impact on performance in the modern MSFS based simulator is Draw Calls.
Second is the LOD Optimization, which based on my test above the best configuration is the 1+5 v2 model. This is where you have the Full render LOD and the animation-less distance model.
Last thing is polygons, they do affect performance but not to the extent that draw calls do.