The download hangar is currently disabled. We're doing our best to bring it back as soon as possible.

Goodbye to LODs?

Discussion, tutorials,hints and tips relating to designing military ai aircraft.
Post Reply
User avatar
John Young
MAIW Developer
MAIW Developer
Posts: 4222
Joined: 12 Jul 2008, 15:15

Goodbye to LODs?

Post by John Young »

Designers here might find a bit of testing I did over the weekend useful.

It was to do with the influence of LODs on performance (frame rate) in FS9, FSX and P3D4.5. The results in the main didn’t surprise me, but one most definitely did. I’ve added a bit of introductory information so that non-designers can perhaps follow the ins and outs of the subject. I was also able to quantify the performance hit of using FS9 AI aircraft in FSX.

LODs (Levels of Detail) have been incorporated into Microsoft Flight Simulator models for more than 15 years. The principle is that it is costly in performance to render detail in a model at large distances and is unnecessary because the user can’t actually see it. To counter that, each model usually contains a number of sub-models each diminishing in detail over distance, determined by a LOD number that is recognised by the simulator. This is the LOD progression of my Typhoon model in 7 stages showing the polygon count from the fully detailed model on the left to a simple paper aeroplane on the right:

Image

While it might take 80 hours to make and texture an AI model, adding LODs, generally takes no more than another 6. However in FSX and P3D, some parts need to have animation and/or visibility tags applied to them. That’s particularly tedious because the animation tags do not clone from one LOD to another in a part. Adding them each time requires ungrouping each LOD, selecting the tag from a scroll down list and grouping again, including re-typing the name. It’s also a pain if any changes are required to parts after the LODs are done, because the change often needs to be made through the bulk of them. With several model variations, the number of changes can be huge.

LODs need a lot of thought, because the art is to remove polygons progressively so that the changes are hardly perceptible. 7 LODs help to do that, but at a price in tedium.

Microsoft produced a really interesting technical paper several years ago called "Performance Art 3 – Polygons don’t Matter". In it, they argued that the greater influence on performance was the number of texture vertices used in the model – the mapping of the texture to the model. The revelation came with the discovery that welding common texture vertices together, reduced the vertex count considerably. That was a spectacular breakthrough in custom scenery design at the time, with parts like hand rail and stair components in control towers, or multiple weapons bunkers, for example. It led to the development of large Gmax scenes with more complex parts in order to take advantage of the principle, but also to reduce draw calls (generally 1 part + 1 texture). The scope for vertex welding in AI aircraft is not so great, but there’s enough to make it worthwhile.

LODs were first used in the days when home computers were low in processing and graphics performance compared to today’s specs. The question is are they still needed? The only real way to test that is by measuring the frame rate for the same model, in native code, with and without LODs, in the same scenery and with similar settings, in all 3 sims. That’s what I did.

For the test, I picked the MAIW Scenery of Norfolk Virginia (KNGU). It is very typical of much of the scenery in use today, with use of the MAIW Global Object Libraries.

For the AI aircraft, I picked my Eurofighter Typhoon with Paveways (FS9 and FSX native) because it has a maximum polygon count of 9854, close to the 10,000 upper limit I tend to work with in 7 LOD models.

For the test flight plan, I enabled 30 Typhoons, each with a different texture sheet, at Norfolk in FS9, FSX and P3Dv4.5.

The viewpoint was close to the runway 10 threshold. The late stages of approach are perhaps the best position to test frame rate. At this point, users need a responsive situation to be able to roll wings level in a cross wind without hesitation because of a poor frame rate. This is the position I used in all 3 sims, with the same weather conditions and autogen settings:

Image

Obviously, PC specifications are relevant too. I have a mid-range set up, so that’s probably a fair test. These are my PC Specs:

- Intel I7 9700K 3.6 Ghz (not overclocked)
- Nvidia GeForce RTX2070 8GB
- 16Gb DDR4 RAM

Just as a comparison, the minimum frame rate to run FS9. FSX or P3D smoothly is about 25 fps.

These are the results of the tests that I did:

Image

The results for FS9 didn’t surprise me. I have never really had a problem with FS9 frame rate in any of my past PCs. There is enough margin in the 88 fps there to cater for a variety of other factors, such as the instrument panel that would normally be in view in the user aircraft.

FSX didn’t really surprise me either because that sim version has always been more of a challenge for performance. Although the overall performance bracket is much lower than in FS9, the effect of LODs in the Typhoon, appears negligible. This is with FSX native code Typhoons.

While I was testing FSX, I was also able to verify, what I always knew – that FS9 AI aircraft used in FSX are a killer, compared to FSX native AI. It was easy to do – all I had to do was swap the FSX model for the FS9 one. These are the results:

Image

What really surprised me was P3D. I have always thought that this sim handles AI traffic particularly well, but I did not expect the non-LOD performance to be better by 11 fps than the LOD test. I don’t know why that is. Maybe it’s because P3D has an overhead in actually processing the LODs that outweighs the gains in the LODs themselves?

My immediate reaction after doing these tests was to stop making LODs. However, there’s a bit more to it than that.

My flight simulators are set up for design work. I need to launch each sim quickly so that I can test what I am building frequently. I need a load time of about 20 seconds and for that reason, I don’t have much scenery or AI traffic live.

There are basically two types of AI user – those who like to enhance their flight experience by having numbers of AI aircraft typically as seen day to day in the real world and those that collect AI like postage stamps. These users typically want all manufactured serial numbers and traffic that would fill most parking spots. My test might have taken into account the first user type, but certainly not the second.

LOD performance also changes with screen resolution, so users will see different drawing distances according to their monitor set up. I tested with a monitor running at 2560 x 1440 resolution.

While the tests might indicate that LODs are not really needed any more, I still have the nagging doubt that it is particularly wasteful to have the sim draw nearly 300,000 polygons (30 Typhoons x the maximum polygon count) anywhere in the AI catchment area, which could place the aircraft 60-80 miles away from the user. Add in all the other AI in the area and that could still be problematic.

I think I’m coming to the conclusion that the paper aeroplane should be retained to kill the count at say a couple of miles, as a safety margin. An intermediate LOD at about 300 feet to kill the small detail might still have some benefit so long as the change is not too abrupt.

I’m going to configure my current project that way and that will involve a more detailed scenery than in the test I’ve just done. I’m hoping this with take the work out of LODs and I know that’s the way designers here are going. There's little doubt about that for P3D certainly.

John
Last edited by John Young on 15 Mar 2021, 10:08, edited 1 time in total.
User avatar
hschuit
MAIW Developer
MAIW Developer
Posts: 594
Joined: 20 Jul 2011, 07:25
Version: P3D
Location: Near EHSB

Re: Goodbye to LODs?

Post by hschuit »

John, your analysis is excellent, thanks for doing these tests. My experience with P3Dv4/v5 confirms what you are seeing. I also found another strange thing with P3Dv5 when I tested LOD transitions of my Nimrod model which has 3 LODs. I compared the transitions in FSX and P3Dv5 with equal screen resolution (1920 x 1200), viewport zoom factor and FPS settings (limited at 30). What I saw was that the LOD transitions in FSX happened at much closer ranges than they did in P3Dv5. In P3Dv5 I could not even see the lowest transition from LOD 40 to LOD 10 happening.

For P3D, my priority is keeping draw calls as low as possible, ideally between 25 - 45. Large aircraft get 3 LOD's, small ones only LOD 100 and a textured paper plane at LOD 7 or 8.

Henk.
User avatar
gsnde
MAIW Admin
MAIW Admin
Posts: 4381
Joined: 05 Apr 2007, 08:13
Version: P3D
Location: South-West Germany
Contact:

Re: Goodbye to LODs?

Post by gsnde »

A great piece of analysis, John! We should start bringing such essential things into documents to keep them at hand.


From mobile hence short
Cheers,
Martin
________________________________________
The Owl's Nest * Military Aircraft Reference * ICAO Reference * Distance Calculator * MAIW, Military AI & UKMil Reference
User avatar
TimC340
Lieutenant Colonel
Lieutenant Colonel
Posts: 1321
Joined: 07 Mar 2015, 13:18
Version: P3D
Location: Hadleigh, Suffolk
Contact:

Re: Goodbye to LODs?

Post by TimC340 »

I've seen this issue referred to over at FSDev. I don't do aircraft, so I don't take huge note of the issue, but there seems to be a consensus that the later sims running on modern hardware don't need LODs. I assume that's because graphics handling is that much better using DX12 and modern GPUs - and that the limitations of the older programs' graphics routines would mean they're less susceptible to improvement on modern hardware.

That little snippet about welding vertices in buildings is something I need to look into, I think. My SketchUp-based sceneries are quite wasteful of resources!
User avatar
John Young
MAIW Developer
MAIW Developer
Posts: 4222
Joined: 12 Jul 2008, 15:15

Re: Goodbye to LODs?

Post by John Young »

Yes I think that's about right Tim, but I still want to avoid dumping 300,000 polygons into an AI catchment area when I can easily kill them at 2 miles with a simple LOD. It's the same principle as burying a tiny triangular plane as a final LOD to kill, say a car scenery object, at a few hundred feet.

I've just e-mailed a performance tutorial for custom scenery to you that includes a section on Texture Vertex welding. It's for Gmax, but you might find it useful.

John
User avatar
miljan
MAIW Developer
MAIW Developer
Posts: 2144
Joined: 31 Jul 2009, 21:34
Version: P3D
Location: Between continents

Re: Goodbye to LODs?

Post by miljan »

Great analysis John. If this is the case I am still in. Usually I make main LOD and then it takes forever to make other LODs coz I simply hate that part.
VIVA LA VIDA
Image
User avatar
MIKE JG
MAIW Developer
MAIW Developer
Posts: 10976
Joined: 12 Aug 2006, 02:25
Version: MSFS

Re: Goodbye to LODs?

Post by MIKE JG »

Interesting stuff John. Often wondered how much we're saving by doing all these LODs. Now we know.
-Mike G.

Recovering flight sim addict, constant lurker.

Check out my real life RV-8 build here: RV-8 Builder Log
User avatar
John Young
MAIW Developer
MAIW Developer
Posts: 4222
Joined: 12 Jul 2008, 15:15

Re: Goodbye to LODs?

Post by John Young »

So, I have tested the new regime with my current project (I'll reveal that shortly). I'm using:

LOD_400 = full detail
LOD_40 = half the polygon count at about a quarter of a mile (to protect the airfield frame rate)
LOD_05 = a paper aeroplane at about 3 miles (to protect the wider AI catchment area frame rate)

LOD_40 has all the small parts removed. Going further than that risks an abrupt change and noticeable transition.

Very happy with that.

John
User avatar
hschuit
MAIW Developer
MAIW Developer
Posts: 594
Joined: 20 Jul 2011, 07:25
Version: P3D
Location: Near EHSB

Re: Goodbye to LODs?

Post by hschuit »

John, does it make a difference in your LOD 05 - 40 - 400 example if the highest LOD is 400 or 100 ? I always use 100 as the highest when all other LOD's are less than 100.

I found this in my FSX notes, cannot remember the source: LOD value is the amount of pixels rendered below which the next lower LOD model will be displayed, the result depends on the monitor resolution.

What I understand is that when this 3 LOD model moves away from your viewpoint, 2 transitions are happening: One when the viewport pixel count of the model becomes 40 or less and another when it becomes 5 or less. Finally the sim stops rendering the model if pixel count becomes less than the SmallPartRejectRadius value (FSX default is 4, I set mine at 2).

Henk.

EDIT: I found the source and it also answers my question, it was posted on the FSDeveloper forum by Arno Gerretsen:

https://www.fsdeveloper.com/forum/threa ... ost-626237

Some quotes: "The lod value is indeed the amount of pixels covered by the object at which it should switch. So it is by design that small objects will switch earlier than bigger ones. They switch once their contribution to the total scene gets smaller."

"About the highest lod switch value, it is irrelevant. If you make two models, one with lod 10, 40 and 100 and one with 10, 40 and 1000, they will show exactly the same behavior. So it's the values 10 and 40 that matter."
User avatar
John Young
MAIW Developer
MAIW Developer
Posts: 4222
Joined: 12 Jul 2008, 15:15

Re: Goodbye to LODs?

Post by John Young »

Henk, LOD_100 is fine for an AI aircraft with two or 3 LODs and what you say pixel-wise is quite true. That's why the transition will vary according to monitor resolution as you say.

I used LOD_400 previously with 7 LODs to give a smoother spread of transitions (400, 200, 100, 70,40,20, 05). It's also a hang over from my scenery design days with large Gmax scenes, like a whole housing estate or a weapons site. You need LOD_400 and LOD_399 to make very large composite models like those, switch. For things like cars, I used LOD_100 because they are easy to make disappear.

I didn't think you could go higher than LOD_400, but Arno will know better than me. I think, going back to the MAIW Legacy models, Nick Black tended to start at 400 and spread the range.

John
User avatar
rocket_26_
MAIW Developer
MAIW Developer
Posts: 301
Joined: 29 Aug 2006, 05:28
Version: P3D
Location: EGXW

Re: Goodbye to LODs?

Post by rocket_26_ »

LODS are only necessary nowadays for really high poly model such as aircraft. For a lot of my scenery models it just isn't worth for the extra draw call's.

In fact Coningsby for P3D and MSFS2020 have no LODS and no issues with performance.

Draw calls are the biggest hit on FPS for me and then texture size also has a impact memory wise particularly in P3D V5 due to being GPU heavy.

The texture vertex welding is only useful if you weld vertex's where two faces share them. For example where two walls join. I found when you weld duplicate objects or objects such as handrails all on one vertex in GMAX, once you export they are no longer welded. Open a model in MCX post export and you will see what I mean. In fact 3DS Max only lets you weld vertex's where faces join.

If you try and weld all the vertices together of a object it wont weld, so for me that saved a lot of wasted time.

Fortunately in the FS2020 exporter it optimises vertices where possible on export so welding is required.
User avatar
John Young
MAIW Developer
MAIW Developer
Posts: 4222
Joined: 12 Jul 2008, 15:15

Re: Goodbye to LODs?

Post by John Young »

Welding common vertices were certainly effective in FS9 Ian, the tests we did at ACG and the results we got afterwards confirmed that. Microsoft said they batch welded vertices in FSX at the time, so it was not so important in that sim version and presumably after.

John
User avatar
Greg
MAIW Admin
MAIW Admin
Posts: 4046
Joined: 12 Aug 2006, 19:56
Version: MSFS
Location: Belgium

Re: Goodbye to LODs?

Post by Greg »

Sorry I'm not a modeller but just wondering: what's the use of the LOD_05 model if the default SmallPartRejectRadius value is 4? That would mean a transition when the model is displayed with 5 pixels, but at 4 pixels the rendering completely stops? That's just one pixel difference.

Doesn't this SmallPartRejectRadius solve John's issue with aircraft being potentially rendered while being too far to be in sight, hence making the LOD_05 (almost) irrelevant?
User avatar
John Young
MAIW Developer
MAIW Developer
Posts: 4222
Joined: 12 Jul 2008, 15:15

Re: Goodbye to LODs?

Post by John Young »

I don't know Greg, but without the 05 LOD (paper aeroplane) the previous LOD continues in view for a far greater distance than the 05 switch. Maybe it does disappear further out, but I have no way of detecting that. MAIW have always used paper aeroplanes as final LODs I think.
User avatar
hschuit
MAIW Developer
MAIW Developer
Posts: 594
Joined: 20 Jul 2011, 07:25
Version: P3D
Location: Near EHSB

Re: Goodbye to LODs?

Post by hschuit »

I use SmallPartRejectRadius = 2 because on my 1920 x 1200 monitor, AI aircraft disappear to quickly if I use the default value 4. In my conversions, I change the paper plane LOD 05 to something between LOD 7 - 10 depending on the size of the model.
User avatar
John Young
MAIW Developer
MAIW Developer
Posts: 4222
Joined: 12 Jul 2008, 15:15

Re: Goodbye to LODs?

Post by John Young »

Could someone just clarify for me please whether "SmallPartRejectRadius=" is included in the .cfg files for FS9, FSX and P3D by default? From all I have read, it seems that it's a tweak. Having scoured my .cfg files for those 3 sims, both visually and with a search, I can't that line in any of them. I'm pretty sure FSX Steam doesn't have it by default.

If it's not there by default, then that argues for retention of a final LOD paper aeroplane, because I guess many others won't have it either.

John
User avatar
hschuit
MAIW Developer
MAIW Developer
Posts: 594
Joined: 20 Jul 2011, 07:25
Version: P3D
Location: Near EHSB

Re: Goodbye to LODs?

Post by hschuit »

John, it is a tweak you can add in the FSX.cfg [SCENERY] section or Prepar3D.cfg [GRAPHICS] section. Without the tweak, FSX defaults to a value of 4, P3D to a value of 1.

Henk.
User avatar
Firebird
MAIW Admin
MAIW Admin
Posts: 12132
Joined: 11 Aug 2006, 21:04
Version: FS9
Location: EGLL

Re: Goodbye to LODs?

Post by Firebird »

There is no such setting in FS9. So in essence in FS9 the object will always use the last LOD, which if you only have one LOD would be problematic. Hence for FS9, at least you would need the paper plane LOD.

To be honest I am not sure why doing away with the paper plane LOD for FSX/P3D is worth a discussion.
That LOD is always the easiest and quickest to do. The same LOD can be used in all three sims, and presumably FS2020, so it has to be a boon to modellers. This way they can model for multiple sims and know that the outcome will not be affected by what the user has or has not put in their sim cfg file. The user experience will be the same for all using that sim.
Steve
_______________________________________________________
Image
Quid Si Coelum Ruat
_______________________________________________________
User avatar
John Young
MAIW Developer
MAIW Developer
Posts: 4222
Joined: 12 Jul 2008, 15:15

Re: Goodbye to LODs?

Post by John Young »

That's what I thought Steve. I have to make the paper aeroplane for FS9 and so as long as I continue to design for that sim, I might as well add it into FSX and P3D too. It's the same LOD.
User avatar
rocket_26_
MAIW Developer
MAIW Developer
Posts: 301
Joined: 29 Aug 2006, 05:28
Version: P3D
Location: EGXW

Re: Goodbye to LODs?

Post by rocket_26_ »

John Young wrote: 17 Mar 2021, 07:19 Welding common vertices were certainly effective in FS9 Ian, the tests we did at ACG and the results we got afterwards confirmed that. Microsoft said they batch welded vertices in FSX at the time, so it was not so important in that sim version and presumably after.

John
Microsoft implemented draw call batching at the time I don't recall them batch welding vertices.

Regarding welding common vertices. I mis spoke on the hand rails. If you welded all the vertices to one vertex you would get a reduction in texture vertex's but just not the amount the tvert counter was saying.

It would only weld the vertices at the joins of the faces which would make a reasonable reduction but not down to 1 like indicated.

To be fair the Twin Bases was the only scenery project I used the welding and later on was not possible due to not being able to bake in ambient collusion properly as you need to unwrap each face in the texture sheet.

A none textured LOD is still recommended for objects in FS2020 according to the SDK . I have not tried yet though.
Post Reply