楼主: 威斯敏斯特

[XP11b10] 大家觉得这个天气怎么样?

[复制链接]
楼主 发表于 2017-2-16 11:55:36 | 显示全部楼层
mwm 发表于 2017-2-16 11:08
我沒試過
不過改貼圖的雲就無需太強求

试了。还可以。没什么本质上的区别。不过参数还是需要调整。而且跟显示器也有关系。我的显示器不够蓝,所以还得调。
已绑定手机
发表于 2017-2-16 18:11:41 | 显示全部楼层
威斯敏斯特 发表于 2017-2-15 11:40
是。就是改改几个文本文件什么的。而且并没有什么特别需要反复调试的。 ...

能不能分享一下是如何改的吗?感谢

点评

改了什么不记得了。反正两个文件是这样的  详情 回复 发表于 2017-2-17 01:56
发表于 2017-2-16 22:10:31 | 显示全部楼层
这个效果可以。
楼主 发表于 2017-2-17 01:56:37 | 显示全部楼层
fujigao82 发表于 2017-2-16 18:11
能不能分享一下是如何改的吗?感谢

改了什么不记得了。反正两个文件是这样的
  1. set("sim/private/controls/clouds/ambient_gain", 5)
  2. --set("sim/private/controls/clouds/spec_gain", 20)
  3. --set("sim/private/controls/clouds/first_res_3d", 4)
  4. set("sim/private/controls/clouds/plot_radius", 1)
  5. --set("sim/private/controls/clouds/diffuse_gain", 2.4)
  6. --set("sim/private/controls/clouds/cloud_shadow_lighten_ratio", 0.95)
  7. set("sim/private/controls/clouds/shadow_size", 1024)
  8. --set("sim/private/controls/atmo/atmo_scale_raleigh", 30)
  9. --set("sim/private/controls/atmo/inscatter_gain_mie", 0)
  10. --set("sim/private/controls/atmo/inscatter_gain_raleigh", 17)
  11. --set("sim/private/controls/atmo/scatter_raleigh_b", 52)
  12. set("sim/private/controls/hdr/gain_min", 2)
  13. set("sim/private/controls/hdr/sky_gain", 5)
  14. set("sim/private/controls/skyc/max_shadow_angle", -89)
  15. set("sim/private/controls/skyc/min_shadow_angle", -90)
  16. set("sim/private/controls/hdr/white_point", 2.50)
  17. set("sim/private/controls/dome/kill_glares", 1)
  18. --set("sim/private/controls/shadow/cockpit_near_adjust", 2.0)
  19. --set("sim/private/controls/shadow/cockpit_near_proxy", 1.0)
  20. set("sim/private/controls/shadow/csm_split_exterior", 7.0)
  21. set("sim/private/controls/shadow/csm_split_interior", 5.0)
  22. set("sim/private/controls/shadow/csm/far_limit", 15000.0)
  23. set("sim/private/controls/shadow/csm/far_limit_cockpit", 10000.0)
复制代码
  1. --------------------------------
  2. -- Script:  3jClouds2
  3. -- Version: 1.2
  4. -- Date:    2016-12-29
  5. -- By:      3j@raeuber.com
  6. --------------------------------
  7. -----------------------------------------------------------------------------------------------
  8. -- for other scripts to detect that this plugin is installed and running
  9. jjjCl_3jCloudsRunning = true
  10. -----------------------------------------------------------------------------------------------
  11. jjjCl_crashSaveLevel = 0 -- when X-Plane crashes due to this plugin, try increasing this value by 1 up to 3
  12. require("jjjLib1")
  13. if jjjLib1.version == nil or jjjLib1.version() < 1.2 then
  14.         do_every_draw('draw_string(20, SCREEN_HIGHT - 84, "Plugin 3jCabin-sounds: Requires library \'3jLib1\' version 1.2 or higher! Please search for \'3jLib1\' on x-plane.org, download and install current version of library.")')
  15.         jjjCl_3jCloudsRunning = false
  16.         return
  17. end
  18. local jjjCl_pluginName = "3jClouds2"
  19. local jjjCl_plId = jjjLib1.getPlId(jjjCl_pluginName)
  20. jjjLib1.dataRefAvailable(jjjCl_plId, "sim/graphics/settings/HDR_on", true)
  21. jjjLib1.dataRefAvailable(jjjCl_plId, "sim/private/controls/skyc/white_out_in_clouds", true)
  22. jjjLib1.dataRefAvailable(jjjCl_plId, "sim/private/controls/atmo/atmo_scale_raleigh", true)
  23. jjjLib1.dataRefAvailable(jjjCl_plId, "sim/private/controls/atmo/inscatter_gain_mie", true)
  24. jjjLib1.dataRefAvailable(jjjCl_plId, "sim/private/controls/atmo/inscatter_gain_raleigh", true)
  25. jjjLib1.dataRefAvailable(jjjCl_plId, "sim/private/controls/atmo/scatter_raleigh_b", true)
  26. jjjLib1.dataRefAvailable(jjjCl_plId, "sim/private/controls/atmo/scatter_raleigh_g", true)
  27. jjjLib1.dataRefAvailable(jjjCl_plId, "sim/private/controls/atmo/scatter_raleigh_r", true)
  28. jjjLib1.dataRefAvailable(jjjCl_plId, "sim/private/controls/clouds/min_res_for_shadow", true)
  29. jjjLib1.dataRefAvailable(jjjCl_plId, "sim/private/controls/clouds/soft_occlude", true)
  30. jjjLib1.dataRefAvailable(jjjCl_plId, "sim/private/controls/clouds/limit_far", true)
  31. jjjLib1.dataRefAvailable(jjjCl_plId, "sim/private/controls/clouds/first_res_3d", true)
  32. jjjLib1.dataRefAvailable(jjjCl_plId, "sim/private/controls/clouds/last_res_3d", true)
  33. jjjLib1.dataRefAvailable(jjjCl_plId, "sim/private/controls/clouds/light_curve_ratio", true)
  34. jjjLib1.dataRefAvailable(jjjCl_plId, "sim/private/controls/clouds/light_curve_power", true)
  35. jjjLib1.dataRefAvailable(jjjCl_plId, "sim/private/controls/clouds/diffuse_gain", true)
  36. jjjLib1.dataRefAvailable(jjjCl_plId, "sim/private/controls/clouds/spec_gain", true)
  37. jjjLib1.dataRefAvailable(jjjCl_plId, "sim/private/controls/clouds/cloud_shadow_lighten_ratio", true)
  38. jjjLib1.dataRefAvailable(jjjCl_plId, "sim/private/controls/cloud/sample_opacity", true)
  39. jjjLib1.dataRefAvailable(jjjCl_plId, "sim/private/controls/cloud/sample_radius", true)
  40. if jjjLib1.getNumMissingDataRefs(jjjCl_plId) > 0 then
  41.         jjjLib1.warning(jjjCl_plId, jjjLib1.getNumMissingDataRefs(jjjCl_plId) .. ' DataRef(s) missing, plugin is stopped!||The plugin is not compatible with your installed version of X-Plane.')
  42.         jjjCl_3jCloudsRunning = false
  43.         return
  44. end
  45. local jjjCl_rthPath = SCRIPT_DIRECTORY .. "RTH.lua"
  46. local jjjCl_rthConflict = false
  47. function jjjCl_RTHconflictAlert()
  48.         jjjLib1.alert(jjjCl_plId, "WARNING", "You have RTH (Real Terra Haze) installed, RTH sets some cloud parameters once a second. Together with " .. jjjCl_pluginName .. ", clouds and cloud shadows will flicker every second!||There are 3 options to avoid this:||1. RECOMMENDED: Let " .. jjjCl_pluginName .. " patch 'RTH.lua', so that RTH's cloud lightning and cloud shadow features are inactive, when " .. jjjCl_pluginName .. " is running. Click 'PATCH' to do this. (A backup of 'RTH.lua' will be saved as 'RTH.lua_jjjLib_BACKUP'.)||2. Turn off 'dark rain clouds' and 'cloud shadows' function of " .. jjjCl_pluginName .. ". Click 'Rain cl./shad. OFF' for this and let RTH do the cloud shadows.||3. Click 'Ignore' and remove " .. jjjCl_pluginName .. " or RTH from the FlyWithLua scripts directory.", "red", "PATCH", "jjjCl_patchRTH()", "Rain cl./shad. OFF", 'jjjCl_deactivateRTHconflictFeatures()', "Ignore")
  49.         jjjCl_rthConflict = false
  50. end
  51. function jjjCl_patchRTH()
  52.         local patch = jjjLib1.patchLuaScript(jjjCl_rthPath, {"sim/private/controls/clouds/cloud_shadow_lighten_ratio", "sim/private/controls/clouds/ambient_gain"}, "not jjjCl_3jCloudsRunning", "patched by " .. jjjCl_pluginName .. " to avoid conflicts with cloud shadows and cloud lightning", jjjCl_pluginName)
  53.         if patch ~= false and patch > 0 then
  54.                 jjjLib1.alert(jjjCl_plId, "INFO", "Patch of RTH.lua was successful!||Now reload FlyWithLua scripts and cloud shadow flickering will be fixed.||Go to:|Menu -> Plugin -> FlyWithLua -> Reload all Lua script files", "red", "OK")
  55.                 jjjCl_rthConflict = false
  56.         end
  57. end
  58. function jjjCl_deactivateRTHconflictFeatures()
  59.         jjjLib1.setParam(jjjCl_plId, "ClShadows", false)
  60.         jjjLib1.setParam(jjjCl_plId, "ClRainDark", false)
  61.         jjjCl_setRainDarkAuto(false)
  62.         jjjLib1.saveParams(jjjCl_plId)
  63.         jjjCl_refreshPanel()
  64. end
  65. -- check if RTH exists
  66. if jjjLib1.fileExists(jjjCl_rthPath) then
  67.         if not jjjLib1.checkPatchLuaScript(jjjCl_rthPath, jjjCl_pluginName) then
  68.                 jjjCl_rthConflict = true
  69.         end
  70. end
  71. local jjjCl_drefOrig = {}
  72. local jjjCl_setNoWhtOutCnt = 16
  73. local jjjCl_needCloudsReload = 0
  74. local jjjCl_clShdAuto = true
  75. local jjjCl_clLevelMin = 30000
  76. local jjjCl_clLevelMid = 30000
  77. local jjjCl_clLevelMax = 31000
  78. local jjjCl_autoShdOffEnabled = true
  79. local jjjCl_drViewHeight = {[0]=0}
  80. if jjjLib1.dataRefAvailable(jjjCl_plId, "sim/graphics/view/view_y", true) then
  81. --        jjjCl_drViewHeight = dataref_table("sim/flightmodel/position/elevation")
  82.         jjjCl_drViewHeight = dataref_table("sim/graphics/view/view_y")
  83. else
  84.         jjjCl_autoShdOffEnabled = false
  85. end
  86. local jjjCl_drClShdLightRatio = {[0]=0}
  87. if jjjLib1.dataRefAvailable(jjjCl_plId, "sim/private/controls/clouds/cloud_shadow_lighten_ratio", true) then
  88.         jjjCl_drClShdLightRatio = dataref_table("sim/private/controls/clouds/cloud_shadow_lighten_ratio")
  89. else
  90.         jjjCl_autoShdOffEnabled = false
  91. end
  92. local jjjCl_rainPercent  = 0
  93. local jjjCl_rainDarkAuto = true
  94. local jjjCl_autoDarkRainEnabled = true
  95. local jjjCl_autoDarkRainHeight  = 300
  96. local jjjCl_drClLightCurvePower = {[0]=0}
  97. local jjjCl_drClAmbientGain     = {[0]=0}
  98. local jjjCl_drRainPercent       = {[0]=0}
  99. if jjjLib1.dataRefAvailable(jjjCl_plId, "sim/private/controls/clouds/light_curve_power", true) and jjjLib1.dataRefAvailable(jjjCl_plId, "sim/private/controls/clouds/ambient_gain", true) and jjjLib1.dataRefAvailable(jjjCl_plId, "sim/weather/rain_percent", true) then
  100.         jjjCl_drClLightCurvePower = dataref_table("sim/private/controls/clouds/light_curve_power")
  101.         jjjCl_drClAmbientGain     = dataref_table("sim/private/controls/clouds/ambient_gain")
  102.         jjjCl_drRainPercent       = dataref_table("sim/weather/rain_percent")
  103. else
  104.         jjjCl_autoDarkRainEnabled = false
  105. end
  106. local jjjCl_pnId = jjjLib1.createPanel(jjjCl_plId, "", false, 'jjjCl_refreshPanel()', "cyan")
  107. jjjLib1.setPanelPos(jjjCl_plId, jjjCl_pnId, false, 64)
  108. function jjjCl_getDataRef(dref)
  109.         return get("sim/" .. dref)
  110. end
  111. function jjjCl_setDataRef(dref, val)
  112.         set("sim/" .. dref, val)
  113. end
  114. function jjjCl_setDataRefRatio(dref, val, ratio)
  115.         set("sim/" .. dref, val*ratio + jjjCl_drefOrig[dref]*(1 - ratio))
  116. end
  117. function jjjCl_saveDataRef(dref)
  118.         jjjCl_drefOrig[dref] = jjjCl_getDataRef(dref)
  119. end
  120. function jjjCl_getDataRefOrig(dref)
  121.         return jjjCl_drefOrig[dref]
  122. end
  123. function jjjCl_restoreDataRef(dref)
  124.         jjjCl_setDataRef(dref, jjjCl_drefOrig[dref])
  125. end
  126. function jjjCl_restoreAllDataRefs()
  127.         for dref, val in pairs(jjjCl_drefOrig) do
  128.                 jjjCl_setDataRef(dref, val)
  129.         end
  130. end
  131. function jjjCl_setOverrideClouds(flag, ignoreNoWhtOutCnt)
  132.         if jjjCl_setNoWhtOutCnt == 0 or ignoreNoWhtOutCnt then
  133.                 if jjjCl_crashSaveLevel < 3 and jjjCl_getDataRef("operation/override/override_clouds") ~= flag then
  134.                         jjjCl_setDataRef("operation/override/override_clouds", flag)
  135.                 end
  136.         end
  137. end
  138. function jjjCl_setDataRefs()
  139.         -- Sky colors
  140.         if jjjLib1.getParam(jjjCl_plId, "SkyColors") then
  141.                 jjjCl_setDataRef("private/controls/atmo/atmo_scale_raleigh", 20.0)
  142.                 jjjCl_setDataRef("private/controls/atmo/inscatter_gain_mie", 2.0)
  143.                 jjjCl_setDataRef("private/controls/atmo/inscatter_gain_raleigh", 13.0)
  144.                 jjjCl_setDataRef("private/controls/atmo/scatter_raleigh_b", 8.0)
  145.                 jjjCl_setDataRef("private/controls/atmo/scatter_raleigh_g", 2.80)
  146.                 jjjCl_setDataRef("private/controls/atmo/scatter_raleigh_r", 0.010)
  147.         else
  148.                 jjjCl_restoreDataRef("private/controls/atmo/atmo_scale_raleigh")
  149.                 jjjCl_restoreDataRef("private/controls/atmo/inscatter_gain_mie")
  150.                 jjjCl_restoreDataRef("private/controls/atmo/inscatter_gain_raleigh")
  151.                 jjjCl_restoreDataRef("private/controls/atmo/scatter_raleigh_b")
  152.                 jjjCl_restoreDataRef("private/controls/atmo/scatter_raleigh_g")
  153.                 jjjCl_restoreDataRef("private/controls/atmo/scatter_raleigh_r")
  154.         end
  155.         if jjjCl_crashSaveLevel < 2 and jjjLib1.getParam(jjjCl_plId, "ClKill") then
  156.                 jjjCl_setOverrideClouds(1)
  157.                 return
  158.         end
  159.         jjjCl_setOverrideClouds(0)
  160.        
  161.         -- puffy clouds
  162.         if jjjLib1.getParam(jjjCl_plId, "ClPuffier") then
  163.                 jjjCl_setDataRef("private/controls/clouds/soft_occlude", 1.0)
  164.                 jjjCl_setDataRef("private/controls/clouds/limit_far", 0.25)
  165.                 jjjCl_setDataRef("private/controls/clouds/first_res_3d", 1.0)
  166.                 jjjCl_setDataRef("private/controls/clouds/last_res_3d", 4.0)
  167.         else
  168.                 jjjCl_restoreDataRef("private/controls/clouds/soft_occlude")
  169.                 jjjCl_restoreDataRef("private/controls/clouds/limit_far")
  170.                 jjjCl_restoreDataRef("private/controls/clouds/first_res_3d")
  171.                 jjjCl_restoreDataRef("private/controls/clouds/last_res_3d")
  172.         end
  173.        
  174.         -- cloud brightness variety
  175.         if jjjLib1.getParam(jjjCl_plId, "ClVariety") then
  176.                 if math.abs(jjjCl_getDataRef("private/controls/cloud/sample_opacity") - 0.05) > 0.001 or math.abs(jjjCl_getDataRef("private/controls/cloud/sample_radius") - 200) > 0.1 then
  177.                         jjjCl_setDataRef("private/controls/cloud/sample_opacity", 0.05)
  178.                         jjjCl_setDataRef("private/controls/cloud/sample_radius", 200)
  179.                         -- need clouds reload?
  180.                         if not jjjLib1.getParam(jjjCl_plId, "ClKill") and jjjCl_crashSaveLevel < 1 then
  181.                                 jjjCl_needCloudsReload = 1
  182.                         end
  183.                 end
  184.         else
  185.                 if math.abs(jjjCl_getDataRef("private/controls/cloud/sample_opacity") - jjjCl_getDataRefOrig("private/controls/cloud/sample_opacity")) > 0.001 or math.abs(jjjCl_getDataRef("private/controls/cloud/sample_radius") - jjjCl_getDataRefOrig("private/controls/cloud/sample_radius")) > 0.1 then
  186.                         jjjCl_restoreDataRef("private/controls/cloud/sample_opacity")
  187.                         jjjCl_restoreDataRef("private/controls/cloud/sample_radius")
  188.                         -- need clouds reload?
  189.                         if not jjjLib1.getParam(jjjCl_plId, "ClKill") and jjjCl_crashSaveLevel < 1 then
  190.                                 jjjCl_needCloudsReload = 1
  191.                         end
  192.                 end
  193.         end
  194.         -- lighter clouds
  195.         if jjjLib1.getParam(jjjCl_plId, "ClLighter") then
  196.                 jjjCl_setDataRefRatio("private/controls/clouds/light_curve_ratio", 0.8, jjjLib1.getParam(jjjCl_plId, "ClBrightness")/100)
  197.                 jjjCl_setDataRefRatio("private/controls/clouds/spec_gain", 3, jjjLib1.getParam(jjjCl_plId, "ClBrightness")/100)
  198.                 jjjCl_setDataRef("private/controls/clouds/diffuse_gain", 1.6)
  199.         else
  200.                 jjjCl_restoreDataRef("private/controls/clouds/light_curve_ratio")
  201.                 jjjCl_restoreDataRef("private/controls/clouds/diffuse_gain")
  202.                 jjjCl_restoreDataRef("private/controls/clouds/spec_gain")
  203.         end
  204.        
  205.         -- cloud shadows
  206.         if jjjLib1.getParam(jjjCl_plId, "ClShadows") then
  207.                 jjjCl_setDataRef("private/controls/clouds/min_res_for_shadow", 1.0)
  208.                 jjjCl_drClShdLightRatio[0] = 0.85 + 0.2*jjjLib1.getParam(jjjCl_plId, "ClShdDark")/100
  209.                 -- jjjCl_setDataRef("private/controls/clouds/cloud_shadow_lighten_ratio", 0.85 + 0.2*jjjLib1.getParam(jjjCl_plId, "ClShdDark")/100)
  210.         else
  211.                 jjjCl_restoreDataRef("private/controls/clouds/min_res_for_shadow")
  212.                 jjjCl_drClShdLightRatio[0] = 0.5
  213.                 -- jjjCl_restoreDataRef("private/controls/clouds/cloud_shadow_lighten_ratio")
  214.         end
  215.         jjjCl_rainDarkAuto = jjjLib1.getParam(jjjCl_plId, "ClRainDark")
  216.         -- unpatched RTH and RTH-conflicting feature(s) active?
  217.         if jjjCl_rthConflict and (jjjLib1.getParam(jjjCl_plId, "ClShadows") or jjjCl_rainDarkAuto ) then
  218.                 jjjCl_RTHconflictAlert()
  219.         end
  220. end
  221. function jjjCl_setNoWhiteOut()
  222.         local curWhtOut = jjjCl_getDataRef("private/controls/skyc/white_out_in_clouds")
  223.         if jjjLib1.getParam(jjjCl_plId, "ClNoWhtOut") and curWhtOut == 1 then
  224.                 jjjCl_setNoWhtOutCnt = 16
  225.         elseif not jjjLib1.getParam(jjjCl_plId, "ClNoWhtOut") and curWhtOut == 0 then
  226.                 jjjCl_setDataRef("private/controls/skyc/white_out_in_clouds", 1)
  227.         end
  228. end
  229. function jjjCl_setCldShdAuto()
  230.         jjjCl_clShdAuto = jjjLib1.getParam(jjjCl_plId, "ClShdAuto")
  231.         if not jjjCl_autoShdOffEnabled or not jjjCl_clShdAuto then
  232.                 jjjCl_drClShdLightRatio[0] = 0.85 + 0.2*jjjLib1.getParam(jjjCl_plId, "ClShdDark")/100
  233.         else
  234.                 jjjCl_checkCloudLevels()
  235.         end
  236. end
  237. function jjjCl_setRainDarkAuto()
  238.         jjjCl_rainDarkAuto = jjjLib1.getParam(jjjCl_plId, "ClRainDark")
  239.         if not jjjCl_autoDarkRainEnabled or not jjjCl_rainDarkAuto then
  240.                 jjjCl_drClLightCurvePower[0] = 0.75
  241.                 jjjCl_drClAmbientGain[0] = 1.0
  242.         else
  243.                 jjjCl_checkCloudLevels()
  244.         end
  245.         if jjjCl_rthConflict and (jjjLib1.getParam(jjjCl_plId, "ClShadows") or jjjCl_rainDarkAuto ) then
  246.                 jjjCl_RTHconflictAlert()
  247.         end
  248. end
  249. function jjjCl_checkCloudLevels()
  250.         if jjjCl_clShdAuto then
  251.                 local coverage = 0
  252.                 local coverageMax = 0.5
  253.                 jjjCl_clLevelMin = 999999
  254.                 jjjCl_clLevelMax = 0
  255.                 for layer = 2, 0, -1 do
  256.                         coverage = get("sim/weather/cloud_coverage[" .. layer .. "]")
  257.                         if coverage and coverage >= coverageMax then
  258.                                 jjjCl_clLevelMax = math.max(jjjCl_clLevelMax, get("sim/weather/cloud_tops_msl_m[" .. layer .. "]"))
  259.                                 jjjCl_clLevelMin = math.min(jjjCl_clLevelMin, get("sim/weather/cloud_base_msl_m[" .. layer .. "]"))
  260.                                 if coverage >= 4 then
  261.                                         break
  262.                                 end
  263.                                 coverageMax = coverage
  264.                         end
  265.                 end
  266.                 if jjjCl_clLevelMax < jjjCl_clLevelMin then
  267.                         jjjCl_clLevelMax = jjjCl_clLevelMin + 1000
  268.                         jjjCl_clLevelMid = jjjCl_clLevelMin
  269.                 else
  270.                         jjjCl_clLevelMid = (jjjCl_clLevelMin + jjjCl_clLevelMax)/2
  271.                 end
  272.                
  273.         end
  274.         jjjCl_refreshPanel()
  275. end
  276. function jjjCl_main()
  277.         if jjjCl_setNoWhtOutCnt > 0 then
  278.                 jjjCl_setNoWhtOutCnt = jjjCl_setNoWhtOutCnt - 1
  279.                 if jjjCl_setNoWhtOutCnt == 15 then
  280.                         jjjCl_setOverrideClouds(1, true)
  281.                 elseif jjjCl_setNoWhtOutCnt == 7 and jjjLib1.getParam(jjjCl_plId, "ClNoWhtOut") then
  282.                         jjjCl_setDataRef("private/controls/skyc/white_out_in_clouds", 0)
  283.                 elseif jjjCl_setNoWhtOutCnt == 0 then
  284.                         jjjCl_setDataRefs()
  285.                 end
  286.         end
  287.         local f
  288.         local h = jjjCl_drViewHeight[0]
  289.         if jjjCl_needCloudsReload ~= 0 then
  290.                 if jjjCl_needCloudsReload == 1 then
  291.                         jjjCl_setOverrideClouds(1)
  292.                         jjjCl_needCloudsReload = 2
  293.                 else
  294.                         jjjCl_needCloudsReload = 0
  295.                         jjjCl_setOverrideClouds(0)
  296.                 end
  297.         end
  298.         if jjjCl_clShdAuto and jjjLib1.getParam(jjjCl_plId, "ClShadows") then
  299.                 f = 1
  300.                 if h >= jjjCl_clLevelMax then
  301.                         f = 0
  302.                 elseif h > jjjCl_clLevelMid then
  303.                         f = (jjjCl_clLevelMax - h)/(jjjCl_clLevelMax - jjjCl_clLevelMid)
  304.                 end
  305.                 jjjCl_drClShdLightRatio[0] = (0.85 + 0.2*jjjLib1.getParam(jjjCl_plId, "ClShdDark")/100)*f + 0.5*(1 - f)
  306.         end
  307.         if jjjCl_rainDarkAuto then
  308.                 jjjCl_rainPercent = jjjCl_rainPercent + math.max(-0.001, math.min(0.001, jjjCl_drRainPercent[0] - jjjCl_rainPercent))
  309.                 f = 1
  310.                 if h >= jjjCl_clLevelMin + jjjCl_autoDarkRainHeight then
  311.                         f = 0
  312.                 elseif h > jjjCl_clLevelMin then
  313.                         f = (jjjCl_clLevelMin + jjjCl_autoDarkRainHeight - h)/jjjCl_autoDarkRainHeight
  314.                 end
  315.                 f = f*jjjLib1.getParam(jjjCl_plId, "ClRainDarkLvl")*0.01
  316.                 jjjCl_drClLightCurvePower[0] = 0.75 + 0.75*f*jjjCl_rainPercent
  317.                 jjjCl_drClAmbientGain[0] = 1.0 - jjjCl_rainPercent
  318.         end
  319. end
  320. function jjjCl_refreshPanel()
  321.         jjjLib1.clearPanel(jjjCl_plId, jjjCl_pnId)
  322.         jjjLib1.setPanelName(jjjCl_plId, jjjCl_pnId, "CONFIGURATION")
  323.         jjjLib1.addPanelClose(jjjCl_plId, jjjCl_pnId, "")
  324.         jjjLib1.addPanelTextLine(jjjCl_plId, jjjCl_pnId, "General clouds settings")
  325.         jjjLib1.addPanelBR(jjjCl_plId, jjjCl_pnId, 0.5)
  326.         local clKill = jjjLib1.getParam(jjjCl_plId, "ClKill")
  327.         if clKill then
  328.                 jjjLib1.addPanelToggleButton(jjjCl_plId, jjjCl_pnId, "Clouds OFF",  "m", "ClKill", jjjCl_crashSaveLevel < 2, "red" )
  329.         else
  330.                 jjjLib1.addPanelToggleButton(jjjCl_plId, jjjCl_pnId, "Clouds ON",  "m", "ClKill", jjjCl_crashSaveLevel < 2, "green" )
  331.         end
  332.         -- jjjLib1.addPanelTextLine(jjjCl_plId, jjjCl_pnId, "Clouds smoothness")
  333.         -- jjjLib1.addPanelBR(jjjCl_plId, jjjCl_pnId, 0.5)
  334.         jjjLib1.addPanelToggleButton(jjjCl_plId, jjjCl_pnId, "PUFFIER",  "m", "ClPuffier", not clKill )
  335.         jjjLib1.addPanelToggleButton(jjjCl_plId, jjjCl_pnId, "SMOOTHER",  "m", "ClVariety", not clKill )
  336.         jjjLib1.addPanelToggleButton(jjjCl_plId, jjjCl_pnId, "No WHITE OUT",  "m", "ClNoWhtOut", not clKill and jjjCl_crashSaveLevel < 3)
  337.         jjjLib1.addPanelHR(jjjCl_plId, jjjCl_pnId)
  338.         jjjLib1.addPanelTextLine(jjjCl_plId, jjjCl_pnId, "Clouds lighter (less gray)")
  339.         jjjLib1.addPanelBR(jjjCl_plId, jjjCl_pnId, 0.5)
  340.         jjjLib1.addPanelToggleButton(jjjCl_plId, jjjCl_pnId, "",  "m", "ClLighter", not clKill )
  341.         jjjLib1.addPanelSliderLegend(jjjCl_plId, jjjCl_pnId, "min", "max")
  342.         jjjLib1.addPanelNumericInput(jjjCl_plId, jjjCl_pnId, "ClBrightness", jjjLib1.getParam(jjjCl_plId, "ClLighter") and not clKill)
  343.         jjjLib1.addPanelTextLine(jjjCl_plId, jjjCl_pnId, "Darken clouds with precipitation propability (gray rain clouds)")
  344.         jjjLib1.addPanelBR(jjjCl_plId, jjjCl_pnId, 0.5)
  345.         jjjLib1.addPanelToggleButton(jjjCl_plId, jjjCl_pnId, "",  "m", "ClRainDark", not clKill and jjjCl_autoDarkRainEnabled)
  346.         jjjLib1.addPanelNumericInput(jjjCl_plId, jjjCl_pnId, "ClRainDarkLvl", jjjLib1.getParam(jjjCl_plId, "ClRainDark") and not clKill)
  347.         jjjLib1.addPanelHR(jjjCl_plId, jjjCl_pnId)
  348.         jjjLib1.addPanelTextLine(jjjCl_plId, jjjCl_pnId, "Cloud shadows (values > 60 can cause flickering of shadows)")
  349.         jjjLib1.addPanelBR(jjjCl_plId, jjjCl_pnId, 0.5)
  350.         jjjLib1.addPanelToggleButton(jjjCl_plId, jjjCl_pnId, "",  "m", "ClShadows", not clKill )
  351.         jjjLib1.addPanelNumericInput(jjjCl_plId, jjjCl_pnId, "ClShdDark", jjjLib1.getParam(jjjCl_plId, "ClShadows") and not clKill)
  352.         jjjLib1.addPanelTextLine(jjjCl_plId, jjjCl_pnId, "Fade out cloud shadows when aircraft is above top clouds layer")
  353.         jjjLib1.addPanelBR(jjjCl_plId, jjjCl_pnId, 0.5)
  354.         jjjLib1.addPanelToggleButton(jjjCl_plId, jjjCl_pnId, "",  "m", "ClShdAuto", jjjLib1.getParam(jjjCl_plId, "ClShadows") and not clKill and jjjCl_autoShdOffEnabled)
  355.         jjjLib1.addPanelTextLine(jjjCl_plId, jjjCl_pnId, "('ON' avoids shadows on aircraft above clouds)")
  356.         if jjjCl_getDataRef("graphics/settings/HDR_on") == 1 then
  357.                 jjjLib1.addPanelHR(jjjCl_plId, jjjCl_pnId)
  358.        
  359.                 jjjLib1.addPanelLabel(jjjCl_plId, jjjCl_pnId, "Sky colors (HDR)")
  360.                 jjjLib1.addPanelToggleButton(jjjCl_plId, jjjCl_pnId, "",  "m", "SkyColors", true )
  361.         end
  362. end
  363. function jjjCl_togglePanel()
  364.         jjjLib1.openPanel(jjjCl_plId, jjjCl_pnId)
  365. end
  366. jjjLib1.addParam(jjjCl_plId, "ClKill", {["autosave"]=true, ["dflt"]=false}, "jjjCl_setDataRefs()")
  367. jjjLib1.addParam(jjjCl_plId, "ClNoWhtOut", {["autosave"]=true, ["dflt"]=false}, "jjjCl_setNoWhiteOut()")
  368. jjjLib1.addParam(jjjCl_plId, "ClPuffier", {["autosave"]=true, ["dflt"]=true}, "jjjCl_setDataRefs()")
  369. jjjLib1.addParam(jjjCl_plId, "ClVariety", {["autosave"]=true, ["dflt"]=true}, "jjjCl_setDataRefs()")
  370. jjjLib1.addParam(jjjCl_plId, "ClLighter", {["autosave"]=true, ["dflt"]=true}, "jjjCl_setDataRefs()")
  371. jjjLib1.addParam(jjjCl_plId, "ClBrightness", {["autosave"]=true, ["dflt"]=40, ["mn"]=0, ["mx"]=100, ["stp"]=1, ["slMn"]=0, ["slMx"]=100, ["gdMn"]=30, ["gdMx"]=80, ["fmt"]="%3i"}, "jjjCl_setDataRefs()")
  372. jjjLib1.addParam(jjjCl_plId, "ClRainDark", {["autosave"]=true, ["dflt"]=true}, "jjjCl_setRainDarkAuto()")
  373. jjjLib1.addParam(jjjCl_plId, "ClRainDarkLvl", {["autosave"]=true, ["dflt"]=50, ["mn"]=0, ["mx"]=100, ["stp"]=1, ["slMn"]=0, ["slMx"]=100, ["gdMn"]=40, ["gdMx"]=80, ["fmt"]="%3i"}, "jjjCl_setRainDarkAuto()")
  374. jjjLib1.addParam(jjjCl_plId, "ClShadows", {["autosave"]=true, ["dflt"]=true}, "jjjCl_setDataRefs()")
  375. jjjLib1.addParam(jjjCl_plId, "ClShdDark", {["autosave"]=true, ["dflt"]=50, ["mn"]=0, ["mx"]=100, ["stp"]=1, ["slMn"]=0, ["slMx"]=100, ["gdMn"]=40, ["gdMx"]=60, ["fmt"]="%3i"}, "jjjCl_setDataRefs()")
  376. jjjLib1.addParam(jjjCl_plId, "ClShdAuto", {["autosave"]=true, ["dflt"]=false}, "jjjCl_setCldShdAuto()")
  377. jjjLib1.addParam(jjjCl_plId, "SkyColors", {["autosave"]=true, ["dflt"]=true}, "jjjCl_setDataRefs()")
  378. jjjCl_saveDataRef("private/controls/atmo/atmo_scale_raleigh")
  379. jjjCl_saveDataRef("private/controls/atmo/inscatter_gain_mie")
  380. jjjCl_saveDataRef("private/controls/atmo/inscatter_gain_raleigh")
  381. jjjCl_saveDataRef("private/controls/atmo/scatter_raleigh_b")
  382. jjjCl_saveDataRef("private/controls/atmo/scatter_raleigh_g")
  383. jjjCl_saveDataRef("private/controls/atmo/scatter_raleigh_r")
  384. jjjCl_saveDataRef("private/controls/clouds/min_res_for_shadow")
  385. jjjCl_saveDataRef("private/controls/clouds/cloud_shadow_lighten_ratio")
  386. jjjCl_saveDataRef("private/controls/clouds/soft_occlude")
  387. jjjCl_saveDataRef("private/controls/clouds/limit_far")
  388. jjjCl_saveDataRef("private/controls/clouds/first_res_3d")
  389. jjjCl_saveDataRef("private/controls/clouds/last_res_3d")
  390. jjjCl_saveDataRef("private/controls/clouds/light_curve_ratio")
  391. jjjCl_saveDataRef("private/controls/clouds/diffuse_gain")
  392. jjjCl_saveDataRef("private/controls/clouds/spec_gain")
  393. jjjCl_saveDataRef("private/controls/cloud/sample_opacity")
  394. jjjCl_saveDataRef("private/controls/cloud/sample_radius")
  395. jjjLib1.loadParams(jjjCl_plId)
  396. jjjCl_checkCloudLevels()
  397. jjjCl_refreshPanel()
  398. add_macro(jjjCl_pluginName .. ": open/close settings", "jjjCl_togglePanel()")
  399. create_command("FlyWithLua/" .. jjjCl_pluginName .. "/open_settings", "open/close settings panel", "jjjCl_togglePanel()", "", "")
  400. do_on_exit("jjjCl_restoreAllDataRefs()")
  401. do_sometimes("jjjCl_checkCloudLevels()")
  402. do_on_new_metar("jjjCl_checkCloudLevels()")
  403. do_every_frame("jjjCl_main()")
复制代码


点评

flywithlua的script文件夹里。存成文本放进去就好了。  详情 回复 发表于 2017-2-18 10:29
是哪两个文件啊?具体在哪个位置呢?感谢了!!!  详情 回复 发表于 2017-2-17 11:15
已绑定手机
发表于 2017-2-17 11:15:28 | 显示全部楼层
威斯敏斯特 发表于 2017-2-17 01:56
改了什么不记得了。反正两个文件是这样的

是哪两个文件啊?具体在哪个位置呢?感谢了!!!
发表于 2017-2-17 12:35:06 | 显示全部楼层
可以的,相对于P3D来说好不少
发表于 2017-2-17 19:58:38 | 显示全部楼层
XP还是很不错的
发表于 2017-2-17 20:15:16 | 显示全部楼层
这个不错!               
发表于 2017-2-18 08:21:12 | 显示全部楼层
效果是不錯,但雲沒很明顯
楼主 发表于 2017-2-18 10:29:30 | 显示全部楼层
威斯敏斯特 发表于 2017-2-17 01:56
改了什么不记得了。反正两个文件是这样的

flywithlua的script文件夹里。存成文本放进去就好了。
已绑定手机
发表于 2017-2-21 11:29:29 | 显示全部楼层
威斯敏斯特 发表于 2017-2-16 09:50
我用的3jClouds2。但是自己改了几个参数。不太记得具体是哪几个了。但是这个是个人口味问题。你按你的口 ...

收到,马上试试,谢谢!
发表于 2017-2-22 13:57:05 | 显示全部楼层
用的是啥插件??
发表于 2017-2-22 16:33:56 | 显示全部楼层
这景色已经是很逼真的了。楼主多发点这种美图啊!
发表于 2017-2-24 22:52:52 | 显示全部楼层
牛逼的天气   啊  
发表于 2017-2-25 16:08:53 | 显示全部楼层
这个效国是什么效果啊
已绑定手机
发表于 2017-2-25 17:29:00 | 显示全部楼层
LZ这张是开RTH做的吗?
已绑定手机
发表于 2017-3-1 15:28:22 | 显示全部楼层
Mouse21 发表于 2017-2-15 15:03
不错,不错,能发个贴分享一下技术就更好了。

用了一下,感觉不错!再谢谢分享。
您需要登录后才可以回帖 登录 | 加入联盟

本版积分规则

快速回复 返回顶部 返回列表