Thursday, December 29, 2011

THE SCENERY LAYERING BUG

From FSAviator: Thanks to Tom at calclassics for posting this info:

In relation to the the 331 layers issue. The statement;

>>>>>>>>>>>

Beware you may be able to declare more than 331 layers, but no more than 331 layers will load. Only 'required' layers are guaranteed to load when more than 331 layers are declared and FS9 may not discard other layers in a way we perceive to be logical.

>>>>>>>>>>>

Is correct.


The scenery library is not a menu or a list. It is a layering sequence. FS9 can load and display up to 331 layers of scenery at the same time. It will never load more than 331. Those 331 layers may not be visible. Once loaded the layer is present and 'using a memory slot' whether or not it is currently visible.

If we order FS9 to load more than 331 layers of scenery some Microsoft hard code takes over and decides the priority for unloading and loading from then onwards. Our defined priority is discarded. This might work just fine if the FS9 mesh layering bug did not exist and everybody was very careful what they allocated to a single scenery folder = layer. My first post explained that we must carefully layer our FS9 mesh using reverse logic

Global mesh
Regional mesh
Local mesh

due to the FS9 bug.

FS9 does not know it has a bug and will not use reverse logic when we overload it. It may use no logic or some logic, but it won't use reverse logic.

FS9 has 'some' location or 'distance' logic concerning layer loading. Nobody outside MS knows exactly how it works. If we place sceneries from very different locations into the same folder = layer we will have no problem *so long as we do not define more than 331 layers per scenery.cfg*. We can put Florida and Oregon airports in a single layer and just tell FS9 to load them all as a single layer. The problem comes only if we overload FS9 by allowing it to attempt to load more than 331 layers.

If we have a thousand layers defined in a single scenery.cfg and they are spread right across the planet, and we made each folder = layer 'very local' in content then FS9 may never actually try to load even 332 of the one thousand during a single (short) flight. If however we have 332 layers containing bgls relating to the entire length of a much longer flight FS9 will eventually try to load a 332nd layer and will cease to use our layering sequence. It will start to decide what to load and unload according to its own logic. It is bugged. Our bug fix ceases to work *and* it might load only a very local folder into the only memory slot available in preference to one with scenery stretching from Oregon to Florida even though the Florida bgl is one we need to navigate by shortly. We lose control of what loads if we define more than 331 layers. Up to 331 we have total control and we can be careless about regional converge within a single folder = layer. Everything we need will *all* load anyway so long as we never define more than 331 layers in a scenery.cfg.

To be sure we retain control of the layering logic and what gets loaded we must define no more than 331 layers per scenery.cfg. Anything else has a risk of wrong mesh loading and needed scenery not loading. The more layers we declare above 331, and the more layers we force FS9 to load, by having huge area converge in a single layer, the greater the risk of overload somewhere round the planet, and the longer the flight the greater the risk of overloading FS9 and causing display errors with our excess defined layers.

Anyone who has more than 331 layers in a single scenery.cfg must think much harder about which layers must have a REQUIRED flag, what they can include in a single folder = layer, and how far they can fly without invoking the 332nd layer.

We must each take control of layering. The developer of a scenery, whether mesh, or photo, or landclass, or local scenery cannot. He has no idea what we have installed in which layer already.

When we download some scenery whose installation instruction is 'add three folders in the following sequence'

1. nicefield airport
2. nicefield area landclass
3 nicefield local mesh

It cannot mean sequentially. Sequentially ignores the FS9 layering bug. The airport must be inserted within our 'airport layers', the mesh must be inserted within our 'mesh layers' and the landclass in our 'landclass layers'.

Suppose we place nicefield airport at layer 50. The supplied local landclass could be at layer 51 or layer 250 so long as either is above our regional landclass layers. However even layering the local landclass at layer 1 would not allow it to load if we have photo scenery for that region in any layer at all. The provided local mesh may need to be all the way down at layer 300 to make sure it is below all our regional mesh layers. Layering it two layers below the airport has no relevance and won't work. In FS9 local mesh has to be layered below all global and regional mesh. Where airports that sit on it are in the layering sequence has no relevance at all. Mesh must be layered solely in relation to other mesh and landclass solely in relation to other landclass.

If we add more scenery than we know how to layer correctly we introduce layering errors. Developers cannot do it for us. Worse until about early 2007 the mesh installation instructions and the mesh auto installers of mesh developers were all wrong (if applied to FS9) anyway. They had not yet noticed the FS9 mesh layering bug.

FSAviator.

No comments:

Post a Comment