diff --git a/core/biome_generator/biome_generator.gd b/core/biome_generator/biome_generator.gd index 3658506..f717c85 100644 --- a/core/biome_generator/biome_generator.gd +++ b/core/biome_generator/biome_generator.gd @@ -50,7 +50,7 @@ const RIVER_NEIGHBOUR_OFFSETS: Dictionary = { #aumentare generazione a 3000 o 4000 #Se ci sono micro-scatti: #abbassare generazione a 1000 o 1500 -#Se i fili appaiono in ritardo: +"res://tgcc/chunk/railway/scene/chunk_railway_curve_2.tscn"#Se i fili appaiono in ritardo: #aumentare wire a 1500 o 2000 #Se il cleanup causa scatti: #abbassare cleanup a 500 diff --git a/core/daynight/environment_manager.gd b/core/daynight/environment_manager.gd index 63dbe1b..c289801 100644 --- a/core/daynight/environment_manager.gd +++ b/core/daynight/environment_manager.gd @@ -3,7 +3,7 @@ extends Node3D const NOISE_TEXTURE: Texture2D = preload("res://core/daynight/noise.tres") const WEATHER_SHADER: Material = preload("res://core/daynight/weather_overlay.tres") -const DYNAMIC_ENVIRONMENT_UPDATES_PER_FRAME: int = 2 #how many update of the environment (apply materials) will be done per frame +const DYNAMIC_ENVIRONMENT_UPDATES_PER_FRAME: int = 32 #how many update of the environment (apply materials) will be done per frame @export var environment_config: EnvironmentConfig @@ -80,6 +80,9 @@ func _ready() -> void: func _process(_delta: float) -> void: _process_pending_environment_nodes() +func flush_pending_environment_nodes() -> void: + _process_pending_environment_nodes(-1) + func _on_tree_node_added(node: Node) -> void: if node.is_in_group("wind_node") or node.is_in_group("weather_node") or node.is_in_group("weather_vegetables_node"): _queue_dynamic_environment_node(node) @@ -108,10 +111,10 @@ func _queue_dynamic_environment_node(node: Node) -> void: pending_environment_nodes[node.get_instance_id()] = node -func _process_pending_environment_nodes() -> void: +func _process_pending_environment_nodes(max_nodes: int = DYNAMIC_ENVIRONMENT_UPDATES_PER_FRAME) -> void: var processed = 0 for node_id in pending_environment_nodes.keys(): - if processed >= DYNAMIC_ENVIRONMENT_UPDATES_PER_FRAME: + if max_nodes >= 0 and processed >= max_nodes: break var node = pending_environment_nodes[node_id] diff --git a/core/daynight/snow_cap.gdshader b/core/daynight/snow_cap.gdshader index 71b6abc..0ce8ff2 100644 --- a/core/daynight/snow_cap.gdshader +++ b/core/daynight/snow_cap.gdshader @@ -7,6 +7,7 @@ global uniform float global_snow_melt_time = -1.0; global uniform float global_snow_melt_speed = 0.1; global uniform float global_snow_amount = 0.0; global uniform vec4 global_snow_color = vec4(0.92, 0.96, 1.0, 1.0); +const float SNOW_VISUAL_RESPONSE = 0.55; uniform float max_height : hint_range(0.02, 1.0) = 0.2; uniform float half_width : hint_range(0.01, 20.0) = 1.0; @@ -68,10 +69,14 @@ float get_snow_amount() { return snow_amount; } +float get_visual_snow_amount(float snow_amount) { + return pow(clamp(snow_amount, 0.0, 1.0), SNOW_VISUAL_RESPONSE); +} + void vertex() { vec3 base_vertex = VERTEX; vec3 world_pos = (MODEL_MATRIX * vec4(base_vertex, 1.0)).xyz; - float snow_amount = get_snow_amount(); + float snow_amount = get_visual_snow_amount(get_snow_amount()); float noise_val = fbm(world_pos.xz * noise_scale); float thickness = max_height * snow_amount * mix( 1.0 - noise_strength, diff --git a/core/daynight/weather_controller.gd b/core/daynight/weather_controller.gd index 782a2e9..c427a76 100644 --- a/core/daynight/weather_controller.gd +++ b/core/daynight/weather_controller.gd @@ -3,6 +3,9 @@ extends Node signal wind_parameters_changed(speed: float, strength: float, fade: float, direction: Vector2) +const SNOW_ACCUMULATION_DELAY: float = 4.0 +const SNOW_ACCUMULATION_DELAY_THRESHOLD: float = 0.01 + var thunder_audio_player: AudioStreamPlayer var thunder_sounds: Array[AudioStream] var rain_sounds: Array[AudioStream] @@ -836,6 +839,8 @@ func toggle_snow(value: bool): if is_snowing and is_raining: toggle_rain(false) + + var snow_accumulation_delay: float = _get_snow_accumulation_delay() if is_snowing else 0.0 # Fade particelle neve if particles_snow: @@ -849,7 +854,7 @@ func toggle_snow(value: bool): snow_particles_tween = create_tween() snow_particles_tween.tween_property(particles_snow, "amount_ratio", 1.0, environment_config.snow_fade_time) - start_snow_accumulation() + start_snow_accumulation(snow_accumulation_delay) else: snow_particles_tween = create_tween() snow_particles_tween.tween_property(particles_snow, "amount_ratio", 0.0, environment_config.snow_fade_time) @@ -864,6 +869,8 @@ func toggle_snow(value: bool): snow_weather_tween.kill() var snow_amount_transition_duration: float = _get_snow_amount_transition_duration(is_snowing) snow_tween = create_tween() + if is_snowing and snow_accumulation_delay > 0.0: + snow_tween.tween_interval(snow_accumulation_delay) snow_tween.tween_method( init_snow_amount, actual_snow_amount, @@ -928,14 +935,26 @@ func init_snow_amount(value: float): func init_snow_weather_amount(value: float): snow_weather_amount = value -func start_snow_accumulation() -> void: +func start_snow_accumulation(delay: float = 0.0) -> void: RenderingServer.global_shader_parameter_set("global_snow_melt_time", -1.0) - RenderingServer.global_shader_parameter_set("global_snow_start_time", Time.get_ticks_msec() / 1000.0) + RenderingServer.global_shader_parameter_set("global_snow_start_time", Time.get_ticks_msec() / 1000.0 + delay) + _flush_pending_weather_materials() func start_snow_melt() -> void: RenderingServer.global_shader_parameter_set("global_snow_melt_time", Time.get_ticks_msec() / 1000.0) RenderingServer.global_shader_parameter_set("global_snow_melt_speed", environment_config.snow_melt_speed) +func _get_snow_accumulation_delay() -> float: + if actual_snow_amount > SNOW_ACCUMULATION_DELAY_THRESHOLD: + return 0.0 + + return SNOW_ACCUMULATION_DELAY + +func _flush_pending_weather_materials() -> void: + var environment_manager := get_parent() + if environment_manager != null and environment_manager.has_method("flush_pending_environment_nodes"): + environment_manager.call("flush_pending_environment_nodes") + func _get_snow_amount_transition_duration(is_accumulating: bool) -> float: if environment_config == null: return 0.0 diff --git a/core/daynight/weather_overlay.gdshader b/core/daynight/weather_overlay.gdshader index 5858dd2..212be0e 100644 --- a/core/daynight/weather_overlay.gdshader +++ b/core/daynight/weather_overlay.gdshader @@ -16,6 +16,7 @@ global uniform float global_snow_cap_flatness_start = 0.72; global uniform float global_snow_cap_flatness_end = 0.96; global uniform float global_snow_cap_noise_scale = 0.22; global uniform float global_snow_cap_noise_strength = 0.18; +const float SNOW_VISUAL_RESPONSE = 0.55; uniform float snow_noise_scale : hint_range(0.01, 1.0) = 0.15; uniform float snow_edge_softness : hint_range(0.01, 0.5) = 0.2; uniform float snow_roughness_variation : hint_range(0.0, 0.3) = 0.15; @@ -86,6 +87,18 @@ float get_snow_progress() { return snow_progress; } +float get_visual_snow_progress(float snow_progress) { + return pow(clamp(snow_progress, 0.0, 1.0), SNOW_VISUAL_RESPONSE); +} + +float get_snow_noise_mask(vec3 world_pos, float snow_progress) { + float detail_noise = texture(noise_texture, world_pos.xz * snow_noise_scale).r; + float broad_noise = texture(noise_texture, world_pos.xz * snow_noise_scale * 0.35 + vec2(19.1, 7.4)).r; + float combined_noise = mix(detail_noise, broad_noise, 0.35); + float threshold = mix(0.92, 0.08, snow_progress); + return smoothstep(threshold - 0.18, threshold + 0.18, combined_noise); +} + float ripple_ring(vec2 uv, float time_offset) { float d = length(uv); float ring = sin(d * 30.0 - TIME * ripple_speed + time_offset) * 0.5 + 0.5; @@ -94,7 +107,7 @@ float ripple_ring(vec2 uv, float time_offset) { } void vertex() { - float snow_progress = get_snow_progress(); + float snow_progress = get_visual_snow_progress(get_snow_progress()); float snow_accumulation = snow_progress * global_snow_max_accumulation; vec3 world_pos = (MODEL_MATRIX * vec4(VERTEX, 1.0)).xyz; vec3 world_normal = normalize((MODEL_MATRIX * vec4(NORMAL, 0.0)).xyz); @@ -104,7 +117,7 @@ void vertex() { global_snow_cap_flatness_end, world_normal.y ); - float accumulation_growth = smoothstep(0.08, 0.65, snow_progress); + float accumulation_growth = smoothstep(0.02, 0.45, snow_progress); float cap_noise = fbm(world_pos.xz * global_snow_cap_noise_scale + vec2(11.3, 4.7)); float cap_variation = mix(1.0 - global_snow_cap_noise_strength, 1.0 + global_snow_cap_noise_strength, cap_noise); @@ -118,6 +131,8 @@ void fragment() { vec3 world_pos = (INV_VIEW_MATRIX * vec4(VERTEX, 1.0)).xyz; vec3 world_normal = normalize((INV_VIEW_MATRIX * vec4(NORMAL, 0.0)).xyz); float facing_up = clamp(world_normal.y, 0.0, 1.0); + vec3 geometric_normal = normalize(cross(dFdx(world_pos), dFdy(world_pos))); + float snow_facing_up = max(facing_up, abs(geometric_normal.y)); float noise_val = texture(noise_texture, world_pos.xz * snow_noise_scale).r; //Snow @@ -127,14 +142,15 @@ void fragment() { float snow_edge = smoothstep( global_snow_threshold - snow_edge_softness, global_snow_threshold + snow_edge_softness, - facing_up + snow_facing_up ); float flat_accumulation = smoothstep(0.0, 0.35, v_snow_cap_mask) * snow_accumulation; + float snow_noise_mask = get_snow_noise_mask(world_pos, snow_progress); float snow_variation = mix(0.75, 1.15, noise_val); - float snow_coverage = clamp(snow_progress * snow_variation + flat_accumulation * 0.25, 0.0, 1.0); + float snow_coverage = clamp(mix(snow_progress * 0.35, snow_progress * snow_variation, snow_noise_mask) + flat_accumulation * 0.15, 0.0, 1.0); float snow_factor = max(snow_edge * snow_coverage, flat_accumulation); float snow_opacity = clamp(snow_factor, 0.0, 1.0); - snow_opacity = max(snow_opacity, flat_accumulation * 0.9); + snow_opacity = max(snow_opacity, flat_accumulation * mix(0.45, 0.9, snow_noise_mask)); float shade = mix(-snow_color_variation, snow_color_variation, noise_val); vec3 snow_albedo = clamp(global_snow_color.rgb + vec3(shade), 0.0, 1.0); diff --git a/core/daynight/weather_overlay.tres b/core/daynight/weather_overlay.tres index 03906a7..66f2509 100644 --- a/core/daynight/weather_overlay.tres +++ b/core/daynight/weather_overlay.tres @@ -1,6 +1,7 @@ [gd_resource type="ShaderMaterial" format=3 uid="uid://cn5vw7unbqgve"] [ext_resource type="Shader" uid="uid://dh3j2jp6defuk" path="res://core/daynight/weather_overlay.gdshader" id="1_weather"] +[ext_resource type="Texture2D" uid="uid://bpswbjh4jj1ou" path="res://core/daynight/noise.tres" id="2_noise"] [resource] render_priority = 0 @@ -19,3 +20,4 @@ shader_parameter/wet_roughness = 0.05 shader_parameter/rain_normal_strength = 0.4 shader_parameter/puddle_noise_scale = 0.08 shader_parameter/puddle_threshold = 0.45 +shader_parameter/noise_texture = ExtResource("2_noise") diff --git a/core/daynight/weather_plain_shader.gdshader b/core/daynight/weather_plain_shader.gdshader index c793d3e..c9bc804 100644 --- a/core/daynight/weather_plain_shader.gdshader +++ b/core/daynight/weather_plain_shader.gdshader @@ -8,7 +8,9 @@ global uniform float global_snow_melt_time = -1.0; global uniform float global_snow_melt_speed = 0.1; global uniform float global_snow_amount = 0.0; global uniform vec4 global_snow_color; +const float SNOW_VISUAL_RESPONSE = 0.55; uniform float snow_edge_softness : hint_range(0.01, 0.5) = 0.15; +uniform float snow_noise_scale : hint_range(0.01, 1.0) = 0.15; uniform float snow_color_variation : hint_range(0.0, 0.15) = 0.05; @@ -50,6 +52,18 @@ float get_snow_progress() { return snow_progress; } +float get_visual_snow_progress(float snow_progress) { + return pow(clamp(snow_progress, 0.0, 1.0), SNOW_VISUAL_RESPONSE); +} + +float get_snow_noise_mask(vec3 world_pos, float snow_progress) { + float detail_noise = texture(noise_texture, world_pos.xz * snow_noise_scale).r; + float broad_noise = texture(noise_texture, world_pos.xz * snow_noise_scale * 0.35 + vec2(19.1, 7.4)).r; + float combined_noise = mix(detail_noise, broad_noise, 0.35); + float threshold = mix(0.92, 0.08, snow_progress); + return smoothstep(threshold - 0.18, threshold + 0.18, combined_noise); +} + void fragment() { vec3 world_pos = (INV_VIEW_MATRIX * vec4(VERTEX, 1.0)).xyz; @@ -57,14 +71,15 @@ void fragment() { float facing_up = 1.0; // Snow accumulation - float snow_amount = get_snow_progress(); + float snow_amount = get_visual_snow_progress(get_snow_progress()); - // Plain surfaces fade in uniformly to avoid patchy strip-like accumulation. - float snow_mask = smoothstep(0.0, 1.0, snow_amount); + // Plain surfaces accumulate through world-space noise so flat snow is not uniform. + float snow_noise_mask = get_snow_noise_mask(world_pos, snow_amount); + float snow_mask = mix(snow_amount * 0.35, snow_amount, snow_noise_mask); snow_mask *= step(0.01, snow_amount); // Snow color with slight variation - float shade = fract(sin(dot(UV, vec2(12.9898, 78.233))) * 43758.5453); + float shade = texture(noise_texture, world_pos.xz * snow_noise_scale * 2.0 + vec2(3.7, 11.2)).r; shade = mix(-snow_color_variation, snow_color_variation, shade); vec3 snow_albedo = clamp(global_snow_color.rgb + vec3(shade), 0.0, 1.0); diff --git a/core/daynight/weather_plain_shader.tres b/core/daynight/weather_plain_shader.tres index 4706dc1..0c800f0 100644 --- a/core/daynight/weather_plain_shader.tres +++ b/core/daynight/weather_plain_shader.tres @@ -7,6 +7,7 @@ render_priority = 0 shader = ExtResource("1_weather_plain") shader_parameter/snow_edge_softness = 0.15 +shader_parameter/snow_noise_scale = 0.15 shader_parameter/snow_color_variation = 0.05 shader_parameter/ripple_scale = 1.5 shader_parameter/ripple_speed = 2.0 diff --git a/core/environment_config.gd b/core/environment_config.gd index 303470f..fdaeb17 100644 --- a/core/environment_config.gd +++ b/core/environment_config.gd @@ -167,7 +167,7 @@ extends Resource @export var snow_threshold: float = 0.4 #Normal Y threshold for snow accumulation on surfaces @export var snow_accumulation_speed: float = 0.005 #Accumulation speed: 0.005 -> ~200s, 0.01 -> 100s, 0.02 -> 50s @export var snow_melt_speed: float = 0.05 #Speed at which accumulated snow melts away -@export var show_snow_accumulation_volume: bool = true #Enables vertex snow buildup; when false snow only changes surface color +@export var show_snow_accumulation_volume: bool = false #Enables vertex snow buildup; when false snow only changes surface color @export var snow_max_accumulation: float = 0.25 #Maximum accumulated snow factor applied to coverage and thickness @export var snow_color: Color = Color(0.9, 0.95, 1.0) #Albedo color of snow on surfaces @export var snow_cap_height: float = 0.03 #Maximum snow thickness extruded on flat surfaces diff --git a/snow.jpg b/snow.jpg new file mode 100644 index 0000000..b5dd05d Binary files /dev/null and b/snow.jpg differ diff --git a/snow.jpg.import b/snow.jpg.import new file mode 100644 index 0000000..83e959a --- /dev/null +++ b/snow.jpg.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bk1h41vq5acfa" +path="res://.godot/imported/snow.jpg-51a2902860b21a02a582c65a2470860d.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://snow.jpg" +dest_files=["res://.godot/imported/snow.jpg-51a2902860b21a02a582c65a2470860d.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/tgcc/chunk/countryside/scene/fields/river/chunk_river_fields_mix1_1.tscn b/tgcc/chunk/countryside/scene/fields/river/chunk_river_fields_mix1_1.tscn index 504041a..b350d54 100644 --- a/tgcc/chunk/countryside/scene/fields/river/chunk_river_fields_mix1_1.tscn +++ b/tgcc/chunk/countryside/scene/fields/river/chunk_river_fields_mix1_1.tscn @@ -124,7 +124,7 @@ surface_material_override/0 = ExtResource("3_sa8j3") surface_material_override/0 = ExtResource("4_wx70f") surface_material_override/1 = ExtResource("4_wx70f") -[node name="Cortile_006" parent="." index="4" unique_id=12586199] +[node name="Cortile_006" parent="." index="4" unique_id=12586199 groups=["weather_node"]] surface_material_override/0 = ExtResource("5_05rnc") [node name="Cube_036" parent="." index="5" unique_id=1681749225] diff --git a/tgcc/chunk/countryside/scene/rice/chunk_country_empty_03.tscn b/tgcc/chunk/countryside/scene/rice/chunk_country_empty_03.tscn index 8731b33..4a4812d 100644 --- a/tgcc/chunk/countryside/scene/rice/chunk_country_empty_03.tscn +++ b/tgcc/chunk/countryside/scene/rice/chunk_country_empty_03.tscn @@ -71,67 +71,67 @@ transform = Transform3D(1.7, 0, 0, 0, 1.7, 0, 0, 0, 1.7, -5.5632, -0.14742994, 3 script = ExtResource("5_22afi") scala_massima = 1.1 -[node name="Tree_02" parent="tree" unique_id=678891384 instance=ExtResource("6_o4mrg")] +[node name="Tree_02" parent="tree" unique_id=678891384 groups=["weather_node", "wind_node"] instance=ExtResource("6_o4mrg")] transform = Transform3D(0.29938805, 0, -0.7966952, 0, 0.8510913, 0, 0.7966952, 0, 0.29938805, -0.38952708, 0.0867235, 1.7667623) -[node name="Tree_03" parent="tree" unique_id=274883116 instance=ExtResource("6_o4mrg")] +[node name="Tree_03" parent="tree" unique_id=274883116 groups=["weather_node", "wind_node"] instance=ExtResource("6_o4mrg")] transform = Transform3D(-0.74109775, 0, -0.22520898, 0, 0.77456117, 0, 0.22520898, 0, -0.74109775, 1.8829049, 0.0867235, 1.5336914) -[node name="Tree_04" parent="tree" unique_id=238510396 instance=ExtResource("6_o4mrg")] +[node name="Tree_04" parent="tree" unique_id=238510396 groups=["weather_node", "wind_node"] instance=ExtResource("6_o4mrg")] transform = Transform3D(-1.0050138, 0, 0.043901123, 0, 1.0059723, 0, -0.043901123, 0, -1.0050138, 0.74668837, 0.0867235, -0.24346757) -[node name="Tree_05" parent="tree" unique_id=466988009 instance=ExtResource("6_o4mrg")] +[node name="Tree_05" parent="tree" unique_id=466988009 groups=["weather_node", "wind_node"] instance=ExtResource("6_o4mrg")] transform = Transform3D(0.13193716, 0, 0.9404468, 0, 0.94965655, 0, -0.9404468, 0, 0.13193716, 4.2761, 0.0867235, -1.4199381) -[node name="Tree_06" parent="tree" unique_id=1072663130 instance=ExtResource("6_o4mrg")] +[node name="Tree_06" parent="tree" unique_id=1072663130 groups=["weather_node", "wind_node"] instance=ExtResource("6_o4mrg")] transform = Transform3D(0.30659983, 0, -0.7438946, 0, 0.8046009, 0, 0.7438946, 0, 0.30659983, 5.4123154, 0.0867235, 1.3477685) -[node name="Tree_07" parent="tree" unique_id=115507207 instance=ExtResource("6_o4mrg")] +[node name="Tree_07" parent="tree" unique_id=115507207 groups=["weather_node", "wind_node"] instance=ExtResource("6_o4mrg")] transform = Transform3D(-0.76092607, 0, 0.023468828, 0, 0.7612879, 0, -0.023468828, 0, -0.76092607, 7.1020727, 0.0867235, 2.0178452) -[node name="Tree_08" parent="tree" unique_id=1561772854 instance=ExtResource("6_o4mrg")] +[node name="Tree_08" parent="tree" unique_id=1561772854 groups=["weather_node", "wind_node"] instance=ExtResource("6_o4mrg")] transform = Transform3D(-0.63023233, 0, 0.48905104, 0, 0.79772407, 0, -0.48905104, 0, -0.63023233, 7.3934116, 0.0867235, -0.25458765) -[node name="Tree_09" parent="tree" unique_id=313944963 instance=ExtResource("6_o4mrg")] +[node name="Tree_09" parent="tree" unique_id=313944963 groups=["weather_node", "wind_node"] instance=ExtResource("6_o4mrg")] transform = Transform3D(-0.7222728, 0, 0.39546818, 0, 0.82345194, 0, -0.39546818, 0, -0.7222728, 6.8398695, 0.0867235, -2.3813524) -[node name="Tree_10" parent="tree" unique_id=122393023 instance=ExtResource("6_o4mrg")] +[node name="Tree_10" parent="tree" unique_id=122393023 groups=["weather_node", "wind_node"] instance=ExtResource("6_o4mrg")] transform = Transform3D(-0.93547463, 0, 0.33586454, 0, 0.99394053, 0, -0.33586454, 0, -0.93547463, 6.927271, 0.0867235, -4.9742575) -[node name="Tree_11" parent="tree" unique_id=1946224600 instance=ExtResource("6_o4mrg")] +[node name="Tree_11" parent="tree" unique_id=1946224600 groups=["weather_node", "wind_node"] instance=ExtResource("6_o4mrg")] transform = Transform3D(-0.55466866, 0, -0.89065087, 0, 1.0492456, 0, 0.89065087, 0, -0.55466866, 3.3978593, 0.0867235, -4.9742575) -[node name="Tree_12" parent="tree" unique_id=52099570 instance=ExtResource("6_o4mrg")] +[node name="Tree_12" parent="tree" unique_id=52099570 groups=["weather_node", "wind_node"] instance=ExtResource("6_o4mrg")] transform = Transform3D(0.49727297, 0, 0.6585089, 0, 0.82517534, 0, -0.6585089, 0, 0.49727297, 1.2128274, 0.0867235, -3.2844996) -[node name="Tree_13" parent="tree" unique_id=533097036 instance=ExtResource("6_o4mrg")] +[node name="Tree_13" parent="tree" unique_id=533097036 groups=["weather_node", "wind_node"] instance=ExtResource("6_o4mrg")] transform = Transform3D(0.93419886, 0, 0.40311188, 0, 1.017461, 0, -0.40311188, 0, 0.93419886, -1.0596058, 0.0867235, -1.7404108) -[node name="Tree_14" parent="tree" unique_id=1799822151 instance=ExtResource("6_o4mrg")] +[node name="Tree_14" parent="tree" unique_id=1799822151 groups=["weather_node", "wind_node"] instance=ExtResource("6_o4mrg")] transform = Transform3D(0.7729016, 0, 0.7029506, 0, 1.0447567, 0, -0.7029506, 0, 0.7729016, -0.41866302, 0.0867235, -4.6537867) -[node name="Tree_15" parent="tree" unique_id=20940384 instance=ExtResource("6_o4mrg")] +[node name="Tree_15" parent="tree" unique_id=20940384 groups=["weather_node", "wind_node"] instance=ExtResource("6_o4mrg")] transform = Transform3D(0.21265577, 0, -0.9430117, 0, 0.96669203, 0, 0.9430117, 0, 0.21265577, 0.48448348, 0.0867235, -6.4892135) -[node name="Tree_16" parent="tree" unique_id=1547596252 instance=ExtResource("6_o4mrg")] +[node name="Tree_16" parent="tree" unique_id=1547596252 groups=["weather_node", "wind_node"] instance=ExtResource("6_o4mrg")] transform = Transform3D(-0.7224034, 0, -0.56015676, 0, 0.91413474, 0, 0.56015676, 0, -0.7224034, 3.8057318, 0.0867235, -7.275826) -[node name="Tree_17" parent="tree" unique_id=1911024433 instance=ExtResource("6_o4mrg")] +[node name="Tree_17" parent="tree" unique_id=1911024433 groups=["weather_node", "wind_node"] instance=ExtResource("6_o4mrg")] transform = Transform3D(-0.7111182, 0, 0.61400616, 0, 0.93951726, 0, -0.61400616, 0, -0.7111182, 7.9135923, 0.0867235, -7.4214945) -[node name="Tree_18" parent="tree" unique_id=728179114 instance=ExtResource("6_o4mrg")] +[node name="Tree_18" parent="tree" unique_id=728179114 groups=["weather_node", "wind_node"] instance=ExtResource("6_o4mrg")] transform = Transform3D(0.71622694, 0, 0.7039445, 0, 1.0042504, 0, -0.7039445, 0, 0.71622694, 7.7679234, 0.0867235, -4.566386) -[node name="Tree_19" parent="tree" unique_id=466895741 instance=ExtResource("6_o4mrg")] +[node name="Tree_19" parent="tree" unique_id=466895741 groups=["weather_node", "wind_node"] instance=ExtResource("6_o4mrg")] transform = Transform3D(0.8202933, 0, -0.5276438, 0, 0.9753405, 0, 0.5276438, 0, 0.8202933, 7.942726, 0.0867235, -1.4199398) -[node name="Tree_20" parent="tree" unique_id=960181762 instance=ExtResource("6_o4mrg")] +[node name="Tree_20" parent="tree" unique_id=960181762 groups=["weather_node", "wind_node"] instance=ExtResource("6_o4mrg")] transform = Transform3D(-0.554579, 0, 0.91229934, 0, 1.0676366, 0, -0.91229934, 0, -0.554579, 4.5340776, 0.0867235, -2.8183599) -[node name="Tree_21" parent="tree" unique_id=900507490 instance=ExtResource("6_o4mrg")] +[node name="Tree_21" parent="tree" unique_id=900507490 groups=["weather_node", "wind_node"] instance=ExtResource("6_o4mrg")] transform = Transform3D(-0.28730845, 0, 0.8336728, 0, 0.88179165, 0, -0.8336728, 0, -0.28730845, 2.7693715, 0.0867235, -1.6418893) -[node name="Tree_22" parent="tree" unique_id=1749682186 instance=ExtResource("6_o4mrg")] +[node name="Tree_22" parent="tree" unique_id=1749682186 groups=["weather_node", "wind_node"] instance=ExtResource("6_o4mrg")] transform = Transform3D(0.29675677, 0, -0.85609794, 0, 0.906073, 0, 0.85609794, 0, 0.29675677, 2.7693715, 0.0867235, -1.6418893) [node name="Flower36" parent="." unique_id=705935685 instance=ExtResource("8_1h35v")] diff --git a/tgcc/chunk/countryside/scene/rice/chunk_country_straight_02.tscn b/tgcc/chunk/countryside/scene/rice/chunk_country_straight_02.tscn index 0f88f53..a42e7b0 100644 --- a/tgcc/chunk/countryside/scene/rice/chunk_country_straight_02.tscn +++ b/tgcc/chunk/countryside/scene/rice/chunk_country_straight_02.tscn @@ -244,7 +244,7 @@ surface_material_override/0 = ExtResource("5_sy58u") surface_material_override/1 = ExtResource("5_sy58u") surface_material_override/2 = ExtResource("6_eev23") -[node name="Statue" parent="." index="11" unique_id=1814801509] +[node name="Statue" parent="." index="11" unique_id=1814801509 groups=["weather_node"]] surface_material_override/0 = ExtResource("5_sy58u") surface_material_override/1 = ExtResource("7_q2s76") diff --git a/tgcc/chunk/countryside/scene/rice/chunk_country_straight_03.tscn b/tgcc/chunk/countryside/scene/rice/chunk_country_straight_03.tscn index 7c917ad..05e18f6 100644 --- a/tgcc/chunk/countryside/scene/rice/chunk_country_straight_03.tscn +++ b/tgcc/chunk/countryside/scene/rice/chunk_country_straight_03.tscn @@ -90,19 +90,19 @@ script = ExtResource("2_e417f") north = true south = true -[node name="Argini_003" parent="." index="0" unique_id=1178813592] +[node name="Argini_003" parent="." index="0" unique_id=509439881] surface_material_override/0 = ExtResource("2_8tada") -[node name="Grass_005" parent="." index="1" unique_id=1427965126 groups=["weather_vegetables_node", "wind_node"]] +[node name="Grass_005" parent="." index="1" unique_id=188609017 groups=["weather_vegetables_node", "wind_node"]] surface_material_override/0 = ExtResource("2_8tada") -[node name="MSH_Staccioanta_1_002" parent="." index="2" unique_id=562234307] +[node name="MSH_Staccioanta_1_002" parent="." index="2" unique_id=746941179] surface_material_override/0 = ExtResource("2_vjhke") -[node name="Strada_004" parent="." index="3" unique_id=387203009 groups=["weather_node"]] +[node name="Strada_004" parent="." index="3" unique_id=604168900 groups=["weather_node"]] surface_material_override/0 = ExtResource("3_bdsn7") -[node name="Water_004" parent="." index="4" unique_id=1258756459] +[node name="Water_004" parent="." index="4" unique_id=244513747] surface_material_override/0 = ExtResource("5_uf7g8") [node name="grass" type="Node3D" parent="." index="5" unique_id=1540226859 groups=["weather_vegetables_node", "wind_node"]] diff --git a/tgcc/chunk/countryside/scene/rice/chunk_country_straight_04.tscn b/tgcc/chunk/countryside/scene/rice/chunk_country_straight_04.tscn index 30dfc38..2ffbaea 100644 --- a/tgcc/chunk/countryside/scene/rice/chunk_country_straight_04.tscn +++ b/tgcc/chunk/countryside/scene/rice/chunk_country_straight_04.tscn @@ -61,7 +61,7 @@ south = true [node name="Argini_003" parent="." index="0" unique_id=509439881] surface_material_override/0 = ExtResource("3_c4jie") -[node name="Grass_005" parent="." index="1" unique_id=188609017 groups=["weather_vegetables_node", "wind_node"]] +[node name="Grass_005" parent="." index="1" unique_id=188609017] surface_material_override/0 = ExtResource("3_c4jie") [node name="MSH_Staccioanta_1_002" parent="." index="2" unique_id=746941179] @@ -70,7 +70,7 @@ surface_material_override/0 = ExtResource("4_lr7xw") [node name="Strada_004" parent="." index="3" unique_id=604168900 groups=["weather_node"]] surface_material_override/0 = ExtResource("5_5jc2f") -[node name="Water_004" parent="." index="4" unique_id=244513747] +[node name="Water_004" parent="." index="4" unique_id=244513747 groups=["weather_node"]] surface_material_override/0 = ExtResource("6_0bmh1") [node name="grass" type="Node3D" parent="." index="5" unique_id=1540226859 groups=["weather_vegetables_node", "wind_node"]] diff --git a/tgcc/chunk/countryside/scene/rice/river/scene/chunk_river_mix2_1.tscn b/tgcc/chunk/countryside/scene/rice/river/scene/chunk_river_mix2_1.tscn index d97e817..72ff1d0 100644 --- a/tgcc/chunk/countryside/scene/rice/river/scene/chunk_river_mix2_1.tscn +++ b/tgcc/chunk/countryside/scene/rice/river/scene/chunk_river_mix2_1.tscn @@ -121,7 +121,7 @@ transform = Transform3D(-2.105941, -1.3013108, -3.4868522, -7.450568e-08, -0.647 surface_material_override/0 = ExtResource("3_6i64l") surface_material_override/1 = ExtResource("3_6i64l") -[node name="Cortile_008" parent="." index="3" unique_id=919013044] +[node name="Cortile_008" parent="." index="3" unique_id=919013044 groups=["weather_node"]] surface_material_override/0 = ExtResource("4_chuhj") [node name="Cube_037" parent="." index="4" unique_id=1360593188 groups=["weather_node"]] diff --git a/tgcc/chunk/countryside/scene/tea/chunk_country_tea_empty.tscn b/tgcc/chunk/countryside/scene/tea/chunk_country_tea_empty.tscn index 82146af..b29c54e 100644 --- a/tgcc/chunk/countryside/scene/tea/chunk_country_tea_empty.tscn +++ b/tgcc/chunk/countryside/scene/tea/chunk_country_tea_empty.tscn @@ -85,7 +85,7 @@ surface_material_override/0 = ExtResource("3_h7374") [node name="grass_001" parent="." index="3" unique_id=1653206836] surface_material_override/0 = ExtResource("4_aco6i") -[node name="Tea2" type="Node3D" parent="." index="4" unique_id=515491080 groups=["weather_vegetables_node", "wind_node"]] +[node name="Tea2" type="Node3D" parent="." index="4" unique_id=515491080 groups=["weather_vegetables_node"]] [node name="tea_plane" type="MeshInstance3D" parent="Tea2" index="0" unique_id=1884512502] transform = Transform3D(1, 0, 0, 0, -4.371139e-08, -1, 0, 1, -4.371139e-08, 0, 0, 0) diff --git a/tgcc/chunk/countryside/scene/tea/chunk_country_tea_end_03.tscn b/tgcc/chunk/countryside/scene/tea/chunk_country_tea_end_03.tscn index 8bf3d63..8f539c8 100644 --- a/tgcc/chunk/countryside/scene/tea/chunk_country_tea_end_03.tscn +++ b/tgcc/chunk/countryside/scene/tea/chunk_country_tea_end_03.tscn @@ -164,14 +164,14 @@ material_override = ExtResource("8_klscp") cast_shadow = 0 multimesh = SubResource("MultiMesh_2xngq") -[node name="Tea2" type="Node3D" parent="." index="9" unique_id=153529085 groups=["weather_vegetables_node", "wind_node"]] +[node name="Tea2" type="Node3D" parent="." index="9" unique_id=153529085 groups=["weather_vegetables_node"]] [node name="tea_plane" type="MeshInstance3D" parent="Tea2" index="0" unique_id=1170491878] transform = Transform3D(1, 0, 0, 0, -4.371139e-08, -1, 0, 1, -4.371139e-08, 0, 0, 0) visible = false mesh = SubResource("PlaneMesh_ny8qj") -[node name="bush" type="MultiMeshInstance3D" parent="Tea2" index="1" unique_id=763333607] +[node name="bush" type="MultiMeshInstance3D" parent="Tea2" index="1" unique_id=763333607 groups=["weather_vegetables_node"]] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.36843967, 0) material_override = ExtResource("14_820gh") cast_shadow = 0 diff --git a/tgcc/chunk/countryside/scene/tea/river/chunk_river_tea_curve_3.tscn b/tgcc/chunk/countryside/scene/tea/river/chunk_river_tea_curve_3.tscn index c11bb8c..d0546d3 100644 --- a/tgcc/chunk/countryside/scene/tea/river/chunk_river_tea_curve_3.tscn +++ b/tgcc/chunk/countryside/scene/tea/river/chunk_river_tea_curve_3.tscn @@ -207,13 +207,13 @@ scala_correzione_xz = 4.955 scala_correzione_y = 5.945 altezza_massima = 2.0 -[node name="tea_big" parent="." index="12" unique_id=1080521676 groups=["weather_node"] instance=ExtResource("19_5lxs6")] +[node name="tea_big" parent="." index="12" unique_id=1080521676 groups=["weather_vegetables_node"] instance=ExtResource("19_5lxs6")] transform = Transform3D(-4.371139e-08, 0, -0.8607846, 0, 1, 0, 1, 0, -3.762609e-08, 6.137363, 0, 0.21655339) -[node name="tea_medium" parent="." index="13" unique_id=774250378 groups=["weather_node"] instance=ExtResource("20_v5b08")] +[node name="tea_medium" parent="." index="13" unique_id=774250378 groups=["weather_vegetables_node"] instance=ExtResource("20_v5b08")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 0.8468988, -4.717209, 0, -5.866095) -[node name="tea_small" parent="." index="14" unique_id=738556947 groups=["weather_node"] instance=ExtResource("21_1bp38")] +[node name="tea_small" parent="." index="14" unique_id=738556947 groups=["weather_vegetables_node"] instance=ExtResource("21_1bp38")] transform = Transform3D(-3.4182502e-08, 0, -1, 0, 1, 0, 0.7820045, 0, -4.371139e-08, 1.4791412, 0, -5.8110795) [node name="Node3D" type="Node3D" parent="." index="15" unique_id=1498631029] diff --git a/tgcc/chunk/countryside/scene/tea/river/chunk_river_tea_straight_5.tscn b/tgcc/chunk/countryside/scene/tea/river/chunk_river_tea_straight_5.tscn index 06b6e2f..a1c7733 100644 --- a/tgcc/chunk/countryside/scene/tea/river/chunk_river_tea_straight_5.tscn +++ b/tgcc/chunk/countryside/scene/tea/river/chunk_river_tea_straight_5.tscn @@ -58,17 +58,17 @@ script = ExtResource("2_a7g4w") river_north = true river_south = true -[node name="Argini_011" parent="." index="0" unique_id=895986402] +[node name="Argini_011" parent="." index="0" unique_id=1103166467] surface_material_override/0 = ExtResource("3_v8v20") surface_material_override/1 = ExtResource("3_v8v20") -[node name="Grass_019" parent="." index="1" unique_id=1784106582] +[node name="Grass_019" parent="." index="1" unique_id=163702648] surface_material_override/0 = ExtResource("3_v8v20") -[node name="Water_012" parent="." index="2" unique_id=1865739867] +[node name="Water_012" parent="." index="2" unique_id=183333409] surface_material_override/0 = ExtResource("5_fp6q1") -[node name="Water_F_015" parent="." index="3" unique_id=147107428] +[node name="Water_F_015" parent="." index="3" unique_id=1691016237] surface_material_override/0 = ExtResource("5_8ajan") [node name="grass2" type="Node3D" parent="." index="4" unique_id=451356134 groups=["weather_vegetables_node", "wind_node"]] @@ -206,8 +206,8 @@ scala_correzione_xz = 4.955 scala_correzione_y = 5.945 altezza_massima = 2.0 -[node name="tea_small" parent="." index="12" unique_id=738556947 instance=ExtResource("13_oha7e")] +[node name="tea_small" parent="." index="12" unique_id=738556947 groups=["weather_vegetables_node"] instance=ExtResource("13_oha7e")] transform = Transform3D(-2.958303e-08, 0, -1, 0, 1, 0, 0.6767808, 0, -4.371139e-08, -6.1359725, 0, 5.9230976) -[node name="tea_small2" parent="." index="13" unique_id=1500366807 instance=ExtResource("13_oha7e")] +[node name="tea_small2" parent="." index="13" unique_id=1500366807 groups=["weather_vegetables_node"] instance=ExtResource("13_oha7e")] transform = Transform3D(-2.958303e-08, 0, -1, 0, 1, 0, 0.6767808, 0, -4.371139e-08, 5.933122, 0, -5.890115) diff --git a/tgcc/train/train.tscn b/tgcc/train/train.tscn index 79aa4f2..9a145a2 100644 --- a/tgcc/train/train.tscn +++ b/tgcc/train/train.tscn @@ -8,20 +8,18 @@ [ext_resource type="Script" uid="uid://5frq4qrokiy2" path="res://tgcc/train/train_glass_emission.gd" id="9_4qk3b"] [ext_resource type="Texture2D" uid="uid://j4m5wsf4magb" path="res://tgcc/chunk/material/decal/vending_decal.png" id="9_eke0t"] -[node name="Treno" unique_id=1182090923 instance=ExtResource("1_33mei")] +[node name="Treno" unique_id=1182090923 groups=["weather_node"] instance=ExtResource("1_33mei")] script = ExtResource("9_4qk3b") -[node name="Finestrini" parent="." index="0" unique_id=271431519] +[node name="Finestrini" parent="." index="0" unique_id=435624928] surface_material_override/0 = ExtResource("2_bks4l") surface_material_override/1 = ExtResource("3_sgpgi") surface_material_override/2 = ExtResource("4_gua5y") -[node name="Ruote" parent="." index="1" unique_id=1570760095] +[node name="Ruote" parent="." index="1" unique_id=1465803702] surface_material_override/0 = ExtResource("5_pj7tp") surface_material_override/1 = ExtResource("4_gua5y") -[node name="Train" parent="." index="2" unique_id=301191703 groups=["weather_node"]] - [node name="SpotLight3D2" type="SpotLight3D" parent="." index="3" unique_id=806665693] transform = Transform3D(-0.9991066, -0.0071845297, -0.041647736, -0.024456872, 0.9019672, 0.4311113, 0.034467563, 0.4317447, -0.9013371, -0.9830586, 3.6702201, 4.8446546) light_color = Color(0.8039216, 0.6784314, 0.3254902, 1) diff --git a/tgcc/train/wagon.tscn b/tgcc/train/wagon.tscn index b957a69..c5f6b52 100644 --- a/tgcc/train/wagon.tscn +++ b/tgcc/train/wagon.tscn @@ -31,7 +31,7 @@ shader_parameter/glint_sharpness = 32.0 shader_parameter/emission_color = Color(0.5882353, 0.06666667, 0.10980392, 1) shader_parameter/emission_energy = 6.50000030875 -[node name="wagon" unique_id=14655460 instance=ExtResource("1_ud2nc")] +[node name="wagon" unique_id=14655460 groups=["weather_node"] instance=ExtResource("1_ud2nc")] [node name="Finestrini_001" parent="." index="0" unique_id=596055029] surface_material_override/0 = ExtResource("2_upuw2") @@ -42,14 +42,14 @@ surface_material_override/2 = ExtResource("4_wwpam") surface_material_override/0 = ExtResource("5_yjhvb") surface_material_override/1 = ExtResource("4_wwpam") -[node name="Train_001" parent="." index="2" unique_id=2037201435 groups=["weather_node"]] +[node name="Train_001" parent="." index="2" unique_id=2037201435] surface_material_override/0 = ExtResource("6_6ck1e") surface_material_override/1 = ExtResource("7_wglgp") surface_material_override/2 = ExtResource("2_upuw2") surface_material_override/3 = ExtResource("4_wwpam") surface_material_override/4 = SubResource("ShaderMaterial_t2dm3") -[node name="Train_002" parent="." index="3" unique_id=57076645 groups=["weather_node"]] +[node name="Train_002" parent="." index="3" unique_id=57076645] surface_material_override/0 = ExtResource("6_6ck1e") [node name="Decal6" type="Decal" parent="." index="4" unique_id=207551392]