Share via


No More "Blurries?"

Adam has been working hard on our scenery system and he has recently checked in a fix that should remove most of the blurries from FSX. That said, if you're flying a fast aircraft with autogen and other stuff cranked up, you can still outpace the updates, but from my own tests on my machine, the difference is night and day. Finally I can see the ground in all of it's 1 meter glory while I am flying!

Here is an excerpt from the check-in mail that explains what was going on and what he did to fix it (I asked Adam if it was okay to post). Another angle Adam is pursuing is to make the anisotropic filtering more aggressive which should sharpen the images much better (but that isn't checked in just yet).

Bugs:  Flight Simulator 10 - Prevent fiber starvation
 
Description of problem: The terrain textures seem to go blurry really quickly as you move around the world. Even after you stop moving, it takes forever for the terrain textures to become sharp again. 
Description of fix: There were several causes of this problem.

1. The percentage of frame time given to worker fibers (10%) was simply too stingy for the amount of texture work needing to be done. This change increases the target fiber time allocation to 33%. This value is configurable via the following variable in fsx.cfg:

[Main]
FIBER_FRAME_TIME_FRACTION=0.33

2. The terrain texture compositor was being swamped by requests from AI boats for land/water masks and by autogen for class maps. This left little time to process requests for textures by the terrain. To even the playing field, the texture compositor now has three separate request queues: one for terrain textures, one for autogen class maps, and one for any other type (i.e. land/water masks for boats). The queues are serviced in a round-robin fashion to keep any one client from overpowering the others.

3. The terrain was simply too casual about scheduling new textures to be built. It would only request two at a time, after which it would go off and retriangulate the mesh and do other time-consuming tasks. Now the terrain will process 20 incoming textures before moving on to other tasks.

4. The AI boats sometimes make redundant requests for land/water masks that put additional strain on the terrain texture compositor. To reduce the number of redundant requests that actually require the attention of the texture compositor, improve the caching of existing land/water masks by giving them their own LRU cache and make it big enough to hold a full set for a given scene. The memory penalty is small because land/water masks are only single bit images.

NOTE: There is still one cause of the "blurries" that this checkin does not address. If we attempt to use more texture memory than the hardware supports, some textures may be forced to render with reduced resolution. This is unfortunately beyond the control of the terrain engine and it depends upon the other objects in the scene and the particulars of the user's hardware.