Levels of Detail (LODs) with GMAX

There are two very different concepts called LODs within the simulator. One is the method used to map the surface of the Earth into squares, each LOD halving each side of the previous square LOD for the next 'level of detail'. Here I'm talking about the other one:)

Like many of my tutorials, this is less of a step-by-step format, and more of a discussion. Your side of the discussion is via the Godzone Forum...

In the 'old days', there were a few ways to design a complex, feature-rich airport or other model for good performance on a range of systems. Many of these, however, relied on varying the settings within the simulator, such as the display complexity, to fine-tune the performance on lower-end systems. For instance, the main terminal may have a complexity setting of Very Sparse, so that it will display at any setting, but the surrounding fences and gates may be set to Dense, so that by setting the display complexity within the sim to Normal, the fences and gates would not appear.This meant that the scenery would perform at a reasonable frame-rate, but only at the expense of some detail. It also meant that not everyone would see the airport as the designer intended.

This all-or-nothing approach is simple, but not ideal. What we really need is another way to scale the display so that everyone sees what the designer intended, without a loss of performance on slower machines.
LODs, or Levels of Detail, goes a long way towards offering this solution.

What are LODs?
Basically, a single model can have more than one level of complexity. In its most basic form, an object with 2 LODs will display the simpler, more frame-rate-friendly model from a distance, and the more complex, more accurate model up close.

A single model can have more than 2 LODs, though, but the total number of LODs will vary depending on the type of model and the way it appears in the simulator.

Let's look at an actual object -- a section of wire-mesh fence. In this example, the full fence model is made up of a cylindrical frame, a single plane with the wire mesh texture, and an upright cylindrical post to attach it to.
What we want to see, when we are close enough, is a 'real' metallic fence frame and a solid-looking post. However, when we move away from the fence, we may notice (depending on the actual model we've made) that the wire mesh is no longer visible, the wire being two small to discern. Also, the cylindrical frame may lose its complex lighting, devolving into a basic frame shape. At the points where these transitions occur, we can replace the complex model with something simpler. When the wire mesh is no longer discernable, we can simply discard the plane with the wire mesh texture. When the cylindrical frame become a simple shape, we can replace it with a simpler 'box' shape.

The fence post can start with a multi-sided cylinder -- perhaps 18 sections -- and we can reduce the number of sections in steps -- perhaps 12, 8, then 4, which is basically another 'box'.

Ideally the transitions should be invisible, but in practice it makes more sense to keep the transition as discreet as possible, but still discernible. This ensures that we are getting the best result from our LODs, with minimum visual disturbance.

There are various ways to build LODs.
First, we can build the full, complex model and then simplify it for the lower LODs.

Secondly, we can save our model as different LODs as it becomes more complex during the modelling phase.

Lastly, we can build each LOD from scratch.

In practice, I tend to use all three methods depending on the object. Most commonly, though, I'll build the complete model and then simplify it in stages. This ensures that the LODs are derived from the same shapes. It may be that a model may be 'tweaked' significantly when it's almost finished, which would mean that any gross changes would need to be made to any previously made LODs. Waiting until the model is completely finished ensures that late changes won't complicate things.

However, for simple objects, such as light poles, saving each significant step as a LOD makes a lot of sense. For example, model the pole as a cylinder, save it as a LOD, add the actual light on top, save as a LOD, add a bit of wiring and complexity, save as the full LOD. Then using the last method, build a simple box for an even lower-polygon pole. We then have 4 LODs with hardly any extra work.

Which of our objects need LODs?
This is entirely up to the designer, but it does require some thought. My design method is to incorporate LODs as often as I can, based on the model's complexity, quantity and importance.

LODs can have various reasons for being. Our light pole is one use for LODs, but a terminal may be treated differently -- instead of simplifying the overall model, we may just remove some details. Ramps, steps, bollards, posts, signs etc may just appear in the full LOD. The overall shape of the terminal may stay the same, with exactly the same geometry, but we just lose the frilly bits.

So, how do determine the point at which each LOD appears?
I'm quite sure that there is a scientific method, and I'd publish it here if I knew it, but I don't think I'd use it. The method I use is more trial and error. After a while it gets easier to determine this, but the best way -- for me -- is to try different LOD values within the sim and see how they perform. They can be easily tweaked.

Ok, how easy is it to tweak the values?
It depends on how you place the models within the sim. You really need a system which allows for easy updating of models. The best method, for me, is to use a library manager, in my case EZ Scenery. After the initial model is made, added to the library using the Ez Scenery Library Manager,and placed within the simulator, subsequent changes can be made by:
Exporting the new model through GMAX;
running the EZ Scenery Library Manager, and recreating the library file.
It's that easy. Changes will show the next time the simulator is started.

What's the catch?
You don't get anything for nothing, and LODs are no exception. It makes sense -- and seems to be measurable within the sim -- that there will be some performance overhead for LODs. The actual model file is larger, of course, as it contains multiple versions of the same objects, but also the sim needs to do some figuring -- which LOD should I display now? More LODs mean more computation. It appears that even if your object doesn't exist -- just am empty LOD -- if you repeat it enough times it'll slow the sim down.

What's an empty LOD!?
It makes sense that if your object would not normally be visible -- because it is too far away to render, for instance -- it needn't have any geometry at all. We'll show how to do that later on.

Copyright © 2021 Godzone Virtual Flight. Powered by Zen Cart