diff --git a/Aircraft/Generic/WalkView/walkview.nas b/Aircraft/Generic/WalkView/walkview.nas index c44467216..0824dc229 100644 --- a/Aircraft/Generic/WalkView/walkview.nas +++ b/Aircraft/Generic/WalkView/walkview.nas @@ -11,7 +11,7 @@ # Global API. Automatically selects the right walker for the current view. -# NOTE: Coordinates are always 3 component lists: [x, y, z]. +# NOTE: Coordinates are always 3 component lists: [x, y, z] in meters. # The coordinate system is the same as the main 3d model one. # X - back, Y - right and Z - up. @@ -58,10 +58,17 @@ var active_walker = func { # Class for a moving view. # # CONSTRUCTOR: -# walker.new(, ); +# walker.new(, , ); # # view name ... The name of the view : string # constraints ... The movement constraints : constraint hash +# Determines where the view can go. +# managers ... Optional list of custom managers. A manager is a +# a hash that contains an update function of the type +# func(walker instance). The update function +# of each manager will be called as the last part of +# each walker update. Intended for controlling a +# a 3d model or similar. # # METHODS: # active() : bool @@ -82,7 +89,7 @@ var active_walker = func { # get_eye_height() : int (meter) # # set_constraints(constraints) -# get_constraints() : contraint hash +# get_constraints() : constraint hash # # EXAMPLE: # var constraint = @@ -95,10 +102,11 @@ var active_walker = func { # walk view should not have any other view manager. # var walker = { - new : func (view_name, constraints = nil) { + new : func (view_name, constraints = nil, managers = nil) { var obj = { parents : [walker] }; obj.view = view.views[view.indexof(view_name)]; obj.constraints = constraints; + obj.managers = managers; obj.position = [ obj.view.getNode("config/z-offset-m").getValue(), obj.view.getNode("config/x-offset-m").getValue(), @@ -108,7 +116,6 @@ var walker = { obj.view.getNode("config/heading-offset-deg").getValue(); obj.speed_fwd = 0.0; obj.speed_side = 0.0; - obj.id = 0; obj.isactive = 0; obj.eye_height = 1.60; obj.goal_height = obj.position[2] + obj.eye_height; @@ -135,7 +142,7 @@ var walker = { me.position[2] = pos[2]; }, get_pos : func { - return me.position; + return [me.position[0], me.position[1], me.position[2]]; }, set_eye_height : func (h) { me.eye_height = h; @@ -157,13 +164,11 @@ var walker = { me.last_time = getprop("/sim/time/elapsed-sec") - 0.0001; me.update(); me.position[2] = me.goal_height; - settimer(func { me._loop_(me.id); }, 0.0); }, stop : func { me.isactive = 0; - me.id += 1; }, - # Internals. + # The update function is called by the view manager when the view is active. update : func { var t = getprop("/sim/time/elapsed-sec"); var dt = t - me.last_time; @@ -173,11 +178,11 @@ var walker = { me.heading = cur.getNode("heading-offset-deg").getValue(); me.position[0] -= - me.speed_fwd * dt * math.cos(me.heading * RAD) + - me.speed_side * dt * math.sin(me.heading * RAD); + me.speed_fwd * dt * math.cos(me.heading * TO_RAD) + + me.speed_side * dt * math.sin(me.heading * TO_RAD); me.position[1] -= - me.speed_fwd * dt * math.sin(me.heading * RAD) - - me.speed_side * dt * math.cos(me.heading * RAD); + me.speed_fwd * dt * math.sin(me.heading * TO_RAD) - + me.speed_side * dt * math.cos(me.heading * TO_RAD); var cur_height = me.position[2]; if (me.constraints != nil) { @@ -198,19 +203,23 @@ var walker = { cur.getNode("x-offset-m").setValue(me.position[1]); cur.getNode("y-offset-m").setValue(me.position[2]); + if (me.managers != nil) { + foreach(var m; me.managers) { + m.update(me); + } + } + me.last_time = t; + return 0.0; }, - _loop_ : func (id) { - if (me.id != id) return; - me.update(); - settimer(func { me._loop_(id); }, 0.0); - } }; ############################################################################### -# Constraint classes. +# Constraint classes. Determines where the view can walk. -# Assumes that the constraints are convex. +# The union of two constraints. +# c1, c2 - the constraints : constraint +# NOTE: Assumes that the constraints are convex. var unionConstraint = { new : func (c1, c2) { var obj = { parents : [unionConstraint] }; @@ -236,6 +245,7 @@ var unionConstraint = { }; # Build a unionConstraint hierarchy from a list of constraints. +# cs - list of constraints : [constraint] var makeUnionConstraint = func (cs) { if (size(cs) < 2) return cs[0]; @@ -247,8 +257,8 @@ var makeUnionConstraint = func (cs) { } # Mostly aligned plane sloping along the X axis. -# minp - the X,Y minimum point -# maxp - the X,Y maximum point +# minp - the X,Y minimum point : position (meter) +# maxp - the X,Y maximum point : position (meter) var slopingYAlignedPlane = { new : func (minp, maxp) { var obj = { parents : [slopingYAlignedPlane] }; @@ -270,8 +280,8 @@ var slopingYAlignedPlane = { # Action constraint # Triggers an action when entering or exiting the constraint. -# contraint - the area in question. -# on_enter - function that is called when the walker enters the area. +# constraint - the area in question : constraint +# on_enter() - function that is called when the walker enters the area. # on_exit(x, y) - function that is called when the walker leaves the area. # x and y are <0, 0 or >0 depending on in which direction(s) # the walker left the constraint. @@ -305,11 +315,49 @@ var actionConstraint = { } }; +############################################################################### +# Manager classes. + +# JSBSim pointmass manager. +# Moves a pointmass representing the crew member together with the view. +# CONSTRUCTOR: +# JSBSimPointmass.new(); +# +# pointmass index ... The index of the pointmass : int +# offsets ... [x, y ,z] position in meter of the origin of the +# JSBSim structural frame in the 3d model frame. +# +# NOTE: Only supports aligned frames (yet). +# +var JSBSimPointmass = { + new : func (index, offsets = nil) { + var base = props.globals.getNode("fdm/jsbsim/inertia"); + var prefix = "pointmass-location-"; + var postfix = "-inches[" ~ index ~"]"; + var obj = { parents : [JSBSimPointmass] }; + obj.pos_ft = + [ + base.getNode(prefix ~ "X" ~ postfix), + base.getNode(prefix ~ "Y" ~ postfix), + base.getNode(prefix ~ "Z" ~ postfix) + ]; + obj.offset = (offsets == nil) ? [0.0, 0.0, 0.0] : offsets; + return obj; + }, + update : func (walker) { + var pos = walker.get_pos(); + pos[2] += walker.get_eye_height()/2; + forindex (var i; pos) { + me.pos_ft[i].setValue((pos[i] - me.offset[i])*M2FT*12); + } + } +}; + ############################################################################### # Module implementation below -var RAD = math.pi/180; -var DEG = 180/math.pi; +var TO_RAD = math.pi/180; +var TO_DEG = 180/math.pi; var walkers = {}; diff --git a/Aircraft/Generic/generic-autopilot.xml b/Aircraft/Generic/generic-autopilot.xml index b1806eaa4..b66fc9d49 100644 --- a/Aircraft/Generic/generic-autopilot.xml +++ b/Aircraft/Generic/generic-autopilot.xml @@ -385,7 +385,7 @@ - Altitude Hold (Altimeter based) Stage 2 + AGL Hold (Altimeter based) Stage 2 false /autopilot/locks/altitude diff --git a/Effects/crop.eff b/Effects/crop.eff index d6e39bffd..2c616ff06 100644 --- a/Effects/crop.eff +++ b/Effects/crop.eff @@ -11,11 +11,12 @@ normalized - Textures/Terrain/cropcolors.png + Textures/Terrain/crop-colors.png linear-mipmap-linear mirror normalized + /sim/rendering/snow-level-m @@ -98,6 +99,11 @@ sampler-1d 2 + + snowlevel + float + snow-level + diff --git a/Effects/cropgrass.eff b/Effects/cropgrass.eff new file mode 100644 index 000000000..72d1b554c --- /dev/null +++ b/Effects/cropgrass.eff @@ -0,0 +1,109 @@ + + + Effects/cropgrass + Effects/terrain-default + + + Textures/Terrain/cropgrass.png + linear-mipmap-linear + repeat + repeat + normalized + + + Textures/Terrain/cropgrass-colors.png + linear-mipmap-linear + mirror + normalized + + /sim/rendering/snow-level-m + + + + + /sim/rendering/crop-shader + /sim/rendering/shader-effects + + + 2.0 + + + + GL_ARB_shader_objects + GL_ARB_shading_language_100 + GL_ARB_vertex_shader + GL_ARB_fragment_shader + + + + + + true + + + material/ambient + material/diffuse + material/specular + ambient-and-diffuse + + transparent + transparent + smooth + back + + render-bin/bin-number + render-bin/bin-name + + + 0 + noise + + + 1 + texture[2]/image + texture[2]/filter + texture[2]/wrap-s + texture[2]/wrap-t + + texture[2]/internal-format + + + + 2 + 1d + texture[3]/image + texture[3]/filter + texture[3]/wrap-s + + texture[3]/internal-format + + + + Shaders/crop.vert + Shaders/crop.frag + + + NoiseTex + sampler-3d + 0 + + + SampleTex + sampler-2d + 1 + + + ColorsTex + sampler-1d + 2 + + + snowlevel + float + snow-level + + + + diff --git a/Effects/forest.eff b/Effects/forest.eff new file mode 100644 index 000000000..e189b587a --- /dev/null +++ b/Effects/forest.eff @@ -0,0 +1,205 @@ + + + Effects/forest + Effects/terrain-default + + + Textures/Terrain/rock.png + linear-mipmap-linear + repeat + repeat + normalized + + + Textures/Terrain/forest-colors.png + linear-mipmap-linear + mirror + normalized + + + Textures/Terrain/forest.png + linear-mipmap-linear + repeat + repeat + normalized + + + Textures.high/Terrain/forest-relief.png + linear-mipmap-linear + repeat + repeat + normalized + + /sim/rendering/snow-level-m + 0.04 + 15.0 + /sim/rendering/quality-level + + + 0.12 + 0.86 + 0.22 + + + + + 6 + 7 + + + + + /sim/rendering/crop-shader + /sim/rendering/shader-effects + + + 2.0 + + + + GL_ARB_shader_objects + GL_ARB_shading_language_100 + GL_ARB_vertex_shader + GL_ARB_fragment_shader + + + + + + true + + + material/ambient + material/diffuse + material/specular + ambient-and-diffuse + + transparent + transparent + smooth + back + + render-bin/bin-number + render-bin/bin-name + + + 0 + noise + + + 1 + texture[2]/image + texture[2]/filter + texture[2]/wrap-s + texture[2]/wrap-t + + texture[2]/internal-format + + + + 3 + 1d + texture[3]/image + texture[3]/filter + texture[3]/wrap-s + + texture[3]/internal-format + + + + 2 + texture[4]/image + texture[4]/filter + texture[4]/wrap-s + texture[4]/wrap-t + + texture[4]/internal-format + + + + 5 + texture[5]/image + texture[5]/filter + texture[5]/wrap-s + texture[5]/wrap-t + + texture[5]/internal-format + + + + Shaders/forest.vert + Shaders/forest.frag + + tangent + 6 + + + binormal + 7 + + + + NoiseTex + sampler-3d + 0 + + + SampleTex + sampler-2d + 1 + + + SampleTex2 + sampler-2d + 2 + + + ColorsTex + sampler-1d + 3 + + + NormalTex + sampler-2d + 5 + + + depth_factor + float + depth-factor + + + snowlevel + float + snow-level + + + quality_level + float + quality-level + + + red + float + season-red + + + green + float + season-green + + + blue + float + season-blue + + + alpha + float + 0.0 + + + + diff --git a/Effects/glacier.eff b/Effects/glacier.eff new file mode 100644 index 000000000..da9a06146 --- /dev/null +++ b/Effects/glacier.eff @@ -0,0 +1,205 @@ + + + Effects/glacier + Effects/terrain-default + + + Textures/Terrain/rock.png + linear-mipmap-linear + repeat + repeat + normalized + + + Textures/Terrain/forest-colors.png + linear-mipmap-linear + mirror + normalized + + + Textures/Terrain/forest.png + linear-mipmap-linear + repeat + repeat + normalized + + + Textures.high/Terrain/forest-relief.png + linear-mipmap-linear + repeat + repeat + normalized + + /sim/rendering/snow-level-m + 0.01 + 15.0 + /sim/rendering/quality-level + + + 0.12 + 0.86 + 0.22 + + + + + 6 + 7 + + + + + /sim/rendering/crop-shader + /sim/rendering/shader-effects + + + 2.0 + + + + GL_ARB_shader_objects + GL_ARB_shading_language_100 + GL_ARB_vertex_shader + GL_ARB_fragment_shader + + + + + + true + + + material/ambient + material/diffuse + material/specular + ambient-and-diffuse + + transparent + transparent + smooth + back + + render-bin/bin-number + render-bin/bin-name + + + 0 + noise + + + 1 + texture[2]/image + texture[2]/filter + texture[2]/wrap-s + texture[2]/wrap-t + + texture[2]/internal-format + + + + 3 + 1d + texture[3]/image + texture[3]/filter + texture[3]/wrap-s + + texture[3]/internal-format + + + + 2 + texture[4]/image + texture[4]/filter + texture[4]/wrap-s + texture[4]/wrap-t + + texture[4]/internal-format + + + + 5 + texture[5]/image + texture[5]/filter + texture[5]/wrap-s + texture[5]/wrap-t + + texture[5]/internal-format + + + + Shaders/forest.vert + Shaders/forest.frag + + tangent + 6 + + + binormal + 7 + + + + NoiseTex + sampler-3d + 0 + + + SampleTex + sampler-2d + 1 + + + SampleTex2 + sampler-2d + 2 + + + ColorsTex + sampler-1d + 3 + + + NormalTex + sampler-2d + 5 + + + depth_factor + float + depth-factor + + + snowlevel + float + snow-level + + + quality_level + float + quality-level + + + red + float + season-red + + + green + float + season-green + + + blue + float + season-blue + + + alpha + float + 0.0 + + + + diff --git a/Effects/herbtundra.eff b/Effects/herbtundra.eff new file mode 100644 index 000000000..5f97c2112 --- /dev/null +++ b/Effects/herbtundra.eff @@ -0,0 +1,205 @@ + + + Effects/herbtundra + Effects/terrain-default + + + Textures/Terrain/rock.png + linear-mipmap-linear + repeat + repeat + normalized + + + Textures/Terrain/forest-colors.png + linear-mipmap-linear + mirror + normalized + + + Textures/Terrain/forest.png + linear-mipmap-linear + repeat + repeat + normalized + + + Textures.high/Terrain/forest-relief.png + linear-mipmap-linear + repeat + repeat + normalized + + /sim/rendering/snow-level-m + 0.01 + 15.0 + + + 0.12 + 0.86 + 0.22 + + + /sim/rendering/quality-level + + + 6 + 7 + + + + + /sim/rendering/crop-shader + /sim/rendering/shader-effects + + + 2.0 + + + + GL_ARB_shader_objects + GL_ARB_shading_language_100 + GL_ARB_vertex_shader + GL_ARB_fragment_shader + + + + + + true + + + material/ambient + material/diffuse + material/specular + ambient-and-diffuse + + transparent + transparent + smooth + back + + render-bin/bin-number + render-bin/bin-name + + + 0 + noise + + + 1 + texture[2]/image + texture[2]/filter + texture[2]/wrap-s + texture[2]/wrap-t + + texture[2]/internal-format + + + + 3 + 1d + texture[3]/image + texture[3]/filter + texture[3]/wrap-s + + texture[3]/internal-format + + + + 2 + texture[4]/image + texture[4]/filter + texture[4]/wrap-s + texture[4]/wrap-t + + texture[4]/internal-format + + + + 5 + texture[5]/image + texture[5]/filter + texture[5]/wrap-s + texture[5]/wrap-t + + texture[5]/internal-format + + + + Shaders/forest.vert + Shaders/forest.frag + + tangent + 6 + + + binormal + 7 + + + + NoiseTex + sampler-3d + 0 + + + SampleTex + sampler-2d + 1 + + + SampleTex2 + sampler-2d + 2 + + + ColorsTex + sampler-1d + 3 + + + NormalTex + sampler-2d + 5 + + + depth_factor + float + depth-factor + + + snowlevel + float + snow-level + + + quality_level + float + quality-level + + + red + float + season-red + + + green + float + season-green + + + blue + float + season-blue + + + alpha + float + 0.0 + + + + diff --git a/cloudlayers.xml b/Environment/cloudlayers.xml similarity index 93% rename from cloudlayers.xml rename to Environment/cloudlayers.xml index 946873306..613f51622 100644 --- a/cloudlayers.xml +++ b/Environment/cloudlayers.xml @@ -1,4 +1,20 @@ + + + + environment/metar/clouds/layer[0]/elevation-ft + /environment/clouds/layer[0]/elevation-ft + + MetarController:clouds:altitude_interpolate + noise-spike + 8.333 + + + /environment/metar/valid + + + -9000 + + + + -9000 + + + + + + diff --git a/Environment/clouds-altitude-set.xml b/Environment/clouds-altitude-set.xml new file mode 100644 index 000000000..edd834a49 --- /dev/null +++ b/Environment/clouds-altitude-set.xml @@ -0,0 +1,43 @@ + + + + + environment/metar/clouds/layer[0]/elevation-ft + /environment/clouds/layer[0]/elevation-ft + + MetarController:clouds:altitude_set + gain + 1.0 + + + /environment/metar/valid + + + + -9000 + + + + -9000 + + + + + + + diff --git a/Environment/clouds-coverage.xml b/Environment/clouds-coverage.xml new file mode 100644 index 000000000..83e2fdbbe --- /dev/null +++ b/Environment/clouds-coverage.xml @@ -0,0 +1,37 @@ + + + + + /environment/metar/clouds/layer[0]/coverage-type + environment/clouds/layer[0]/coverage-type + + MetarController:clouds:coverage + gain + 1.0 + + + /environment/metar/valid + + + + + + + + + diff --git a/Environment/clouds-thickness.xml b/Environment/clouds-thickness.xml new file mode 100644 index 000000000..89e64573a --- /dev/null +++ b/Environment/clouds-thickness.xml @@ -0,0 +1,29 @@ + + + + MetarController:clouds:thickness + + + /environment/metar/valid + + + /environment/metar/clouds/layer[0]/thickness-ft + /environment/clouds/layer[0]/thickness-ft + noise-spike + 8.3333 + diff --git a/Environment/environment.xml b/Environment/environment.xml new file mode 100644 index 000000000..71e44e61e --- /dev/null +++ b/Environment/environment.xml @@ -0,0 +1,223 @@ + + + + + + Disabled + METAR weather generation is disabled. Use 'Weather Conditions' and 'Clouds' dialogs to setup your weather. + + + Live data + Fetch live weather data for your nearest airport from noaa.gov. You need a working internet connection. + + + Manual input + Enter your favorite METAR weather in the textbox below. A valid METAR syntax is required. + + + Fair weather + XXXX 012345Z 15003KT 12SM SCT041 FEW200 20/08 Q1015 NOSIG + A lovely day for trip to your favorite 100$ hamburger airfield + + + Thunderstorm + XXXX 012345Z 15012G25KT 4000 TSRA FEW030CB SCT035TCU 27/24 Q0995 + A hot and damp summer day with thunderstorms developing in the afternoon. + Be prepared for reduction of visibility in showers and strong gusts + near thunderstorms + + + Stormy Monday + XXXX 012345Z 28035G50KT 250V300 9999 TSRA SCT022CB BKN030 13/09 Q1005 + You're out for an adventure? Gusty winds blowing from the west + and isolated thunderstorms should be avoided. Fasten your seatbelt! + + + Marginal VFR + XXXX 012345Z 23010KT 5000 SHRA SCT012 BKN018 OVC060 15/11 Q1010 + After the storm - limited visibility and some showers. + Go or No-Go? + + + CAT I minimum + XXXX 012345Z 15015KT 0800 -RA BKN002 OVC004 08/06 Q0990 + If you just got your IFR rating, this is what you are allowed to do. But can you? + + + CAT II minimum + XXXX 012345Z 15010KT 0400 -RA BKN001 OVC002 08/06 Q0990 + With just a 1/4 mile visibility and clouds at 100ft, you don't see much of the runway until + seconds before touchdown. Trust your instruments to stay alive. + + + CAT IIIb minimum + XXXX 012345Z VRB01KT 0100 FG OVC001 OVC002 02/02 Q0990 + This is expert level. You will barely see the taxiway from the cockpit, even if you are + on ground. Fog and light drizzle, freezing level at 1000ft. + + + Fair weather + + + 500 + + + + + 0 + 270 + 3 + 16093.44 + 29.92 + 15.0 + 5.0 + + 0.2 + 0.0 + 1.0 + + 0 + 0 + + + + 500 + 280 + 6 + + 1.0 + 0.1 + 1.0 + + 5 + 0.3 + + + + + + + + 3000 + 300 + 10 + 16093.44 + 29.92 + + 0.5 + 0.05 + 1.0 + + 25 + 1 + + + + 6000 + 310 + 20 + + 0.0 + 0.0 + 1.0 + + 30 + 1.2 + + + + 9000 + 320 + 30 + 35 + 1.3 + + + + 30000 + 330 + 50 + 35 + 1.3 + + + + 40000 + 340 + 70 + 35 + 1.3 + + + + + + + + + clear + -9999 + 600 + 150 + 40000 + + + clear + -9999 + 65 + 25 + 40000 + + + clear + -9999 + 40000 + + + clear + -9999 + 40000 + + + clear + -9999 + 40000 + + + + + + + false + 240 + true + true + 30000 + + + + false + false + false + false + false + false + + + + diff --git a/Environment/interpolator.xml b/Environment/interpolator.xml new file mode 100644 index 000000000..761bb608c --- /dev/null +++ b/Environment/interpolator.xml @@ -0,0 +1,111 @@ + + + + + + + EnvironmentInterpolator:temperature-sea-level-degc + + + /environment/config/enabled + + + /environment/config/interpolated/temperature-sea-level-degc + /environment/temperature-sea-level-degc + noise-spike + 0.1667 + + + + EnvironmentInterpolator:dewpoint-sea-level-degc + + + /environment/config/enabled + + + /environment/config/interpolated/dewpoint-sea-level-degc + /environment/dewpoint-sea-level-degc + noise-spike + 0.1667 + + + + + EnvironmentInterpolator:pressure-sea-level-inhg + noise-spike + 0.03 + + + /environment/config/enabled + + + /environment/config/interpolated/pressure-sea-level-inhg + /environment/pressure-sea-level-inhg + + + + EnvironmentInterpolator:visibility-m + + + /environment/config/enabled + + + /environment/config/interpolated/visibility-m + /environment/visibility-m + exponential + 10 + + + + + EnvironmentInterpolator:wind-from-north + + + /environment/config/enabled + + + /environment/config/interpolated/wind-from-north-fps + /environment/wind-from-north-fps + exponential + 5 + + + + EnvironmentInterpolator:wind-from-east + + + /environment/config/enabled + + + /environment/config/interpolated/wind-from-east-fps + /environment/wind-from-east-fps + exponential + 5 + + + diff --git a/Environment/layer-heading-offset.xml b/Environment/layer-heading-offset.xml new file mode 100644 index 000000000..363f71560 --- /dev/null +++ b/Environment/layer-heading-offset.xml @@ -0,0 +1,36 @@ + + + + MetarController:layer:wind-from-heading-deg + gain + 1.0 + + + /environment/metar/valid + + + + /environment/config/boundary/entry[0]/wind-from-heading-deg + /environment/config/boundary/entry[1]/wind-heading-change-deg + + /environment/config/boundary/entry[1]/wind-from-heading-deg + + 0 + 360 + + diff --git a/Environment/layer-speed-change.xml b/Environment/layer-speed-change.xml new file mode 100644 index 000000000..6cce732f4 --- /dev/null +++ b/Environment/layer-speed-change.xml @@ -0,0 +1,39 @@ + + + + MetarController:layer:wind-speed-kt + gain + 1.0 + + + /environment/metar/valid + + + + + + /environment/config/boundary/entry[0]/wind-speed-kt + + /environment/config/boundary/entry[1]/wind-speed-change-rel + 1.0 + + + + + /environment/config/boundary/entry[1]/wind-speed-kt + diff --git a/Environment/metarinterpolator.xml b/Environment/metarinterpolator.xml new file mode 100644 index 000000000..35775635f --- /dev/null +++ b/Environment/metarinterpolator.xml @@ -0,0 +1,375 @@ + + + + + + + MetarController:pressure-sea-level-inhg + noise-spike + 0.0003 + + + /environment/metar/valid + + + /environment/metar/pressure-sea-level-inhg + /environment/config/boundary/entry/pressure-sea-level-inhg + /environment/config/aloft/entry/pressure-sea-level-inhg + + + + + MetarController:temperature-sea-level-degc + noise-spike + 0.01667 + + + /environment/metar/valid + + + /environment/metar/temperature-sea-level-degc + /environment/config/boundary/entry[0]/temperature-sea-level-degc + /environment/config/boundary/entry[1]/temperature-sea-level-degc + /environment/config/aloft/entry[0]/temperature-sea-level-degc + /environment/config/aloft/entry[1]/temperature-sea-level-degc + /environment/config/aloft/entry[2]/temperature-sea-level-degc + /environment/config/aloft/entry[3]/temperature-sea-level-degc + /environment/config/aloft/entry[4]/temperature-sea-level-degc + + + + + MetarController:dewpoint-sea-level-degc + noise-spike + 0.01667 + + + /environment/metar/valid + + + /environment/metar/dewpoint-sea-level-degc + /environment/config/boundary/entry[0]/dewpoint-sea-level-degc + /environment/config/boundary/entry[1]/dewpoint-sea-level-degc + /environment/config/aloft/entry[0]/dewpoint-sea-level-degc + /environment/config/aloft/entry[1]/dewpoint-sea-level-degc + /environment/config/aloft/entry[2]/dewpoint-sea-level-degc + /environment/config/aloft/entry[3]/dewpoint-sea-level-degc + /environment/config/aloft/entry[4]/dewpoint-sea-level-degc + + + + + MetarController:visibility-m + exponential + 30 + + + /environment/metar/valid + + + /environment/metar/min-visibility-m + /environment/config/boundary/entry[0]/visibility-m + /environment/config/boundary/entry[1]/visibility-m + /environment/config/aloft/entry[0]/visibility-m + /environment/config/aloft/entry[1]/visibility-m + + + + + + MetarController:wind-from-north-kt + exponential + 30 + + + /environment/metar/valid + + + + + + + /environment/metar/base-wind-dir-deg + 0.0174533 + + + + /environment/metar/base-wind-speed-kt + + /environment/metar/base-wind-from-north-kt + + + + MetarController:wind-from-east-kt + exponential + 30 + + + /environment/metar/valid + + + + + + + /environment/metar/base-wind-dir-deg + 0.0174533 + + + + /environment/metar/base-wind-speed-kt + + /environment/metar/base-wind-from-east-kt + + + + MetarController::wind-speed-kt + + + /environment/metar/valid + + + + + + + + + /environment/metar/base-wind-from-east-kt + /environment/metar/base-wind-from-east-kt + + + /environment/metar/base-wind-from-north-kt + /environment/metar/base-wind-from-north-kt + + + + + + /environment/config/boundary/entry[0]/wind-speed-kt + gain + 1.0 + + + + MetarController:wind-from-heading-deg + + + /environment/metar/valid + + + + + + /environment/metar/base-wind-from-east-kt + /environment/metar/base-wind-from-north-kt + + + + /environment/config/boundary/entry[0]/wind-from-heading-deg + gain + 57.3 + + 0 + 360 + + + + + + + + + /environment/config/aloft/entry[0]/wind-heading-change-deg + + /environment/config/aloft/entry[0]/wind-from-heading-deg + + + + /environment/config/aloft/entry[1]/wind-heading-change-deg + + /environment/config/aloft/entry[1]/wind-from-heading-deg + + + + /environment/config/aloft/entry[2]/wind-heading-change-deg + + /environment/config/aloft/entry[2]/wind-from-heading-deg + + + + /environment/config/aloft/entry[3]/wind-heading-change-deg + + /environment/config/aloft/entry[3]/wind-from-heading-deg + + + + /environment/config/aloft/entry[4]/wind-heading-change-deg + + /environment/config/aloft/entry[4]/wind-from-heading-deg + + + + + + /environment/config/aloft/entry[0]/wind-speed-change-rel + + /environment/config/aloft/entry[0]/wind-speed-kt + + + + /environment/config/aloft/entry[1]/wind-speed-change-rel + + /environment/config/aloft/entry[1]/wind-speed-kt + + + + /environment/config/aloft/entry[2]/wind-speed-change-rel + + /environment/config/aloft/entry[2]/wind-speed-kt + + + + /environment/config/aloft/entry[3]/wind-speed-change-rel + + /environment/config/aloft/entry[3]/wind-speed-kt + + + + /environment/config/aloft/entry[4]/wind-speed-change-rel + + /environment/config/aloft/entry[4]/wind-speed-kt + + + + + + + + /environment/metar/clouds/layer[1]/elevation-ft + /environment/clouds/layer[1]/elevation-ft + + + + + /environment/metar/clouds/layer[2]/elevation-ft + /environment/clouds/layer[2]/elevation-ft + + + + + /environment/metar/clouds/layer[3]/elevation-ft + /environment/clouds/layer[3]/elevation-ft + + + + + /environment/metar/clouds/layer[4]/elevation-ft + /environment/clouds/layer[4]/elevation-ft + + + + + + + /environment/metar/clouds/layer[1]/elevation-ft + /environment/clouds/layer[1]/elevation-ft + + + + + /environment/metar/clouds/layer[2]/elevation-ft + /environment/clouds/layer[2]/elevation-ft + + + + + /environment/metar/clouds/layer[3]/elevation-ft + /environment/clouds/layer[3]/elevation-ft + + + + + /environment/metar/clouds/layer[4]/elevation-ft + /environment/clouds/layer[4]/elevation-ft + + + + + + /environment/metar/clouds/layer[1]/thickness-ft + /environment/clouds/layer[1]/thickness-ft + + + /environment/metar/clouds/layer[2]/thickness-ft + /environment/clouds/layer[2]/thickness-ft + + + /environment/metar/clouds/layer[3]/thickness-ft + /environment/clouds/layer[3]/thickness-ft + + + /environment/metar/clouds/layer[4]/thickness-ft + /environment/clouds/layer[4]/thickness-ft + + + + + + /environment/metar/clouds/layer[1]/coverage-type + environment/clouds/layer[1]/coverage-type + + + + + /environment/metar/clouds/layer[2]/coverage-type + environment/clouds/layer[2]/coverage-type + + + + + /environment/metar/clouds/layer[3]/coverage-type + environment/clouds/layer[3]/coverage-type + + + + + /environment/metar/clouds/layer[4]/coverage-type + environment/clouds/layer[4]/coverage-type + + + diff --git a/Nasal/IOrules b/Nasal/IOrules index 61e902507..1c0face2a 100644 --- a/Nasal/IOrules +++ b/Nasal/IOrules @@ -27,6 +27,7 @@ READ ALLOW $FG_ROOT/* READ ALLOW $FG_HOME/* +READ ALLOW $FG_AIRCRAFT/* WRITE ALLOW /tmp/*.xml WRITE ALLOW $FG_HOME/*.sav diff --git a/Nasal/aircraft.nas b/Nasal/aircraft.nas index c12881ef7..4c8580abc 100644 --- a/Nasal/aircraft.nas +++ b/Nasal/aircraft.nas @@ -606,7 +606,7 @@ var overlay_update = { return m; }, add: func(path, prop, callback = nil) { - var path = string.normpath(getprop("/sim/fg-root") ~ '/' ~ path) ~ '/'; + var path = path ~ '/'; me.data[path] = [me.root.initNode(prop, ""), "", typeof(callback) == "func" ? callback : func nil]; return me; diff --git a/Nasal/gui.nas b/Nasal/gui.nas index 11105b955..ea098f99a 100644 --- a/Nasal/gui.nas +++ b/Nasal/gui.nas @@ -287,7 +287,7 @@ var Dialog = { me.close(); me.prop.removeChildren(); - io.read_properties(getprop("/sim/fg-root") ~ "/" ~ me.path, me.prop); + io.read_properties(me.path, me.prop); var n = me.prop.getNode("name"); if (n == nil) @@ -372,8 +372,10 @@ var OverlaySelector = { var m = Dialog.new(data.getNode("dialog", 1), "gui/dialogs/overlay-select.xml", name); m.parents = [OverlaySelector, Dialog]; - - m.dir = string.normpath(getprop("/sim/fg-root") ~ '/' ~ dir) ~ '/'; + + # resolve the path in FG_ROOT, and --fg-aircraft dir, etc + m.dir = resolvepath(dir) ~ "/"; + var relpath = func(p) substr(p, p[0] == `/`); m.nameprop = relpath(nameprop); m.sortprop = relpath(sortprop or nameprop); diff --git a/Nasal/io.nas b/Nasal/io.nas index cea2f75f9..41d5d7fc9 100644 --- a/Nasal/io.nas +++ b/Nasal/io.nas @@ -235,11 +235,26 @@ _setlistener("/sim/signals/nasal-dir-initialized", func { var pattern = f[2]; foreach (var p; subvec(f, 3)) pattern ~= " " ~ p; - if (substr(pattern, 0, 9) == "$FG_ROOT/") - pattern = root ~ "/" ~ substr(pattern, 9); - elsif (substr(pattern, 0, 9) == "$FG_HOME/") - pattern = home ~ "/" ~ substr(pattern, 9); - append(f[0] == "READ" ? read_rules : write_rules, [pattern, f[1] == "ALLOW"]); + var rules = f[0] == "READ" ? read_rules : write_rules; + var allow = (f[1] == "ALLOW"); + + if (substr(pattern, 0, 13) == "$FG_AIRCRAFT/") { + var p = substr(pattern, 13); + var sim = props.globals.getNode("/sim"); + foreach (var c; sim.getChildren("fg-aircraft")) { + pattern = c.getValue() ~ "/" ~ p; + append(rules, [pattern, allow]); + printlog("info", "IORules: appending ", pattern); + } + } else { + if (substr(pattern, 0, 9) == "$FG_ROOT/") + pattern = root ~ "/" ~ substr(pattern, 9); + elsif (substr(pattern, 0, 9) == "$FG_HOME/") + pattern = home ~ "/" ~ substr(pattern, 9); + + append(rules, [pattern, allow]); + printlog("info", "IORules: appending ", pattern); + } } close(file); return path; diff --git a/Nasal/tutorial.nas b/Nasal/tutorial.nas index d3941d231..e5c9b82ae 100644 --- a/Nasal/tutorial.nas +++ b/Nasal/tutorial.nas @@ -468,7 +468,7 @@ var dialog = func { # var load = func(file, index = 0) { props.globals.getNode("/sim/tutorials", 1).removeChild("tutorial", index); - io.read_properties(getprop("/sim/fg-root") ~ "/" ~ file, "/sim/tutorials/tutorial[" ~ index ~ "]/"); + io.read_properties(file, "/sim/tutorials/tutorial[" ~ index ~ "]/"); } diff --git a/Shaders/crop.frag b/Shaders/crop.frag index d9d50f3e5..555e673a2 100644 --- a/Shaders/crop.frag +++ b/Shaders/crop.frag @@ -4,25 +4,20 @@ varying vec4 rawpos; varying vec4 ecPosition; varying vec3 VNormal; varying vec3 Normal; -varying vec4 constantColor; uniform sampler3D NoiseTex; uniform sampler2D SampleTex; uniform sampler1D ColorsTex; -const float scale = 1.0; +uniform float snowlevel; // From /sim/rendering/snow-level-m -const vec4 red = vec4(1.0, 0.0, 0.0, 1.0); -const vec4 green = vec4(0.0, 1.0, 0.0, 1.0); -const vec4 blue = vec4(0.0, 0.0, 1.0, 1.0); -const vec4 yellow = vec4(1.0, 1.0, 0.0, 1.0); +const float scale = 1.0; #define BLA 1 #define BLA2 0 void main (void) { - const float snowlevel=2000.0; vec4 basecolor = texture2D(SampleTex, rawpos.xy*0.000144); basecolor = texture1D(ColorsTex, basecolor.r+0.00); @@ -54,13 +49,15 @@ void main (void) // good vec4 c1; c1 = basecolor * vec4(smoothstep(0.0, 1.15, n), smoothstep(0.0, 1.2, n), smoothstep(0.1, 1.3, n), 1.0); + //"steep = gray" c1 = mix(vec4(n-0.42, n-0.44, n-0.51, 1.0), c1, smoothstep(0.970, 0.990, abs(normalize(Normal).z)+nvL[2]*1.3)); + //"snow" c1 = mix(c1, clamp(n+nvL[2]*4.1+vec4(0.1, 0.1, nvL[2]*2.2, 1.0), 0.7, 1.0), smoothstep(snowlevel+300.0, snowlevel+360.0, (rawpos.z)+nvL[1]*3000.0)); vec3 diffuse = gl_Color.rgb * max(0.0, dot(VNormal, gl_LightSource[0].position.xyz)); - vec4 ambient_light = constantColor + gl_LightSource[0].diffuse * vec4(diffuse, 1.0); + vec4 ambient_light = gl_LightSource[0].diffuse * vec4(diffuse, 1.0); c1 *= ambient_light; vec4 finalColor = c1; diff --git a/Shaders/crop.vert b/Shaders/crop.vert index 50bdc1f85..b5c7314a5 100644 --- a/Shaders/crop.vert +++ b/Shaders/crop.vert @@ -1,23 +1,19 @@ #version 120 -varying vec4 rawpos; -varying vec4 ecPosition; -varying vec3 VNormal; -varying vec3 Normal; -varying vec4 constantColor; -centroid varying vec4 ipos; +varying vec4 rawpos; +varying vec4 ecPosition; +varying vec3 VNormal; +varying vec3 Normal; void main(void) { gl_TexCoord[0] = gl_MultiTexCoord0; - rawpos = gl_Vertex; - ipos = gl_Vertex; + rawpos = gl_Vertex; ecPosition = gl_ModelViewMatrix * gl_Vertex; VNormal = normalize(gl_NormalMatrix * gl_Normal); Normal = normalize(gl_Normal); - gl_FrontColor = gl_Color; - constantColor = gl_FrontMaterial.emission - + gl_Color * (gl_LightModel.ambient + gl_LightSource[0].ambient); + + gl_FrontColor = gl_Color; gl_Position = ftransform(); -} +} \ No newline at end of file diff --git a/Shaders/forest.frag b/Shaders/forest.frag new file mode 100644 index 000000000..4641a8000 --- /dev/null +++ b/Shaders/forest.frag @@ -0,0 +1,188 @@ +#version 120 + +varying vec4 rawpos; +varying vec4 ecPosition; +varying vec3 VTangent; +varying vec3 VBinormal; +varying vec3 VNormal; +varying vec3 Normal; +varying float bump; + +uniform sampler3D NoiseTex; +uniform sampler2D SampleTex; +uniform sampler1D ColorsTex; +uniform sampler2D SampleTex2; +uniform sampler2D NormalTex; +uniform float depth_factor; + +uniform float red, green, blue, alpha; + +uniform float quality_level; // From /sim/rendering/quality-level +uniform float snowlevel; // From /sim/rendering/snow-level-m + +const float scale = 1.0; +int linear_search_steps = 10; + +float ray_intersect(sampler2D reliefMap, vec2 dp, vec2 ds) +{ + + float size = 1.0 / float(linear_search_steps); + float depth = 0.0; + float best_depth = 1.0; + + for(int i = 0; i < linear_search_steps - 1; ++i) + { + depth += size; + float t = texture2D(reliefMap, dp + ds * depth).a; + if(best_depth > 0.996) + if(depth >= t) + best_depth = depth; + } + depth = best_depth; + + const int binary_search_steps = 5; + + for(int i = 0; i < binary_search_steps; ++i) + { + size *= 0.5; + float t = texture2D(reliefMap, dp + ds * depth).a; + if(depth >= t) + { + best_depth = depth; + depth -= 2.0 * size; + } + depth += size; + } + + return(best_depth); +} + + +void main (void) +{ + + if ( quality_level >= 3.5 ) { + linear_search_steps = 20; + } + vec2 uv, dp, ds; + vec3 N; + float d; + if ( bump > 0.9 && quality_level >= 2.0 ) + { + vec3 V = normalize(ecPosition.xyz); + float a = dot(VNormal, -V); + vec2 s = vec2(dot(V, VTangent), dot(V, VBinormal)); + s *= depth_factor / a; + ds = s; + dp = gl_TexCoord[0].st; + d = ray_intersect(NormalTex, dp, ds); + + uv = dp + ds * d; + N = texture2D(NormalTex, uv).xyz * 2.0 - 1.0; + } + else + { + uv = gl_TexCoord[0].st; + N = vec3(0.0, 0.0, 1.0); + } + + + vec4 basecolor = texture2D(SampleTex, rawpos.xy*0.000344); + vec4 basecolor2 = texture2D(SampleTex2, rawpos.xy*0.000144); + + basecolor = texture1D(ColorsTex, basecolor.r+0.0); + + vec4 noisevec = texture3D(NoiseTex, (rawpos.xyz)*0.01*scale); + + vec4 nvL = texture3D(NoiseTex, (rawpos.xyz)*0.00066*scale); + + float vegetationlevel = (rawpos.z)+nvL[2]*3000.0; + + float fogFactor; + float fogCoord = ecPosition.z; + const float LOG2 = 1.442695; + fogFactor = exp2(-gl_Fog.density * gl_Fog.density * fogCoord * fogCoord * LOG2); + float biasFactor = exp2(-0.00000002 * fogCoord * fogCoord * LOG2); + + float n=0.06; + n += nvL[0]*0.4; + n += nvL[1]*0.6; + n += nvL[2]*2.0; + n += nvL[3]*4.0; + n += noisevec[0]*0.1; + n += noisevec[1]*0.4; + + n += noisevec[2]*0.8; + n += noisevec[3]*2.1; + n = mix(0.6, n, biasFactor); + + vec4 c1; + c1 = basecolor * vec4(smoothstep(-1.3, 0.5, n), smoothstep(-1.3, 0.5, n), smoothstep(-2.0, 0.9, n), 0.0); + + vec4 c2; + c2 = basecolor2 * vec4(smoothstep(-1.3, 0.5, n), smoothstep(-1.3, 0.5, n), smoothstep(-2.0, 0.9, n), 0.0); + + N = normalize(N.x * VTangent + N.y * VBinormal + N.z * VNormal); + vec3 l = gl_LightSource[0].position.xyz; + vec3 diffuse; + + //draw floor where !steep, and another blurb for smoothing transitions + vec4 c3, c4, c5, c3a, c4a, c5a; + float subred = 1.0 - red; float subgreen = 1.0 - green; float subblue = 1.0 - blue; + c3 = mix(vec4(n-subred, n-subgreen, -n-subblue, 0.0), c1, smoothstep(0.990, 0.970, abs(normalize(Normal).z)+nvL[2]*1.3)); + c4 = mix(vec4(n-subred, n-subgreen-0.6, -n-subblue, 0.0), c1, smoothstep(0.990, 0.890, abs(normalize(Normal).z)+nvL[2]*0.9)); + c4a = mix(vec4(n-subred+0.12, n-subgreen-0.52, -n-subblue, 0.3), c1, smoothstep(0.990, 0.970, abs(normalize(Normal).z)+nvL[2]*1.32)); + c5 = mix(c3, c4, 1.0); + c5a = mix(c3, c4a, 1.0); + + + if (vegetationlevel <= 2200) { + c1 = mix(c2, c5, clamp(0.65, n*0.1, 0.5)); + diffuse = gl_Color.rgb * max(0.7, dot(N, l)) * max(0.9, dot(VNormal, gl_LightSource[0].position.xyz)); + } + + if (vegetationlevel > 2200 && vegetationlevel < 2300) { + c1 = mix(c2, c5, clamp(0.65, n*0.5, 0.35)); + diffuse = gl_Color.rgb * max(0.7, dot(N, l)) * max(0.9, dot(VNormal, gl_LightSource[0].position.xyz)); + } + + if (vegetationlevel >= 2300 && vegetationlevel < 2480) { + c1 = mix(c2, c5a, clamp(0.65, n*0.5, 0.30)); + diffuse = gl_Color.rgb * max(0.85, dot(N, l)) * max(0.9, dot(VNormal, gl_LightSource[0].position.xyz)); + } + + if (vegetationlevel >= 2480 && vegetationlevel < 2530) { + c1 = mix(c2, c5a, clamp(0.65, n*0.5, 0.20)); + diffuse = gl_Color.rgb * max(0.85, dot(N, l)) * max(0.9, dot(VNormal, gl_LightSource[0].position.xyz)); + } + + if (vegetationlevel >= 2530 && vegetationlevel < 2670) { + c1 = mix(c2, c5, clamp(0.65, n*0.5, 0.10)); + diffuse = gl_Color.rgb * max(0.85, dot(N, l)) * max(0.9, dot(VNormal, gl_LightSource[0].position.xyz)); + } + + if (vegetationlevel >= 2670) { + c1 = mix(c2, c5, clamp(0.0, n*0.1, 0.4)); + diffuse = gl_Color.rgb * max(0.85, dot(N, l)) * max(0.9, dot(VNormal, gl_LightSource[0].position.xyz)); + } + + + //adding snow and permanent snow/glacier + if (vegetationlevel > snowlevel || vegetationlevel > 3100) { + c3 = mix(vec4(n+1.0, n+1.0, n+1.0, 0.0), c1, smoothstep(0.990, 0.965, abs(normalize(Normal).z)+nvL[2]*1.3)); + c4 = mix(vec4(n+1.0, n+1.0, n+1.0, 0.0), c1, smoothstep(0.990, 0.965, abs(normalize(Normal).z)+nvL[2]*0.9)); + c5 = mix(c3, c4, 1.0); + c1 = mix(c1, c5, clamp(0.65, n*0.5, 0.6)); + diffuse = gl_Color.rgb * max(0.8, dot(N, l)) * max(0.9, dot(VNormal, gl_LightSource[0].position.xyz)); + } + + vec4 ambient_light = gl_LightSource[0].diffuse * vec4(diffuse, 0.0); + + c1 *= ambient_light; + vec4 finalColor = c1; + + if(gl_Fog.density == 1.0) + fogFactor=1.0; + + gl_FragColor = mix(gl_Fog.color,finalColor, fogFactor); +} diff --git a/Shaders/forest.vert b/Shaders/forest.vert new file mode 100644 index 000000000..de27c5ac3 --- /dev/null +++ b/Shaders/forest.vert @@ -0,0 +1,28 @@ +varying vec4 rawpos; +varying vec4 ecPosition; +varying vec3 VNormal; +varying vec3 VTangent; +varying vec3 VBinormal; +varying vec3 Normal; +varying vec4 constantColor; +varying float bump; + +attribute vec3 tangent; +attribute vec3 binormal; + +void main(void) +{ + rawpos = gl_Vertex; + ecPosition = gl_ModelViewMatrix * rawpos; + Normal = normalize(gl_Normal); + VNormal = gl_NormalMatrix * gl_Normal; + VTangent = gl_NormalMatrix * tangent; + VBinormal = gl_NormalMatrix * binormal; + bump = 1.0; + + gl_FrontColor = gl_Color; + constantColor = gl_FrontMaterial.emission + + gl_FrontColor * (gl_LightModel.ambient + gl_LightSource[0].ambient); + gl_Position = ftransform(); + gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0; +} diff --git a/Shaders/urban.frag b/Shaders/urban.frag index bef3e6a29..1638f94da 100644 --- a/Shaders/urban.frag +++ b/Shaders/urban.frag @@ -101,7 +101,7 @@ void main (void) ambient_light = constantColor + gl_LightSource[0].diffuse * shadow_factor * vec4(diffuse, 1.0); float emission_factor = (1.0 - smoothstep(0.15, 0.25, reflectance)) * emis; vec4 tc = texture2D(BaseTex, uv); - emission_factor *= 0.5*pow(tc.r+0.8*tc.g+0.2*tc.b, 2) -0.2; + emission_factor *= 0.5*pow(tc.r+0.8*tc.g+0.2*tc.b, 2.0) -0.2; ambient_light += (emission_factor * vec4(night_color, 0.0)); float fogFactor; diff --git a/Textures/Terrain/cropcolors.png b/Textures/Terrain/crop-colors.png similarity index 100% rename from Textures/Terrain/cropcolors.png rename to Textures/Terrain/crop-colors.png diff --git a/Textures/Terrain/cropgrass-colors.png b/Textures/Terrain/cropgrass-colors.png new file mode 100644 index 000000000..edf0d9f51 Binary files /dev/null and b/Textures/Terrain/cropgrass-colors.png differ diff --git a/Textures/Terrain/cropgrass.png b/Textures/Terrain/cropgrass.png index 5a26033a1..81c53c281 100644 Binary files a/Textures/Terrain/cropgrass.png and b/Textures/Terrain/cropgrass.png differ diff --git a/Textures/Terrain/forest-colors.png b/Textures/Terrain/forest-colors.png new file mode 100644 index 000000000..356b39d09 Binary files /dev/null and b/Textures/Terrain/forest-colors.png differ diff --git a/Textures/Terrain/forest.png b/Textures/Terrain/forest.png new file mode 100644 index 000000000..c285cda61 Binary files /dev/null and b/Textures/Terrain/forest.png differ diff --git a/Textures/Terrain/glacier.png b/Textures/Terrain/glacier.png index fbdae1358..88fac8c1e 100644 Binary files a/Textures/Terrain/glacier.png and b/Textures/Terrain/glacier.png differ diff --git a/Textures/Terrain/rock-colors.png b/Textures/Terrain/rock-colors.png new file mode 100644 index 000000000..473dd71ab Binary files /dev/null and b/Textures/Terrain/rock-colors.png differ diff --git a/Textures/Terrain/rock.png b/Textures/Terrain/rock.png index f2c6a7d77..c285cda61 100644 Binary files a/Textures/Terrain/rock.png and b/Textures/Terrain/rock.png differ diff --git a/materials.xml b/materials.xml index 8e41fbfd9..5f990123f 100644 --- a/materials.xml +++ b/materials.xml @@ -708,7 +708,7 @@ Shared parameters for various materials. EvergreenBroadCover EvergreenForest - Effects/landmass + Effects/forest Terrain/forest1a.png Terrain/forest1b.png Terrain/forest1c.png @@ -720,7 +720,7 @@ Shared parameters for various materials. 8 25.0 - 15.0 + 18.0 1 1 @@ -732,7 +732,7 @@ Shared parameters for various materials. summer - Effects/landmass + Effects/forest DeciduousBroadCover DeciduousForest Bog @@ -759,7 +759,7 @@ Shared parameters for various materials. summer - Effects/landmass + Effects/forest MixedForestCover MixedForest RainForest @@ -786,7 +786,7 @@ Shared parameters for various materials. summer - Effects/landmass + Effects/forest EvergreenNeedleCover WoodedTundraCover Terrain/evergreen.png @@ -810,7 +810,7 @@ Shared parameters for various materials. summer - Effects/landmass + Effects/forest DeciduousNeedleCover Terrain/dec_evergreen.png 1000 @@ -1200,7 +1200,7 @@ Shared parameters for various materials. HerbTundraCover - Effects/landmass-nowood + Effects/herbtundra Terrain/herbtundra.png Terrain/herbtundra2.png Terrain/herbtundra3.png @@ -1474,7 +1474,7 @@ Shared parameters for various materials. summer - Effects/crop + Effects/cropgrass CropGrassCover CropGrass Terrain/cropgrass1.png @@ -2383,6 +2383,7 @@ Shared parameters for various materials. Glacier PolarIce + Effects/glacier Terrain/glacier1.png Terrain/glacier2.png Terrain/glacier3.png diff --git a/preferences.xml b/preferences.xml index 4aa2818ca..c3f8c3327 100644 --- a/preferences.xml +++ b/preferences.xml @@ -663,212 +663,7 @@ Started September 2000 by David Megginson, david@megginson.com - - - - Disabled - METAR weather generation is disabled. Use 'Weather Conditions' and 'Clouds' dialogs to setup your weather. - - - Live data - Fetch live weather data for your nearest airport from noaa.gov. You need a working internet connection. - - - Manual input - Enter your favorite METAR weather in the textbox below. A valid METAR syntax is required. - - - Fair weather - XXXX 012345Z 15003KT 12SM SCT041 FEW200 20/08 Q1015 NOSIG - A lovely day for trip to your favorite 100$ hamburger airfield - - - Thunderstorm - XXXX 012345Z 15012G25KT 4000 TSRA FEW030CB SCT035TCU 27/24 Q0995 - A hot and damp summer day with thunderstorms developing in the afternoon. - Be prepared for reduction of visibility in showers and strong gusts - near thunderstorms - - - Stormy Monday - XXXX 012345Z 28035G50KT 9999 TSRA SCT022CB BKN030 13/09 Q1005 - You're out for an adventure? Gusty winds blowing from the west - and isolated thunderstorms should be avoided. Fasten your seatbelt! - - - Marginal VFR - XXXX 012345Z 23010KT 5000 SHRA SCT012 BKN018 OVC060 15/11 Q1010 - After the storm - limited visibility and some showers. - Go or No-Go? - - - CAT I minimum - XXXX 012345Z 15015KT 0800 -RA BKN002 OVC004 08/06 Q0990 - If you just got your IFR rating, this is what you are allowed to do. But can you? - - - CAT II minimum - XXXX 012345Z 15010KT 0400 -RA BKN001 OVC002 08/06 Q0990 - With just a 1/4 mile visibility and clouds at 100ft, you don't see much of the runway until - seconds before touchdown. Trust your instruments to stay alive. - - - CAT IIIb minimum - XXXX 012345Z VRB01KT 0100 FG OVC001 OVC002 02/02 Q0990 - This is expert level. You will barely see the taxiway from the cockpit, even if you are - on ground. Fog and light drizzle, freezing level at 1000ft. - - - Fair weather - - - 500 - - - - - 0 - 270 - 3 - 16093.44 - 29.92 - 15.0 - 5.0 - - 0.2 - 0.0 - 1.0 - - 0 - 0 - - - - 500 - 280 - 6 - - 1.0 - 0.1 - 1.0 - - 5 - 0.3 - - - - - - - - 3000 - 300 - 10 - 16093.44 - 29.92 - - - - 0.5 - 0.05 - 1.0 - - 25 - 1 - - - - 6000 - 310 - 20 - - 0.0 - 0.0 - 1.0 - - 30 - 1.2 - - - - 9000 - 320 - 30 - 35 - 1.3 - - - - 30000 - 330 - 50 - 35 - 1.3 - - - - 40000 - 340 - 70 - 35 - 1.3 - - - - - - - - true - - clear - 4000 - 600 - 150 - 40000 - - - clear - 19500 - 65 - 25 - 40000 - - - clear - 40000 - - - clear - 40000 - - - clear - 40000 - - - - - - - false - 240 - true - true - 30000 - - - - false - false - false - false - false - false - - - - +