威斯敏斯特 发表于 2017-2-16 11:55:36

mwm 发表于 2017-2-16 11:08
我沒試過
不過改貼圖的雲就無需太強求

试了。还可以。没什么本质上的区别。不过参数还是需要调整。而且跟显示器也有关系。我的显示器不够蓝,所以还得调。

fujigao82 发表于 2017-2-16 18:11:41

威斯敏斯特 发表于 2017-2-15 11:40
是。就是改改几个文本文件什么的。而且并没有什么特别需要反复调试的。 ...

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

阿斯图利亚斯 发表于 2017-2-16 22:10:31

这个效果可以。

威斯敏斯特 发表于 2017-2-17 01:56:37

fujigao82 发表于 2017-2-16 18:11
能不能分享一下是如何改的吗?感谢

改了什么不记得了。反正两个文件是这样的
set("sim/private/controls/clouds/ambient_gain", 5)
--set("sim/private/controls/clouds/spec_gain", 20)
--set("sim/private/controls/clouds/first_res_3d", 4)
set("sim/private/controls/clouds/plot_radius", 1)
--set("sim/private/controls/clouds/diffuse_gain", 2.4)
--set("sim/private/controls/clouds/cloud_shadow_lighten_ratio", 0.95)
set("sim/private/controls/clouds/shadow_size", 1024)
--set("sim/private/controls/atmo/atmo_scale_raleigh", 30)
--set("sim/private/controls/atmo/inscatter_gain_mie", 0)
--set("sim/private/controls/atmo/inscatter_gain_raleigh", 17)
--set("sim/private/controls/atmo/scatter_raleigh_b", 52)
set("sim/private/controls/hdr/gain_min", 2)
set("sim/private/controls/hdr/sky_gain", 5)
set("sim/private/controls/skyc/max_shadow_angle", -89)
set("sim/private/controls/skyc/min_shadow_angle", -90)
set("sim/private/controls/hdr/white_point", 2.50)
set("sim/private/controls/dome/kill_glares", 1)
--set("sim/private/controls/shadow/cockpit_near_adjust", 2.0)
--set("sim/private/controls/shadow/cockpit_near_proxy", 1.0)
set("sim/private/controls/shadow/csm_split_exterior", 7.0)
set("sim/private/controls/shadow/csm_split_interior", 5.0)
set("sim/private/controls/shadow/csm/far_limit", 15000.0)
set("sim/private/controls/shadow/csm/far_limit_cockpit", 10000.0)

--------------------------------
-- Script:3jClouds2
-- Version: 1.2
-- Date:    2016-12-29
-- By:      3j@raeuber.com
--------------------------------

-----------------------------------------------------------------------------------------------
-- for other scripts to detect that this plugin is installed and running
jjjCl_3jCloudsRunning = true
-----------------------------------------------------------------------------------------------

jjjCl_crashSaveLevel = 0 -- when X-Plane crashes due to this plugin, try increasing this value by 1 up to 3

require("jjjLib1")
if jjjLib1.version == nil or jjjLib1.version() < 1.2 then
        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.")')
        jjjCl_3jCloudsRunning = false
        return
end

local jjjCl_pluginName = "3jClouds2"
local jjjCl_plId = jjjLib1.getPlId(jjjCl_pluginName)

jjjLib1.dataRefAvailable(jjjCl_plId, "sim/graphics/settings/HDR_on", true)
jjjLib1.dataRefAvailable(jjjCl_plId, "sim/private/controls/skyc/white_out_in_clouds", true)
jjjLib1.dataRefAvailable(jjjCl_plId, "sim/private/controls/atmo/atmo_scale_raleigh", true)
jjjLib1.dataRefAvailable(jjjCl_plId, "sim/private/controls/atmo/inscatter_gain_mie", true)
jjjLib1.dataRefAvailable(jjjCl_plId, "sim/private/controls/atmo/inscatter_gain_raleigh", true)
jjjLib1.dataRefAvailable(jjjCl_plId, "sim/private/controls/atmo/scatter_raleigh_b", true)
jjjLib1.dataRefAvailable(jjjCl_plId, "sim/private/controls/atmo/scatter_raleigh_g", true)
jjjLib1.dataRefAvailable(jjjCl_plId, "sim/private/controls/atmo/scatter_raleigh_r", true)
jjjLib1.dataRefAvailable(jjjCl_plId, "sim/private/controls/clouds/min_res_for_shadow", true)
jjjLib1.dataRefAvailable(jjjCl_plId, "sim/private/controls/clouds/soft_occlude", true)
jjjLib1.dataRefAvailable(jjjCl_plId, "sim/private/controls/clouds/limit_far", true)
jjjLib1.dataRefAvailable(jjjCl_plId, "sim/private/controls/clouds/first_res_3d", true)
jjjLib1.dataRefAvailable(jjjCl_plId, "sim/private/controls/clouds/last_res_3d", true)
jjjLib1.dataRefAvailable(jjjCl_plId, "sim/private/controls/clouds/light_curve_ratio", true)
jjjLib1.dataRefAvailable(jjjCl_plId, "sim/private/controls/clouds/light_curve_power", true)
jjjLib1.dataRefAvailable(jjjCl_plId, "sim/private/controls/clouds/diffuse_gain", true)
jjjLib1.dataRefAvailable(jjjCl_plId, "sim/private/controls/clouds/spec_gain", true)
jjjLib1.dataRefAvailable(jjjCl_plId, "sim/private/controls/clouds/cloud_shadow_lighten_ratio", true)
jjjLib1.dataRefAvailable(jjjCl_plId, "sim/private/controls/cloud/sample_opacity", true)
jjjLib1.dataRefAvailable(jjjCl_plId, "sim/private/controls/cloud/sample_radius", true)

if jjjLib1.getNumMissingDataRefs(jjjCl_plId) > 0 then
        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.')
        jjjCl_3jCloudsRunning = false
        return
end

local jjjCl_rthPath = SCRIPT_DIRECTORY .. "RTH.lua"
local jjjCl_rthConflict = false

function jjjCl_RTHconflictAlert()
        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")
        jjjCl_rthConflict = false
end
function jjjCl_patchRTH()
        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)
        if patch ~= false and patch > 0 then
                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")
                jjjCl_rthConflict = false
        end
end
function jjjCl_deactivateRTHconflictFeatures()
        jjjLib1.setParam(jjjCl_plId, "ClShadows", false)
        jjjLib1.setParam(jjjCl_plId, "ClRainDark", false)
        jjjCl_setRainDarkAuto(false)
        jjjLib1.saveParams(jjjCl_plId)
        jjjCl_refreshPanel()
end

-- check if RTH exists
if jjjLib1.fileExists(jjjCl_rthPath) then
        if not jjjLib1.checkPatchLuaScript(jjjCl_rthPath, jjjCl_pluginName) then
                jjjCl_rthConflict = true
        end
end

local jjjCl_drefOrig = {}

local jjjCl_setNoWhtOutCnt = 16
local jjjCl_needCloudsReload = 0

local jjjCl_clShdAuto = true
local jjjCl_clLevelMin = 30000
local jjjCl_clLevelMid = 30000
local jjjCl_clLevelMax = 31000

local jjjCl_autoShdOffEnabled = true

local jjjCl_drViewHeight = {=0}
if jjjLib1.dataRefAvailable(jjjCl_plId, "sim/graphics/view/view_y", true) then
--        jjjCl_drViewHeight = dataref_table("sim/flightmodel/position/elevation")
        jjjCl_drViewHeight = dataref_table("sim/graphics/view/view_y")
else
        jjjCl_autoShdOffEnabled = false
end

local jjjCl_drClShdLightRatio = {=0}
if jjjLib1.dataRefAvailable(jjjCl_plId, "sim/private/controls/clouds/cloud_shadow_lighten_ratio", true) then
        jjjCl_drClShdLightRatio = dataref_table("sim/private/controls/clouds/cloud_shadow_lighten_ratio")
else
        jjjCl_autoShdOffEnabled = false
end

local jjjCl_rainPercent= 0
local jjjCl_rainDarkAuto = true
local jjjCl_autoDarkRainEnabled = true
local jjjCl_autoDarkRainHeight= 300

local jjjCl_drClLightCurvePower = {=0}
local jjjCl_drClAmbientGain   = {=0}
local jjjCl_drRainPercent       = {=0}
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
        jjjCl_drClLightCurvePower = dataref_table("sim/private/controls/clouds/light_curve_power")
        jjjCl_drClAmbientGain   = dataref_table("sim/private/controls/clouds/ambient_gain")
        jjjCl_drRainPercent       = dataref_table("sim/weather/rain_percent")
else
        jjjCl_autoDarkRainEnabled = false
end

local jjjCl_pnId = jjjLib1.createPanel(jjjCl_plId, "", false, 'jjjCl_refreshPanel()', "cyan")
jjjLib1.setPanelPos(jjjCl_plId, jjjCl_pnId, false, 64)

function jjjCl_getDataRef(dref)
        return get("sim/" .. dref)
end

function jjjCl_setDataRef(dref, val)
        set("sim/" .. dref, val)
end

function jjjCl_setDataRefRatio(dref, val, ratio)
        set("sim/" .. dref, val*ratio + jjjCl_drefOrig*(1 - ratio))
end

function jjjCl_saveDataRef(dref)
        jjjCl_drefOrig = jjjCl_getDataRef(dref)
end

function jjjCl_getDataRefOrig(dref)
        return jjjCl_drefOrig
end

function jjjCl_restoreDataRef(dref)
        jjjCl_setDataRef(dref, jjjCl_drefOrig)
end

function jjjCl_restoreAllDataRefs()
        for dref, val in pairs(jjjCl_drefOrig) do
                jjjCl_setDataRef(dref, val)
        end
end

function jjjCl_setOverrideClouds(flag, ignoreNoWhtOutCnt)
        if jjjCl_setNoWhtOutCnt == 0 or ignoreNoWhtOutCnt then
                if jjjCl_crashSaveLevel < 3 and jjjCl_getDataRef("operation/override/override_clouds") ~= flag then
                        jjjCl_setDataRef("operation/override/override_clouds", flag)
                end
        end
end


function jjjCl_setDataRefs()
        -- Sky colors
        if jjjLib1.getParam(jjjCl_plId, "SkyColors") then
                jjjCl_setDataRef("private/controls/atmo/atmo_scale_raleigh", 20.0)
                jjjCl_setDataRef("private/controls/atmo/inscatter_gain_mie", 2.0)
                jjjCl_setDataRef("private/controls/atmo/inscatter_gain_raleigh", 13.0)
                jjjCl_setDataRef("private/controls/atmo/scatter_raleigh_b", 8.0)
                jjjCl_setDataRef("private/controls/atmo/scatter_raleigh_g", 2.80)
                jjjCl_setDataRef("private/controls/atmo/scatter_raleigh_r", 0.010)
        else
                jjjCl_restoreDataRef("private/controls/atmo/atmo_scale_raleigh")
                jjjCl_restoreDataRef("private/controls/atmo/inscatter_gain_mie")
                jjjCl_restoreDataRef("private/controls/atmo/inscatter_gain_raleigh")
                jjjCl_restoreDataRef("private/controls/atmo/scatter_raleigh_b")
                jjjCl_restoreDataRef("private/controls/atmo/scatter_raleigh_g")
                jjjCl_restoreDataRef("private/controls/atmo/scatter_raleigh_r")
        end

        if jjjCl_crashSaveLevel < 2 and jjjLib1.getParam(jjjCl_plId, "ClKill") then
                jjjCl_setOverrideClouds(1)
                return
        end
        jjjCl_setOverrideClouds(0)
       
        -- puffy clouds
        if jjjLib1.getParam(jjjCl_plId, "ClPuffier") then
                jjjCl_setDataRef("private/controls/clouds/soft_occlude", 1.0)
                jjjCl_setDataRef("private/controls/clouds/limit_far", 0.25)
                jjjCl_setDataRef("private/controls/clouds/first_res_3d", 1.0)
                jjjCl_setDataRef("private/controls/clouds/last_res_3d", 4.0)
        else
                jjjCl_restoreDataRef("private/controls/clouds/soft_occlude")
                jjjCl_restoreDataRef("private/controls/clouds/limit_far")
                jjjCl_restoreDataRef("private/controls/clouds/first_res_3d")
                jjjCl_restoreDataRef("private/controls/clouds/last_res_3d")
        end
       
        -- cloud brightness variety
        if jjjLib1.getParam(jjjCl_plId, "ClVariety") then
                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
                        jjjCl_setDataRef("private/controls/cloud/sample_opacity", 0.05)
                        jjjCl_setDataRef("private/controls/cloud/sample_radius", 200)
                        -- need clouds reload?
                        if not jjjLib1.getParam(jjjCl_plId, "ClKill") and jjjCl_crashSaveLevel < 1 then
                                jjjCl_needCloudsReload = 1
                        end
                end
        else
                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
                        jjjCl_restoreDataRef("private/controls/cloud/sample_opacity")
                        jjjCl_restoreDataRef("private/controls/cloud/sample_radius")
                        -- need clouds reload?
                        if not jjjLib1.getParam(jjjCl_plId, "ClKill") and jjjCl_crashSaveLevel < 1 then
                                jjjCl_needCloudsReload = 1
                        end
                end
        end

        -- lighter clouds
        if jjjLib1.getParam(jjjCl_plId, "ClLighter") then
                jjjCl_setDataRefRatio("private/controls/clouds/light_curve_ratio", 0.8, jjjLib1.getParam(jjjCl_plId, "ClBrightness")/100)
                jjjCl_setDataRefRatio("private/controls/clouds/spec_gain", 3, jjjLib1.getParam(jjjCl_plId, "ClBrightness")/100)
                jjjCl_setDataRef("private/controls/clouds/diffuse_gain", 1.6)
        else
                jjjCl_restoreDataRef("private/controls/clouds/light_curve_ratio")
                jjjCl_restoreDataRef("private/controls/clouds/diffuse_gain")
                jjjCl_restoreDataRef("private/controls/clouds/spec_gain")
        end
       
        -- cloud shadows
        if jjjLib1.getParam(jjjCl_plId, "ClShadows") then
                jjjCl_setDataRef("private/controls/clouds/min_res_for_shadow", 1.0)
                jjjCl_drClShdLightRatio = 0.85 + 0.2*jjjLib1.getParam(jjjCl_plId, "ClShdDark")/100
                -- jjjCl_setDataRef("private/controls/clouds/cloud_shadow_lighten_ratio", 0.85 + 0.2*jjjLib1.getParam(jjjCl_plId, "ClShdDark")/100)
        else
                jjjCl_restoreDataRef("private/controls/clouds/min_res_for_shadow")
                jjjCl_drClShdLightRatio = 0.5
                -- jjjCl_restoreDataRef("private/controls/clouds/cloud_shadow_lighten_ratio")
        end
        jjjCl_rainDarkAuto = jjjLib1.getParam(jjjCl_plId, "ClRainDark")
        -- unpatched RTH and RTH-conflicting feature(s) active?
        if jjjCl_rthConflict and (jjjLib1.getParam(jjjCl_plId, "ClShadows") or jjjCl_rainDarkAuto ) then
                jjjCl_RTHconflictAlert()
        end
end

function jjjCl_setNoWhiteOut()
        local curWhtOut = jjjCl_getDataRef("private/controls/skyc/white_out_in_clouds")
        if jjjLib1.getParam(jjjCl_plId, "ClNoWhtOut") and curWhtOut == 1 then
                jjjCl_setNoWhtOutCnt = 16
        elseif not jjjLib1.getParam(jjjCl_plId, "ClNoWhtOut") and curWhtOut == 0 then
                jjjCl_setDataRef("private/controls/skyc/white_out_in_clouds", 1)
        end
end

function jjjCl_setCldShdAuto()
        jjjCl_clShdAuto = jjjLib1.getParam(jjjCl_plId, "ClShdAuto")
        if not jjjCl_autoShdOffEnabled or not jjjCl_clShdAuto then
                jjjCl_drClShdLightRatio = 0.85 + 0.2*jjjLib1.getParam(jjjCl_plId, "ClShdDark")/100
        else
                jjjCl_checkCloudLevels()
        end
end

function jjjCl_setRainDarkAuto()
        jjjCl_rainDarkAuto = jjjLib1.getParam(jjjCl_plId, "ClRainDark")
        if not jjjCl_autoDarkRainEnabled or not jjjCl_rainDarkAuto then
                jjjCl_drClLightCurvePower = 0.75
                jjjCl_drClAmbientGain = 1.0
        else
                jjjCl_checkCloudLevels()
        end
        if jjjCl_rthConflict and (jjjLib1.getParam(jjjCl_plId, "ClShadows") or jjjCl_rainDarkAuto ) then
                jjjCl_RTHconflictAlert()
        end
end

function jjjCl_checkCloudLevels()
        if jjjCl_clShdAuto then
                local coverage = 0
                local coverageMax = 0.5
                jjjCl_clLevelMin = 999999
                jjjCl_clLevelMax = 0
                for layer = 2, 0, -1 do
                        coverage = get("sim/weather/cloud_coverage[" .. layer .. "]")
                        if coverage and coverage >= coverageMax then
                                jjjCl_clLevelMax = math.max(jjjCl_clLevelMax, get("sim/weather/cloud_tops_msl_m[" .. layer .. "]"))
                                jjjCl_clLevelMin = math.min(jjjCl_clLevelMin, get("sim/weather/cloud_base_msl_m[" .. layer .. "]"))
                                if coverage >= 4 then
                                        break
                                end
                                coverageMax = coverage
                        end
                end
                if jjjCl_clLevelMax < jjjCl_clLevelMin then
                        jjjCl_clLevelMax = jjjCl_clLevelMin + 1000
                        jjjCl_clLevelMid = jjjCl_clLevelMin
                else
                        jjjCl_clLevelMid = (jjjCl_clLevelMin + jjjCl_clLevelMax)/2
                end
               
        end

        jjjCl_refreshPanel()
end

function jjjCl_main()
        if jjjCl_setNoWhtOutCnt > 0 then
                jjjCl_setNoWhtOutCnt = jjjCl_setNoWhtOutCnt - 1
                if jjjCl_setNoWhtOutCnt == 15 then
                        jjjCl_setOverrideClouds(1, true)
                elseif jjjCl_setNoWhtOutCnt == 7 and jjjLib1.getParam(jjjCl_plId, "ClNoWhtOut") then
                        jjjCl_setDataRef("private/controls/skyc/white_out_in_clouds", 0)
                elseif jjjCl_setNoWhtOutCnt == 0 then
                        jjjCl_setDataRefs()
                end
        end
        local f
        local h = jjjCl_drViewHeight
        if jjjCl_needCloudsReload ~= 0 then
                if jjjCl_needCloudsReload == 1 then
                        jjjCl_setOverrideClouds(1)
                        jjjCl_needCloudsReload = 2
                else
                        jjjCl_needCloudsReload = 0
                        jjjCl_setOverrideClouds(0)
                end
        end
        if jjjCl_clShdAuto and jjjLib1.getParam(jjjCl_plId, "ClShadows") then
                f = 1
                if h >= jjjCl_clLevelMax then
                        f = 0
                elseif h > jjjCl_clLevelMid then
                        f = (jjjCl_clLevelMax - h)/(jjjCl_clLevelMax - jjjCl_clLevelMid)
                end
                jjjCl_drClShdLightRatio = (0.85 + 0.2*jjjLib1.getParam(jjjCl_plId, "ClShdDark")/100)*f + 0.5*(1 - f)
        end
        if jjjCl_rainDarkAuto then
                jjjCl_rainPercent = jjjCl_rainPercent + math.max(-0.001, math.min(0.001, jjjCl_drRainPercent - jjjCl_rainPercent))
                f = 1
                if h >= jjjCl_clLevelMin + jjjCl_autoDarkRainHeight then
                        f = 0
                elseif h > jjjCl_clLevelMin then
                        f = (jjjCl_clLevelMin + jjjCl_autoDarkRainHeight - h)/jjjCl_autoDarkRainHeight
                end
                f = f*jjjLib1.getParam(jjjCl_plId, "ClRainDarkLvl")*0.01
                jjjCl_drClLightCurvePower = 0.75 + 0.75*f*jjjCl_rainPercent
                jjjCl_drClAmbientGain = 1.0 - jjjCl_rainPercent
        end
end


function jjjCl_refreshPanel()
        jjjLib1.clearPanel(jjjCl_plId, jjjCl_pnId)
        jjjLib1.setPanelName(jjjCl_plId, jjjCl_pnId, "CONFIGURATION")
        jjjLib1.addPanelClose(jjjCl_plId, jjjCl_pnId, "")


        jjjLib1.addPanelTextLine(jjjCl_plId, jjjCl_pnId, "General clouds settings")
        jjjLib1.addPanelBR(jjjCl_plId, jjjCl_pnId, 0.5)

        local clKill = jjjLib1.getParam(jjjCl_plId, "ClKill")
        if clKill then
                jjjLib1.addPanelToggleButton(jjjCl_plId, jjjCl_pnId, "Clouds OFF","m", "ClKill", jjjCl_crashSaveLevel < 2, "red" )
        else
                jjjLib1.addPanelToggleButton(jjjCl_plId, jjjCl_pnId, "Clouds ON","m", "ClKill", jjjCl_crashSaveLevel < 2, "green" )
        end

        -- jjjLib1.addPanelTextLine(jjjCl_plId, jjjCl_pnId, "Clouds smoothness")
        -- jjjLib1.addPanelBR(jjjCl_plId, jjjCl_pnId, 0.5)

        jjjLib1.addPanelToggleButton(jjjCl_plId, jjjCl_pnId, "PUFFIER","m", "ClPuffier", not clKill )
        jjjLib1.addPanelToggleButton(jjjCl_plId, jjjCl_pnId, "SMOOTHER","m", "ClVariety", not clKill )
        jjjLib1.addPanelToggleButton(jjjCl_plId, jjjCl_pnId, "No WHITE OUT","m", "ClNoWhtOut", not clKill and jjjCl_crashSaveLevel < 3)

        jjjLib1.addPanelHR(jjjCl_plId, jjjCl_pnId)

        jjjLib1.addPanelTextLine(jjjCl_plId, jjjCl_pnId, "Clouds lighter (less gray)")
        jjjLib1.addPanelBR(jjjCl_plId, jjjCl_pnId, 0.5)
        jjjLib1.addPanelToggleButton(jjjCl_plId, jjjCl_pnId, "","m", "ClLighter", not clKill )
        jjjLib1.addPanelSliderLegend(jjjCl_plId, jjjCl_pnId, "min", "max")
        jjjLib1.addPanelNumericInput(jjjCl_plId, jjjCl_pnId, "ClBrightness", jjjLib1.getParam(jjjCl_plId, "ClLighter") and not clKill)

        jjjLib1.addPanelTextLine(jjjCl_plId, jjjCl_pnId, "Darken clouds with precipitation propability (gray rain clouds)")
        jjjLib1.addPanelBR(jjjCl_plId, jjjCl_pnId, 0.5)
        jjjLib1.addPanelToggleButton(jjjCl_plId, jjjCl_pnId, "","m", "ClRainDark", not clKill and jjjCl_autoDarkRainEnabled)
        jjjLib1.addPanelNumericInput(jjjCl_plId, jjjCl_pnId, "ClRainDarkLvl", jjjLib1.getParam(jjjCl_plId, "ClRainDark") and not clKill)

        jjjLib1.addPanelHR(jjjCl_plId, jjjCl_pnId)

        jjjLib1.addPanelTextLine(jjjCl_plId, jjjCl_pnId, "Cloud shadows (values > 60 can cause flickering of shadows)")
        jjjLib1.addPanelBR(jjjCl_plId, jjjCl_pnId, 0.5)

        jjjLib1.addPanelToggleButton(jjjCl_plId, jjjCl_pnId, "","m", "ClShadows", not clKill )
        jjjLib1.addPanelNumericInput(jjjCl_plId, jjjCl_pnId, "ClShdDark", jjjLib1.getParam(jjjCl_plId, "ClShadows") and not clKill)


        jjjLib1.addPanelTextLine(jjjCl_plId, jjjCl_pnId, "Fade out cloud shadows when aircraft is above top clouds layer")
        jjjLib1.addPanelBR(jjjCl_plId, jjjCl_pnId, 0.5)
        jjjLib1.addPanelToggleButton(jjjCl_plId, jjjCl_pnId, "","m", "ClShdAuto", jjjLib1.getParam(jjjCl_plId, "ClShadows") and not clKill and jjjCl_autoShdOffEnabled)
        jjjLib1.addPanelTextLine(jjjCl_plId, jjjCl_pnId, "('ON' avoids shadows on aircraft above clouds)")

        if jjjCl_getDataRef("graphics/settings/HDR_on") == 1 then
                jjjLib1.addPanelHR(jjjCl_plId, jjjCl_pnId)
       
                jjjLib1.addPanelLabel(jjjCl_plId, jjjCl_pnId, "Sky colors (HDR)")
                jjjLib1.addPanelToggleButton(jjjCl_plId, jjjCl_pnId, "","m", "SkyColors", true )
        end
end

function jjjCl_togglePanel()
        jjjLib1.openPanel(jjjCl_plId, jjjCl_pnId)
end

jjjLib1.addParam(jjjCl_plId, "ClKill", {["autosave"]=true, ["dflt"]=false}, "jjjCl_setDataRefs()")
jjjLib1.addParam(jjjCl_plId, "ClNoWhtOut", {["autosave"]=true, ["dflt"]=false}, "jjjCl_setNoWhiteOut()")
jjjLib1.addParam(jjjCl_plId, "ClPuffier", {["autosave"]=true, ["dflt"]=true}, "jjjCl_setDataRefs()")
jjjLib1.addParam(jjjCl_plId, "ClVariety", {["autosave"]=true, ["dflt"]=true}, "jjjCl_setDataRefs()")
jjjLib1.addParam(jjjCl_plId, "ClLighter", {["autosave"]=true, ["dflt"]=true}, "jjjCl_setDataRefs()")
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()")
jjjLib1.addParam(jjjCl_plId, "ClRainDark", {["autosave"]=true, ["dflt"]=true}, "jjjCl_setRainDarkAuto()")
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()")
jjjLib1.addParam(jjjCl_plId, "ClShadows", {["autosave"]=true, ["dflt"]=true}, "jjjCl_setDataRefs()")
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()")
jjjLib1.addParam(jjjCl_plId, "ClShdAuto", {["autosave"]=true, ["dflt"]=false}, "jjjCl_setCldShdAuto()")
jjjLib1.addParam(jjjCl_plId, "SkyColors", {["autosave"]=true, ["dflt"]=true}, "jjjCl_setDataRefs()")


jjjCl_saveDataRef("private/controls/atmo/atmo_scale_raleigh")
jjjCl_saveDataRef("private/controls/atmo/inscatter_gain_mie")
jjjCl_saveDataRef("private/controls/atmo/inscatter_gain_raleigh")
jjjCl_saveDataRef("private/controls/atmo/scatter_raleigh_b")
jjjCl_saveDataRef("private/controls/atmo/scatter_raleigh_g")
jjjCl_saveDataRef("private/controls/atmo/scatter_raleigh_r")
jjjCl_saveDataRef("private/controls/clouds/min_res_for_shadow")
jjjCl_saveDataRef("private/controls/clouds/cloud_shadow_lighten_ratio")
jjjCl_saveDataRef("private/controls/clouds/soft_occlude")
jjjCl_saveDataRef("private/controls/clouds/limit_far")
jjjCl_saveDataRef("private/controls/clouds/first_res_3d")
jjjCl_saveDataRef("private/controls/clouds/last_res_3d")
jjjCl_saveDataRef("private/controls/clouds/light_curve_ratio")
jjjCl_saveDataRef("private/controls/clouds/diffuse_gain")
jjjCl_saveDataRef("private/controls/clouds/spec_gain")
jjjCl_saveDataRef("private/controls/cloud/sample_opacity")
jjjCl_saveDataRef("private/controls/cloud/sample_radius")

jjjLib1.loadParams(jjjCl_plId)
jjjCl_checkCloudLevels()

jjjCl_refreshPanel()

add_macro(jjjCl_pluginName .. ": open/close settings", "jjjCl_togglePanel()")
create_command("FlyWithLua/" .. jjjCl_pluginName .. "/open_settings", "open/close settings panel", "jjjCl_togglePanel()", "", "")

do_on_exit("jjjCl_restoreAllDataRefs()")
do_sometimes("jjjCl_checkCloudLevels()")
do_on_new_metar("jjjCl_checkCloudLevels()")
do_every_frame("jjjCl_main()")


fujigao82 发表于 2017-2-17 11:15:28

威斯敏斯特 发表于 2017-2-17 01:56
改了什么不记得了。反正两个文件是这样的

是哪两个文件啊?具体在哪个位置呢?感谢了!!!

v362425@163.com 发表于 2017-2-17 12:35:06

可以的,相对于P3D来说好不少

GPDAce 发表于 2017-2-17 19:58:38

XP还是很不错的

CSN8879 发表于 2017-2-17 20:15:16

这个不错!               

jimmyfang 发表于 2017-2-18 08:21:12

效果是不錯,但雲沒很明顯

威斯敏斯特 发表于 2017-2-18 10:29:30

威斯敏斯特 发表于 2017-2-17 01:56
改了什么不记得了。反正两个文件是这样的

flywithlua的script文件夹里。存成文本放进去就好了。

Mouse21 发表于 2017-2-21 11:29:29

威斯敏斯特 发表于 2017-2-16 09:50
我用的3jClouds2。但是自己改了几个参数。不太记得具体是哪几个了。但是这个是个人口味问题。你按你的口 ...

收到,马上试试,谢谢!

WK-XPLANE 发表于 2017-2-22 13:57:05

用的是啥插件??

huazhorg 发表于 2017-2-22 16:33:56

这景色已经是很逼真的了。楼主多发点这种美图啊!

wsjnt 发表于 2017-2-24 22:52:52

牛逼的天气   啊

哈士奇 发表于 2017-2-25 16:08:53

这个效国是什么效果啊

963288932ss 发表于 2017-2-25 17:29:00

LZ这张是开RTH做的吗?

Mouse21 发表于 2017-3-1 15:28:22

Mouse21 发表于 2017-2-15 15:03
不错,不错,能发个贴分享一下技术就更好了。

用了一下,感觉不错!再谢谢分享。
页: 1 [2]
查看完整版本: [XP11b10] 大家觉得这个天气怎么样?