- You can have your object look different (and usually less complex) from farther away.
- Probably more important is - your object is not drawn from arbitrarily far away. All drawing is bounded!
The answer is: if you don't specify ATTR_LOD X-Plane calculates an LOD for your entire object that starts at 0 meters and goes to a distance where we think no one would care if your object disappeared. The calculation is based on the bounding sphere of your object.
Our built-in algorithm usually works pretty well, but there are some cases where it gets fooled. One important case is: when you merge two small objects into one big object, the LOD distance goes up, because the total area that your object covers goes up!
What this means is: if you have a dozen small taxiway signs from XTaxiMaker, they'll all disappear relatively quickly as you go away from the airport, protecting framerate (by keeping the number of drawn objects down). If you merge those into one big object, the performance of the sim changes in two ways:
- Framerate when the objects are drawn goes up - we now draw one object instead of five. The number of objects drawn is very important to framerate.
- The objects will be drawn more frequently, so overall framerates maybe lower.
(Also beware: LOD is calculated frmo the middle of the object, so if the object is huge, take that into account.)
As a final note, ATTR_LOD is "free". X-Plane will calculate and check LOD distances on every object no matter what. If you don't use ATTR_LOD, one is generated for you. So there is no harm in adding ATTR_LOD to your object. Your framerate will only go down if you pick an LOD that is larger than the sim would have picked for you.
No comments:
Post a Comment