LFD’s Auto View Distance Utility

LFD’s Auto View Distance utility will optimise X Plane’s graphics engine dynamically to bring you the best results for your configuration.

Where to Donate

Your search is over!
you can donate here

Where to Download

This free utility is on XPlane.org – click the image to go there.

Click the image to go to the X Plane download page

How it Works

The Auto View Distance utility will optimise X Plane’s graphics dynamically to bring you the best results for your configuration and you control how that happens.

The script can be set to work unobtrusively in the background once you have finished configuring it via the user interface.

The computing power saved from needless far-distance calculations can be spent increasing the quality of the local area. Saving as little as 5% of the view distance can make all the difference by saving 9.25% of the surface area normally lost in haze.

Even in a correctly configured system there will be times when the complexity of scenery and weather can cause your FPS to drop to levels that cause visual stuttering. During these times the utility will automatically reduce the view distance to alleviate the burden on your system and restore your minimum FPS. You will be able to control the speed and depth of that response. The FPS power you will have saved may then allow you to:

  • Increase the Number of World Objects setting
  • Increase the Texture Quality setting

The ‘Number of World Objects’ Setting

The primary X Plane setting that can be radically altered by using the AVD script is the Number of World Objects.

…Without the AVD Script

Without the AVD script, the only way to lower FPS demand from scenery is to reduce the density of the buildings across the whole view and leave it there during the entire flight. That results in an unrealistic representation of towns and cities.

…With the AVD Script

When AVD is running, the Number of Objects can be set to maximum, making your immediate surroundings much more realistic. If your FPS allows, this level of detail will spread to the horizon.

The difference between ‘high’ and ‘max’ number of objects is substantial
A comparison between High and Max number
of world objects in 2 different locations

Key Features of Version 1.8

  • The FPS averaging window is available for configuration.
  • There are two independent rate of change sliders to control the view distance.
  • Rate of change units are now Percent Per Second (%/s).
  • View Distances is also represented by their equivalent as a ground level View Areas. The View Area is the workload that your computer is actually working to fill and this rises exponentially as you approach the horizon.

Compatibility With Other Tools

LFD’s AVD utility is intended to be compatible with other tools as far as is possible – it only controls one variable. There is a good chance that there won’t be any ongoing conflict if you leave the LOD aspect of other tools alone.

The following utilities are compatible:

  • FlyAgi_Tweak_Utility – set its LOD option to manual.
  • 3jFPS-wizard – set automatic LOD to off
  • ASHA – no change needed

Each time the utility detects an external adjustment of the utility’s LOD variable “LOD Control Conflict” is displayed on the user interface until the conflict is resolved.

User Guide for Version 1.8

Once you have configured AVD, set X Plane’s ‘Number of World Objects’ to maximum for best results.

FPS Target

Choose your minimum required FPS value, ensuring that it is an achievable one. If you have ‘frame limiting’ set (for Oculus VR), you can safely use the limiting number as your target. If the FPS drops below this target value then the view distance (the range of the level of detail) will be reduced to compensate.

Sensitivity

The sensitivity depends on a combination of the averaging window and the rates of change applied to the view distance.

The default values will provide smooth handling of the view distance horizon with moderate rates of change, but will still be able to climb back from a minimum view distance at a reasonable pace.

These settings depend on your personal preference for smooth replay vs graphical fidelity so you’ll probably want to adjust them to suit your needs.

FPS Averaging Window

The FPS is averaged over a time period measured in fractions of a second. The default value might seem a little high but it does make changes to the view distance less noticeable.

View Distance Retreat Rate

The retreat rate should be faster than the advance rate in order to lower the stutter frequency. A ratio of 2 or 3 time the advance rate value works well. If you set the retreat rate high then the view horizon will shrink visibly when your FPS drops.

View Distance Advance Rate

The advance rate should be less than the retreat rate for best stutter control. If you set this value high you might find that the view horizon washes back and forth rapidly, making it noticeable. If you set it the advance rate too low then the view distance may take a long time to recover.

Limits

Although the View Distance is the focus of this application, it’s the View Area resulting from it that determines the graphical burden on your computer.

Each 1% step towards the horizon brings into view a larger amount of surface area than the previous 1%. You can read the relative area as a percentage underneath the view distance readouts on the sliders and on the readout at the top of the form.

Max View Distance

The most distant objects become visible at 93% and after 95% there will be little useful improvement due to size and haze. Going to 100% could potentially exchange an extra about 10% of your computer’s resources for what is most likely an imperceptible gain, but the option is available if you want it. The FPS response will depend on the terrain detail and weather.

If your view horizon is fluctuating noticeably and you find it annoying, you might want to consider opting for a lower maximum view distance to make the visuals more consistent across varying terrain.

Min View Distance

When taxiing at an airport a value of around 30% will retain the highest available detail for the buildings in your immediate vicinity and some of the terrain beyond the airport, which will be fine for getting aloft. If seeing extra building detail isn’t of interest to you, then push the minimum to zero to make a final stand against stutter control.

Test

You can test out your system with the test slider to see the appearance at different level of detail. The value will stay set until you disable it or start a new flight.

Options

If you want to keep the AVD dialogue visible during flights you can have it remember its dimensions for next time. In VR the dimension limits for the window sizes are different from the 2D version, and this can be confusing.

Note that in VR you can grab a corner and scale the dialogue to be smaller.

You don’t need to have the user interface on display for it to do its job, leaving the dialogue hidden after loading an aircraft won’t cause any problems.

If you make the dialogue small on a 2D screen, the data will readouts jump to the title bar of the window. Unfortunately, LUA has a few limitations and one of them is that you must make a part of the form visible to be able to capture update events from X Plane.

Installation

The first step is the biggest one: you will need the FlyWithLua plugin to provide the power to run this script – you can find it here. You will be loading it at: >> X-Plane 11 > Resources > plugins.

  • Install FlyWithLua
  • Put the Auto View Distance script into the FlyWithLua ‘scripts’ folder which can be found inside the FlyWithLua plugin folder.
  • Launch X-Plane and the script will appear automatically.
  • You can turn the dialogue auto-launch off in the options settings.
  • The user interface can also be launched from:
    Plugins > FlyWithLua > FlyWithLua Macros
You can launch the dialogue from the FlyWithLua Macro menu

Configuration

Do This First!

  • Select your target FPS carefully, this is a critical step!
  • Ensure you are not running other scripts that might be changing LOD variables – you will see a red warning under the AVD readout if it happens.

Before you Make Changes

It can be confusing to change X Plane settings before you get the measure of how your system has been modified by the default settings of the Auto View Distance Utility. Take some time to figure that part out.

You may see some FPS improvement straight away or else the support may come when you are over more complex terrain or using special effects that are pushing your computer’s limits.

Tailor the Configuration

Press and hold your cursor on the help buttons (marked h1, h2 etc) for an explanation of whats available.

  • Fly to a worst-case FPS scenario area and observe the FPS readout
  • If all is well, increase the Number of World Objects setting
  • See how this affect the FPS and View Distance readout when flying and spend a few minutes getting acquainted with it.
  • If you are OK so far, try increasing the texture setting
  • Continue flying and monitoring the readouts
  • Adjust the sensitivity setting to suit your taste. Refer to the Sensitivity section for more information.

Allow for Stabilisation on Start-Up

Be aware that when launching a flight at a complex location the view distance will probably fall initially because:

  • The sim will still be loading objects and textures in the background.
  • The sim sees a lot more of the terrain, textures and world objects than you do.

For example – if you are on the ground at Heathrow facing London city centre, the frame-rate will be affected far more than if you are facing away from London at the exact same location even though in both cases you can’t see London.

Simply give the sim time to settle and the utility will respond accordingly.

Understand the Sensitivity Settings

There are now two sensitivity settings to control the view distance shrink rate and expansion rate independently.

The values provided by the controls onscreen is the number of samples that are averaged to smooth the result. A value of 1 has no averaging at all and therefore provides the quickest response.

The default values are geared towards reducing stutter by retreating quickly from FPS drops and increasing the view distance at a more moderate pace. Both of these strategies will result in fewer and smaller stutters.

You Will Reach a Limit

Although the utility will give you great results comparable to an expensive hardware boost, at some point you will inevitably push your computer beyond its capability. At this point the frame-rate will drop and the view distance will go to its minimum value and won’t recover.

That can be frustrating but there isn’t a specific fault in the your system, you just don’t have enough computing power and have just reached your limit. All you can do now is carefully review the configuration of your computer’s hardware and software to free up some more computational power.

Check Your Computer Settings

Because the AVD utility is being used to enhance computers that would otherwise be struggling to provide a decent quality it is natural to blame AVD first when things start to fail. That’s where you will see the problem manifest itself.

Be aware that to date there have been no reported errors within the AVD utility that would account for a drop in quality of the sim. In all cases, the visual quality issues are due to the weight of the weather, scenery and object counts being managed by the computer.

In addition, the computer itself can create problems for the sim.

  • Computer OS updates may be downloaded in the background.
  • Steam uses background downloading by default
  • Consider turning off background recording of your flight
  • Control virus scan times and durations
  • Windows 10 has Game Mode settings you should check
  • NVidia card users can get more FPS by configuring the ‘Manage 3D Settings’ tab, choosing performance over quality.

There are many other settings available and you should check your favourites to ensure they are still set as you want them to be.

FPS Flying Tips

There are a few things you can do to avoid having your FPS drop in the first place, so if you just want to relax and enjoy the view then consider the following:

  1. Don’t fly close to complex buildings or the ground.
  2. Plan your airport use such that when entering, leaving or taxiing at an airport ensure you face away from complex structures on the visible horizon such as cities.
  3. When at altitude avoid lining up two cities.

User Issues Answered / FAQ

These points have been extracted from conversational feedback.

Excessive Stuttering?

The actual report concerned stuttering cause by switching between the Zibo Mod cabin view and the exterior view. The next day the user reported that problem had largely disappeared. This type of thing situation can be caused by background downloading by Steam or the OS, virus scanning and video recording. Check all of your computer’s settings to ensure they are how you want them to be.

PAPI Lights Disappear?

The AVD script does not control individual objects, instead X Plane chooses how to respond to the view distance setting. You would have to be quite close to the PAPI lights to use them so that suggests your view distance must have reached a fairly low value. In other words your computer must be heavily loaded. At this point you will need to review your settings. There are tools available which will allow you to choose the density of static aircraft at airports as well as vehicles on the roads and other details. These things can be reduced to give you the FPS you need to raise the view distance enough for the PAPI lights come back into view.

Blank dialogue box?

This may occur when there is conflict in your system. The script has now been recoded to go to a ‘wait and re-test’ mode that seems to clear up the problem. When a collision occurs an error message is shown in the user interface for a few seconds before attempting to continue. If you see this message, you will need to find and stop the LOD modification being executed by another tool in your system.

Screenshots

100% Review Score

Related Posts

Feedback

If you would like to make a comment or want to let me know of any corrections, suggestions, or enhancements...

You can reach me via the contacts page!