LODs -- an example in screenshots

An example -- a fence
I think I go on about fences far too much. They do play a major part in my airports, though, and when I'm building fences, I think about the concept -- keeping people out, keeping people in, its interesting to dwell on the need for fences.

Damn, got side-tracked again!

Lets make a basic fence which is quite common at small airfields in New Zealand. Not to mention on the farm. And in a lot of backyards. And schools. I used to have one to keep my dog in. Not to mention the kids...

This is actually a finished fence, part of the Real New Zealand Tauranga scenery.

There's a lot of this type of fence at Tauranga, in a very small space -- it surrounds the main terminal, and snakes into every corner and bend. Its an ideal candidate for LODs, because it would certainly be a drain on resources without LODs.

The wire-mesh is a simple double-sided plane with a photo texture and alpha channel for transparency. You can't get much simpler than that. The real resource-hog is the cylindrical frame. This fence is viewed right up close -- you can park your aircraft as close as in this picture -- so it needs to be realistic, right down to the tubing joins. The finished fence section contained 91 polygons -- not a lot, but multiply that by 100 fence sections, and we start to get a large number of polygons.

When I look at this model in the simulator, its obvious that as we move away from it, the 3D shape of the cylinder is not at all apparent. Moving even further away, the wire mesh is too small to render, so it becomes completely transparent. At the first point, we just replace the cylinders with boxes.

Another thing we can do is to remove the polygons on the ends of the 'boxes', top, bottom and the ends of the cross-bar. We can also remove the bottom of the crossbar, as it is almost impossible to view the fence from underneath when we are far enough away to view this LOD.

Further away still, we can delete the wire-mesh plane.

So here's our final LOD. 24 polygons, almost 25% of the full model. Not bad. However we can do better.

Dropping further back, the fence just disappears, so having any geometry at this point is redundant. But how do we name an object if it doesn't exist? That's where our Dummy Object comes in. Simply delete everything, create a dummy object, and give it a LOD name -- fence_LOD_005, for instance. This will mean that when we fly around the airport, the fence won't be rendered at all, but it'll be waiting for us when we pull up to the terminal.

The LOD values used here are 600, 100, 050 and 010. LOD values depend on various factors -- the 'physical' size of the object, its distance from the viewer and its onscreen size. These values work well for this particular object, but a different object may require vastly different values.

Sometimes the full model has a LOD value of 100. My fuel pumps are made this way. A normal sized regional terminal building in NZ may have a high LOD value of 200, with a value of 100 for the stripped-down version.

Determining the LOD value, as I've mentioned before, can be done by trial and error, but as you create LODs which work, you can use these as starting points for similar models.

Now, the final step is to Export the GMAX model, and place it into a Library. Objects like fences are best handles via libraries, as it is easiest to place multiple versions with a library placement tool. I use Ez Scenery, which allows me to place objects directly within the sim, and see them straight away without having to restart continually. Placing fence sections is a bit tricky, and I might cover that in a future tutorial... Just remind me sometime.

Excluding objects from the LODs
By this, I mean creating an object which is part of a model with multiple LODs, but will not change in any LOD. An example of this is a light with a textured plane to define the lit light at night. The light pole can have multiple LODs, but the bright light will remain the same. In this case, I simply keep the object separate, and don't give it a LOD value. Calling a light simple Light does the trick.

Here's our light, showing 3 of the 4 final objects -- 3 LODs and one light plane. The lowest LOD isn't shown, it's the dummy object which sits at the base of the pole. The next LOD is the red box, here its been moved to see it, but it belongs where the white light pole is. The plane has no LOD value, it is a separate object which appears all the time.

To make this a bit clearer, here's the light in the sim both day and night. As you move away from the light pole, the physical bits will disappear, but the light will always shine!

So there's a few ideas to get you started with your own LODs. It may seem like an added complication, but it does open the doors to some great scenery. If you find that you can't squeeze in all the close-up detail you want without slowing the sim to a crawl, then LODs may be the answer. Once you start, you just can't stop...

Copyright © 2019 Godzone Virtual Flight. Powered by Zen Cart