add config comment
This commit is contained in:
@@ -216,7 +216,7 @@ shader_parameter/fade_end = 800.000035625
|
||||
shader_parameter/height_fade_start = 10.0
|
||||
shader_parameter/height_fade_end = 50.0
|
||||
|
||||
[node name="EnvironmentManager" type="Node3D" unique_id=1611939731 node_paths=PackedStringArray("particles_wind", "particles_snow", "particles_fireflies", "particles_rain", "fog_overlay", "environment_dust", "blur", "environment_shadows")]
|
||||
[node name="EnvironmentManager" type="Node3D" unique_id=1611939731 node_paths=PackedStringArray("particles_wind", "particles_snow", "particles_fireflies", "particles_rain", "environment_dust", "blur", "environment_shadows")]
|
||||
script = ExtResource("1_wecen")
|
||||
environment_config = SubResource("Resource_r4tfj")
|
||||
particles_wind = NodePath("Particles_Wind")
|
||||
@@ -224,7 +224,6 @@ particles_snow = NodePath("Particles_Snow")
|
||||
particles_fireflies = NodePath("Particles_Fireflies")
|
||||
particles_rain = NodePath("Particles_Rain")
|
||||
godray = ExtResource("5_411rw")
|
||||
fog_overlay = NodePath("")
|
||||
environment_dust = NodePath("EnvironmentDust")
|
||||
blur = NodePath("Blur")
|
||||
environment_shadows = NodePath("EnvironmentCloudsShadows")
|
||||
@@ -287,3 +286,5 @@ mouse_filter = 2
|
||||
extra_cull_margin = 16384.0
|
||||
mesh = SubResource("QuadMesh_sxgg7")
|
||||
surface_material_override/0 = SubResource("ShaderMaterial_oqt1s")
|
||||
|
||||
[node name="AudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="." unique_id=902982869]
|
||||
|
||||
@@ -12,14 +12,17 @@ extends Node3D
|
||||
@export var particles_fireflies: GPUParticles3D
|
||||
@export var particles_rain: GPUParticles3D
|
||||
@export var godray: PackedScene
|
||||
@export var fog_overlay: ColorRect
|
||||
@export var environment_dust: ColorRect
|
||||
@export var blur: ColorRect
|
||||
@export var environment_shadows: MeshInstance3D
|
||||
|
||||
@export_group("Sound")
|
||||
@export var thunder_sounds: Array[AudioStream]
|
||||
|
||||
#environment nodes
|
||||
@onready var sun: DirectionalLight3D = $"../DirectionalLight3D"
|
||||
@onready var environment: WorldEnvironment = $"../WorldEnvironment"
|
||||
@onready var audio_player: AudioStreamPlayer3D = $AudioStreamPlayer3D
|
||||
|
||||
var day_night_controller: DayNightController
|
||||
var weather_controller: WeatherController
|
||||
@@ -49,14 +52,15 @@ func _ready() -> void:
|
||||
particles_fireflies,
|
||||
particles_rain,
|
||||
godray,
|
||||
fog_overlay,
|
||||
environment_dust,
|
||||
blur,
|
||||
environment_shadows,
|
||||
sun,
|
||||
environment,
|
||||
environment_config,
|
||||
camera
|
||||
camera,
|
||||
audio_player,
|
||||
thunder_sounds
|
||||
)
|
||||
weather_controller.name = "WeatherController"
|
||||
add_child(weather_controller)
|
||||
|
||||
BIN
core/daynight/sound/thunder_1.mp3
Normal file
BIN
core/daynight/sound/thunder_1.mp3
Normal file
Binary file not shown.
19
core/daynight/sound/thunder_1.mp3.import
Normal file
19
core/daynight/sound/thunder_1.mp3.import
Normal file
@@ -0,0 +1,19 @@
|
||||
[remap]
|
||||
|
||||
importer="mp3"
|
||||
type="AudioStreamMP3"
|
||||
uid="uid://bfn6kxtpb8b7a"
|
||||
path="res://.godot/imported/thunder_1.mp3-5dfac75637d4484715fa2c52227bbb39.mp3str"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://core/daynight/sound/thunder_1.mp3"
|
||||
dest_files=["res://.godot/imported/thunder_1.mp3-5dfac75637d4484715fa2c52227bbb39.mp3str"]
|
||||
|
||||
[params]
|
||||
|
||||
loop=false
|
||||
loop_offset=0
|
||||
bpm=0
|
||||
beat_count=0
|
||||
bar_beats=4
|
||||
BIN
core/daynight/sound/thunder_2.mp3
Normal file
BIN
core/daynight/sound/thunder_2.mp3
Normal file
Binary file not shown.
19
core/daynight/sound/thunder_2.mp3.import
Normal file
19
core/daynight/sound/thunder_2.mp3.import
Normal file
@@ -0,0 +1,19 @@
|
||||
[remap]
|
||||
|
||||
importer="mp3"
|
||||
type="AudioStreamMP3"
|
||||
uid="uid://br2ye0dto487h"
|
||||
path="res://.godot/imported/thunder_2.mp3-e0bc5cdbb7a7380e5c0e7af073c47559.mp3str"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://core/daynight/sound/thunder_2.mp3"
|
||||
dest_files=["res://.godot/imported/thunder_2.mp3-e0bc5cdbb7a7380e5c0e7af073c47559.mp3str"]
|
||||
|
||||
[params]
|
||||
|
||||
loop=false
|
||||
loop_offset=0
|
||||
bpm=0
|
||||
beat_count=0
|
||||
bar_beats=4
|
||||
BIN
core/daynight/sound/thunder_3.mp3
Normal file
BIN
core/daynight/sound/thunder_3.mp3
Normal file
Binary file not shown.
19
core/daynight/sound/thunder_3.mp3.import
Normal file
19
core/daynight/sound/thunder_3.mp3.import
Normal file
@@ -0,0 +1,19 @@
|
||||
[remap]
|
||||
|
||||
importer="mp3"
|
||||
type="AudioStreamMP3"
|
||||
uid="uid://dvabvoqyya0g5"
|
||||
path="res://.godot/imported/thunder_3.mp3-2057b93f6a6b1db545b448579512d302.mp3str"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://core/daynight/sound/thunder_3.mp3"
|
||||
dest_files=["res://.godot/imported/thunder_3.mp3-2057b93f6a6b1db545b448579512d302.mp3str"]
|
||||
|
||||
[params]
|
||||
|
||||
loop=false
|
||||
loop_offset=0
|
||||
bpm=0
|
||||
beat_count=0
|
||||
bar_beats=4
|
||||
BIN
core/daynight/sound/thunder_4.mp3
Normal file
BIN
core/daynight/sound/thunder_4.mp3
Normal file
Binary file not shown.
19
core/daynight/sound/thunder_4.mp3.import
Normal file
19
core/daynight/sound/thunder_4.mp3.import
Normal file
@@ -0,0 +1,19 @@
|
||||
[remap]
|
||||
|
||||
importer="mp3"
|
||||
type="AudioStreamMP3"
|
||||
uid="uid://creenugno7hm"
|
||||
path="res://.godot/imported/thunder_4.mp3-ab350a8d3ed7b106a20bdb2005be826d.mp3str"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://core/daynight/sound/thunder_4.mp3"
|
||||
dest_files=["res://.godot/imported/thunder_4.mp3-ab350a8d3ed7b106a20bdb2005be826d.mp3str"]
|
||||
|
||||
[params]
|
||||
|
||||
loop=false
|
||||
loop_offset=0
|
||||
bpm=0
|
||||
beat_count=0
|
||||
bar_beats=4
|
||||
BIN
core/daynight/sound/thunder_5.mp3
Normal file
BIN
core/daynight/sound/thunder_5.mp3
Normal file
Binary file not shown.
19
core/daynight/sound/thunder_5.mp3.import
Normal file
19
core/daynight/sound/thunder_5.mp3.import
Normal file
@@ -0,0 +1,19 @@
|
||||
[remap]
|
||||
|
||||
importer="mp3"
|
||||
type="AudioStreamMP3"
|
||||
uid="uid://bm6dq4jwsbxf6"
|
||||
path="res://.godot/imported/thunder_5.mp3-bac65d0a703be3ab04d2144b8eef2bce.mp3str"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://core/daynight/sound/thunder_5.mp3"
|
||||
dest_files=["res://.godot/imported/thunder_5.mp3-bac65d0a703be3ab04d2144b8eef2bce.mp3str"]
|
||||
|
||||
[params]
|
||||
|
||||
loop=false
|
||||
loop_offset=0
|
||||
bpm=0
|
||||
beat_count=0
|
||||
bar_beats=4
|
||||
@@ -1,12 +1,14 @@
|
||||
class_name WeatherController
|
||||
extends Node
|
||||
|
||||
var audio_player: AudioStreamPlayer3D
|
||||
var thunder_sounds: Array[AudioStream]
|
||||
|
||||
var particles_wind: GPUParticles3D
|
||||
var particles_snow: GPUParticles3D
|
||||
var particles_fireflies: GPUParticles3D
|
||||
var particles_rain: GPUParticles3D
|
||||
var godray: PackedScene
|
||||
var fog_overlay: ColorRect
|
||||
var environment_dust: ColorRect
|
||||
var blur: ColorRect
|
||||
var environment_shadows: MeshInstance3D
|
||||
@@ -41,22 +43,23 @@ var thereare_fireflies: bool = false
|
||||
|
||||
func _init(wind: GPUParticles3D, snow: GPUParticles3D,
|
||||
fireflies: GPUParticles3D, rain: GPUParticles3D, ray: PackedScene,
|
||||
fogov: ColorRect, dust: ColorRect, blurr: ColorRect, envshadows: MeshInstance3D,
|
||||
dust: ColorRect, blurr: ColorRect, envshadows: MeshInstance3D,
|
||||
thesun: DirectionalLight3D, theenvironment: WorldEnvironment, environmentconfig: EnvironmentConfig,
|
||||
thecamera: Camera3D = null) -> void:
|
||||
thecamera: Camera3D, audiostreamplayer: AudioStreamPlayer3D, thundersounds: Array[AudioStream]) -> void:
|
||||
particles_wind = wind
|
||||
particles_snow = snow
|
||||
particles_fireflies = fireflies
|
||||
particles_rain = rain
|
||||
godray = ray
|
||||
sun = thesun
|
||||
fog_overlay = fogov
|
||||
environment_dust = dust
|
||||
blur = blurr
|
||||
environment_shadows = envshadows
|
||||
environment = theenvironment
|
||||
environment_config = environmentconfig
|
||||
camera = thecamera
|
||||
thunder_sounds = thundersounds
|
||||
audio_player = audiostreamplayer
|
||||
|
||||
set_rain()
|
||||
|
||||
@@ -101,7 +104,8 @@ func _process(delta: float) -> void:
|
||||
var base_rotation_sun: Vector3
|
||||
|
||||
if is_raining:
|
||||
rain_intensity = move_toward(rain_intensity, 1.0, delta * 0.5)
|
||||
var target_rain = environment_config.storm_rain_intensity_multiplier if is_storm else 1.0
|
||||
rain_intensity = move_toward(rain_intensity, target_rain, delta * 0.5)
|
||||
if is_storm:
|
||||
timer_next_lightning -= delta
|
||||
if timer_next_lightning <= 0.0:
|
||||
@@ -139,11 +143,15 @@ func _process(delta: float) -> void:
|
||||
base_grad_intensity = lerp(environment_config.grad_intensity_afternoon, environment_config.grad_intensity_night, t)
|
||||
base_rotation_sun = environment_config.sun_rotation_afternoon.lerp(environment_config.sun_rotation_night, t)
|
||||
|
||||
var final_tint = base_tint.lerp(base_tint * environment_config.rain_mode_color, rain_intensity)
|
||||
var final_sky_top = base_sky_top.lerp(base_sky_top * environment_config.rain_mode_color, rain_intensity)
|
||||
var final_sky_horizon = base_sky_horizon.lerp(base_sky_horizon * environment_config.rain_mode_color, rain_intensity)
|
||||
var final_fog_color = base_fog_color.lerp(base_fog_color * environment_config.rain_mode_color, rain_intensity)
|
||||
var final_fog_density = lerp(base_fog_density, base_fog_density * 4.0, rain_intensity)
|
||||
var weather_color = environment_config.rain_mode_color
|
||||
if is_storm:
|
||||
var storm_blend = clamp((rain_intensity - 1.0) / (environment_config.storm_rain_intensity_multiplier - 1.0), 0.0, 1.0)
|
||||
weather_color = weather_color.lerp(environment_config.storm_mode_color, storm_blend)
|
||||
var final_tint = base_tint.lerp(base_tint * weather_color, clamp(rain_intensity, 0.0, 1.0))
|
||||
var final_sky_top = base_sky_top.lerp(base_sky_top * weather_color, clamp(rain_intensity, 0.0, 1.0))
|
||||
var final_sky_horizon = base_sky_horizon.lerp(base_sky_horizon * weather_color, clamp(rain_intensity, 0.0, 1.0))
|
||||
var final_fog_color = base_fog_color.lerp(base_fog_color * weather_color, clamp(rain_intensity, 0.0, 1.0))
|
||||
var final_fog_density = lerp(base_fog_density, base_fog_density * 4.0, clamp(rain_intensity, 0.0, 1.0))
|
||||
|
||||
final_tint = final_tint.lerp(final_tint * environment_config.snow_mode_color, actual_snow_amount)
|
||||
final_sky_top = final_sky_top.lerp(final_sky_top * environment_config.snow_mode_color, actual_snow_amount)
|
||||
@@ -151,8 +159,8 @@ func _process(delta: float) -> void:
|
||||
final_fog_color = final_fog_color.lerp(final_fog_color * environment_config.snow_mode_color, actual_snow_amount)
|
||||
|
||||
#Shader parameters for global trunk_shader
|
||||
var final_grad_top = base_grad_top.lerp(base_grad_top * environment_config.rain_mode_color, rain_intensity)
|
||||
var final_grad_bot = base_grad_bot.lerp(base_grad_bot * environment_config.rain_mode_color, rain_intensity)
|
||||
var final_grad_top = base_grad_top.lerp(base_grad_top * weather_color, clamp(rain_intensity, 0.0, 1.0))
|
||||
var final_grad_bot = base_grad_bot.lerp(base_grad_bot * weather_color, clamp(rain_intensity, 0.0, 1.0))
|
||||
|
||||
RenderingServer.global_shader_parameter_set("global_gradient_color_top", final_grad_top)
|
||||
RenderingServer.global_shader_parameter_set("global_gradient_color_bot", final_grad_bot)
|
||||
@@ -226,7 +234,7 @@ func _follow_camera() -> void:
|
||||
if particles_snow:
|
||||
particles_snow.global_position = Vector3(cam_pos.x, particles_snow.position.y, cam_pos.z)
|
||||
if particles_wind:
|
||||
particles_wind.global_position = Vector3(cam_pos.x, particles_wind.position.y, cam_pos.z)
|
||||
particles_wind.global_position = Vector3(cam_pos.x, cam_pos.y, cam_pos.z)
|
||||
if particles_fireflies:
|
||||
particles_fireflies.global_position = Vector3(cam_pos.x, particles_fireflies.position.y, cam_pos.z)
|
||||
|
||||
@@ -254,10 +262,8 @@ func set_fireflies():
|
||||
|
||||
func toggle_wind(value: bool):
|
||||
is_windy = value
|
||||
var is_night = day_time >= 2.5
|
||||
|
||||
if particles_wind:
|
||||
particles_wind.emitting = (not is_storm and not is_night and is_windy)
|
||||
particles_wind.emitting = is_windy
|
||||
|
||||
#disable wind and set default values and materials
|
||||
func set_wind():
|
||||
@@ -385,9 +391,22 @@ func start_lightning():
|
||||
tween_sprite.tween_interval(0.2)
|
||||
tween_sprite.tween_property(lightning_sprite, "modulate:a", 0.0, 0.4)
|
||||
|
||||
#Thunder sound; separated routine to do not stop the loop
|
||||
_play_thunder_delayed(randf_range(0.5, 2.5))
|
||||
|
||||
if lightning_number > 1:
|
||||
await get_tree().create_timer(randf_range(0.05, 0.15)).timeout
|
||||
|
||||
func _play_thunder_delayed(delay: float):
|
||||
await get_tree().create_timer(delay).timeout
|
||||
|
||||
if thunder_sounds.is_empty() or not audio_player:
|
||||
return
|
||||
#choose a random track
|
||||
audio_player.stream = thunder_sounds[randi() % thunder_sounds.size()]
|
||||
audio_player.pitch_scale = randf_range(0.9, 1.1)
|
||||
audio_player.play()
|
||||
|
||||
#endregion
|
||||
|
||||
#region Rain
|
||||
|
||||
@@ -1,51 +1,60 @@
|
||||
class_name EnvironmentConfig
|
||||
extends Resource
|
||||
|
||||
#Time duration in seconds for a day
|
||||
@export_group("Day")
|
||||
@export var day_duration: float = 120.0
|
||||
@export var day_duration: float = 120.0 #Duration of a full day cycle in seconds
|
||||
|
||||
#Ambient light color tinting for each time of day
|
||||
@export_group("Directional Lights and Environment")
|
||||
@export var morning_color: Color = Color(1.0, 0.9, 0.8, 1.0)
|
||||
@export var afternoon_color: Color = Color(1.0, 0.6, 0.2, 1.0)
|
||||
@export var night_color: Color = Color(0.1, 0.1, 0.3, 1.0)
|
||||
@export var morning_color: Color = Color(1.0, 0.9, 0.8, 1.0) #Tint for morning
|
||||
@export var afternoon_color: Color = Color(1.0, 0.6, 0.2, 1.0) #Tint for afternoon (sunset)
|
||||
@export var night_color: Color = Color(0.1, 0.1, 0.3, 1.0) #Tint for night
|
||||
|
||||
#Sun directional light rotation for each time of day
|
||||
@export_group("Sun Rotation")
|
||||
@export var sun_rotation_morning: Vector3 = Vector3(-15.0, 45.0, 0.0)
|
||||
@export var sun_rotation_afternoon: Vector3 = Vector3(-75.0, 10.0, 0.0)
|
||||
@export var sun_rotation_night: Vector3 = Vector3(-35.0, -120.0, 0.0)
|
||||
#Sun light energy during night (multiplied onto base energy)
|
||||
@export var night_light_energy: float = 0.3
|
||||
|
||||
#Camera tonemap exposure for each time of day
|
||||
@export_group("General Exposition")
|
||||
@export var exposure_morning: float = 1.0
|
||||
@export var exposure_afternoon: float = 0.95
|
||||
@export var exposure_night: float = 0.4
|
||||
|
||||
#Sky top color for each time of day
|
||||
@export_group("Sky Colors - Top")
|
||||
@export var sky_top_morning: Color = Color(0.35, 0.65, 0.9, 1.0)
|
||||
@export var sky_top_afternoon: Color = Color(0.7, 0.45, 0.2, 1.0)
|
||||
@export var sky_top_night: Color = Color(0.05, 0.05, 0.15, 1.0)
|
||||
|
||||
#Sky horizon color for each time of day
|
||||
@export_group("Sky Color - Horizon")
|
||||
@export var sky_horizon_morning: Color = Color(0.75, 0.85, 0.95, 1.0)
|
||||
@export var sky_horizon_afternoon: Color = Color(0.95, 0.65, 0.35, 1.0)
|
||||
@export var sky_horizon_night: Color = Color(0.15, 0.1, 0.25, 1.0)
|
||||
|
||||
#Top gradient color used by the trunk shader
|
||||
@export_subgroup("Gradient - Top")
|
||||
@export var grad_top_morning: Color = Color(0.8, 0.4, 0.2, 1.0)
|
||||
@export var grad_top_afternoon: Color = Color(0.2, 0.3, 0.5, 1.0)
|
||||
@export var grad_top_night: Color = Color(0.05, 0.05, 0.1, 1.0)
|
||||
|
||||
#Bottom gradient color used by the trunk shader
|
||||
@export_subgroup("Gradient - Bottom")
|
||||
@export var grad_bot_morning: Color = Color(0.5, 0.2, 0.1, 1.0)
|
||||
@export var grad_bot_afternoon: Color = Color(0.1, 0.15, 0.25, 1.0)
|
||||
@export var grad_bot_night: Color = Color(0.01, 0.01, 0.05, 1.0)
|
||||
|
||||
#Gradient blend intensity for the trunk shader
|
||||
@export_subgroup("Gradient Intensity")
|
||||
@export var grad_intensity_morning: float = 0.5
|
||||
@export var grad_intensity_afternoon: float = 0.3
|
||||
@export var grad_intensity_night: float = 0.8
|
||||
|
||||
#Volumetric fog color and density for each time of day
|
||||
@export_group("Fog")
|
||||
@export var fog_color_morning: Color = Color(0.75, 0.85, 0.95, 1.0)
|
||||
@export var fog_color_afternoon: Color = Color(0.95, 0.65, 0.35, 1.0)
|
||||
@@ -54,71 +63,85 @@ extends Resource
|
||||
@export var fog_density_afternoon: float = 0.002
|
||||
@export var fog_density_night: float = 0.015
|
||||
|
||||
#Glow (bloom) intensity for each time of day
|
||||
@export_group("Glow")
|
||||
@export var glow_morning: float = 1.2
|
||||
@export var glow_afternoon: float = 0.8
|
||||
@export var glow_night: float = 2.0
|
||||
|
||||
#Post-process effect toggles (initial values)
|
||||
@export_group("Post Process")
|
||||
@export var enable_fog_overlay: bool = false
|
||||
@export var enable_dust: bool = true
|
||||
@export var enable_blur: bool = true
|
||||
@export var enable_environment_shadows: bool = true
|
||||
@export var enable_dust: bool = true #Floating dust particles overlay
|
||||
@export var enable_blur: bool = true #Screen blur effect
|
||||
@export var enable_environment_shadows: bool = true #Cloud shadow projection on terrain
|
||||
|
||||
#Shader materials used by weather and sky systems
|
||||
@export_group("Environment Materials")
|
||||
@export var material_fog: ShaderMaterial
|
||||
@export var material_drops: StandardMaterial3D
|
||||
@export var material_clouds: ShaderMaterial
|
||||
@export var material_fog: ShaderMaterial #Fog overlay shader material
|
||||
@export var material_drops: StandardMaterial3D #Rain drops material (albedo tinted by sky)
|
||||
@export var material_clouds: ShaderMaterial #Cloud layer shader material
|
||||
|
||||
#Rain weather settings
|
||||
@export_group("Rain")
|
||||
@export var rain_mode_color: Color = Color(0.5, 0.6, 0.7, 1.0)
|
||||
@export var rain_fade_time: float = 5.0
|
||||
@export var puddle_form_time: float = 15.0
|
||||
@export var puddle_dry_time: float = 20.0
|
||||
@export var rain_mode_color: Color = Color(0.5, 0.6, 0.7, 1.0) #Sky/light darkening color during rain
|
||||
@export var rain_fade_time: float = 5.0 #Seconds for rain particles to fade in/out
|
||||
@export var puddle_form_time: float = 15.0 #Seconds for puddles to fully form
|
||||
@export var puddle_dry_time: float = 20.0 #Seconds for puddles to fully dry after rain stops
|
||||
|
||||
#Storm settings (applied on top of rain when storm is active)
|
||||
@export_group("Storm")
|
||||
@export var storm_rain_intensity_multiplier: float = 1.5 #Rain intensity target during storm (1.0 = normal rain)
|
||||
@export var storm_mode_color: Color = Color(0.476, 0.531, 0.639, 1.0) #Additional sky darkening color during storm
|
||||
|
||||
#Lightning and thunder configuration
|
||||
@export_group("Lightning and Thunders")
|
||||
@export var lightning_min_time: float = 5.0
|
||||
@export var lightning_max_time: float = 15.0
|
||||
@export var lightning_color: Color = Color(1.0, 1.0, 0.8, 1.0)
|
||||
@export var lightning_min: int = 1
|
||||
@export var lightning_max: int = 3
|
||||
@export var lightning_scale_min: float = 1.0
|
||||
@export var lightning_scale_max: float = 3.0
|
||||
@export var lightning_texture: String = "res://core/daynight/lighting_albedo.png"
|
||||
@export var weather_event_interval: float = 8.0
|
||||
@export var lightning_min_time: float = 5.0 #Minimum seconds between lightning strikes
|
||||
@export var lightning_max_time: float = 15.0 #Maximum seconds between lightning strikes
|
||||
@export var lightning_color: Color = Color(1.0, 1.0, 0.8, 1.0) #Lightning sprite tint color
|
||||
@export var lightning_min: int = 1 #Minimum number of lightning bolts per strike event
|
||||
@export var lightning_max: int = 3 #Maximum number of lightning bolts per strike event
|
||||
@export var lightning_scale_min: float = 1.0 #Minimum random scale of lightning sprite
|
||||
@export var lightning_scale_max: float = 3.0 #Maximum random scale of lightning sprite
|
||||
@export var lightning_texture: String = "res://core/daynight/lighting_albedo.png" # Lightning bolt texture path
|
||||
@export var weather_event_interval: float = 8.0 #Base interval between weather events
|
||||
#thunder sound is configured on daynight node
|
||||
|
||||
#God rays spawned after rain or at morning
|
||||
@export_group("God Rays")
|
||||
@export var godray_max_rain: int = 8
|
||||
@export var godray_spawn_radius: float = 15.0
|
||||
@export var godray_spawn_offset: Vector3 = Vector3(15.0, 5.0, -15.0)
|
||||
@export var godray_rotation_degrees: Vector3 = Vector3(-45.0, 45.0, -30.0)
|
||||
@export var godray_spawn_height: float = 5.0
|
||||
@export var godray_scale: Vector3 = Vector3(2.0, 6.0, 2.0)
|
||||
@export var godray_max_rain: int = 8 #Max number of god rays spawned after rain stops
|
||||
@export var godray_spawn_radius: float = 15.0 #Horizontal spawn radius around the camera
|
||||
@export var godray_spawn_offset: Vector3 = Vector3(15.0, 5.0, -15.0) #Position offset from camera
|
||||
@export var godray_rotation_degrees: Vector3 = Vector3(-45.0, 45.0, -30.0) #Rotation of the god ray mesh
|
||||
@export var godray_spawn_height: float = 5.0 #Y world position where god rays spawn
|
||||
@export var godray_scale: Vector3 = Vector3(2.0, 6.0, 2.0) #Scale of the god ray mesh
|
||||
|
||||
#Snow settings
|
||||
@export_group("Snow")
|
||||
@export var snow_amount: float = 0.0
|
||||
@export var snow_transaction_time: float = 10.0
|
||||
@export var snow_fade_time: float = 5.0
|
||||
@export var snow_threshold: float = 0.4
|
||||
@export var snow_accumulation_speed: float = 0.02 #0.1 -> accumulation time 10secs; 0.05 -> accumulation time 20secs; realistic; 0.2 -> accumulation time 5secs;
|
||||
@export var snow_melt_speed: float = 0.05
|
||||
@export var snow_color: Color = Color(0.9, 0.95, 1.0)
|
||||
@export var snow_mode_color: Color = Color(0.7, 0.75, 0.8, 1.0)
|
||||
@export var snow_amount: float = 0.0 #Initial snow coverage amount (0.0 = none, 1.0 = full)
|
||||
@export var snow_transaction_time: float = 10.0 #Seconds for snow shader to fully transition in/out
|
||||
@export var snow_fade_time: float = 5.0 #Seconds for snow particles to fade in/out
|
||||
@export var snow_threshold: float = 0.4 #Normal Y threshold for snow accumulation on surfaces
|
||||
@export var snow_accumulation_speed: float = 0.02 #Accumulation speed: 0.1 -> 10s, 0.05 -> 20s, 0.02 -> 50s, 0.2 -> 5s
|
||||
@export var snow_melt_speed: float = 0.05 #Speed at which accumulated snow melts away
|
||||
@export var snow_color: Color = Color(0.9, 0.95, 1.0) #Albedo color of snow on surfaces
|
||||
@export var snow_mode_color: Color = Color(0.556, 0.62, 0.683, 1.0) #Sky/light darkening color during snow
|
||||
|
||||
#Wind settings
|
||||
@export_group("Wind")
|
||||
@export var wind_amount: int = 100
|
||||
@export var wind_spawn_ray: float = 25.0
|
||||
@export var wind_spawn_height: float = 5.0
|
||||
@export var wind_direction: Vector2 = Vector2(0.5, 0.4)
|
||||
@export var wind_speed: float = 0.2
|
||||
@export var wind_scale: float = 0.025
|
||||
@export var wind_strength: float = 0.6
|
||||
@export var cloud_scale: float = 0.5
|
||||
@export var cloud_speed: float = 0.05
|
||||
@export_range(0.01, 1.0) var cloud_scale_envshadows_rate: float = 0.01
|
||||
@export_range(0.01, 1.0) var cloud_speed_envshadows_rate: float = 0.5
|
||||
@export var wind_amount: int = 100 #Number of wind particles
|
||||
@export var wind_spawn_ray: float = 25.0 #Horizontal spawn radius (emission box XZ extents)
|
||||
@export var wind_spawn_height: float = 8.0 #Vertical spawn range (emission box Y extent)
|
||||
@export var wind_direction: Vector2 = Vector2(0.5, 0.4) #Global wind direction (XZ)
|
||||
@export var wind_speed: float = 0.2 #Global wind animation speed
|
||||
@export var wind_scale: float = 0.025 #Global wind noise scale
|
||||
@export var wind_strength: float = 0.6 #Global wind displacement strength
|
||||
@export var cloud_scale: float = 0.5 #Cloud noise scale in sky shader
|
||||
@export var cloud_speed: float = 0.05 #Cloud movement speed in sky shader
|
||||
@export_range(0.01, 1.0) var cloud_scale_envshadows_rate: float = 0.01 #Cloud scale multiplier for environment shadows
|
||||
@export_range(0.01, 1.0) var cloud_speed_envshadows_rate: float = 0.5 #Cloud speed multiplier for environment shadows
|
||||
|
||||
#Firefly settings (visible only at night)
|
||||
@export_group("Fireflies")
|
||||
@export var fireflies_amount: int = 60
|
||||
@export var fireflies_spawn_ray: float = 20.0
|
||||
@export var fireflies_spawn_height: float = 3.0
|
||||
@export var fireflies_amount: int = 60 #Number of firefly particles
|
||||
@export var fireflies_spawn_ray: float = 20.0 #Horizontal spawn radius
|
||||
@export var fireflies_spawn_height: float = 3.0 #Vertical spawn range
|
||||
|
||||
Reference in New Issue
Block a user