Jump to content

X-Visibility - Dynamic Haze Control 1.0.3

   (4 reviews)

2 Screenshots

About This File

Donation:

If you would like to support me, you can always get me a coffee.

https://www.paypal.me/JordanAChin


For XP 11.25+
 
This script provides dynamic haze/fog control based on reported visibility, providing smooth visibility transitions throughout all phases of flight. This means no "infinite" visibility the higher you get, no abrupt visibility changes and a realistic looking atmosphere based on reported visibility for the area.
 
Features:

* Smooth visibility transitions during all phases of flight
* No white out/grey out/blue out when passing through clouds or at night (My older "No White Out In Clouds" script is no longer needed)
* No more infinite visibility
* More challenge in IMC conditions
* Works with default weather (manual and real weather)
 
Compatibility:

* Not compatible with X-Enviro
* Not tested with Ultra weather, disabling the haze options in that plugin should get it working with X-Visibilty theoretically
* FSE v0.5 uses the older gradual visibility script in the TrueHaze.lua file. Remove all text below (or remove lines 122-288) --TRUEHAZE INTERNAL PARAMETERS and this script should work fine with FSE
* If you are using the "No White Out In Clouds" script, please remove it as it is no longer needed

Installation:

This script was tested on X-Plane 11.25, and it requires the flyWithLua NG plugin available at:

https://forums.x-plane.org/index.php?/files/file/38445-flywithlua-ng-next-generation-edition-for-x-plane-11-win-lin-mac/

To install, place X-Visibility.lua in the following folder:
<X-Plane installation path>\Resources\plugins\FlyWithLua\Scripts\
 
Usage:

There is no interface but it is possible to change some parameters of this script with the following lines:
 
local plugin_on = true --enable plugin
local debug_info = false --show debug info
local atmoTop_visibility = 30480 --elevation to apply the max visibility, default is 30480 m
local minFog_value = 0.6 --minimum fog value between 0.0-1.0, default is 0.6
local atmoTop_Fog = 1.5 --fog value after passing atmoTop_visibility
local highAltFogMult = 1 --reduce to 0.5 or 0.25 if you feel the haze at higher altitudes is too strong, default is 1

Acknowledgements:

Thanks to @SNowblind7 for his help testing this script and for his initial work in the gradualVisibility script from which this is built upon.


What's New in Version 1.0.3   See changelog

Released

Changes for v1.0.3

-Changed default value for xvis_highAltFogMult from 1 to 0.75
-Fixed moon and stars not showing in very low visibility

 

Changes for v1.0.2

-Integration with FlyAgi Tweak Utility

FlyAgi Tweak Utility can access and configure X-Visibility parameters from within the utility main menu by clicking the 'X-Visibility Fog Control' button. That opens a new menu page with the fog controls.

Thanks to @FlyAgi for reaching out to me to have it included in his script.

  • Like 3



User Feedback

Recommended Comments

If you find the haze too thick at higher altitudes, at line 34 you could try something like "local fog_Ratio  = (vis_graphical/visibility_reported_m)*0.25". That'll make the total haze generated be 1/4 the normal value.
 

No longer needed in v1.0.1. Just change the value of HighAltFogMult to something lower than 1.

Edited by JordanChin

Share this comment


Link to comment
Share on other sites

I may have a solution for the unrealistic glow during sunrise/sunset. However, it requires a change to one of the shader files. 

In the file new_scattering.glsl search for "float atmo_rat" (line 138 in my file), then change the value from:

float atmo_rat = clamp(cam_height / ATMO_H, 0.0,1.0); to float atmo_rat = clamp(cam_height / ATMO_H, 0.0,0.0);

Share this comment


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Add a comment...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

Please read the Terms of Use