38 Commits

Author SHA1 Message Date
b4a2bb6144 biome generation optimization 2026-05-14 12:29:41 +02:00
90b9739ee0 Merge branch 'main' of https://gitea.jmpgames.it/jmp-games/tgcc 2026-05-13 18:15:58 +02:00
43556ac110 add uniqueness par for props 2026-05-13 18:15:37 +02:00
7ea515c824 Merge branch 'polish3' into main 2026-05-13 15:50:14 +00:00
4658250206 fix 2026-05-13 17:05:29 +02:00
c25e3bb4f6 add uniqueness property to chunk and manage it on biome generator 2026-05-13 12:25:16 +02:00
Matteo Sonaglioni
c796ea289d well 2026-05-12 16:54:20 +02:00
Matteo Sonaglioni
a18dc64a4f prop1 2026-05-12 16:44:21 +02:00
c52b11388a add chunks
chunk river
hero chunk
2026-05-11 13:32:31 +00:00
ce8a977541 Merge pull request 'fix river water direction2' (#15) from river_direction into main
Reviewed-on: #15
2026-05-10 16:45:11 +00:00
8ceb6cb16b fix river water direction2 2026-05-10 18:44:43 +02:00
bcf854fd74 Merge branch 'main' of https://gitea.jmpgames.it/jmp-games/tgcc 2026-05-10 11:09:41 +02:00
10b437d236 add fog update based on day 2026-05-10 11:09:27 +02:00
9c41da14a6 Merge pull request 'fix_snow_rain_fog' (#14) from fix_snow_rain_fog into main
Reviewed-on: #14
2026-05-10 09:02:01 +00:00
2aa7d1f7d4 fix snow 2026-05-10 11:01:22 +02:00
040ded5f0b fix rain 2026-05-09 14:57:07 +02:00
ddec91d515 update cloud density when is rainy or snowy 2026-05-06 23:14:51 +02:00
d8efa735dd Merge pull request 'polish2' (#12) from polish2 into main
Reviewed-on: #12
2026-05-06 20:29:12 +00:00
Matteo Sonaglioni
9bc7f38d07 add river curve 2026-05-06 22:27:54 +02:00
Matteo Sonaglioni
f4c8775a45 add river chunk 2026-05-06 21:43:34 +02:00
70d3dfe15c add ai, photo_mode and radio 2026-05-05 20:33:00 +00:00
Matteo Sonaglioni
9827b98b3e river water shader 2026-05-05 18:45:16 +02:00
Matteo Sonaglioni
977e8012aa river chunk 2026-05-05 17:03:24 +02:00
72d06560b1 add groups to scenes 2026-05-05 00:04:02 +02:00
9d62d97422 Merge pull request 'biome_gen_river' (#10) from biome_gen_river into main
Reviewed-on: #10
2026-05-04 22:00:08 +00:00
c1e99a3b8e fix merge scenes 2026-05-04 23:59:27 +02:00
8e1ba915a2 add scenes 2026-05-04 23:43:22 +02:00
Matteo Sonaglioni
577b4570da add river chunk 2026-05-04 23:35:29 +02:00
36dff9c070 remove train radar 2026-05-04 10:09:20 +02:00
56591bb907 fix snow cap 2026-05-02 18:10:51 +02:00
9f254d9725 Merge pull request 'polish1' (#6) from polish1 into main
Reviewed-on: #6
2026-05-02 16:09:44 +00:00
abae8434fc add river bioma gen + label weather random 2026-04-30 23:23:49 +02:00
Matteo Sonaglioni
e211f89fca revamp pylon 2026-04-30 17:48:08 +02:00
3c7cbdc662 Merge pull request 'biome_gen_overload' (#5) from biome_gen_overload into main
Reviewed-on: #5
2026-04-30 14:42:30 +00:00
Matteo Sonaglioni
d709d9236c Merge branch 'main' into polish1 2026-04-30 11:24:50 +02:00
Matteo Sonaglioni
9ee6d08918 chunk fix 2026-04-30 11:05:18 +02:00
Matteo Sonaglioni
3521839ed9 add bambu 2026-04-29 17:54:13 +02:00
Matteo Sonaglioni
6a62f92ed5 fog planes 2026-04-29 14:14:58 +02:00
216 changed files with 19112 additions and 441 deletions

13
.idea/.gitignore generated vendored Normal file
View File

@@ -0,0 +1,13 @@
# Default ignored files
/shelf/
/workspace.xml
# Rider ignored files
/contentModel.xml
/modules.xml
/projectSettingsUpdater.xml
/.idea.tgcc.iml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

4
.idea/encodings.xml generated Normal file
View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
</project>

8
.idea/indexLayout.xml generated Normal file
View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="UserContentModel">
<attachedFolders />
<explicitIncludes />
<explicitExcludes />
</component>
</project>

6
.idea/vcs.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

View File

@@ -0,0 +1,51 @@
extends CharacterBody3D
class_name AIBase
@export var speed: float = 4.0
var _enable_state_machine: bool = true
@export var enable_state_machine: bool:
set(value):
_enable_state_machine = value
toggle_enable_state_machine()
get:
return _enable_state_machine
@onready var patrol_radius_shape: CollisionShape3D = $%PatrolRadiusShape
@onready var nav_agent: NavigationAgent3D = $%NavigationAgent3D
@onready var state_machine: StateMachine = $%StateMachine
func _ready() -> void:
randomize()
toggle_enable_state_machine()
func toggle_enable_state_machine() -> void:
state_machine.enable = _enable_state_machine
func _physics_process(delta: float) -> void:
if !_enable_state_machine:
return
state_machine.physics_process(delta)
if nav_agent.is_navigation_finished():
velocity = Vector3.ZERO
move_and_slide()
return
var next_point = nav_agent.get_next_path_position()
var direction = global_position.direction_to(next_point)
velocity.x = direction.x * speed
velocity.z = direction.z * speed
move_and_slide()
func navigate_to_random_point() -> void:
var nav_map_rid = get_world_3d().get_navigation_map()
var patrol_radius = patrol_radius_shape.shape.radius
var target_point_in_space = global_position + Vector3(randf_range(-1, 1), 0, randf_range(-1, 1)).normalized() * randf_range(0, patrol_radius)
var closest_valid_point = NavigationServer3D.map_get_closest_point(nav_map_rid, target_point_in_space)
nav_agent.target_position = closest_valid_point

View File

@@ -0,0 +1 @@
uid://b30p1yqojbbbk

View File

@@ -0,0 +1,44 @@
[gd_scene format=3 uid="uid://clx701xdwelgx"]
[ext_resource type="Script" uid="uid://b30p1yqojbbbk" path="res://core/ai/agents/base/ai_base.gd" id="1_4d1nn"]
[ext_resource type="Script" uid="uid://ps3vlu2qvmop" path="res://core/ai/framework/state_machine.gd" id="2_q1hg3"]
[ext_resource type="Script" uid="uid://nga8qx56iwgu" path="res://core/ai/agents/base/idle_state.gd" id="3_26faq"]
[ext_resource type="Script" uid="uid://bngfthvt04ivv" path="res://core/ai/agents/base/patrol_state.gd" id="4_lim44"]
[sub_resource type="CapsuleMesh" id="CapsuleMesh_mh3lg"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_mh3lg"]
[sub_resource type="SphereShape3D" id="SphereShape3D_lim44"]
radius = 20.0
[node name="AiBase" type="CharacterBody3D" unique_id=1228675528]
script = ExtResource("1_4d1nn")
[node name="MeshInstance3D" type="MeshInstance3D" parent="." unique_id=214482161]
mesh = SubResource("CapsuleMesh_mh3lg")
[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=92811823]
shape = SubResource("CapsuleShape3D_mh3lg")
[node name="NavigationAgent3D" type="NavigationAgent3D" parent="." unique_id=1370024449]
unique_name_in_owner = true
[node name="StateMachine" type="Node" parent="." unique_id=1286404264 node_paths=PackedStringArray("initial_state")]
unique_name_in_owner = true
script = ExtResource("2_q1hg3")
initial_state = NodePath("IdleState")
[node name="IdleState" type="Node" parent="StateMachine" unique_id=763668255]
script = ExtResource("3_26faq")
state_id = &"idle"
[node name="PatrolState" type="Node" parent="StateMachine" unique_id=2054606629]
script = ExtResource("4_lim44")
state_id = &"patrol"
[node name="PatrolRadiusShape" type="CollisionShape3D" parent="." unique_id=1379515938]
unique_name_in_owner = true
shape = SubResource("SphereShape3D_lim44")
disabled = true
debug_color = Color(1, 1, 0, 1)

View File

@@ -0,0 +1,26 @@
extends State
const PATROL_STATE_ID: StringName = &"patrol"
@export var wait_time: float = 3.0
var runtime_timer: Timer
func enter() -> void:
runtime_timer = Timer.new()
runtime_timer.name = "IdleTimer"
add_child(runtime_timer)
runtime_timer.one_shot = true
runtime_timer.timeout.connect(_on_timer_timeout)
runtime_timer.start(wait_time)
func exit() -> void:
if runtime_timer:
if runtime_timer.is_connected("timeout", _on_timer_timeout):
runtime_timer.timeout.disconnect(_on_timer_timeout)
runtime_timer.queue_free()
runtime_timer = null
func _on_timer_timeout() -> void:
transitioned.emit(self, PATROL_STATE_ID)

View File

@@ -0,0 +1 @@
uid://nga8qx56iwgu

View File

@@ -0,0 +1,12 @@
extends State
const IDLE_STATE_ID: StringName = &"idle"
@onready var agent: AIBase = owner
func enter() -> void:
agent.navigate_to_random_point()
func physics_update(_delta) -> void:
if agent.nav_agent.is_navigation_finished():
transitioned.emit(self, IDLE_STATE_ID)

View File

@@ -0,0 +1 @@
uid://bngfthvt04ivv

View File

@@ -0,0 +1,20 @@
extends Node
class_name State
@export var state_id: StringName = &""
@warning_ignore("unused_signal")
signal transitioned(state: State, new_state_id: StringName)
func enter() -> void:
pass
func exit() -> void:
pass
func update(_delta) -> void:
pass
func physics_update(_delta) -> void:
pass

View File

@@ -0,0 +1 @@
uid://dpso7abi5ftyw

View File

@@ -0,0 +1,61 @@
extends Node
class_name StateMachine
@export var initial_state: State
var current_state: State
var states: Dictionary[StringName, State] = {}
var is_initialized: bool = false
var _enabled: bool = true
var enable: bool:
set(value):
_enabled = value
_set_enabled(value)
get:
return _enabled
func _ready() -> void:
_initialize_states()
_set_enabled(enable)
func _initialize_states() -> void:
if is_initialized:
return
for state in get_children():
if state is State:
states[state.state_id] = state
state.transitioned.connect(_on_state_transition)
is_initialized = true
func _set_enabled(value: bool) -> void:
_enabled = value
if not _enabled:
return
_initialize_states()
if initial_state and current_state == null:
current_state = initial_state
current_state.enter()
func physics_process(delta) -> void:
if current_state and _enabled:
current_state.physics_update(delta)
func _on_state_transition(state: State, new_state_id: StringName) -> void:
if state != current_state:
return
var new_state = states.get(new_state_id)
if not new_state:
return
if current_state:
current_state.exit()
current_state = new_state
current_state.enter()

View File

@@ -0,0 +1 @@
uid://ps3vlu2qvmop

View File

@@ -0,0 +1,31 @@
extends Node
const MIN_VOLUME: float = 0.0
const MAX_VOLUME: float = 1.0
func _ready() -> void:
load_save_data()
func load_save_data() -> void:
for bus_name in GameState.save_data.audio_bus_volumes:
_apply_audio_bus_volume(bus_name, GameState.save_data.audio_bus_volumes[bus_name])
func set_audio_bus_volume(bus_name: StringName, linear_value: float) -> void:
var normalized_bus_name := str(bus_name)
var clamped_value := clampf(linear_value, MIN_VOLUME, MAX_VOLUME)
GameState.save_data.audio_bus_volumes[normalized_bus_name] = clamped_value
_apply_audio_bus_volume(normalized_bus_name, clamped_value)
GameState.save_game()
func get_audio_bus_volume(bus_name: StringName, default_value: float = 1.0) -> float:
return float(GameState.save_data.audio_bus_volumes.get(str(bus_name), default_value))
func _apply_audio_bus_volume(bus_name: String, linear_value: float) -> void:
var bus_index := AudioServer.get_bus_index(bus_name)
if bus_index == -1:
return
var clamped_value := clampf(linear_value, MIN_VOLUME, MAX_VOLUME)
AudioServer.set_bus_volume_db(bus_index, linear_to_db(clamped_value))
AudioServer.set_bus_mute(bus_index, is_zero_approx(clamped_value))

View File

@@ -0,0 +1 @@
uid://dcttbbavtwtsg

View File

@@ -0,0 +1,56 @@
extends VBoxContainer
class_name AudioOption
const MIN_VOLUME: float = 0.0
const MAX_VOLUME: float = 1.0
@export var bus_name: StringName = &"Master"
@export var label_text: String = "Master Volume"
@export_range(0.0, 1.0, 0.01) var default_volume: float = 1.0
@onready var label: Label = $Label
@onready var slider: HSlider = $HSlider
func _ready() -> void:
slider.min_value = MIN_VOLUME
slider.max_value = MAX_VOLUME
slider.step = 0.01
slider.value_changed.connect(_on_slider_value_changed)
refresh()
func refresh() -> void:
label.text = label_text
if not has_bus():
slider.set_value_no_signal(default_volume)
slider.editable = false
label.text = "%s (bus missing)" % label_text
return
slider.editable = true
var saved_volume := AudioManager.get_audio_bus_volume(bus_name, default_volume)
slider.set_value_no_signal(saved_volume)
apply_current_value()
func reset_to_default() -> void:
slider.value = default_volume
func apply_current_value() -> void:
_set_bus_volume(slider.value)
func has_bus() -> bool:
return get_bus_index() != -1
func get_bus_index() -> int:
return AudioServer.get_bus_index(bus_name)
func _set_bus_volume(linear_value: float) -> void:
if not has_bus():
return
var clamped_value := clampf(linear_value, MIN_VOLUME, MAX_VOLUME)
AudioManager.set_audio_bus_volume(bus_name, clamped_value)
func _on_slider_value_changed(value: float) -> void:
_set_bus_volume(value)

View File

@@ -0,0 +1 @@
uid://bnh1y560h55vc

View File

@@ -0,0 +1,14 @@
[gd_scene format=3 uid="uid://cescrovsjlwke"]
[ext_resource type="Script" uid="uid://bnh1y560h55vc" path="res://core/audio/settings/audio_option.gd" id="1_orafl"]
[node name="AudioOption" type="VBoxContainer" unique_id=1509773712]
custom_minimum_size = Vector2(300, 0)
script = ExtResource("1_orafl")
[node name="Label" type="Label" parent="." unique_id=781845786]
layout_mode = 2
text = "Master Volume"
[node name="HSlider" type="HSlider" parent="." unique_id=1286896253]
layout_mode = 2

View File

@@ -0,0 +1,36 @@
extends Control
class_name SettingsMenu
@onready var audio_options_container: VBoxContainer = $%AudioOptionsContainer
@onready var reset_button: Button = $%ResetToDefault_Button
@onready var close_button: Button = $%Close_Button
func _ready() -> void:
reset_button.pressed.connect(_on_reset_to_default_button_pressed)
close_button.pressed.connect(_on_close_button_pressed)
_refresh_audio_options()
func _get_audio_options() -> Array[AudioOption]:
var audio_options: Array[AudioOption] = []
for child in audio_options_container.get_children():
if child is AudioOption:
audio_options.append(child)
return audio_options
func _refresh_audio_options() -> void:
for audio_option in _get_audio_options():
audio_option.refresh()
func _apply_current_audio_values() -> void:
for audio_option in _get_audio_options():
audio_option.apply_current_value()
func _on_reset_to_default_button_pressed() -> void:
for audio_option in _get_audio_options():
audio_option.reset_to_default()
func _on_close_button_pressed() -> void:
visible = false

View File

@@ -0,0 +1 @@
uid://cvr25q1blyxg

View File

@@ -0,0 +1,74 @@
[gd_scene format=3 uid="uid://caqf471x0kttc"]
[ext_resource type="Script" uid="uid://cvr25q1blyxg" path="res://core/audio/settings/settings_menu.gd" id="1_4lekq"]
[ext_resource type="PackedScene" uid="uid://cescrovsjlwke" path="res://core/audio/settings/audio_option.tscn" id="1_hwcco"]
[node name="SettingsMenu" type="Control" unique_id=1639777294]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_4lekq")
[node name="PanelContainer" type="PanelContainer" parent="." unique_id=315821242]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -79.5
offset_top = -110.0
offset_right = 79.5
offset_bottom = 110.0
grow_horizontal = 2
grow_vertical = 2
[node name="MarginContainer" type="MarginContainer" parent="PanelContainer" unique_id=648635784]
layout_mode = 2
size_flags_vertical = 0
theme_override_constants/margin_left = 12
theme_override_constants/margin_top = 12
theme_override_constants/margin_right = 12
theme_override_constants/margin_bottom = 12
[node name="AudioOptionsContainer" type="VBoxContainer" parent="PanelContainer/MarginContainer" unique_id=824023653]
unique_name_in_owner = true
layout_mode = 2
theme_override_constants/separation = 12
[node name="MasterVolume_AudioOption" parent="PanelContainer/MarginContainer/AudioOptionsContainer" unique_id=1509773712 instance=ExtResource("1_hwcco")]
layout_mode = 2
[node name="HSeparator" type="HSeparator" parent="PanelContainer/MarginContainer/AudioOptionsContainer" unique_id=1053430754]
layout_mode = 2
[node name="MusicVolume_AudioOption" parent="PanelContainer/MarginContainer/AudioOptionsContainer" unique_id=690924616 instance=ExtResource("1_hwcco")]
layout_mode = 2
bus_name = &"Music"
label_text = "Music Volume"
[node name="HSeparator2" type="HSeparator" parent="PanelContainer/MarginContainer/AudioOptionsContainer" unique_id=453716295]
layout_mode = 2
[node name="SFXVolume_AudioOption" parent="PanelContainer/MarginContainer/AudioOptionsContainer" unique_id=2096291127 instance=ExtResource("1_hwcco")]
layout_mode = 2
bus_name = &"SFX"
label_text = "SFX Volume"
[node name="HSeparator3" type="HSeparator" parent="PanelContainer/MarginContainer/AudioOptionsContainer" unique_id=498553283]
layout_mode = 2
[node name="ResetToDefault_Button" type="Button" parent="PanelContainer/MarginContainer/AudioOptionsContainer" unique_id=720420423]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 0
text = "Reset To Default"
[node name="Close_Button" type="Button" parent="PanelContainer/MarginContainer/AudioOptionsContainer" unique_id=1137906684]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 0
text = "Close"

View File

@@ -1,41 +1,79 @@
extends Node3D extends Node3D
const CHUNK_GENERATION_STEPS_PER_FRAME: int = 2 const CHUNK_TYPE_BIOME: int = 0
const CHUNK_CLEANUP_STEPS_PER_FRAME: int = 4 const CHUNK_TYPE_STRAIGHT_TRACK: int = 1
const LAMPPOST_WIRE_STEPS_PER_FRAME: int = 1 const CHUNK_TYPE_CURVED_TRACK: int = 2
const CHUNK_GENERATION_FRAME_BUDGET_USEC: int = 2000 #2 ms/frame to generate chunks
const CHUNK_CLEANUP_FRAME_BUDGET_USEC: int = 1000 #1 ms/frame per cleanup
const LAMPPOST_WIRE_FRAME_BUDGET_USEC: int = 1000 #1 ms/frame per i fili dei lampioni
#(about 4 ms o work for frame)
#Se compaiono chunk troppo lentamente davanti al treno:
#aumentare generazione a 3000 o 4000
#Se ci sono micro-scatti:
#abbassare generazione a 1000 o 1500
#Se i fili appaiono in ritardo:
#aumentare wire a 1500 o 2000
#Se il cleanup causa scatti:
#abbassare cleanup a 500
const MAX_CHUNK_UNIQUENESS: int = 5
const RAILWAY_SCENE_DIRECTORY: String = "res://tgcc/chunk/railway/scene"
const RIVER_SIDE_ORDER: Array[String] = ["north", "est", "south", "west"]
const RIVER_DIRECTIONS: Dictionary = {
"north": Vector2(0.0, -1.0),
"est": Vector2(1.0, 0.0),
"south": Vector2(0.0, 1.0),
"west": Vector2(-1.0, 0.0),
}
const RIVER_NEIGHBOUR_OFFSETS: Dictionary = {
"north": Vector2i(0, -1),
"est": Vector2i(1, 0),
"south": Vector2i(0, 1),
"west": Vector2i(-1, 0),
}
@export_group("Rails") @export_group("Rails")
@export var rail_path: Path3D @export var rail_path: Path3D #rail path
@export_group("Biomes") @export_group("Biomes")
@export var biome_list: Array[Biome] @export var biome_list: Array[Biome] #list of scenes for the biome
@export_group("Grid and Area") @export_group("Grid and Area")
@export var chunk_size: float = 20.0 @export var chunk_size: float = 20.0 #size of a cell; default 20 (global position is defined dividing x and z for this value)
@export var eye_line: int = 3 @export var eye_line: int = 3 #cells to be considerated around the train (e.g. 3 => a square of cells from -3 to 3 around train cell)
@export var district_scale: float = 0.05 @export var district_scale: float = 0.05 #noise value to distribuite biome; low values create large area, high values create biome with more variants
@export_group("Lamppost") @export_group("Lamppost")
@export var lamppost_wire_material: ShaderMaterial @export var lamppost_wire_material: ShaderMaterial
@export_range(0.01, 1.0) var wire_thickness: float = 0.05 @export_range(0.01, 1.0) var wire_thickness: float = 0.05
@export var lamppost_dist_factor: int = 10 #max distance of connections
var board: Dictionary = {} var board: Dictionary = {}
var last_pos_train: Vector2i = Vector2i(999999, 999999) var last_pos_train: Vector2i = Vector2i(999999, 999999)
var noise_generator: FastNoiseLite var noise_generator: FastNoiseLite
var altitude_generator: FastNoiseLite var altitude_generator: FastNoiseLite
var wire_connections: Dictionary = {} var wire_connections: Dictionary = {}
var chunk_candidate_cache: Dictionary = {} var chunk_candidate_cache: Dictionary = {} #node cache (metadata)
var prop_candidate_cache: Dictionary = {}
var pending_generation_cells: Array[Vector2i] = [] var pending_generation_cells: Array[Vector2i] = []
var pending_cleanup_cells: Array[Vector2i] = [] var pending_cleanup_cells: Array[Vector2i] = []
var pending_wire_cells: Array[Vector2i] = [] var pending_wire_cells: Array[Vector2i] = []
var pending_generation_cursor: int = 0
var pending_cleanup_cursor: int = 0
var pending_wire_cursor: int = 0
var pending_wire_lookup: Dictionary = {} var pending_wire_lookup: Dictionary = {}
var pending_radar_update: bool = false var rail_chunk_catalogue: Dictionary = {} #rails chunk list
var manual_biome: Biome = null var manual_biome: Biome = null
func _ready() -> void: func _ready() -> void:
if biome_list.is_empty() or rail_path == null: return if biome_list.is_empty() or rail_path == null: return
#connect events
UIEvents.update_rail_chunks.connect(_update_rail_chunks)
#noise generator for biome and altitute
noise_generator = FastNoiseLite.new() noise_generator = FastNoiseLite.new()
noise_generator.noise_type = FastNoiseLite.TYPE_PERLIN noise_generator.noise_type = FastNoiseLite.TYPE_PERLIN
noise_generator.seed = randi() noise_generator.seed = randi()
@@ -46,7 +84,10 @@ func _ready() -> void:
altitude_generator.seed = randi() altitude_generator.seed = randi()
altitude_generator.frequency = district_scale * 0.5 altitude_generator.frequency = district_scale * 0.5
#fill cache with available chunk
_warm_chunk_candidate_cache() _warm_chunk_candidate_cache()
_warm_rail_chunk_catalogue()
#set unique pieces
_update_set_pieces() _update_set_pieces()
func _update_set_pieces() -> void: func _update_set_pieces() -> void:
@@ -61,7 +102,7 @@ func _update_set_pieces() -> void:
var local_biome = "" var local_biome = ""
if manual_biome != null: if manual_biome != null:
local_biome = manual_biome.nome local_biome = manual_biome.name
else: else:
var grid_x = roundi(sp.global_position.x / chunk_size) var grid_x = roundi(sp.global_position.x / chunk_size)
var grid_z = roundi(sp.global_position.z / chunk_size) var grid_z = roundi(sp.global_position.z / chunk_size)
@@ -87,7 +128,7 @@ func _destroy_and_regenrate_world() -> void:
#Destroy all models #Destroy all models
for pos in board.keys(): for pos in board.keys():
var cella = board[pos] var cella = board[pos]
if cella["type"] != "obstacle": if not _is_persistent_obstacle(cella):
if cella.has("node") and is_instance_valid(cella["node"]): if cella.has("node") and is_instance_valid(cella["node"]):
cella["node"].queue_free() cella["node"].queue_free()
@@ -100,18 +141,14 @@ func _destroy_and_regenrate_world() -> void:
if rail_path != null and rail_path.train_instance != null: if rail_path != null and rail_path.train_instance != null:
var train_pos = rail_path.train_instance.global_position var train_pos = rail_path.train_instance.global_position
var current_pos = Vector2i(roundi(train_pos.x / chunk_size), roundi(train_pos.z / chunk_size)) var current_pos = Vector2i(roundi(train_pos.x / chunk_size), roundi(train_pos.z / chunk_size))
_refresh_world_work(current_pos) _refresh_world(current_pos)
pending_radar_update = true
func _process(_delta: float) -> void: func _process(_delta: float) -> void:
#based on time budgets the queues are evaluated by frame and not all together
_drain_cleanup_queue() _drain_cleanup_queue()
_drain_generation_queue() _drain_generation_queue()
_drain_wire_queue() _drain_wire_queue()
if pending_radar_update:
pending_radar_update = false
_train_radar()
func _physics_process(_delta: float) -> void: func _physics_process(_delta: float) -> void:
if rail_path == null or rail_path.train_instance == null: return if rail_path == null or rail_path.train_instance == null: return
@@ -122,8 +159,7 @@ func _physics_process(_delta: float) -> void:
if current_pos != last_pos_train: if current_pos != last_pos_train:
last_pos_train = current_pos last_pos_train = current_pos
_refresh_world_work(current_pos) _refresh_world(current_pos)
pending_radar_update = true
func collect_all_chunkinfo(root: Node, list: Array[Node]) -> void: func collect_all_chunkinfo(root: Node, list: Array[Node]) -> void:
if root == null: return if root == null: return
@@ -134,6 +170,15 @@ func collect_all_chunkinfo(root: Node, list: Array[Node]) -> void:
for child in root.get_children(): for child in root.get_children():
collect_all_chunkinfo(child, list) collect_all_chunkinfo(child, list)
func collect_all_propinfo(root: Node, list: Array[Node]) -> void:
if root == null: return
if "available_props" in root:
list.append(root)
for child in root.get_children():
collect_all_propinfo(child, list)
func _warm_chunk_candidate_cache() -> void: func _warm_chunk_candidate_cache() -> void:
var unique_scenes: Dictionary = {} var unique_scenes: Dictionary = {}
@@ -154,6 +199,28 @@ func _warm_chunk_candidate_cache() -> void:
for scene in unique_scenes.values(): for scene in unique_scenes.values():
_get_chunk_scene_metadata(scene) _get_chunk_scene_metadata(scene)
func _warm_rail_chunk_catalogue() -> void:
rail_chunk_catalogue.clear()
var directory := DirAccess.open(RAILWAY_SCENE_DIRECTORY)
if directory == null:
return
directory.list_dir_begin()
var file_name := directory.get_next()
while file_name != "":
if not directory.current_is_dir() and file_name.ends_with(".tscn"):
var scene_path := "%s/%s" % [RAILWAY_SCENE_DIRECTORY, file_name]
var scene := load(scene_path) as PackedScene
if scene != null:
var chunk_type = _get_chunk_type_from_scene(scene)
if chunk_type == CHUNK_TYPE_STRAIGHT_TRACK or chunk_type == CHUNK_TYPE_CURVED_TRACK:
if not rail_chunk_catalogue.has(chunk_type):
rail_chunk_catalogue[chunk_type] = []
rail_chunk_catalogue[chunk_type].append(scene)
file_name = directory.get_next()
directory.list_dir_end()
func _get_chunk_scene_cache_key(scene: PackedScene) -> String: func _get_chunk_scene_cache_key(scene: PackedScene) -> String:
if scene == null: if scene == null:
return "" return ""
@@ -194,6 +261,7 @@ func _get_chunk_scene_metadata(scene: PackedScene) -> Dictionary:
"info_path": info_path, "info_path": info_path,
"rotations": rotations, "rotations": rotations,
"has_lamppost": "have_lamppost" in info_node and info_node.have_lamppost, "has_lamppost": "have_lamppost" in info_node and info_node.have_lamppost,
"uniqueness": _get_chunk_uniqueness_from_info(info_node),
} }
preview_chunk.queue_free() preview_chunk.queue_free()
chunk_candidate_cache[key] = metadata chunk_candidate_cache[key] = metadata
@@ -209,19 +277,129 @@ func _get_cached_chunk_info(instance: Node, scene: PackedScene) -> Node:
return instance return instance
return instance.get_node_or_null(info_path) return instance.get_node_or_null(info_path)
func _get_chunk_type_from_scene(scene: PackedScene) -> int:
if scene == null:
return CHUNK_TYPE_BIOME
var preview_chunk = scene.instantiate()
var info_list: Array[Node] = []
collect_all_chunkinfo(preview_chunk, info_list)
var info_node = info_list[0] if info_list.size() > 0 else null
var chunk_type = CHUNK_TYPE_BIOME
if info_node != null and "chunk_type" in info_node:
chunk_type = info_node.chunk_type
preview_chunk.queue_free()
return chunk_type
func _clear_pending_world_work() -> void: func _clear_pending_world_work() -> void:
pending_generation_cells.clear() pending_generation_cells.clear()
pending_cleanup_cells.clear() pending_cleanup_cells.clear()
pending_wire_cells.clear() pending_wire_cells.clear()
pending_generation_cursor = 0
pending_cleanup_cursor = 0
pending_wire_cursor = 0
pending_wire_lookup.clear() pending_wire_lookup.clear()
pending_radar_update = false
func _refresh_world_work(center: Vector2i) -> void: func _collect_replaceable_rail_chunks(root: Node, result: Array[Node3D]) -> void:
if root == null:
return
if root is Node3D:
var node_3d := root as Node3D
if node_3d.scene_file_path.begins_with(RAILWAY_SCENE_DIRECTORY):
var info_list: Array[Node] = []
collect_all_chunkinfo(node_3d, info_list)
var info_node = info_list[0] if info_list.size() > 0 else null
if info_node != null and "chunk_type" in info_node:
var chunk_type = info_node.chunk_type
if chunk_type == CHUNK_TYPE_STRAIGHT_TRACK or chunk_type == CHUNK_TYPE_CURVED_TRACK:
result.append(node_3d)
return
for child in root.get_children():
_collect_replaceable_rail_chunks(child, result)
func _pick_replacement_rail_scene(chunk_type: int, current_scene_path: String) -> PackedScene:
var candidates: Array = rail_chunk_catalogue.get(chunk_type, [])
if candidates.is_empty():
return null
var alternatives: Array[PackedScene] = []
for candidate in candidates:
var scene := candidate as PackedScene
if scene != null and scene.resource_path != current_scene_path:
alternatives.append(scene)
if not alternatives.is_empty():
return alternatives.pick_random()
return candidates.pick_random() as PackedScene
func _replace_rail_chunk_instance(chunk_root: Node3D) -> bool:
if chunk_root == null or not is_instance_valid(chunk_root):
return false
var info_list: Array[Node] = []
collect_all_chunkinfo(chunk_root, info_list)
var info_node = info_list[0] if info_list.size() > 0 else null
if info_node == null or not "chunk_type" in info_node:
return false
var replacement_scene = _pick_replacement_rail_scene(info_node.chunk_type, chunk_root.scene_file_path)
if replacement_scene == null:
return false
var chunk_parent = chunk_root.get_parent()
var replacement = replacement_scene.instantiate() as Node3D
if chunk_parent == null or replacement == null:
return false
var chunk_index = chunk_root.get_index()
var chunk_name = chunk_root.name
chunk_root.name = "%s_old" % chunk_name
replacement.transform = chunk_root.transform
chunk_parent.add_child(replacement)
chunk_parent.move_child(replacement, chunk_index)
replacement.name = chunk_name
replacement.owner = chunk_root.owner
chunk_root.queue_free()
return true
#rebuild the scene catalogue from res://tgcc/chunk/railway/scene,
#than serach on the current scene which chunks can be changed and for each one chose a new scene (the same kind)
func _refresh_rail_chunks() -> void:
print("update rail chunks")
_warm_rail_chunk_catalogue()
var current_scene: Node = get_tree().current_scene
if current_scene == null:
return
var replaceable_chunks: Array[Node3D] = []
_collect_replaceable_rail_chunks(current_scene, replaceable_chunks)
var replaced_count = 0
for chunk_root in replaceable_chunks:
if _replace_rail_chunk_instance(chunk_root):
replaced_count += 1
if replaced_count > 0:
await get_tree().process_frame
_destroy_and_regenrate_world()
func _update_rail_chunks() -> void:
call_deferred("_refresh_rail_chunks")
func _refresh_world(center: Vector2i) -> void:
_rebuild_generation_queue(center) _rebuild_generation_queue(center)
_rebuild_cleanup_queue(center) _rebuild_cleanup_queue(center)
#check cells around the train by rings:
#first the center, then borders with distance = 1, the distance = 2 and so to eye_line.
#Use maxi(abs(x), abs(z)) to know the border of the ring. Cells closest to the train have more priority
func _rebuild_generation_queue(center: Vector2i) -> void: func _rebuild_generation_queue(center: Vector2i) -> void:
pending_generation_cells.clear() pending_generation_cells.clear()
pending_generation_cursor = 0
for radius in range(eye_line + 1): for radius in range(eye_line + 1):
for x in range(-radius, radius + 1): for x in range(-radius, radius + 1):
@@ -234,13 +412,17 @@ func _rebuild_generation_queue(center: Vector2i) -> void:
continue continue
pending_generation_cells.append(grid_pos) pending_generation_cells.append(grid_pos)
#For each cells add to cleanup queue the cells too far
#Use eye_line plus a margin value to hide chunks not instantly when go out of the eye line
#Persistent obstacle cells are not deleted (rails or set_pieces)
func _rebuild_cleanup_queue(center: Vector2i) -> void: func _rebuild_cleanup_queue(center: Vector2i) -> void:
pending_cleanup_cells.clear() pending_cleanup_cells.clear()
pending_cleanup_cursor = 0
var safe_margin = 2 var safe_margin = 2
for grid_pos in board.keys(): for grid_pos in board.keys():
var cell = board[grid_pos] var cell = board[grid_pos]
if cell["type"] == "obstacle": if _is_persistent_obstacle(cell):
continue continue
var dist_x = abs(grid_pos.x - center.x) var dist_x = abs(grid_pos.x - center.x)
@@ -248,10 +430,16 @@ func _rebuild_cleanup_queue(center: Vector2i) -> void:
if dist_x > eye_line + safe_margin or dist_z > eye_line + safe_margin: if dist_x > eye_line + safe_margin or dist_z > eye_line + safe_margin:
pending_cleanup_cells.append(grid_pos) pending_cleanup_cells.append(grid_pos)
#Check if a queue can continue to work based on time budget setted
func _queue_has_frame_budget(start_usec: int, budget_usec: int, processed: int) -> bool:
return processed == 0 or Time.get_ticks_usec() - start_usec < budget_usec
func _drain_generation_queue() -> void: func _drain_generation_queue() -> void:
var processed = 0 var processed: int = 0
while processed < CHUNK_GENERATION_STEPS_PER_FRAME and not pending_generation_cells.is_empty(): var start_usec: int = Time.get_ticks_usec()
var grid_pos = pending_generation_cells.pop_front() while pending_generation_cursor < pending_generation_cells.size() and _queue_has_frame_budget(start_usec, CHUNK_GENERATION_FRAME_BUDGET_USEC, processed):
var grid_pos: Vector2i = pending_generation_cells[pending_generation_cursor]
pending_generation_cursor += 1
if board.has(grid_pos): if board.has(grid_pos):
continue continue
@@ -260,15 +448,21 @@ func _drain_generation_queue() -> void:
_add_compatible_biome(grid_pos) _add_compatible_biome(grid_pos)
processed += 1 processed += 1
if pending_generation_cursor >= pending_generation_cells.size():
pending_generation_cells.clear()
pending_generation_cursor = 0
func _drain_cleanup_queue() -> void: func _drain_cleanup_queue() -> void:
var processed = 0 var processed: int = 0
while processed < CHUNK_CLEANUP_STEPS_PER_FRAME and not pending_cleanup_cells.is_empty(): var start_usec: int = Time.get_ticks_usec()
var grid_pos = pending_cleanup_cells.pop_front() while pending_cleanup_cursor < pending_cleanup_cells.size() and _queue_has_frame_budget(start_usec, CHUNK_CLEANUP_FRAME_BUDGET_USEC, processed):
var grid_pos: Vector2i = pending_cleanup_cells[pending_cleanup_cursor]
pending_cleanup_cursor += 1
if not board.has(grid_pos): if not board.has(grid_pos):
continue continue
var cell = board[grid_pos] var cell = board[grid_pos]
if cell["type"] == "obstacle": if _is_persistent_obstacle(cell):
continue continue
if cell.has("node") and is_instance_valid(cell["node"]): if cell.has("node") and is_instance_valid(cell["node"]):
@@ -276,6 +470,10 @@ func _drain_cleanup_queue() -> void:
board.erase(grid_pos) board.erase(grid_pos)
processed += 1 processed += 1
if pending_cleanup_cursor >= pending_cleanup_cells.size():
pending_cleanup_cells.clear()
pending_cleanup_cursor = 0
func _queue_lamppost_wire_connection(grid_pos: Vector2i) -> void: func _queue_lamppost_wire_connection(grid_pos: Vector2i) -> void:
if pending_wire_lookup.has(grid_pos): if pending_wire_lookup.has(grid_pos):
return return
@@ -283,9 +481,11 @@ func _queue_lamppost_wire_connection(grid_pos: Vector2i) -> void:
pending_wire_cells.append(grid_pos) pending_wire_cells.append(grid_pos)
func _drain_wire_queue() -> void: func _drain_wire_queue() -> void:
var processed = 0 var processed: int = 0
while processed < LAMPPOST_WIRE_STEPS_PER_FRAME and not pending_wire_cells.is_empty(): var start_usec: int = Time.get_ticks_usec()
var grid_pos = pending_wire_cells.pop_front() while pending_wire_cursor < pending_wire_cells.size() and _queue_has_frame_budget(start_usec, LAMPPOST_WIRE_FRAME_BUDGET_USEC, processed):
var grid_pos: Vector2i = pending_wire_cells[pending_wire_cursor]
pending_wire_cursor += 1
pending_wire_lookup.erase(grid_pos) pending_wire_lookup.erase(grid_pos)
if not board.has(grid_pos): if not board.has(grid_pos):
@@ -296,6 +496,10 @@ func _drain_wire_queue() -> void:
_connect_lamppost_wires(grid_pos) _connect_lamppost_wires(grid_pos)
processed += 1 processed += 1
if pending_wire_cursor >= pending_wire_cells.size():
pending_wire_cells.clear()
pending_wire_cursor = 0
func _generate_pieces_around_train(center: Vector2i) -> void: func _generate_pieces_around_train(center: Vector2i) -> void:
for x in range(-eye_line, eye_line + 1): for x in range(-eye_line, eye_line + 1):
for z in range(-eye_line, eye_line + 1): for z in range(-eye_line, eye_line + 1):
@@ -306,6 +510,8 @@ func _generate_pieces_around_train(center: Vector2i) -> void:
if not ce_obstacle: if not ce_obstacle:
_add_compatible_biome(grid_pos) _add_compatible_biome(grid_pos)
#Decice which catalogue of chunks use for a cell. If manual_biome is set use always it
#Otherwise read noise_generator.get_noise_2d to give an index for biome_list
func _choose_catalogue_by_cell(grid_pos: Vector2i) -> Array[PackedScene]: func _choose_catalogue_by_cell(grid_pos: Vector2i) -> Array[PackedScene]:
if manual_biome != null: if manual_biome != null:
return manual_biome.available_chunks return manual_biome.available_chunks
@@ -323,6 +529,143 @@ func _get_procedural_biome_name(value: float) -> String:
var index = clamp(int(normalized_value * biome_list.size()), 0, biome_list.size() - 1) var index = clamp(int(normalized_value * biome_list.size()), 0, biome_list.size() - 1)
return biome_list[index].name return biome_list[index].name
func _get_chunk_uniqueness_from_info(info_node: Node) -> int:
if info_node != null and "uniqueness" in info_node:
return clampi(info_node.uniqueness, 0, MAX_CHUNK_UNIQUENESS)
return 0
func _get_prop_uniqueness_from_info(info_node: Node) -> int:
if info_node != null and "uniqueness" in info_node:
return clampi(info_node.uniqueness, 0, MAX_CHUNK_UNIQUENESS)
return -1
func _is_persistent_obstacle(cell: Dictionary) -> bool:
return cell.get("type", "") == "obstacle" and cell.get("persistent", true)
func _has_nearby_unique_chunk(grid_pos: Vector2i, uniqueness: int) -> bool:
if uniqueness <= 0:
return false
for nearby_pos in board.keys():
var nearby_uniqueness = int(board[nearby_pos].get("uniqueness", 0))
if nearby_uniqueness <= 0:
continue
var min_distance = maxi(uniqueness, nearby_uniqueness)
var dist_x = abs(nearby_pos.x - grid_pos.x)
var dist_z = abs(nearby_pos.y - grid_pos.y)
if dist_x <= min_distance and dist_z <= min_distance:
return true
return false
func _get_uniqueness_pick_weight(uniqueness: int) -> float:
return 1.0 / pow(float(uniqueness + 1), 2.0)
func _pick_weighted_candidate(candidates: Array) -> Dictionary:
var total_weight = 0.0
for candidate in candidates:
total_weight += candidate.weight
if total_weight <= 0.0:
return candidates.pick_random()
var target_weight = randf() * total_weight
var current_weight = 0.0
for candidate in candidates:
current_weight += candidate.weight
if current_weight >= target_weight:
return candidate
return candidates.back()
func _pick_backup_scene(zone_catalogue: Array[PackedScene], grid_pos: Vector2i) -> PackedScene:
for scene in zone_catalogue:
var metadata = _get_chunk_scene_metadata(scene)
var uniqueness = int(metadata.get("uniqueness", 0))
if not _has_nearby_unique_chunk(grid_pos, uniqueness):
return scene
return zone_catalogue[0]
func _get_prop_scene_cache_key(scene: PackedScene) -> String:
if scene == null:
return ""
if scene.resource_path != "":
return scene.resource_path
return "prop_scene_%s" % scene.get_instance_id()
func _get_prop_scene_uniqueness(scene: PackedScene) -> int:
if scene == null:
return -1
var key = _get_prop_scene_cache_key(scene)
if prop_candidate_cache.has(key):
return prop_candidate_cache[key]
var preview_prop = scene.instantiate()
var uniqueness = _get_prop_uniqueness_from_info(preview_prop)
if uniqueness == -1:
var prop_info_list: Array[Node] = []
collect_all_propinfo(preview_prop, prop_info_list)
if not prop_info_list.is_empty():
uniqueness = _get_prop_uniqueness_from_info(prop_info_list[0])
preview_prop.queue_free()
prop_candidate_cache[key] = uniqueness
return uniqueness
func _get_marker_prop_uniqueness(marker: Node) -> int:
var uniqueness = _get_prop_uniqueness_from_info(marker)
if uniqueness == -1:
return 0
return uniqueness
func _pick_weighted_prop_scene(marker: Node) -> PackedScene:
var candidates = []
var fallback_uniqueness = _get_marker_prop_uniqueness(marker)
for prop_scene in marker.available_props:
if prop_scene == null:
continue
var uniqueness = _get_prop_scene_uniqueness(prop_scene)
if uniqueness == -1:
uniqueness = fallback_uniqueness
candidates.append({
"scene": prop_scene,
"weight": _get_uniqueness_pick_weight(uniqueness),
"uniqueness": uniqueness
})
if candidates.is_empty():
return null
return _pick_weighted_candidate(candidates).scene
func _spawn_props_for_chunk(root: Node) -> void:
var prop_markers: Array[Node] = []
collect_all_propinfo(root, prop_markers)
for marker in prop_markers:
_spawn_prop_for_marker(marker)
func _spawn_prop_for_marker(marker: Node) -> void:
if marker.available_props.is_empty():
return
var prop_scene = _pick_weighted_prop_scene(marker)
if prop_scene == null:
return
var prop_instance = prop_scene.instantiate()
var prop_node = prop_instance as Node3D
if prop_node == null:
prop_instance.queue_free()
return
marker.add_child(prop_node)
prop_node.transform = Transform3D.IDENTITY
#Using a vertical raycast from the top to the bottom at the center of the cell
#If there is a collision search for a new chunk node
func _register_cell_with_ray(grid_pos: Vector2i) -> bool: func _register_cell_with_ray(grid_pos: Vector2i) -> bool:
if board.has(grid_pos): return true if board.has(grid_pos): return true
@@ -367,8 +710,10 @@ func _register_cell_with_ray(grid_pos: Vector2i) -> bool:
right_info_node = info_list[0] right_info_node = info_list[0]
var exit_found = {"north": false, "est": false, "south": false, "west": false} var exit_found = {"north": false, "est": false, "south": false, "west": false}
var river_exit_found = {"north": false, "est": false, "south": false, "west": false}
var height_found = {"north": 0, "est": 0, "south": 0, "west": 0} var height_found = {"north": 0, "est": 0, "south": 0, "west": 0}
var have_lamppost = false var have_lamppost = false
var uniqueness = 0
#Get node info #Get node info
if right_info_node != null: if right_info_node != null:
@@ -376,19 +721,25 @@ func _register_cell_with_ray(grid_pos: Vector2i) -> bool:
var rotation_steps = roundi(rad_to_deg(right_info_node.global_rotation.y) / -90.0) var rotation_steps = roundi(rad_to_deg(right_info_node.global_rotation.y) / -90.0)
var data = right_info_node.get_rotated_data(rotation_steps) var data = right_info_node.get_rotated_data(rotation_steps)
exit_found = data["connections"] exit_found = data["connections"]
river_exit_found = data["river_connections"]
height_found = data["heights"] height_found = data["heights"]
if "have_lamppost" in right_info_node: if "have_lamppost" in right_info_node:
have_lamppost = right_info_node.have_lamppost have_lamppost = right_info_node.have_lamppost
uniqueness = _get_chunk_uniqueness_from_info(right_info_node)
#Add piece to the grid #Add piece to the grid
board[grid_pos] = { board[grid_pos] = {
"type": "obstacle", "type": "obstacle",
"exit": exit_found, "exit": exit_found,
"river_exit": river_exit_found,
"heights": height_found, "heights": height_found,
"node": root_chunk, "node": root_chunk,
"info": right_info_node, "info": right_info_node,
"have_lamppost": have_lamppost "have_lamppost": have_lamppost,
"uniqueness": uniqueness,
"persistent": true
} }
if have_lamppost: if have_lamppost:
@@ -397,11 +748,20 @@ func _register_cell_with_ray(grid_pos: Vector2i) -> bool:
return true return true
return false return false
#For the cell to fill check the contrains for the four neighbors:
#If the neighbor at north have and exit on south then new chunk should have exit to north (the same for east and ovest)
#Contrains: 1 -> connection is mandatory; 0 -> no connection; -1 -> no contrain because there is no neighbor or it already exits
#When generator know the contrains take all chunks and try all different rotations
#A candidate is valid only if all contrains are correct
func _add_compatible_biome(grid_pos: Vector2i) -> void: func _add_compatible_biome(grid_pos: Vector2i) -> void:
var req_conn_north = _needed_connection(grid_pos + Vector2i(0, -1), "south") var req_conn_north = _needed_connection(grid_pos + Vector2i(0, -1), "south")
var req_conn_est = _needed_connection(grid_pos + Vector2i(1, 0), "west") var req_conn_est = _needed_connection(grid_pos + Vector2i(1, 0), "west")
var req_conn_south = _needed_connection(grid_pos + Vector2i(0, 1), "north") var req_conn_south = _needed_connection(grid_pos + Vector2i(0, 1), "north")
var req_conn_west = _needed_connection(grid_pos + Vector2i(-1, 0), "est") var req_conn_west = _needed_connection(grid_pos + Vector2i(-1, 0), "est")
var req_river_north = _needed_river_connection(grid_pos + Vector2i(0, -1), "south")
var req_river_est = _needed_river_connection(grid_pos + Vector2i(1, 0), "west")
var req_river_south = _needed_river_connection(grid_pos + Vector2i(0, 1), "north")
var req_river_west = _needed_river_connection(grid_pos + Vector2i(-1, 0), "est")
var req_height_north = _needed_heights(grid_pos + Vector2i(0, -1), "south") var req_height_north = _needed_heights(grid_pos + Vector2i(0, -1), "south")
var req_height_est = _needed_heights(grid_pos + Vector2i(1, 0), "west") var req_height_est = _needed_heights(grid_pos + Vector2i(1, 0), "west")
@@ -423,12 +783,20 @@ func _add_compatible_biome(grid_pos: Vector2i) -> void:
var rot = candidate["rotation"] var rot = candidate["rotation"]
var data = candidate["data"] var data = candidate["data"]
var u_conn = data["connections"] var u_conn = data["connections"]
var u_river_conn = data["river_connections"]
var u_height = data["heights"] var u_height = data["heights"]
var uniqueness = int(metadata.get("uniqueness", 0))
if _has_nearby_unique_chunk(grid_pos, uniqueness):
continue
var match_conn_n = (req_conn_north == -1) or ((req_conn_north == 1) == u_conn["north"]) var match_conn_n = (req_conn_north == -1) or ((req_conn_north == 1) == u_conn["north"])
var match_conn_e = (req_conn_est == -1) or ((req_conn_est == 1) == u_conn["est"]) var match_conn_e = (req_conn_est == -1) or ((req_conn_est == 1) == u_conn["est"])
var match_conn_s = (req_conn_south == -1) or ((req_conn_south == 1) == u_conn["south"]) var match_conn_s = (req_conn_south == -1) or ((req_conn_south == 1) == u_conn["south"])
var match_conn_o = (req_conn_west == -1) or ((req_conn_west == 1) == u_conn["west"]) var match_conn_o = (req_conn_west == -1) or ((req_conn_west == 1) == u_conn["west"])
var match_river_n = (req_river_north == -1) or ((req_river_north == 1) == u_river_conn["north"])
var match_river_e = (req_river_est == -1) or ((req_river_est == 1) == u_river_conn["est"])
var match_river_s = (req_river_south == -1) or ((req_river_south == 1) == u_river_conn["south"])
var match_river_o = (req_river_west == -1) or ((req_river_west == 1) == u_river_conn["west"])
var match_alt_n = (req_height_north == -1) or (req_height_north == u_height["north"]) var match_alt_n = (req_height_north == -1) or (req_height_north == u_height["north"])
var match_alt_e = (req_height_est == -1) or (req_height_est == u_height["est"]) var match_alt_e = (req_height_est == -1) or (req_height_est == u_height["est"])
@@ -441,14 +809,21 @@ func _add_compatible_biome(grid_pos: Vector2i) -> void:
var diff_o = abs(u_height["west"] - height_target) if req_height_west == -1 else 0 var diff_o = abs(u_height["west"] - height_target) if req_height_west == -1 else 0
var excessive_jumps = diff_n > 1 or diff_e > 1 or diff_s > 1 or diff_o > 1 var excessive_jumps = diff_n > 1 or diff_e > 1 or diff_s > 1 or diff_o > 1
if match_conn_n and match_conn_e and match_conn_s and match_conn_o and match_alt_n and match_alt_e and match_alt_s and match_alt_o and not excessive_jumps: if match_conn_n and match_conn_e and match_conn_s and match_conn_o and match_river_n and match_river_e and match_river_s and match_river_o and match_alt_n and match_alt_e and match_alt_s and match_alt_o and not excessive_jumps:
var score = 0 var score = 0
if req_height_north == -1 and u_height["north"] == height_target: score += 1 if req_height_north == -1 and u_height["north"] == height_target: score += 1
if req_height_est == -1 and u_height["est"] == height_target: score += 1 if req_height_est == -1 and u_height["est"] == height_target: score += 1
if req_height_south == -1 and u_height["south"] == height_target: score += 1 if req_height_south == -1 and u_height["south"] == height_target: score += 1
if req_height_west == -1 and u_height["west"] == height_target: score += 1 if req_height_west == -1 and u_height["west"] == height_target: score += 1
valid_candidates.append({"scene": scene, "rotation": rot, "data": data, "score": score}) valid_candidates.append({
"scene": scene,
"rotation": rot,
"data": data,
"score": score,
"weight": _get_uniqueness_pick_weight(uniqueness),
"uniqueness": uniqueness
})
if valid_candidates.size() > 0: if valid_candidates.size() > 0:
var max_score = -1 var max_score = -1
@@ -459,36 +834,46 @@ func _add_compatible_biome(grid_pos: Vector2i) -> void:
for c in valid_candidates: for c in valid_candidates:
if c.score == max_score: best_candidate.append(c) if c.score == max_score: best_candidate.append(c)
var choise = best_candidate.pick_random() var choise = _pick_weighted_candidate(best_candidate)
var new_chunk = choise.scene.instantiate() var new_chunk = choise.scene.instantiate()
new_chunk.position = Vector3(grid_pos.x * chunk_size, 0, grid_pos.y * chunk_size) new_chunk.position = Vector3(grid_pos.x * chunk_size, 0, grid_pos.y * chunk_size)
new_chunk.rotation.y = choise.rotation * (-PI / 2.0) new_chunk.rotation.y = choise.rotation * (-PI / 2.0)
add_child(new_chunk) add_child(new_chunk)
_spawn_props_for_chunk(new_chunk)
var info_new = _get_cached_chunk_info(new_chunk, choise.scene) var info_new = _get_cached_chunk_info(new_chunk, choise.scene)
var have_lamppost = false var have_lamppost = false
if info_new != null and "have_lamppost" in info_new: if info_new != null and "have_lamppost" in info_new:
have_lamppost = info_new.have_lamppost have_lamppost = info_new.have_lamppost
var river_flow_direction = _calculate_river_flow_direction(grid_pos, choise.data["river_connections"])
_apply_river_flow_direction(new_chunk, river_flow_direction)
board[grid_pos] = { board[grid_pos] = {
"type": "bioma", "type": "biome",
"exit": choise.data["connections"], "exit": choise.data["connections"],
"river_exit": choise.data["river_connections"],
"river_flow_direction": river_flow_direction,
"heights": choise.data["heights"], "heights": choise.data["heights"],
"node": new_chunk, "node": new_chunk,
"info": info_new, "info": info_new,
"have_lamppost": have_lamppost "have_lamppost": have_lamppost,
"uniqueness": choise.uniqueness
} }
if have_lamppost: if have_lamppost:
_queue_lamppost_wire_connection(grid_pos) _queue_lamppost_wire_connection(grid_pos)
else: else:
var backup = zone_catalogue[0].instantiate() var backup_scene = _pick_backup_scene(zone_catalogue, grid_pos)
var backup = backup_scene.instantiate()
backup.position = Vector3(grid_pos.x * chunk_size, 0, grid_pos.y * chunk_size) backup.position = Vector3(grid_pos.x * chunk_size, 0, grid_pos.y * chunk_size)
add_child(backup) add_child(backup)
_spawn_props_for_chunk(backup)
var info_backup = _get_cached_chunk_info(backup, zone_catalogue[0]) var info_backup = _get_cached_chunk_info(backup, backup_scene)
var backup_uniqueness = _get_chunk_uniqueness_from_info(info_backup)
var safe_heights = { var safe_heights = {
"north": req_height_north if req_height_north != -1 else height_target, "north": req_height_north if req_height_north != -1 else height_target,
@@ -499,12 +884,113 @@ func _add_compatible_biome(grid_pos: Vector2i) -> void:
board[grid_pos] = { board[grid_pos] = {
"type": "biome", "type": "biome",
"exit": {"north":false, "est":false, "south":false, "west":false}, "exit": {"north":false, "est":false, "south":false, "west":false},
"river_exit": {"north":false, "est":false, "south":false, "west":false},
"river_flow_direction": Vector2.ZERO,
"heights": safe_heights, "heights": safe_heights,
"node": backup, "node": backup,
"info": info_backup, "info": info_backup,
"have_lamppost": false "have_lamppost": false,
"uniqueness": backup_uniqueness
} }
#Check if a neighbors have a river direction: if yes try to continue it,
#otherwise create a direction based on connections
func _calculate_river_flow_direction(grid_pos: Vector2i, river_connections: Dictionary) -> Vector2:
var connected_sides: Array[String] = []
for side in RIVER_SIDE_ORDER:
if river_connections.has(side) and river_connections[side]:
connected_sides.append(side)
if connected_sides.is_empty():
return Vector2.ZERO
var neighbour_flow = _get_connected_neighbour_river_flow(grid_pos, connected_sides)
if not neighbour_flow.is_zero_approx():
var continued_flow = _continue_river_flow_from_neighbour(grid_pos, connected_sides, neighbour_flow)
if not continued_flow.is_zero_approx():
return continued_flow.normalized()
var default_flow = _get_default_river_flow(connected_sides)
if default_flow.is_zero_approx():
return Vector2.ZERO
return default_flow.normalized()
func _get_connected_neighbour_river_flow(grid_pos: Vector2i, connected_sides: Array[String]) -> Vector2:
for side in connected_sides:
var neighbour_pos: Vector2i = grid_pos + RIVER_NEIGHBOUR_OFFSETS[side]
if not board.has(neighbour_pos):
continue
var neighbour = board[neighbour_pos]
if not neighbour.has("river_flow_direction"):
continue
var neighbour_flow: Vector2 = neighbour["river_flow_direction"]
if not neighbour_flow.is_zero_approx():
return neighbour_flow.normalized()
return Vector2.ZERO
func _continue_river_flow_from_neighbour(grid_pos: Vector2i, connected_sides: Array[String], neighbour_flow: Vector2) -> Vector2:
for side in connected_sides:
var neighbour_pos: Vector2i = grid_pos + RIVER_NEIGHBOUR_OFFSETS[side]
if not board.has(neighbour_pos):
continue
var neighbour = board[neighbour_pos]
if not neighbour.has("river_flow_direction"):
continue
var side_direction: Vector2 = RIVER_DIRECTIONS[side]
var neighbour_direction: Vector2 = neighbour["river_flow_direction"]
if neighbour_direction.is_zero_approx():
continue
neighbour_direction = neighbour_direction.normalized()
var other_sides = connected_sides.duplicate()
other_sides.erase(side)
if other_sides.is_empty():
return neighbour_direction
var other_direction = _get_average_river_side_direction(other_sides)
if neighbour_direction.dot(-side_direction) > 0.25:
return other_direction - side_direction
if neighbour_direction.dot(side_direction) > 0.25:
return side_direction - other_direction
var default_flow = _get_default_river_flow(connected_sides)
if default_flow.dot(neighbour_flow) < 0.0:
return -default_flow
return default_flow
func _get_default_river_flow(connected_sides: Array[String]) -> Vector2:
if connected_sides.size() == 1:
return RIVER_DIRECTIONS[connected_sides[0]]
if connected_sides.has("north") and connected_sides.has("south"):
return Vector2(0.0, 1.0)
if connected_sides.has("est") and connected_sides.has("west"):
return Vector2(1.0, 0.0)
var start_direction: Vector2 = RIVER_DIRECTIONS[connected_sides[0]]
var end_direction = _get_average_river_side_direction(connected_sides.slice(1))
return end_direction - start_direction
func _get_average_river_side_direction(sides: Array[String]) -> Vector2:
var direction := Vector2.ZERO
for side in sides:
direction += RIVER_DIRECTIONS[side]
if direction.is_zero_approx():
return Vector2.ZERO
return direction / float(sides.size())
func _apply_river_flow_direction(root: Node, flow_direction: Vector2) -> void:
if flow_direction.is_zero_approx():
return
_set_river_flow_direction_recursive(root, flow_direction.normalized())
func _set_river_flow_direction_recursive(node: Node, flow_direction: Vector2) -> void:
if node is MeshInstance3D and node.name.begins_with("Water_F"):
var mesh_instance := node as MeshInstance3D
mesh_instance.set_instance_shader_parameter("river_flow_direction", flow_direction)
for child in node.get_children():
_set_river_flow_direction_recursive(child, flow_direction)
func _needed_connection(near_pos: Vector2i, side_needed: String) -> int: func _needed_connection(near_pos: Vector2i, side_needed: String) -> int:
if not board.has(near_pos): if not board.has(near_pos):
_register_cell_with_ray(near_pos) _register_cell_with_ray(near_pos)
@@ -512,36 +998,17 @@ func _needed_connection(near_pos: Vector2i, side_needed: String) -> int:
return 1 if board[near_pos]["exit"][side_needed] else 0 return 1 if board[near_pos]["exit"][side_needed] else 0
return -1 return -1
func _needed_river_connection(near_pos: Vector2i, side_needed: String) -> int:
if not board.has(near_pos):
_register_cell_with_ray(near_pos)
if board.has(near_pos) and board[near_pos].has("river_exit"):
return 1 if board[near_pos]["river_exit"][side_needed] else 0
return -1
func _needed_heights(near_pos: Vector2i, side_needed: String) -> int: func _needed_heights(near_pos: Vector2i, side_needed: String) -> int:
if board.has(near_pos) and board[near_pos].has("heights"): if board.has(near_pos) and board[near_pos].has("heights"):
return board[near_pos]["heights"][side_needed] return board[near_pos]["heights"][side_needed]
return -1 return -1
func _train_radar() -> void:
if rail_path == null or rail_path.curve == null or rail_path.train_instance == null: return
if manual_biome != null:
return
var train_pos = rail_path.train_instance.global_position
var grid_x = roundi(train_pos.x / chunk_size)
var grid_z = roundi(train_pos.z / chunk_size)
var current_biome = _get_procedural_biome_name(noise_generator.get_noise_2d(grid_x, grid_z))
var current_progress = rail_path.train_progress
var total_length = rail_path.curve.get_baked_length()
for step in range(1, 31):
var next_progress = wrapf(current_progress + (step * chunk_size), 0.0, total_length)
var next_local_pos = rail_path.curve.sample_baked(next_progress, true)
var next_global_pos = rail_path.to_global(next_local_pos)
var f_x = roundi(next_global_pos.x / chunk_size)
var f_z = roundi(next_global_pos.z / chunk_size)
var future_biome = _get_procedural_biome_name(noise_generator.get_noise_2d(f_x, f_z))
if future_biome != current_biome:
break
func _get_lampposts(info_node: Node, side: String) -> Array[Node3D]: func _get_lampposts(info_node: Node, side: String) -> Array[Node3D]:
var lampposts: Array[Node3D] = [] var lampposts: Array[Node3D] = []
@@ -576,7 +1043,7 @@ func _connect_lamppost_wires(new_board_pos: Vector2i) -> void:
var p_sx_your_best = null; var p_dx_your_best = null var p_sx_your_best = null; var p_dx_your_best = null
var best_closest_to_root = null var best_closest_to_root = null
var best_distance = 999999.0 var best_distance = 999999.0
var ray_research = 3 var ray_research = 6
for x in range(-ray_research, ray_research + 1): for x in range(-ray_research, ray_research + 1):
for z in range(-ray_research, ray_research + 1): for z in range(-ray_research, ray_research + 1):
@@ -613,38 +1080,7 @@ func _connect_lamppost_wires(new_board_pos: Vector2i) -> void:
p_sx_your_best = closest_sx[i_t] p_sx_your_best = closest_sx[i_t]
p_dx_your_best = closest_dx[i_t] p_dx_your_best = closest_dx[i_t]
if best_closest_to_root == null: var max_dist = chunk_size * lamppost_dist_factor
for x in range(-ray_research, ray_research + 1):
for z in range(-ray_research, ray_research + 1):
if x == 0 and z == 0: continue
var closest_pos = new_board_pos + Vector2i(x, z)
if board.has(closest_pos) and board[closest_pos].get("have_lamppost", false):
var closest_root = board[closest_pos]["node"]
var closest_info = board[closest_pos]["info"]
if not is_instance_valid(closest_root) or closest_root == new_root or closest_info == null: continue
if closest_info is Node3D: closest_info.force_update_transform()
var closest_sx = _get_lampposts(closest_info, "sx")
var closest_dx = _get_lampposts(closest_info, "dx")
if closest_sx.is_empty() or closest_dx.is_empty(): continue
for i_m in range(new_sx.size()):
for i_t in range(closest_sx.size()):
var c_mio = (new_sx[i_m].global_position + new_dx[i_m].global_position) / 2.0
var c_tuo = (closest_sx[i_t].global_position + closest_dx[i_t].global_position) / 2.0
var dist = c_mio.distance_to(c_tuo)
if dist < best_distance:
best_distance = dist
best_closest_to_root = closest_root
p_sx_my_best = new_sx[i_m]
p_dx_my_best = new_dx[i_m]
p_sx_your_best = closest_sx[i_t]
p_dx_your_best = closest_dx[i_t]
var max_dist = chunk_size * 8.0
if best_closest_to_root != null and best_distance < max_dist: if best_closest_to_root != null and best_distance < max_dist:
var dist_streight = p_sx_my_best.global_position.distance_to(p_sx_your_best.global_position) + p_dx_my_best.global_position.distance_to(p_dx_your_best.global_position) var dist_streight = p_sx_my_best.global_position.distance_to(p_sx_your_best.global_position) + p_dx_my_best.global_position.distance_to(p_dx_your_best.global_position)
@@ -662,6 +1098,7 @@ func _connect_lamppost_wires(new_board_pos: Vector2i) -> void:
if not wire_connections.has(closest_id): wire_connections[closest_id] = 0 if not wire_connections.has(closest_id): wire_connections[closest_id] = 0
wire_connections[closest_id] += 1 wire_connections[closest_id] += 1
#draw lamppost wires
func _draw_parable(p1: Vector3, p2: Vector3, parent: Node3D) -> void: func _draw_parable(p1: Vector3, p2: Vector3, parent: Node3D) -> void:
var segments = 15 var segments = 15
var lowering = 1.5 var lowering = 1.5

View File

@@ -5,6 +5,7 @@ class_name ChunkInfo
@export_group("Set Piece Rules (Unique pieces)") @export_group("Set Piece Rules (Unique pieces)")
@export var exclusive_biome: String = "" # Es: "Forest" @export var exclusive_biome: String = "" # Es: "Forest"
@export_range(0, 5, 1) var uniqueness: int = 0 #0=common; 5=unique
@export_group("Base exit") @export_group("Base exit")
@export var north: bool = false @export var north: bool = false
@@ -12,6 +13,12 @@ class_name ChunkInfo
@export var south: bool = false @export var south: bool = false
@export var west: bool = false @export var west: bool = false
@export_group("River exit")
@export var river_north: bool = false
@export var river_est: bool = false
@export var river_south: bool = false
@export var river_west: bool = false
@export_group("Margin heights (level 0, 1, 2)") @export_group("Margin heights (level 0, 1, 2)")
@export_range(0, 2, 1) var height_north: int = 0 @export_range(0, 2, 1) var height_north: int = 0
@export_range(0, 2, 1) var height_est: int = 0 @export_range(0, 2, 1) var height_est: int = 0
@@ -29,14 +36,17 @@ func _ready() -> void:
func get_rotated_data(steps_90: int) -> Dictionary: func get_rotated_data(steps_90: int) -> Dictionary:
var original_exit = [north, est, south, west] var original_exit = [north, est, south, west]
var original_river_exit = [river_north, river_est, river_south, river_west]
var original_height = [height_north, height_est, height_south, height_west] var original_height = [height_north, height_est, height_south, height_west]
var calculated_exit = [] var calculated_exit = []
var calculated_river_exit = []
var calculated_height = [] var calculated_height = []
for i in range(4): for i in range(4):
var index = (i - steps_90 + 4) % 4 var index = (i - steps_90 + 4) % 4
calculated_exit.append(original_exit[index]) calculated_exit.append(original_exit[index])
calculated_river_exit.append(original_river_exit[index])
calculated_height.append(original_height[index]) calculated_height.append(original_height[index])
return { return {
@@ -44,6 +54,10 @@ func get_rotated_data(steps_90: int) -> Dictionary:
"north": calculated_exit[0], "est": calculated_exit[1], "north": calculated_exit[0], "est": calculated_exit[1],
"south": calculated_exit[2], "west": calculated_exit[3] "south": calculated_exit[2], "west": calculated_exit[3]
}, },
"river_connections": {
"north": calculated_river_exit[0], "est": calculated_river_exit[1],
"south": calculated_river_exit[2], "west": calculated_river_exit[3]
},
"heights": { "heights": {
"north": calculated_height[0], "est": calculated_height[1], "north": calculated_height[0], "est": calculated_height[1],
"south": calculated_height[2], "west": calculated_height[3] "south": calculated_height[2], "west": calculated_height[3]

View File

@@ -0,0 +1,5 @@
extends Marker3D
class_name PropInfo
@export var available_props: Array[PackedScene]
@export_range(0, 5, 1) var uniqueness: int = 0 #0=common; 5=unique

View File

@@ -0,0 +1 @@
uid://dg6ngy4pmtsyc

View File

@@ -32,6 +32,7 @@ render_priority = 0
shader = ExtResource("2_r4tfj") shader = ExtResource("2_r4tfj")
shader_parameter/use_red_as_alpha = true shader_parameter/use_red_as_alpha = true
shader_parameter/fog_color = Color(0.8, 0.85, 0.9, 0.5) shader_parameter/fog_color = Color(0.8, 0.85, 0.9, 0.5)
shader_parameter/fog_density = 0.25
shader_parameter/scroll_speed = Vector2(0.05, 0.01) shader_parameter/scroll_speed = Vector2(0.05, 0.01)
shader_parameter/texture_scale = Vector2(1, 1) shader_parameter/texture_scale = Vector2(1, 1)
shader_parameter/edge_softness_y = 0.2 shader_parameter/edge_softness_y = 0.2
@@ -66,12 +67,12 @@ grad_intensity_morning = 0.05
grad_intensity_afternoon = 0.1 grad_intensity_afternoon = 0.1
grad_intensity_night = 0.5 grad_intensity_night = 0.5
fog_color_morning = Color(0.7490196, 0.8509804, 0.9490196, 1) fog_color_morning = Color(0.7490196, 0.8509804, 0.9490196, 1)
fog_color_afternoon = Color(0.9647059, 0.5882353, 0.7607843, 1) fog_color_afternoon = Color(0.9823975, 0.8034449, 0.8778439, 1)
fog_color_night = Color(0.14901961, 0.101960786, 0.2509804, 1) fog_color_night = Color(0.38409987, 0.28720453, 0.5907528, 1)
fog_density_morning = 0.01 fog_density_morning = 0.01
fog_density_afternoon = 0.02 fog_density_afternoon = 0.02
glow_morning = 0.4 glow_morning = 0.4
glow_night = 0.6 glow_night = 0.8
material_fog = SubResource("ShaderMaterial_b5atu") material_fog = SubResource("ShaderMaterial_b5atu")
material_drops = SubResource("StandardMaterial3D_r4tfj") material_drops = SubResource("StandardMaterial3D_r4tfj")
material_clouds = SubResource("ShaderMaterial_ruhh7") material_clouds = SubResource("ShaderMaterial_ruhh7")
@@ -80,7 +81,7 @@ lightning_min = 2
lightning_max = 4 lightning_max = 4
lightning_scale_min = 2.0 lightning_scale_min = 2.0
lightning_scale_max = 5.0 lightning_scale_max = 5.0
godray_max_rain = 60 godray_max_rain = 30
godray_spawn_radius = 100.0 godray_spawn_radius = 100.0
godray_spawn_offset = Vector3(20, 80, 20) godray_spawn_offset = Vector3(20, 80, 20)
godray_rotation_degrees = Vector3(50, 30, 0) godray_rotation_degrees = Vector3(50, 30, 0)
@@ -90,6 +91,9 @@ wind_amount = 50
cloud_speed = 0.01 cloud_speed = 0.01
fireflies_amount = 550 fireflies_amount = 550
fireflies_spawn_ray = 60.0 fireflies_spawn_ray = 60.0
water_color_morning = Color(0.33333334, 0.654902, 0.5294118, 1)
water_color_afternoon = Color(0.5803922, 0.5137255, 0.2901961, 1)
water_color_night = Color(0.48235294, 0.45490196, 0.69411767, 1)
metadata/_custom_type_script = "uid://butda6k2tli3o" metadata/_custom_type_script = "uid://butda6k2tli3o"
[sub_resource type="Gradient" id="Gradient_i3hjl"] [sub_resource type="Gradient" id="Gradient_i3hjl"]
@@ -258,6 +262,7 @@ shader = ExtResource("2_r4tfj")
shader_parameter/fog_noise = ExtResource("11_tuauy") shader_parameter/fog_noise = ExtResource("11_tuauy")
shader_parameter/use_red_as_alpha = true shader_parameter/use_red_as_alpha = true
shader_parameter/fog_color = Color(0.8, 0.8509804, 0.9019608, 0.2509804) shader_parameter/fog_color = Color(0.8, 0.8509804, 0.9019608, 0.2509804)
shader_parameter/fog_density = 0.25
shader_parameter/scroll_speed = Vector2(0, 0.01) shader_parameter/scroll_speed = Vector2(0, 0.01)
shader_parameter/texture_scale = Vector2(1, 1) shader_parameter/texture_scale = Vector2(1, 1)
shader_parameter/edge_softness_y = 0.16400000779 shader_parameter/edge_softness_y = 0.16400000779

View File

@@ -3,7 +3,6 @@ extends Node3D
const NOISE_TEXTURE: Texture2D = preload("res://core/daynight/noise.tres") const NOISE_TEXTURE: Texture2D = preload("res://core/daynight/noise.tres")
const WEATHER_SHADER: Material = preload("res://core/daynight/weather_overlay.tres") const WEATHER_SHADER: Material = preload("res://core/daynight/weather_overlay.tres")
const WEATHER_PLAIN_SHADER: Material = preload("res://core/daynight/weather_plain_shader.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 = 2 #how many update of the environment (apply materials) will be done per frame
@export var environment_config: EnvironmentConfig @export var environment_config: EnvironmentConfig
@@ -134,7 +133,7 @@ func _apply_dynamic_environment_materials(node: Node) -> void:
_apply_weather_overlay_to_node(node, WEATHER_SHADER) _apply_weather_overlay_to_node(node, WEATHER_SHADER)
if node.is_in_group("weather_vegetables_node"): if node.is_in_group("weather_vegetables_node"):
_apply_weather_overlay_to_node(node, WEATHER_PLAIN_SHADER) _clear_weather_overlay_from_node(node)
func ApplyWindNoiseToMaterials(): func ApplyWindNoiseToMaterials():
for node in get_tree().get_nodes_in_group("wind_node"): for node in get_tree().get_nodes_in_group("wind_node"):
@@ -160,15 +159,54 @@ func ApplyWeatherShaderToMaterials():
_apply_weather_overlay_to_node(node, WEATHER_SHADER) _apply_weather_overlay_to_node(node, WEATHER_SHADER)
for node in get_tree().get_nodes_in_group("weather_vegetables_node"): for node in get_tree().get_nodes_in_group("weather_vegetables_node"):
_apply_weather_overlay_to_node(node, WEATHER_PLAIN_SHADER) _clear_weather_overlay_from_node(node)
func _apply_weather_overlay_to_node(node: Node, material: Material) -> void: func _apply_weather_overlay_to_node(node: Node, material: Material) -> void:
if node.is_in_group("weather_vegetables_node"):
_clear_weather_overlay_from_node(node)
return
if node is GeometryInstance3D: if node is GeometryInstance3D:
node.material_overlay = material if _geometry_uses_alpha_texture(node):
node.material_overlay = null
else:
node.material_overlay = material
for child in node.get_children(): for child in node.get_children():
_apply_weather_overlay_to_node(child, material) _apply_weather_overlay_to_node(child, material)
func _clear_weather_overlay_from_node(node: Node) -> void:
if node is GeometryInstance3D:
node.material_overlay = null
for child in node.get_children():
_clear_weather_overlay_from_node(child)
func _geometry_uses_alpha_texture(node: GeometryInstance3D) -> bool:
var material_override := node.material_override as ShaderMaterial
if _shader_material_uses_alpha_texture(material_override):
return true
if node is MeshInstance3D:
for surface_index in node.get_surface_override_material_count():
var surface_material := node.get_surface_override_material(surface_index) as ShaderMaterial
if _shader_material_uses_alpha_texture(surface_material):
return true
if node.mesh:
for surface_index in node.mesh.get_surface_count():
var mesh_material := node.mesh.surface_get_material(surface_index) as ShaderMaterial
if _shader_material_uses_alpha_texture(mesh_material):
return true
return false
func _shader_material_uses_alpha_texture(material: ShaderMaterial) -> bool:
if material == null or material.shader == null:
return false
return material.shader.code.find("alpha_texture") != -1
func select_day_time(normalized_time: float) -> void: func select_day_time(normalized_time: float) -> void:
#set show_day_time_debug = true to show debug on screen #set show_day_time_debug = true to show debug on screen
#normalized_time is a value between 0 and 1; the time of the day is calculate as "normalized_time" * 1440; day_time is the step to pass from sunrise, to day, to sunset, to night #normalized_time is a value between 0 and 1; the time of the day is calculate as "normalized_time" * 1440; day_time is the step to pass from sunrise, to day, to sunset, to night

View File

@@ -67,7 +67,6 @@ void fragment() {
float is_center = step(center_sharpness, internal_n); float is_center = step(center_sharpness, internal_n);
ALBEDO = shadow_color; ALBEDO = shadow_color;
ALPHA = mix(opacity_edge, opacity_center, is_center) * final_fade; ALPHA = mix(opacity_edge, opacity_center, is_center) * final_fade;
} }
} }

View File

@@ -7,6 +7,7 @@ uniform bool use_red_as_alpha = true;
group_uniforms Settings; group_uniforms Settings;
uniform vec4 fog_color : source_color = vec4(0.8, 0.85, 0.9, 0.5); uniform vec4 fog_color : source_color = vec4(0.8, 0.85, 0.9, 0.5);
uniform float fog_density : hint_range(0.0, 1.0) = 0.25;
uniform vec2 scroll_speed = vec2(0.05, 0.01); uniform vec2 scroll_speed = vec2(0.05, 0.01);
uniform vec2 texture_scale = vec2(1.0, 1.0); uniform vec2 texture_scale = vec2(1.0, 1.0);
@@ -36,5 +37,5 @@ void fragment() {
vec3 dark_fog = tinted_fog * 0.5; vec3 dark_fog = tinted_fog * 0.5;
ALBEDO = mix(tinted_fog, dark_fog, night_intensity); ALBEDO = mix(tinted_fog, dark_fog, night_intensity);
ALPHA = fog_color.a * noise_alpha * edge_mask; ALPHA = fog_color.a * fog_density * noise_alpha * edge_mask;
} }

View File

@@ -8,10 +8,12 @@ global uniform float global_wind_speed;
global uniform float global_wind_strength; global uniform float global_wind_strength;
global uniform vec2 global_wind_direction; global uniform vec2 global_wind_direction;
//global uniform sampler2D global_wind_noise : filter_linear_mipmap; //global uniform sampler2D global_wind_noise : filter_linear_mipmap;
global uniform float global_snow_start_time; global uniform float global_snow_start_time = -1.0;
global uniform float global_snow_accumulation_speed; global uniform float global_snow_accumulation_speed = 0.005;
global uniform float global_snow_melt_time; global uniform float global_snow_melt_time = -1.0;
global uniform float global_snow_melt_speed; global uniform float global_snow_melt_speed = 0.1;
global uniform float global_snow_amount = 0.0;
global uniform float global_rain_intensity;
// --- PARAMETRI ESTETICI --- // --- PARAMETRI ESTETICI ---
uniform bool billboard_enabled = true; uniform bool billboard_enabled = true;
@@ -31,6 +33,7 @@ uniform vec4 variance_color : source_color = vec4(0.3, 0.5, 0.2, 1.0); // Colore
uniform float variance_intensity : hint_range(0.0, 1.0) = 0.4; // Quanto si vedono le chiazze uniform float variance_intensity : hint_range(0.0, 1.0) = 0.4; // Quanto si vedono le chiazze
uniform vec4 snow_color : source_color = vec4(0.85, 0.9, 0.95, 1.0); uniform vec4 snow_color : source_color = vec4(0.85, 0.9, 0.95, 1.0);
uniform float snow_visibility : hint_range(0.0, 1.0) = 1.0;
// --- CONTROLLO GRADIENTE E RANDOM --- // --- CONTROLLO GRADIENTE E RANDOM ---
uniform float height_min = 0.0; uniform float height_min = 0.0;
@@ -41,6 +44,7 @@ uniform float light_steps : hint_range(1.0, 10.0) = 4.0;
uniform float random_mix : hint_range(0.0, 1.0) = 0.3; uniform float random_mix : hint_range(0.0, 1.0) = 0.3;
uniform float cast_shadow_strength : hint_range(0.0, 1.0) = 0.6; uniform float cast_shadow_strength : hint_range(0.0, 1.0) = 0.6;
uniform float wetness_darkening : hint_range(0.0, 0.5) = 0.25;
varying vec3 v_final_color; varying vec3 v_final_color;
varying float v_shade_factor; varying float v_shade_factor;
@@ -52,6 +56,21 @@ float hash(vec3 p) {
return fract((p.x + p.y) * p.z); return fract((p.x + p.y) * p.z);
} }
float get_snow_progress() {
float snow_progress = clamp(global_snow_amount, 0.0, 1.0);
if (global_snow_start_time >= 0.0) {
float timed_progress = clamp((TIME - global_snow_start_time) * global_snow_accumulation_speed, 0.0, 1.0);
snow_progress = max(snow_progress, timed_progress);
}
if (global_snow_melt_time >= 0.0) {
float melt = clamp((TIME - global_snow_melt_time) * global_snow_melt_speed, 0.0, 1.0);
snow_progress = min(snow_progress, 1.0 - melt);
}
return snow_progress;
}
void vertex() { void vertex() {
vec3 instance_pos = MODEL_MATRIX[3].xyz; vec3 instance_pos = MODEL_MATRIX[3].xyz;
v_world_pos = instance_pos; // Salviamo la posizione dell'istanza v_world_pos = instance_pos; // Salviamo la posizione dell'istanza
@@ -113,17 +132,10 @@ void fragment() {
// Applichiamo la variazione al colore finale dell'erba // Applichiamo la variazione al colore finale dell'erba
vec3 varied_grass_color = mix(v_final_color, variance_color.rgb, noise_sample * variance_intensity); vec3 varied_grass_color = mix(v_final_color, variance_color.rgb, noise_sample * variance_intensity);
float snow_amount = 0.0; float snow_amount = smoothstep(0.0, 1.0, get_snow_progress());
if (global_snow_start_time >= 0.0) {
snow_amount = clamp((TIME - global_snow_start_time) * global_snow_accumulation_speed, 0.0, 1.0);
}
if (global_snow_melt_time >= 0.0) {
float melt = clamp((TIME - global_snow_melt_time) * global_snow_melt_speed, 0.0, 1.0);
snow_amount *= (1.0 - melt);
}
float top_mask = 1.0 - shifted_uv.y; float top_mask = 1.0 - shifted_uv.y;
float snow_mask = smoothstep(1.0 - snow_amount, 1.2 - snow_amount, top_mask); float snow_mask = smoothstep(0.65, 1.0, top_mask) * snow_amount * snow_visibility;
snow_mask *= step(0.01, snow_amount); snow_mask *= step(0.01, snow_amount);
vec3 dark_snow = snow_color.rgb * (1.0 - shadow_intensity); vec3 dark_snow = snow_color.rgb * (1.0 - shadow_intensity);
@@ -131,12 +143,15 @@ void fragment() {
// Mescoliamo il colore variato con la neve // Mescoliamo il colore variato con la neve
vec3 final_albedo = mix(varied_grass_color, shaded_snow, snow_mask); vec3 final_albedo = mix(varied_grass_color, shaded_snow, snow_mask);
float rain_int = clamp(global_rain_intensity, 0.0, 1.0);
final_albedo *= mix(1.0, 1.0 - wetness_darkening, rain_int);
float final_roughness = mix(0.02, 0.005, rain_int);
ALBEDO = final_albedo; ALBEDO = final_albedo;
ALPHA = tex.r * opacity; ALPHA = tex.r * opacity;
ALPHA_SCISSOR_THRESHOLD = 0.5; ALPHA_SCISSOR_THRESHOLD = 0.5;
ROUGHNESS = 0.02; ROUGHNESS = final_roughness;
} }
void light() { void light() {

View File

@@ -20,17 +20,14 @@ const SNOW_CAP_SHADER: Shader = preload("res://core/daynight/snow_cap.gdshader")
var _mesh_instance: MeshInstance3D var _mesh_instance: MeshInstance3D
func _ready() -> void: func _ready() -> void:
add_to_group("weather_overlay_ignore") add_to_group("weather_overlay_ignore")
_ensure_mesh_instance() _ensure_mesh_instance()
_rebuild() _rebuild()
func rebuild() -> void: func rebuild() -> void:
_rebuild() _rebuild()
func _ensure_mesh_instance() -> void: func _ensure_mesh_instance() -> void:
_mesh_instance = get_node_or_null("SnowCapMesh") as MeshInstance3D _mesh_instance = get_node_or_null("SnowCapMesh") as MeshInstance3D
if _mesh_instance != null: if _mesh_instance != null:
@@ -41,7 +38,6 @@ func _ensure_mesh_instance() -> void:
_mesh_instance.add_to_group("weather_overlay_ignore") _mesh_instance.add_to_group("weather_overlay_ignore")
add_child(_mesh_instance) add_child(_mesh_instance)
func _rebuild() -> void: func _rebuild() -> void:
var cap_width: float = 0.0 var cap_width: float = 0.0
var cap_depth: float = 0.0 var cap_depth: float = 0.0
@@ -78,7 +74,6 @@ func _rebuild() -> void:
_mesh_instance.material_override = _build_material(cap_width, cap_depth) _mesh_instance.material_override = _build_material(cap_width, cap_depth)
_mesh_instance.visible = true _mesh_instance.visible = true
func _build_material(cap_width: float, cap_depth: float) -> ShaderMaterial: func _build_material(cap_width: float, cap_depth: float) -> ShaderMaterial:
var material := ShaderMaterial.new() var material := ShaderMaterial.new()
material.shader = SNOW_CAP_SHADER material.shader = SNOW_CAP_SHADER
@@ -87,7 +82,6 @@ func _build_material(cap_width: float, cap_depth: float) -> ShaderMaterial:
material.set_shader_parameter("half_depth", cap_depth * 0.5) material.set_shader_parameter("half_depth", cap_depth * 0.5)
return material return material
func _get_target_aabb(target_mesh: MeshInstance3D) -> AABB: func _get_target_aabb(target_mesh: MeshInstance3D) -> AABB:
var points: Array[Vector3] = [] var points: Array[Vector3] = []
for point in _get_aabb_points(target_mesh.get_aabb()): for point in _get_aabb_points(target_mesh.get_aabb()):
@@ -98,7 +92,6 @@ func _get_target_aabb(target_mesh: MeshInstance3D) -> AABB:
merged = merged.expand(point) merged = merged.expand(point)
return merged return merged
func _get_aabb_points(aabb: AABB) -> Array[Vector3]: func _get_aabb_points(aabb: AABB) -> Array[Vector3]:
var p: Vector3 = aabb.position var p: Vector3 = aabb.position
var s: Vector3 = aabb.size var s: Vector3 = aabb.size

View File

@@ -2,9 +2,10 @@ shader_type spatial;
render_mode blend_mix, cull_back, depth_draw_opaque; render_mode blend_mix, cull_back, depth_draw_opaque;
global uniform float global_snow_start_time = -1.0; global uniform float global_snow_start_time = -1.0;
global uniform float global_snow_accumulation_speed = 0.1; global uniform float global_snow_accumulation_speed = 0.005;
global uniform float global_snow_melt_time = -1.0; global uniform float global_snow_melt_time = -1.0;
global uniform float global_snow_melt_speed = 0.1; 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); global uniform vec4 global_snow_color = vec4(0.92, 0.96, 1.0, 1.0);
uniform float max_height : hint_range(0.02, 1.0) = 0.2; uniform float max_height : hint_range(0.02, 1.0) = 0.2;
@@ -51,17 +52,18 @@ float fbm(vec2 p) {
} }
float get_snow_amount() { float get_snow_amount() {
float snow_amount = 0.0; float snow_amount = clamp(global_snow_amount, 0.0, 1.0);
if (global_snow_start_time >= 0.0) { if (global_snow_start_time >= 0.0) {
snow_amount = clamp( float timed_amount = clamp(
(TIME - global_snow_start_time) * global_snow_accumulation_speed, (TIME - global_snow_start_time) * global_snow_accumulation_speed,
0.0, 0.0,
1.0 1.0
); );
snow_amount = max(snow_amount, timed_amount);
} }
if (global_snow_melt_time >= 0.0) { if (global_snow_melt_time >= 0.0) {
float melt = clamp((TIME - global_snow_melt_time) * global_snow_melt_speed, 0.0, 1.0); float melt = clamp((TIME - global_snow_melt_time) * global_snow_melt_speed, 0.0, 1.0);
snow_amount *= (1.0 - melt); snow_amount = min(snow_amount, 1.0 - melt);
} }
return snow_amount; return snow_amount;
} }

View File

@@ -6,12 +6,12 @@ global uniform vec2 global_wind_direction;
global uniform float global_wind_scale; global uniform float global_wind_scale;
global uniform float global_wind_strength; global uniform float global_wind_strength;
global uniform float global_wind_fade; global uniform float global_wind_fade;
/* global uniform float global_snow_start_time = -1.0;
global uniform float global_snow_start_time; global uniform float global_snow_accumulation_speed = 0.005;
global uniform float global_snow_accumulation_speed; global uniform float global_snow_melt_time = -1.0;
global uniform float global_snow_melt_time; global uniform float global_snow_melt_speed = 0.1;
global uniform float global_snow_melt_speed; global uniform float global_snow_amount = 0.0;
global uniform vec4 global_snow_color;*/ global uniform vec4 global_snow_color;
global uniform float global_rain_intensity; global uniform float global_rain_intensity;
uniform sampler2D wind_noise : filter_linear_mipmap; uniform sampler2D wind_noise : filter_linear_mipmap;
@@ -31,6 +31,7 @@ uniform float light_steps : hint_range(1.0, 10.0) = 4.0;
uniform float random_mix : hint_range(0.0, 1.0) = 0.3; uniform float random_mix : hint_range(0.0, 1.0) = 0.3;
uniform float cast_shadow_strength : hint_range(0.0, 1.0) = 0.6; uniform float cast_shadow_strength : hint_range(0.0, 1.0) = 0.6;
uniform float wetness_darkening : hint_range(0.0, 0.5) = 0.25; uniform float wetness_darkening : hint_range(0.0, 0.5) = 0.25;
uniform float snow_visibility : hint_range(0.0, 1.0) = 1.0;
varying vec3 v_final_color; varying vec3 v_final_color;
varying float v_shade_factor; varying float v_shade_factor;
@@ -41,6 +42,21 @@ float hash(vec3 p) {
return fract((p.x + p.y) * p.z); return fract((p.x + p.y) * p.z);
} }
float get_snow_progress() {
float snow_progress = clamp(global_snow_amount, 0.0, 1.0);
if (global_snow_start_time >= 0.0) {
float timed_progress = clamp((TIME - global_snow_start_time) * global_snow_accumulation_speed, 0.0, 1.0);
snow_progress = max(snow_progress, timed_progress);
}
if (global_snow_melt_time >= 0.0) {
float melt = clamp((TIME - global_snow_melt_time) * global_snow_melt_speed, 0.0, 1.0);
snow_progress = min(snow_progress, 1.0 - melt);
}
return snow_progress;
}
void vertex() { void vertex() {
vec3 instance_pos = MODEL_MATRIX[3].xyz; vec3 instance_pos = MODEL_MATRIX[3].xyz;
@@ -88,24 +104,16 @@ void fragment() {
vec2 shifted_uv = UV + texture_offset; vec2 shifted_uv = UV + texture_offset;
vec4 tex = texture(alpha_texture, shifted_uv); vec4 tex = texture(alpha_texture, shifted_uv);
//// Snow accumulation // Snow accumulation
//float snow_amount = 0.0; float snow_amount = pow(get_snow_progress(), 0.55);
//if (global_snow_start_time >= 0.0) {
//snow_amount = clamp((TIME - global_snow_start_time) * global_snow_accumulation_speed, 0.0, 1.0);
//}
//if (global_snow_melt_time >= 0.0) {
//float melt = clamp((TIME - global_snow_melt_time) * global_snow_melt_speed, 0.0, 1.0);
//snow_amount *= (1.0 - melt);
//}
//
//float top_mask = 1.0 - shifted_uv.y;
//float snow_mask = smoothstep(1.0 - snow_amount, 1.2 - snow_amount, top_mask);
//snow_mask *= step(0.01, snow_amount);
//vec3 dark_snow = global_snow_color.rgb * (1.0 - shadow_intensity); float top_mask = 1.0 - shifted_uv.y;
//vec3 shaded_snow = mix(dark_snow, global_snow_color.rgb, v_shade_factor); float snow_mask = smoothstep(1.0 - snow_amount * 1.35, 1.08 - snow_amount * 1.35, top_mask) * snow_visibility;
//vec3 final_albedo = mix(v_final_color, shaded_snow, snow_mask); snow_mask *= step(0.01, snow_amount);
vec3 final_albedo = v_final_color;
vec3 dark_snow = global_snow_color.rgb * (1.0 - shadow_intensity);
vec3 shaded_snow = mix(dark_snow, global_snow_color.rgb, v_shade_factor);
vec3 final_albedo = mix(v_final_color, shaded_snow, snow_mask);
// Rain wetness: darken and make shinier // Rain wetness: darken and make shinier
float rain_int = clamp(global_rain_intensity, 0.0, 1.0); float rain_int = clamp(global_rain_intensity, 0.0, 1.0);

View File

@@ -3,6 +3,12 @@ render_mode blend_mix, depth_draw_always;
global uniform float global_rain_intensity; global uniform float global_rain_intensity;
global uniform vec4 global_water_color = vec4(0.285, 0.534, 0.487, 1.0); global uniform vec4 global_water_color = vec4(0.285, 0.534, 0.487, 1.0);
global uniform float global_snow_start_time = -1.0;
global uniform float global_snow_accumulation_speed = 0.005;
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);
//Water color //Water color
uniform vec4 deep_water_color : source_color = vec4(0.0, 0.1, 0.2, 1.0); uniform vec4 deep_water_color : source_color = vec4(0.0, 0.1, 0.2, 1.0);
@@ -29,6 +35,21 @@ uniform sampler2D depth_texture : hint_depth_texture, filter_linear_mipmap;
varying vec2 world_pos_xz; varying vec2 world_pos_xz;
varying vec2 local_uv; varying vec2 local_uv;
float get_snow_progress() {
float snow_progress = clamp(global_snow_amount, 0.0, 1.0);
if (global_snow_start_time >= 0.0) {
float timed_progress = clamp((TIME - global_snow_start_time) * global_snow_accumulation_speed, 0.0, 1.0);
snow_progress = max(snow_progress, timed_progress);
}
if (global_snow_melt_time >= 0.0) {
float melt = clamp((TIME - global_snow_melt_time) * global_snow_melt_speed, 0.0, 1.0);
snow_progress = min(snow_progress, 1.0 - melt);
}
return snow_progress;
}
void vertex() { void vertex() {
world_pos_xz = (MODEL_MATRIX * vec4(VERTEX, 1.0)).xz; world_pos_xz = (MODEL_MATRIX * vec4(VERTEX, 1.0)).xz;
local_uv = UV; local_uv = UV;
@@ -82,8 +103,15 @@ void fragment() {
float is_sky = step(ref_depth_raw, 0.00001); // Protezione anti-cielo float is_sky = step(ref_depth_raw, 0.00001); // Protezione anti-cielo
reflection_mask *= (1.0 - is_sky); reflection_mask *= (1.0 - is_sky);
vec3 final_rgb = mix(base_water.rgb, screen_ref, reflection_strength * reflection_mask); float snow_progress = get_snow_progress();
float active_snowfall = step(0.0, global_snow_start_time) * (1.0 - step(0.0, global_snow_melt_time));
float reflection_snow_damping = max(smoothstep(0.0, 0.08, snow_progress), active_snowfall * 0.75);
float effective_reflection_strength = reflection_strength * (1.0 - reflection_snow_damping * 0.85);
vec3 final_rgb = mix(base_water.rgb, screen_ref, effective_reflection_strength * reflection_mask);
final_rgb = mix(final_rgb, ripple_color.rgb, ring * ripple_color.a); final_rgb = mix(final_rgb, ripple_color.rgb, ring * ripple_color.a);
float water_snow_amount = smoothstep(0.15, 1.0, snow_progress) * 0.18;
final_rgb = mix(final_rgb, global_snow_color.rgb, water_snow_amount);
ALBEDO = final_rgb; ALBEDO = final_rgb;

View File

@@ -0,0 +1,241 @@
#define USE_CAUSTICS 1
#define USE_REFRACTION 1
#define USE_DISPLACEMENT 1
#define USE_STYLIZED_LIGHTING 0
#define USE_UNSHADED 0
shader_type spatial;
#if USE_UNSHADED
render_mode unshaded, depth_draw_never;
#else
render_mode depth_draw_never;
#endif
uniform sampler2D DEPTH_TEXTURE: hint_depth_texture;
group_uniforms Color;
uniform vec4 surface_color : source_color = vec4(0.2,1.0,0.8,1.0);
uniform vec4 depth_color : source_color = vec4(0.08,0.2,0.4,1.0);
uniform vec4 foam_color : source_color = vec4(1.0);
uniform float depth_size = 12.0;
group_uniforms Roughness;
uniform float surface_roughness : hint_range(0.0, 1.0, 0.01) = 0.05;
uniform float foam_roughness : hint_range(0.0, 1.0, 0.01) = 0.05;
#if USE_CAUSTICS
group_uniforms Caustics;
uniform sampler2D caustics_texture;
uniform float caustics_strength = 2.0;
uniform vec2 caustics_scale = vec2(0.5);
#endif
group_uniforms Wave;
uniform sampler2D wave_texture;
uniform float wave_softness : hint_range(0.0, 10.0, 0.1) = 3.0;
uniform vec2 wave_scale = vec2(0.2);
uniform vec2 wave_layer_scale = vec2(1.5);
uniform float wave_highlight : hint_range(0.0, 1.0, 0.05) = 0.5;
group_uniforms Wave.Motion;
uniform vec2 wave_velocity = vec2(0.02);
instance uniform vec2 river_flow_direction = vec2(0.0, 0.0);
group_uniforms Foam;
uniform sampler2D foam_texture;
uniform float edge_foam_depth_size = 1.0;
uniform float wave_foam_amount : hint_range(0.0, 1.0, 0.01) = 0.8;
uniform float foam_start : hint_range(0.0, 1.0, 0.05) = 0.15;
uniform float foam_end : hint_range(0.0, 1.0, 0.05) = 0.3;
uniform float foam_exponent = 2.0;
#if USE_REFRACTION
group_uniforms Refraction;
uniform float refraction_amount = 0.5;
uniform float refraction_exponent = 0.5;
#endif
#if USE_DISPLACEMENT
group_uniforms Displacement;
uniform float displacement_amount = 0.3;
#endif
#if USE_STYLIZED_LIGHTING && !USE_UNSHADED
group_uniforms Lighting;
uniform float diffuse_steps = 12.0;
uniform float diffuse_smoothness : hint_range(0.0, 1.0, 0.01) = 0.2;
uniform float specular_steps = 12.0;
uniform float specular_smoothness : hint_range(0.0, 1.0, 0.01) = 0.2;
#endif
uniform sampler2D screen_texture : hint_screen_texture;
varying vec3 world_pos;
varying vec2 world_wave_velocity;
#if USE_CAUSTICS
vec3 sample_caustics(vec2 uv){
vec2 caustics_uv = uv * caustics_scale;
return vec3(
texture(caustics_texture, caustics_uv).r,
texture(caustics_texture, caustics_uv+vec2(0.02,0.02)).r,
texture(caustics_texture, caustics_uv+vec2(0.03,0.01)).r
);
}
#endif
vec4 sample_world_dpos(vec2 screen_uv, mat4 inv_proj_mat, mat4 inv_view_mat){
vec4 clip_pos = vec4(screen_uv * 2.0 - 1.0, texture(DEPTH_TEXTURE, screen_uv).r, 1.0);
vec4 view_pos = inv_proj_mat * clip_pos;
view_pos /= view_pos.w;
vec4 world_dpos = inv_view_mat * view_pos;
return world_dpos;
}
vec4 sample_wave(sampler2D tex, vec2 uv, vec2 velocity, float lod){
vec2 base_uv = uv * wave_scale;
vec2 wave_uv1 = (base_uv * wave_layer_scale) + (TIME * -velocity);
float wave1 = textureLod(tex, wave_uv1, lod).r;
vec2 wave_uv2 = base_uv + (TIME * velocity);
vec4 wave2 = textureLod(tex, wave_uv2 - (wave1 * 0.1), lod);
return wave2;
}
vec3 sample_wave_normal(vec2 uv, vec2 velocity, float center_wave) {
vec2 normal_offset = vec2(0.25, 0.0);
float wave_x = sample_wave(wave_texture, uv + normal_offset.xy, velocity, wave_softness).r;
float wave_z = sample_wave(wave_texture, uv + normal_offset.yx, velocity, wave_softness).r;
vec2 slope = vec2(center_wave - wave_x, center_wave - wave_z) * 0.35;
return normalize(vec3(slope, 1.0)) * 0.5 + 0.5;
}
vec2 get_world_wave_velocity(mat4 model_matrix) {
float velocity_length = length(wave_velocity);
if (velocity_length <= 0.0001) {
return vec2(0.0);
}
float flow_direction_length = length(river_flow_direction);
if (flow_direction_length > 0.0001) {
return (river_flow_direction / flow_direction_length) * velocity_length;
}
vec3 world_direction_3d = (model_matrix * vec4(0.0, 1.0, 0.0, 0.0)).xyz;
vec2 world_direction = world_direction_3d.xz;
float world_direction_length = length(world_direction);
if (world_direction_length <= 0.0001) {
return wave_velocity;
}
return (world_direction / world_direction_length) * velocity_length;
}
void vertex(){
world_pos = (MODEL_MATRIX * vec4(VERTEX, 1.0)).xyz;
world_wave_velocity = get_world_wave_velocity(MODEL_MATRIX);
#if USE_DISPLACEMENT
float wave = sample_wave(wave_texture, world_pos.xz, world_wave_velocity, wave_softness).r;
VERTEX.y += wave*displacement_amount;
#endif
}
void fragment() {
float wave = sample_wave(wave_texture, world_pos.xz, world_wave_velocity, wave_softness).r;
wave = smoothstep(0.0,1.0,wave);
vec2 screen_uv = SCREEN_UV;
// Refraction
#if USE_REFRACTION
screen_uv += ((pow(wave, refraction_exponent)*2.0 - 0.5) * 0.01 * refraction_amount);
vec4 world_dpos = sample_world_dpos(screen_uv, INV_PROJECTION_MATRIX, INV_VIEW_MATRIX);
float pre_depth = pow(clamp((world_dpos.y - world_pos.y + depth_size)/depth_size, 0.0, 1.0), 4.0);
screen_uv = mix(screen_uv, SCREEN_UV, pre_depth);
if(world_dpos.y - world_pos.y > 0.0){
screen_uv = SCREEN_UV;
}
#else
vec4 world_dpos = sample_world_dpos(screen_uv, INV_PROJECTION_MATRIX, INV_VIEW_MATRIX);
#endif
world_dpos = sample_world_dpos(screen_uv, INV_PROJECTION_MATRIX, INV_VIEW_MATRIX);
vec2 surface_uv = world_dpos.xz * 0.2;
float depth = pow(clamp((world_dpos.y - world_pos.y + depth_size)/depth_size, 0.0, 1.0), 4.0);
// Caustics
#if USE_CAUSTICS
vec3 caustics1 = sample_caustics(surface_uv + (TIME * -world_wave_velocity));
vec3 caustics2 = sample_caustics((surface_uv + (caustics1.r*0.05)) + (TIME * (world_wave_velocity*0.5)));
vec3 caustics = caustics2 * (1.0 - depth);
#endif
// Edge Foam
float edge_foam_depth = clamp((world_dpos.y - world_pos.y + edge_foam_depth_size)/edge_foam_depth_size, 0.0, 1.0);
// Wave Foam
float wave_foam = wave;
float foam = max(edge_foam_depth, wave_foam * wave_foam_amount);
float foam_shape = 1.0 - texture(foam_texture, world_pos.xz* 0.5).r;
foam = clamp((foam - foam_start) / (foam_end - foam_start), 0.0, 1.0);
foam = clamp((foam - foam_shape) / (1.0 - foam_shape), 0.0, 1.0);
foam = pow(foam, foam_exponent);
vec3 flat_color = mix(depth_color, surface_color, depth).rgb;
vec4 screen = texture(screen_texture, screen_uv);
vec3 color = screen.rgb;
#if USE_CAUSTICS
color += vec3(pow(caustics * caustics_strength, vec3(2.0)));
#endif
color = mix(flat_color, color, 0.4 * depth);
color = mix(color, surface_color.rgb, wave * wave_highlight);
color = mix(color, foam_color.rgb, foam);
#if !USE_UNSHADED
vec3 wave_normal_map = sample_wave_normal(world_pos.xz, world_wave_velocity, wave);
NORMAL_MAP = wave_normal_map;
#endif
ROUGHNESS = mix(surface_roughness, foam_roughness, foam);
ALBEDO = color;
}
#if USE_STYLIZED_LIGHTING && !USE_UNSHADED
void light(){
float ndotl = dot(NORMAL, LIGHT) * ATTENUATION;
//ndotl = smoothstep(0.0,1.0-ROUGHNESS,ndotl);
float light = ndotl;
float light_mult = light * diffuse_steps;
float light_step_base = floor(light_mult);
float light_factor = light_mult - light_step_base;
light_factor = smoothstep(0.5 - diffuse_smoothness * 0.5, 0.5 + diffuse_smoothness * 0.5, light_factor);
light = (light_step_base + light_factor) / diffuse_steps;
DIFFUSE_LIGHT += (LIGHT_COLOR+ALBEDO) * light / PI;
float roughness = mix(0.01, 0.99, ROUGHNESS);
vec3 h = normalize(VIEW + LIGHT);
float ndoth = clamp(dot(NORMAL, h), 0.0, 1.0) * ATTENUATION;
float specular = clamp(pow(ndoth, 16.0/(roughness)), 0.1, 0.99);
specular = mix(pow(specular, 2.0-roughness),0.00,pow(roughness, 0.1));
float specular_mult = specular * specular_steps;
float specular_step_base = floor(specular_mult);
float specular_factor = specular_mult - specular_step_base;
specular_factor = smoothstep(0.5 - specular_smoothness * 0.5, 0.5 + specular_smoothness * 0.5, specular_factor);
specular = (specular_step_base + specular_factor) / specular_steps;
SPECULAR_LIGHT += (LIGHT_COLOR + ALBEDO) * specular;
}
#endif

View File

@@ -0,0 +1 @@
uid://cb12c2j8rfu6a

View File

@@ -34,12 +34,15 @@ var rain_tween: Tween
var rain_audio_tween: Tween var rain_audio_tween: Tween
var puddle_tween: Tween var puddle_tween: Tween
var puddle_amount: float = 0.0 var puddle_amount: float = 0.0
var clouds_tween: Tween
var snow_tween: Tween var snow_tween: Tween
var snow_weather_tween: Tween
var snow_particles_tween: Tween var snow_particles_tween: Tween
var is_snowing: bool = false var is_snowing: bool = false
var is_snow_accumulated: bool = false var is_snow_accumulated: bool = false
var actual_snow_amount: float = 0.0 var actual_snow_amount: float = 0.0
var snow_weather_amount: float = 0.0
var is_storm: bool = false var is_storm: bool = false
var cold_tween: Tween var cold_tween: Tween
@@ -51,6 +54,8 @@ var current_wind_strength: float = 0.0
var current_wind_fade: float = 0.0 var current_wind_fade: float = 0.0
var max_wind_amount: int = 0 var max_wind_amount: int = 0
var random_weather_restore_tween: Tween var random_weather_restore_tween: Tween
var random_event_remaining: float = 0.0
var random_event_label_seconds: int = -1
func _init(wind: GPUParticles3D, snow: GPUParticles3D, func _init(wind: GPUParticles3D, snow: GPUParticles3D,
fireflies: GPUParticles3D, rain: GPUParticles3D, ray: PackedScene, fireflies: GPUParticles3D, rain: GPUParticles3D, ray: PackedScene,
@@ -112,6 +117,7 @@ func _ready() -> void:
_emit_weather_event_label() _emit_weather_event_label()
func _process(delta: float) -> void: func _process(delta: float) -> void:
_update_random_event_label(delta)
_follow_camera() _follow_camera()
@@ -185,10 +191,10 @@ func _process(delta: float) -> void:
var final_fog_density = lerp(base_fog_density, base_fog_density * 4.0, 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))
var final_water_color = base_water_color.darkened(clamp(environment_config.water_darkening_rain, 0.0, 1.0) * clamp(rain_intensity, 0.0, 1.0)) var final_water_color = base_water_color.darkened(clamp(environment_config.water_darkening_rain, 0.0, 1.0) * clamp(rain_intensity, 0.0, 1.0))
final_tint = final_tint.lerp(final_tint * environment_config.snow_mode_color, actual_snow_amount) final_tint = final_tint.lerp(final_tint * environment_config.snow_mode_color, snow_weather_amount)
final_sky_top = final_sky_top.lerp(final_sky_top * environment_config.snow_mode_color, actual_snow_amount) final_sky_top = final_sky_top.lerp(final_sky_top * environment_config.snow_mode_color, snow_weather_amount)
final_sky_horizon = final_sky_horizon.lerp(final_sky_horizon * environment_config.snow_mode_color, actual_snow_amount) final_sky_horizon = final_sky_horizon.lerp(final_sky_horizon * environment_config.snow_mode_color, snow_weather_amount)
final_fog_color = final_fog_color.lerp(final_fog_color * environment_config.snow_mode_color, actual_snow_amount) final_fog_color = final_fog_color.lerp(final_fog_color * environment_config.snow_mode_color, snow_weather_amount)
#Shader parameters for global trunk_shader #Shader parameters for global trunk_shader
var final_grad_top = base_grad_top.lerp(base_grad_top * weather_color, clamp(rain_intensity, 0.0, 1.0)) var final_grad_top = base_grad_top.lerp(base_grad_top * weather_color, clamp(rain_intensity, 0.0, 1.0))
@@ -202,8 +208,8 @@ func _process(delta: float) -> void:
var night_val = clamp(day_time - 2.0, 0.0, 1.0) var night_val = clamp(day_time - 2.0, 0.0, 1.0)
#Snow exposure compensation #Snow exposure compensation
var snow_light_attenuation = lerp(1.0, 0.55, actual_snow_amount * (1.0 - night_val)) var snow_light_attenuation = lerp(1.0, 0.55, snow_weather_amount * (1.0 - night_val))
var snow_glow_attenuation = lerp(1.0, 0.5, actual_snow_amount) var snow_glow_attenuation = lerp(1.0, 0.5, snow_weather_amount)
var final_bloom = lerp(base_bloom, base_bloom * 0.5, rain_intensity) * snow_glow_attenuation var final_bloom = lerp(base_bloom, base_bloom * 0.5, rain_intensity) * snow_glow_attenuation
# We calculate the final exposure by applying snow damping directly to the camera exposure # We calculate the final exposure by applying snow damping directly to the camera exposure
@@ -244,15 +250,36 @@ func _process(delta: float) -> void:
sky_mat.set_shader_parameter("sun_color", final_tint) sky_mat.set_shader_parameter("sun_color", final_tint)
sky_mat.set_shader_parameter("night_intensity", night_val) sky_mat.set_shader_parameter("night_intensity", night_val)
var cloud_density_amount: float = maxf(clamp(rain_intensity, 0.0, 1.0), clamp(snow_weather_amount, 0.0, 1.0))
var current_cloud_density: float = lerp(environment_config.base_cloud_density, environment_config.rain_cloud_density, cloud_density_amount)
if environment_config.material_clouds: if environment_config.material_clouds:
var current_density = lerp(0.4, 1.0, rain_intensity) environment_config.material_clouds.set_shader_parameter("cloud_density", current_cloud_density)
environment_config.material_clouds.set_shader_parameter("cloud_density", current_density) var current_sharpness = lerp(0.14, 0.0, cloud_density_amount)
var current_sharpness = lerp(0.14, 0.0, rain_intensity)
environment_config.material_clouds.set_shader_parameter("center_sharpness", current_sharpness) environment_config.material_clouds.set_shader_parameter("center_sharpness", current_sharpness)
var env_shadow_mat = environment_shadows.get_surface_override_material(0) if environment_shadows else null
if env_shadow_mat:
env_shadow_mat.set_shader_parameter("cloud_density", current_cloud_density)
if environment_config.material_fog: if environment_config.material_fog:
environment_config.material_fog.set_shader_parameter("fog_color", final_fog_color)
environment_config.material_fog.set_shader_parameter("fog_density", clamp(final_fog_density * 25.0, 0.0, 1.0))
environment_config.material_fog.set_shader_parameter("night_intensity", night_val) environment_config.material_fog.set_shader_parameter("night_intensity", night_val)
environment_config.material_fog.set_shader_parameter("sun_color", final_tint) environment_config.material_fog.set_shader_parameter("sun_color", final_tint)
if fog:
for child in fog.get_children():
var fog_mesh := child as MeshInstance3D
if fog_mesh == null:
continue
var fog_material := fog_mesh.get_surface_override_material(0) as ShaderMaterial
if fog_material == null:
continue
fog_material.set_shader_parameter("fog_color", final_fog_color)
fog_material.set_shader_parameter("fog_density", clamp(final_fog_density * 25.0, 0.0, 1.0))
fog_material.set_shader_parameter("night_intensity", night_val)
fog_material.set_shader_parameter("sun_color", final_tint)
func create_sound_players(): func create_sound_players():
rain_audio_player = AudioStreamPlayer.new() rain_audio_player = AudioStreamPlayer.new()
@@ -449,6 +476,8 @@ func _update_wind_amount_from_strength(value: float) -> void:
func trigger_random_weather_event(duration: float = 0.0) -> void: func trigger_random_weather_event(duration: float = 0.0) -> void:
if random_weather_restore_tween and random_weather_restore_tween.is_valid(): if random_weather_restore_tween and random_weather_restore_tween.is_valid():
random_weather_restore_tween.kill() random_weather_restore_tween.kill()
random_event_remaining = 0.0
random_event_label_seconds = -1
var previous_rain: bool = is_raining var previous_rain: bool = is_raining
var previous_snow: bool = is_snowing var previous_snow: bool = is_snowing
@@ -466,12 +495,26 @@ func trigger_random_weather_event(duration: float = 0.0) -> void:
_apply_weather_event_state(true, false, false, true) _apply_weather_event_state(true, false, false, true)
if duration > 0.0: if duration > 0.0:
random_event_remaining = duration
_emit_weather_event_label()
random_weather_restore_tween = create_tween() random_weather_restore_tween = create_tween()
random_weather_restore_tween.tween_interval(duration) random_weather_restore_tween.tween_interval(duration)
random_weather_restore_tween.tween_callback(func(): random_weather_restore_tween.tween_callback(func():
random_event_remaining = 0.0
random_event_label_seconds = -1
_apply_weather_event_state(previous_rain, previous_snow, previous_wind, previous_storm) _apply_weather_event_state(previous_rain, previous_snow, previous_wind, previous_storm)
) )
func _update_random_event_label(delta: float) -> void:
if random_event_remaining <= 0.0:
return
random_event_remaining = maxf(random_event_remaining - delta, 0.0)
var display_seconds: int = ceili(random_event_remaining)
if display_seconds != random_event_label_seconds:
random_event_label_seconds = display_seconds
_emit_weather_event_label()
func _apply_weather_event_state(rain_enabled: bool, snow_enabled: bool, wind_enabled: bool, storm_enabled: bool = false) -> void: func _apply_weather_event_state(rain_enabled: bool, snow_enabled: bool, wind_enabled: bool, storm_enabled: bool = false) -> void:
if is_storm and not storm_enabled: if is_storm and not storm_enabled:
toggle_storm(false) toggle_storm(false)
@@ -647,7 +690,7 @@ func toggle_rain(value: bool):
if puddle_tween and puddle_tween.is_valid(): if puddle_tween and puddle_tween.is_valid():
puddle_tween.kill() puddle_tween.kill()
if is_raining: if is_raining:
particles_rain.amount_ratio = 0.0 particles_rain.amount_ratio = 0.0
particles_rain.emitting = true particles_rain.emitting = true
@@ -767,8 +810,23 @@ func toggle_snow(value: bool):
var target_snow_amount: float = 1.0 if is_snowing else 0.0 var target_snow_amount: float = 1.0 if is_snowing else 0.0
if snow_tween and snow_tween.is_valid(): if snow_tween and snow_tween.is_valid():
snow_tween.kill() snow_tween.kill()
if snow_weather_tween and snow_weather_tween.is_valid():
snow_weather_tween.kill()
var snow_amount_transition_duration: float = _get_snow_amount_transition_duration(is_snowing)
snow_tween = create_tween() snow_tween = create_tween()
snow_tween.tween_method(init_snow_amount, actual_snow_amount, target_snow_amount, environment_config.snow_transaction_time) snow_tween.tween_method(
init_snow_amount,
actual_snow_amount,
target_snow_amount,
snow_amount_transition_duration
)
snow_weather_tween = create_tween()
snow_weather_tween.tween_method(
init_snow_weather_amount,
snow_weather_amount,
target_snow_amount,
environment_config.snow_fade_time
)
_emit_weather_event_label() _emit_weather_event_label()
func _emit_weather_event_label() -> void: func _emit_weather_event_label() -> void:
@@ -785,11 +843,14 @@ func _emit_weather_event_label() -> void:
active_events.append("Wind") active_events.append("Wind")
if not active_events.is_empty(): if not active_events.is_empty():
weather_label = "Weather: %s" % " + ".join(active_events) weather_label = "Weather: %s" % " + ".join(active_events)
if random_event_remaining > 0.0:
weather_label += " (%s'')" % ceili(random_event_remaining)
UIEvents.weather_event_changed.emit(weather_label) UIEvents.weather_event_changed.emit(weather_label)
#disable snow and set default values and shader #disable snow and set default values and shader
func init_snow(value: float = 0.0): func init_snow(value: float = 0.0):
actual_snow_amount = value actual_snow_amount = value
snow_weather_amount = value
RenderingServer.global_shader_parameter_set("global_snow_amount", value) RenderingServer.global_shader_parameter_set("global_snow_amount", value)
if particles_snow: if particles_snow:
@@ -814,6 +875,9 @@ func init_snow_amount(value: float):
actual_snow_amount = value actual_snow_amount = value
RenderingServer.global_shader_parameter_set("global_snow_amount", value) RenderingServer.global_shader_parameter_set("global_snow_amount", value)
func init_snow_weather_amount(value: float):
snow_weather_amount = value
func start_snow_accumulation() -> void: func start_snow_accumulation() -> void:
RenderingServer.global_shader_parameter_set("global_snow_melt_time", -1.0) 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)
@@ -822,6 +886,18 @@ 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_time", Time.get_ticks_msec() / 1000.0)
RenderingServer.global_shader_parameter_set("global_snow_melt_speed", environment_config.snow_melt_speed) RenderingServer.global_shader_parameter_set("global_snow_melt_speed", environment_config.snow_melt_speed)
func _get_snow_amount_transition_duration(is_accumulating: bool) -> float:
if environment_config == null:
return 0.0
var speed: float = environment_config.snow_melt_speed
if is_accumulating:
speed = environment_config.snow_accumulation_speed
if speed <= 0.0:
return environment_config.snow_transaction_time
return 1.0 / speed
#endregion #endregion
#region Post-Process #region Post-Process

View File

@@ -3,7 +3,7 @@ render_mode blend_mix, depth_draw_never;
//Snow globals //Snow globals
global uniform float global_snow_start_time = -1.0; global uniform float global_snow_start_time = -1.0;
global uniform float global_snow_accumulation_speed = 0.1; global uniform float global_snow_accumulation_speed = 0.005;
global uniform float global_snow_melt_time = -1.0; global uniform float global_snow_melt_time = -1.0;
global uniform float global_snow_melt_speed = 0.1; global uniform float global_snow_melt_speed = 0.1;
global uniform float global_snow_amount = 0.0; global uniform float global_snow_amount = 0.0;
@@ -72,18 +72,15 @@ float fbm(vec2 p) {
} }
float get_snow_progress() { float get_snow_progress() {
bool has_snow_timeline = global_snow_start_time >= 0.0 || global_snow_melt_time >= 0.0;
float snow_progress = clamp(global_snow_amount, 0.0, 1.0); float snow_progress = clamp(global_snow_amount, 0.0, 1.0);
if (has_snow_timeline) { if (global_snow_start_time >= 0.0) {
snow_progress = 0.0; float timed_progress = clamp((TIME - global_snow_start_time) * global_snow_accumulation_speed, 0.0, 1.0);
if (global_snow_start_time >= 0.0) { snow_progress = max(snow_progress, timed_progress);
snow_progress = clamp((TIME - global_snow_start_time) * global_snow_accumulation_speed, 0.0, 1.0); }
} if (global_snow_melt_time >= 0.0) {
if (global_snow_melt_time >= 0.0) { float melt = clamp((TIME - global_snow_melt_time) * global_snow_melt_speed, 0.0, 1.0);
float melt = clamp((TIME - global_snow_melt_time) * global_snow_melt_speed, 0.0, 1.0); snow_progress = min(snow_progress, 1.0 - melt);
snow_progress *= (1.0 - melt);
}
} }
return snow_progress; return snow_progress;
@@ -130,12 +127,13 @@ void fragment() {
float snow_edge = smoothstep( float snow_edge = smoothstep(
global_snow_threshold - snow_edge_softness, global_snow_threshold - snow_edge_softness,
global_snow_threshold + snow_edge_softness, global_snow_threshold + snow_edge_softness,
facing_up + (noise_val - 0.5) * 0.4 facing_up
); );
float flat_accumulation = smoothstep(0.0, 0.35, v_snow_cap_mask) * snow_accumulation; float flat_accumulation = smoothstep(0.0, 0.35, v_snow_cap_mask) * snow_accumulation;
float snow_coverage = smoothstep(0.0, 0.6, noise_val + snow_progress - 0.4 + flat_accumulation * 0.25); float snow_variation = mix(0.75, 1.15, noise_val);
float snow_factor = max(snow_edge * snow_coverage * snow_progress, flat_accumulation); float snow_coverage = clamp(snow_progress * snow_variation + flat_accumulation * 0.25, 0.0, 1.0);
float snow_opacity = smoothstep(0.04, 0.28, snow_factor); 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 * 0.9);
float shade = mix(-snow_color_variation, snow_color_variation, noise_val); float shade = mix(-snow_color_variation, snow_color_variation, noise_val);

View File

@@ -2,10 +2,11 @@ shader_type spatial;
render_mode blend_mix, depth_draw_never, cull_disabled; render_mode blend_mix, depth_draw_never, cull_disabled;
// Snow globals // Snow globals
global uniform float global_snow_start_time; global uniform float global_snow_start_time = -1.0;
global uniform float global_snow_accumulation_speed; global uniform float global_snow_accumulation_speed = 0.005;
global uniform float global_snow_melt_time; global uniform float global_snow_melt_time = -1.0;
global uniform float global_snow_melt_speed; global uniform float global_snow_melt_speed = 0.1;
global uniform float global_snow_amount = 0.0;
global uniform vec4 global_snow_color; global uniform vec4 global_snow_color;
uniform float snow_edge_softness : hint_range(0.01, 0.5) = 0.15; uniform float snow_edge_softness : hint_range(0.01, 0.5) = 0.15;
uniform float snow_color_variation : hint_range(0.0, 0.15) = 0.05; uniform float snow_color_variation : hint_range(0.0, 0.15) = 0.05;
@@ -34,6 +35,21 @@ float ripple_ring(vec2 uv, float time_offset) {
return ring * fade; return ring * fade;
} }
float get_snow_progress() {
float snow_progress = clamp(global_snow_amount, 0.0, 1.0);
if (global_snow_start_time >= 0.0) {
float timed_progress = clamp((TIME - global_snow_start_time) * global_snow_accumulation_speed, 0.0, 1.0);
snow_progress = max(snow_progress, timed_progress);
}
if (global_snow_melt_time >= 0.0) {
float melt = clamp((TIME - global_snow_melt_time) * global_snow_melt_speed, 0.0, 1.0);
snow_progress = min(snow_progress, 1.0 - melt);
}
return snow_progress;
}
void fragment() { void fragment() {
vec3 world_pos = (INV_VIEW_MATRIX * vec4(VERTEX, 1.0)).xyz; vec3 world_pos = (INV_VIEW_MATRIX * vec4(VERTEX, 1.0)).xyz;
@@ -41,18 +57,10 @@ void fragment() {
float facing_up = 1.0; float facing_up = 1.0;
// Snow accumulation // Snow accumulation
float snow_amount = 0.0; float snow_amount = get_snow_progress();
if (global_snow_start_time >= 0.0) {
snow_amount = clamp((TIME - global_snow_start_time) * global_snow_accumulation_speed, 0.0, 1.0);
}
if (global_snow_melt_time >= 0.0) {
float melt = clamp((TIME - global_snow_melt_time) * global_snow_melt_speed, 0.0, 1.0);
snow_amount *= (1.0 - melt);
}
// UV-based snow mask: accumulates from the top of the quad // Plain surfaces fade in uniformly to avoid patchy strip-like accumulation.
float top_mask = 1.0 - UV.y; float snow_mask = smoothstep(0.0, 1.0, snow_amount);
float snow_mask = smoothstep(1.0 - snow_amount, 1.0 - snow_amount + snow_edge_softness, top_mask);
snow_mask *= step(0.01, snow_amount); snow_mask *= step(0.01, snow_amount);
// Snow color with slight variation // Snow color with slight variation

View File

@@ -98,6 +98,7 @@ extends Resource
@export var material_fog: ShaderMaterial #Fog overlay shader material @export var material_fog: ShaderMaterial #Fog overlay shader material
@export var material_drops: StandardMaterial3D #Rain drops material (albedo tinted by sky) @export var material_drops: StandardMaterial3D #Rain drops material (albedo tinted by sky)
@export var material_clouds: ShaderMaterial #Cloud layer shader material @export var material_clouds: ShaderMaterial #Cloud layer shader material
@export var base_cloud_density: float = 0.4 #default cloud density
#Rain weather settings #Rain weather settings
@export_group("Rain") @export_group("Rain")
@@ -106,6 +107,7 @@ extends Resource
@export var rain_audio_volume_db: float = -10.0 #Target rain loop volume in decibels @export var rain_audio_volume_db: float = -10.0 #Target rain loop volume in decibels
@export var puddle_form_time: float = 15.0 #Seconds for puddles to fully form @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 @export var puddle_dry_time: float = 20.0 #Seconds for puddles to fully dry after rain stops
@export var rain_cloud_density: float = 1.0 #the cloud density when is rainy
#Storm settings (applied on top of rain when storm is active) #Storm settings (applied on top of rain when storm is active)
@export_group("Storm") @export_group("Storm")
@@ -136,7 +138,7 @@ extends Resource
#Train start settings #Train start settings
@export_group("Train Start") @export_group("Train Start")
@export var train_start_from_random_position: bool = false #When enabled the train starts from a random offset on the rail curve instead of a stop @export var train_start_from_random_position: bool = true #When enabled the train starts from a random offset on the rail curve instead of a stop
@export_range(0, 64, 1, "or_greater") var train_start_stop_index: int = 1 #Stop index used for the train start when random start is disabled @export_range(0, 64, 1, "or_greater") var train_start_stop_index: int = 1 #Stop index used for the train start when random start is disabled
#Snow settings #Snow settings
@@ -145,7 +147,7 @@ extends Resource
@export var snow_transaction_time: float = 10.0 #Seconds for snow shader to fully transition in/out @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_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_threshold: float = 0.4 #Normal Y threshold for snow accumulation on surfaces
@export var snow_accumulation_speed: float = 0.014 #Accumulation speed: 0.1 -> 10s, 0.05 -> 20s, 0.02 -> 50s, 0.012 -> ~83s @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 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 = true #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_max_accumulation: float = 0.25 #Maximum accumulated snow factor applied to coverage and thickness
@@ -184,3 +186,7 @@ extends Resource
@export var water_color_afternoon: Color = Color(0.889, 0.733, 0.205, 1.0) #Tint for afternoon (sunset) @export var water_color_afternoon: Color = Color(0.889, 0.733, 0.205, 1.0) #Tint for afternoon (sunset)
@export var water_color_night: Color = Color(0.728, 0.54, 0.986, 1.0); #Tint for night @export var water_color_night: Color = Color(0.728, 0.54, 0.986, 1.0); #Tint for night
@export var water_darkening_rain: float = 0.7 #Percentage of darkening when is rainy @export var water_darkening_rain: float = 0.7 #Percentage of darkening when is rainy
#Random events
@export_group("Random Events")
@export var random_event_duration: float = 30.0 #Duration time for random event

View File

@@ -0,0 +1,32 @@
extends Node
const SAVE_PATH: String = "user://savegame.json"
var save_data: SaveGameData = SaveGameData.new()
var is_loaded: bool = false
func _ready() -> void:
load_game()
func save_game() -> void:
var save_file = FileAccess.open(SAVE_PATH, FileAccess.WRITE)
var json_string = JSON.stringify(save_data.to_dictionary())
save_file.store_line(json_string)
func load_game() -> void:
if not FileAccess.file_exists(SAVE_PATH):
save_data = SaveGameData.new()
is_loaded = true
return
var file = FileAccess.open(SAVE_PATH, FileAccess.READ)
var json_string = file.get_as_text()
var json = JSON.new()
var parse_result = json.parse(json_string)
save_data = SaveGameData.new()
if parse_result == OK and json.data is Dictionary:
save_data = SaveGameData.from_dictionary(json.data)
is_loaded = true

View File

@@ -0,0 +1 @@
uid://b17g2w2g101o6

View File

@@ -0,0 +1,34 @@
class_name SaveGameData
extends Resource
var unlocked_collectibles_ids: Array[StringName] = []
var saved_photos: Array[String] = []
var audio_bus_volumes: Dictionary[String, float] = {}
func to_dictionary() -> Dictionary:
var serialized_collectible_ids: Array[String] = []
for collectible_id in unlocked_collectibles_ids:
serialized_collectible_ids.append(str(collectible_id))
return {
"unlocked_collectibles_ids": serialized_collectible_ids,
"saved_photos": saved_photos,
"audio_bus_volumes": audio_bus_volumes,
}
static func from_dictionary(data: Dictionary) -> SaveGameData:
var save_game_data := SaveGameData.new()
if data.has("unlocked_collectibles_ids"):
for collectible_id in data["unlocked_collectibles_ids"]:
save_game_data.unlocked_collectibles_ids.append(StringName(str(collectible_id)))
if data.has("saved_photos"):
for photo_path in data["saved_photos"]:
save_game_data.saved_photos.append(str(photo_path))
if data.has("audio_bus_volumes") and data["audio_bus_volumes"] is Dictionary:
for bus_name in data["audio_bus_volumes"]:
save_game_data.audio_bus_volumes[str(bus_name)] = float(data["audio_bus_volumes"][bus_name])
return save_game_data

View File

@@ -0,0 +1 @@
uid://bxmvs842r82vl

View File

@@ -0,0 +1,4 @@
class_name CollectibleLibrary
extends Resource
@export var collectibles: Array[CollectibleResource]

View File

@@ -0,0 +1 @@
uid://hhuufh87skq5

View File

@@ -0,0 +1,31 @@
[gd_resource type="Resource" script_class="CollectibleLibrary" format=3 uid="uid://c6pkpvsvimafb"]
[ext_resource type="Script" uid="uid://bj34o0org55ei" path="res://core/photo_mode/data/collectible_resource.gd" id="1_3cgvf"]
[ext_resource type="Script" uid="uid://hhuufh87skq5" path="res://core/photo_mode/data/collectible_library.gd" id="2_ggu10"]
[ext_resource type="Texture2D" uid="uid://cx8d233y32kmu" path="res://icon.svg" id="2_pxmdy"]
[sub_resource type="Resource" id="Resource_3cgvf"]
script = ExtResource("1_3cgvf")
id = &"cane"
title = "Cane"
image = ExtResource("2_pxmdy")
metadata/_custom_type_script = "uid://bj34o0org55ei"
[sub_resource type="Resource" id="Resource_ggu10"]
script = ExtResource("1_3cgvf")
id = &"gatto"
title = "Gatto"
image = ExtResource("2_pxmdy")
metadata/_custom_type_script = "uid://bj34o0org55ei"
[sub_resource type="Resource" id="Resource_pxmdy"]
script = ExtResource("1_3cgvf")
id = &"farfalla"
title = "Farfalla"
image = ExtResource("2_pxmdy")
metadata/_custom_type_script = "uid://bj34o0org55ei"
[resource]
script = ExtResource("2_ggu10")
collectibles = Array[ExtResource("1_3cgvf")]([SubResource("Resource_3cgvf"), SubResource("Resource_ggu10"), SubResource("Resource_pxmdy")])
metadata/_custom_type_script = "uid://hhuufh87skq5"

View File

@@ -0,0 +1,6 @@
class_name CollectibleResource
extends Resource
@export var id: StringName
@export var title: String
@export var image: Texture2D

View File

@@ -0,0 +1 @@
uid://bj34o0org55ei

View File

@@ -0,0 +1,60 @@
extends Node
signal on_collectible_unlocked(collectible_id: StringName)
signal on_photo_saved(filePath: String)
var collectibles_library: CollectibleLibrary = preload("res://core/photo_mode/data/collectible_library.tres")
var unlocked_collectibles_ids: Array[StringName] = []
var saved_photos: Array[String] = []
func _ready() -> void:
load_save_data()
func unlock_collectible(collectible_id: StringName) -> void:
if not collectible_id in unlocked_collectibles_ids:
var new_collectible = get_collectible_by_id(collectible_id)
if new_collectible:
unlocked_collectibles_ids.append(collectible_id)
sync_save_data()
on_collectible_unlocked.emit(collectible_id)
func get_collectible_by_id(id: StringName) -> CollectibleResource:
for collectible in collectibles_library.collectibles:
if collectible.id == id:
return collectible
return null
func get_all_collectibles() -> Array[CollectibleResource]:
return collectibles_library.collectibles
func get_unlocked_collectible_ids() -> Array[StringName]:
return unlocked_collectibles_ids
func save_photo_to_disk_async() -> void:
await RenderingServer.frame_post_draw
var image = get_viewport().get_texture().get_image()
if not DirAccess.dir_exists_absolute("user://photos"):
DirAccess.make_dir_absolute("user://photos")
var timestamp = str(Time.get_unix_time_from_system())
var file_path = "user://photos/photo_" + timestamp + ".png"
image.save_png(file_path)
saved_photos.append(file_path)
sync_save_data()
on_photo_saved.emit(file_path)
func sync_save_data() -> void:
GameState.save_data.unlocked_collectibles_ids = unlocked_collectibles_ids.duplicate()
GameState.save_data.saved_photos = saved_photos.duplicate()
func load_save_data() -> void:
unlocked_collectibles_ids = GameState.save_data.unlocked_collectibles_ids.duplicate()
saved_photos = GameState.save_data.saved_photos.duplicate()
if unlocked_collectibles_ids.is_empty() and saved_photos.is_empty():
unlocked_collectibles_ids.append(&"cane")
sync_save_data()

View File

@@ -0,0 +1 @@
uid://c3kq1qddpm8tf

View File

@@ -0,0 +1,6 @@
extends Area3D
@export var collectible_data: CollectibleResource
func _ready() -> void:
add_to_group("collectible")

View File

@@ -0,0 +1 @@
uid://62d14boivr3g

View File

@@ -0,0 +1,11 @@
[gd_scene format=3 uid="uid://bmkxt6btcx8qr"]
[ext_resource type="Script" uid="uid://62d14boivr3g" path="res://core/photo_mode/runtime/collectible.gd" id="1_xse8c"]
[sub_resource type="BoxShape3D" id="BoxShape3D_xse8c"]
[node name="Collectible" type="Area3D" unique_id=1229019813]
script = ExtResource("1_xse8c")
[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=1479480920]
shape = SubResource("BoxShape3D_xse8c")

View File

@@ -0,0 +1,94 @@
extends Node3D
@export_group("Speed")
@export var pan_speed: float = 5.0
@export var rotation_speed: float = 0.003
@export_group("Bounds")
@export var movement_bounds: AABB
@export_group("Ref")
@export var rotation_target: Node3D
@onready var camera: Camera3D = $%Camera3D
var total_yaw: float = 0.0
var total_pitch: float = 0.0
var orbit_distance: float = 0.0
var current_pan: Vector2 = Vector2.ZERO
var is_active: bool = false
func _ready() -> void:
total_yaw = global_rotation.y
total_pitch = global_rotation.x
if rotation_target:
orbit_distance = global_position.distance_to(rotation_target.global_position)
func _unhandled_input(event: InputEvent) -> void:
if event.is_action_pressed("toggle_photo_mode"):
is_active = !is_active
get_tree().paused = is_active
if !is_active:
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
else:
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
if event is InputEventMouseMotion and is_active:
total_yaw -= event.relative.x * rotation_speed
if event.is_action_pressed("take_photo"):
take_photo_async()
func _process(delta: float) -> void:
if not rotation_target:
return
var pan_input = Input.get_vector("photo_pan_left", "photo_pan_right", "photo_pan_up", "photo_pan_down")
var rot_basis = Basis.from_euler(Vector3(total_pitch, total_yaw, 0))
if pan_input != Vector2.ZERO and is_active:
current_pan.x += pan_input.x * pan_speed * delta
current_pan.y += -pan_input.y * pan_speed * delta
if movement_bounds.size != Vector3.ZERO:
current_pan.x = clampf(current_pan.x, movement_bounds.position.x, movement_bounds.position.x + movement_bounds.size.x)
current_pan.y = clampf(current_pan.y, movement_bounds.position.y, movement_bounds.position.y + movement_bounds.size.y)
var right_dir = rot_basis.x.normalized()
var up_dir = rot_basis.y.normalized()
var final_pan_offset = (right_dir * current_pan.x) + (up_dir * current_pan.y)
var orbit_pos = rotation_target.global_position + (rot_basis * Vector3(0, 0, orbit_distance))
global_position = orbit_pos + final_pan_offset
global_basis = rot_basis
func take_photo_async() -> void:
if !is_active:
return
var targets = get_tree().get_nodes_in_group("collectible")
var space_state = get_world_3d().direct_space_state
await CollectionManager.save_photo_to_disk_async()
for target in targets:
if not target.collectible_data:
continue
if camera.is_position_in_frustum(target.global_position):
var query = PhysicsRayQueryParameters3D.create(camera.global_position, target.global_position)
query.collide_with_areas = true
query.collide_with_bodies = true
var result = space_state.intersect_ray(query)
if result and result.collider == target:
CollectionManager.unlock_collectible(target.collectible_data.id)
GameState.save_game()

View File

@@ -0,0 +1 @@
uid://d7ln6iru6mq6

View File

@@ -0,0 +1,10 @@
[gd_scene format=3 uid="uid://vni5kjalum6d"]
[ext_resource type="Script" uid="uid://d7ln6iru6mq6" path="res://core/photo_mode/runtime/photo_mode_controller.gd" id="1_uhpya"]
[node name="PhotoModeController" type="Node3D" unique_id=695158870]
process_mode = 3
script = ExtResource("1_uhpya")
[node name="Camera3D" type="Camera3D" parent="." unique_id=1369039645]
unique_name_in_owner = true

View File

@@ -0,0 +1,34 @@
extends Control
@export var collectible_ui_scene: PackedScene
@onready var grid_container: GridContainer = $%CollectibleGrid
func _ready() -> void:
CollectionManager.on_collectible_unlocked.connect(_unlock_collectible)
setup()
func setup() -> void:
var unlocked_collectible_ids = CollectionManager.get_unlocked_collectible_ids()
var collectibles = CollectionManager.get_all_collectibles()
for child in grid_container.get_children():
child.queue_free()
for collectible in collectibles:
_add_collectible(collectible)
if unlocked_collectible_ids.has(collectible.id):
_unlock_collectible(collectible.id)
func on_collectible_unlocked(collectible_id: StringName) -> void:
_unlock_collectible(collectible_id)
func _add_collectible(collectible: CollectibleResource) -> void:
var collectible_ui: CollectibleUI = collectible_ui_scene.instantiate()
collectible_ui.setup(collectible)
grid_container.add_child(collectible_ui)
func _unlock_collectible(collectible_id: StringName) -> void:
for collectible_ui in grid_container.get_children():
if collectible_ui.collectible_resource.id == collectible_id:
collectible_ui.unlock()

View File

@@ -0,0 +1 @@
uid://dq3qtcrdnikl7

View File

@@ -0,0 +1,50 @@
[gd_scene format=3 uid="uid://bvw086glfpcba"]
[ext_resource type="Script" uid="uid://dq3qtcrdnikl7" path="res://core/photo_mode/ui/collectible_gallery.gd" id="1_67tug"]
[ext_resource type="PackedScene" uid="uid://dp7dvfauh5rpx" path="res://core/photo_mode/ui/collectible_ui.tscn" id="2_or234"]
[node name="CollectibleGallery" type="Control" unique_id=354419843]
layout_mode = 3
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_67tug")
collectible_ui_scene = ExtResource("2_or234")
[node name="PanelContainer" type="PanelContainer" parent="." unique_id=640179265]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -350.0
offset_top = -350.0
offset_right = 350.0
offset_bottom = 350.0
grow_horizontal = 2
grow_vertical = 2
[node name="MarginContainer" type="MarginContainer" parent="PanelContainer" unique_id=125147979]
layout_mode = 2
theme_override_constants/margin_left = 12
theme_override_constants/margin_top = 12
theme_override_constants/margin_right = 12
theme_override_constants/margin_bottom = 12
[node name="ScrollContainer" type="ScrollContainer" parent="PanelContainer/MarginContainer" unique_id=348576028]
layout_mode = 2
draw_focus_border = true
[node name="CollectibleGrid" type="GridContainer" parent="PanelContainer/MarginContainer/ScrollContainer" unique_id=1187865988]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 6
size_flags_vertical = 2
theme_override_constants/h_separation = 12
theme_override_constants/v_separation = 12
columns = 3

View File

@@ -0,0 +1,22 @@
extends Control
class_name CollectibleUI
@onready var label: Label = $%CollectibleName
@onready var texture_rect: TextureRect = $%CollectibleTexture
var collectible_resource: CollectibleResource
func setup(collectible: CollectibleResource) -> void:
collectible_resource = collectible
if !label:
label = $%CollectibleName
label.text = collectible_resource.title
if collectible.image:
if !texture_rect:
texture_rect = $%CollectibleTexture
texture_rect.texture = collectible_resource.image
func unlock() -> void:
if !texture_rect:
texture_rect = $%CollectibleTexture
texture_rect.set_modulate(Color(1,1,1,1))

View File

@@ -0,0 +1 @@
uid://dxh8e1n16qjpp

View File

@@ -0,0 +1,49 @@
[gd_scene format=3 uid="uid://dp7dvfauh5rpx"]
[ext_resource type="Script" uid="uid://dxh8e1n16qjpp" path="res://core/photo_mode/ui/collectible_ui.gd" id="1_tu5nx"]
[ext_resource type="Texture2D" uid="uid://cx8d233y32kmu" path="res://icon.svg" id="1_x3wje"]
[node name="CollectibleUI" type="Control" unique_id=201865221]
custom_minimum_size = Vector2(200, 200)
layout_mode = 3
anchors_preset = 0
offset_right = 200.0
offset_bottom = 200.0
script = ExtResource("1_tu5nx")
[node name="Panel" type="PanelContainer" parent="." unique_id=1372516531]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="MarginContainer" type="MarginContainer" parent="Panel" unique_id=1141643525]
layout_mode = 2
theme_override_constants/margin_left = 12
theme_override_constants/margin_top = 12
theme_override_constants/margin_right = 12
theme_override_constants/margin_bottom = 12
[node name="VBoxContainer" type="VBoxContainer" parent="Panel/MarginContainer" unique_id=1841409877]
layout_mode = 2
alignment = 1
[node name="CollectibleName" type="Label" parent="Panel/MarginContainer/VBoxContainer" unique_id=117774359]
unique_name_in_owner = true
layout_mode = 2
size_flags_vertical = 0
text = "Collectible"
horizontal_alignment = 1
[node name="HSeparator" type="HSeparator" parent="Panel/MarginContainer/VBoxContainer" unique_id=1345822244]
layout_mode = 2
[node name="CollectibleTexture" type="TextureRect" parent="Panel/MarginContainer/VBoxContainer" unique_id=506844785]
unique_name_in_owner = true
modulate = Color(0.16206557, 0.1620656, 0.16206557, 1)
layout_mode = 2
size_flags_vertical = 3
texture = ExtResource("1_x3wje")
stretch_mode = 3

View File

@@ -0,0 +1,11 @@
extends Control
class_name Photo
@onready var texture_rect: TextureRect = $%PhotoTexture
func setup(texture: Texture) -> void:
if texture:
if !texture_rect:
texture_rect = $%PhotoTexture
texture_rect.texture = texture

View File

@@ -0,0 +1 @@
uid://dsey5dvc11vpq

View File

@@ -0,0 +1,38 @@
[gd_scene format=3 uid="uid://cvus62qkop3qi"]
[ext_resource type="Script" uid="uid://dsey5dvc11vpq" path="res://core/photo_mode/ui/photo.gd" id="1_u0arp"]
[node name="Photo" type="Control" unique_id=201865221]
custom_minimum_size = Vector2(200, 200)
layout_mode = 3
anchors_preset = 0
offset_right = 200.0
offset_bottom = 200.0
script = ExtResource("1_u0arp")
[node name="ColorRect" type="ColorRect" parent="." unique_id=1208008621]
layout_mode = 0
offset_right = 200.0
offset_bottom = 200.0
[node name="MarginContainer" type="MarginContainer" parent="ColorRect" unique_id=1141643525]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 12
theme_override_constants/margin_top = 12
theme_override_constants/margin_right = 12
theme_override_constants/margin_bottom = 12
[node name="Panel" type="PanelContainer" parent="ColorRect/MarginContainer" unique_id=1372516531]
layout_mode = 2
[node name="PhotoTexture" type="TextureRect" parent="ColorRect/MarginContainer/Panel" unique_id=506844785]
unique_name_in_owner = true
layout_mode = 2
size_flags_vertical = 3
expand_mode = 1
stretch_mode = 6

View File

@@ -0,0 +1,27 @@
extends Control
@export var photo_scene: PackedScene
@onready var grid_container: GridContainer = $%PhotoGrid
func _ready() -> void:
CollectionManager.on_photo_saved.connect(_create_photo_thumbnail)
load_gallery()
func load_gallery() -> void:
for child in grid_container.get_children():
child.queue_free()
var saved_photos = CollectionManager.saved_photos
for file_path in saved_photos:
if FileAccess.file_exists(file_path):
_create_photo_thumbnail(file_path)
func _create_photo_thumbnail(file_path: String) -> void:
var image = Image.load_from_file(file_path)
if image:
var photo: Photo = photo_scene.instantiate()
var texture = ImageTexture.create_from_image(image)
photo.setup(texture)
grid_container.add_child(photo)

View File

@@ -0,0 +1 @@
uid://k4iqrlkbjppl

View File

@@ -0,0 +1,50 @@
[gd_scene format=3 uid="uid://b6r787sik5yil"]
[ext_resource type="Script" uid="uid://k4iqrlkbjppl" path="res://core/photo_mode/ui/photo_gallery.gd" id="1_bp5uf"]
[ext_resource type="PackedScene" uid="uid://cvus62qkop3qi" path="res://core/photo_mode/ui/photo.tscn" id="2_45wok"]
[node name="PhotoGallery" type="Control" unique_id=354419843]
layout_mode = 3
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_bp5uf")
photo_scene = ExtResource("2_45wok")
[node name="PanelContainer" type="PanelContainer" parent="." unique_id=640179265]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -350.0
offset_top = -350.0
offset_right = 350.0
offset_bottom = 350.0
grow_horizontal = 2
grow_vertical = 2
[node name="MarginContainer" type="MarginContainer" parent="PanelContainer" unique_id=125147979]
layout_mode = 2
theme_override_constants/margin_left = 12
theme_override_constants/margin_top = 12
theme_override_constants/margin_right = 12
theme_override_constants/margin_bottom = 12
[node name="ScrollContainer" type="ScrollContainer" parent="PanelContainer/MarginContainer" unique_id=348576028]
layout_mode = 2
draw_focus_border = true
[node name="PhotoGrid" type="GridContainer" parent="PanelContainer/MarginContainer/ScrollContainer" unique_id=1187865988]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 6
size_flags_vertical = 2
theme_override_constants/h_separation = 12
theme_override_constants/v_separation = 12
columns = 3

31
core/radio/radio.gd Normal file
View File

@@ -0,0 +1,31 @@
extends AudioStreamPlayer
class_name Radio
@export var playlist: Array[AudioStream] = []
var current_track_index: int = 0
func _ready():
finished.connect(next_track)
func play_track(index: int = current_track_index):
if playlist.is_empty():
return
current_track_index = posmod(index, playlist.size())
stream = playlist[current_track_index]
play()
stream_paused = false
func next_track():
play_track(current_track_index + 1)
func prev_track():
play_track(current_track_index - 1)
func toggle_pause():
stream_paused = !stream_paused
func stop_radio():
stop()
stream_paused = false

1
core/radio/radio.gd.uid Normal file
View File

@@ -0,0 +1 @@
uid://bwrgh6xlvhqch

7
core/radio/radio.tscn Normal file
View File

@@ -0,0 +1,7 @@
[gd_scene format=3 uid="uid://cpeyt1dgrtglc"]
[ext_resource type="Script" uid="uid://bwrgh6xlvhqch" path="res://core/radio/radio.gd" id="1_2akjj"]
[node name="Radio" type="AudioStreamPlayer" unique_id=1234112225]
bus = &"Music"
script = ExtResource("1_2akjj")

View File

@@ -30,6 +30,10 @@ signal toggle_shadows(value: bool)
@warning_ignore("unused_signal") @warning_ignore("unused_signal")
signal toggle_fog(value: bool) signal toggle_fog(value: bool)
#railway signals
@warning_ignore("unused_signal")
signal update_rail_chunks()
#day cycle signals #day cycle signals
@warning_ignore("unused_signal") @warning_ignore("unused_signal")
signal toggle_pause_daytime(value: bool) signal toggle_pause_daytime(value: bool)

15
default_bus_layout.tres Normal file
View File

@@ -0,0 +1,15 @@
[gd_resource type="AudioBusLayout" format=3 uid="uid://cqvx62pwvvboj"]
[resource]
bus/1/name = &"Music"
bus/1/solo = false
bus/1/mute = false
bus/1/bypass_fx = false
bus/1/volume_db = 0.0
bus/1/send = &"Master"
bus/2/name = &"SFX"
bus/2/solo = false
bus/2/mute = false
bus/2/bypass_fx = false
bus/2/volume_db = 0.0
bus/2/send = &"Master"

92
docs/gyms/ai/gym_ai.tscn Normal file
View File

@@ -0,0 +1,92 @@
[gd_scene format=3 uid="uid://dqvrhiqgkd3w1"]
[ext_resource type="PackedScene" uid="uid://clx701xdwelgx" path="res://core/ai/agents/base/ai_base.tscn" id="1_a2xtd"]
[sub_resource type="NavigationMesh" id="NavigationMesh_optuv"]
vertices = PackedVector3Array(10.984741, 0.25012434, -1.0140381, 11.234741, 0.25012434, 0.23596191, 19.484741, 0.25012434, 0.23596191, 19.484741, 0.25012434, -19.514038, 9.234741, 0.25012434, -1.0140381, -19.515259, 0.25012434, -19.514038, -19.515259, 0.25012434, -0.014038086, 8.984741, 0.25012434, -0.014038086, 10.984741, 0.25012434, 1.2359619, 19.484741, 0.25012434, 19.235962, 9.234741, 0.25012434, 1.2359619, -19.515259, 0.25012434, 19.235962)
polygons = [PackedInt32Array(1, 0, 2), PackedInt32Array(2, 0, 3), PackedInt32Array(6, 5, 4), PackedInt32Array(4, 5, 3), PackedInt32Array(3, 0, 4), PackedInt32Array(4, 7, 6), PackedInt32Array(1, 2, 8), PackedInt32Array(8, 2, 9), PackedInt32Array(6, 10, 11), PackedInt32Array(11, 10, 9), PackedInt32Array(10, 8, 9), PackedInt32Array(6, 7, 10)]
[sub_resource type="PlaneMesh" id="PlaneMesh_optuv"]
[sub_resource type="BoxShape3D" id="BoxShape3D_xtjak"]
size = Vector3(1.9942131, 0.09710693, 1.984024)
[sub_resource type="BoxMesh" id="BoxMesh_lmjyn"]
[sub_resource type="BoxShape3D" id="BoxShape3D_lmjyn"]
[sub_resource type="Environment" id="Environment_lmjyn"]
[node name="GymAI" type="Node3D" unique_id=868339787]
[node name="NavigationRegion3D" type="NavigationRegion3D" parent="." unique_id=774907858]
navigation_mesh = SubResource("NavigationMesh_optuv")
[node name="Floor" type="MeshInstance3D" parent="NavigationRegion3D" unique_id=1976415311]
transform = Transform3D(20, 0, 0, 0, 20, 0, 0, 0, 20, 0, -0.83473957, 0)
mesh = SubResource("PlaneMesh_optuv")
[node name="StaticBody3D" type="StaticBody3D" parent="NavigationRegion3D/Floor" unique_id=2007477719]
[node name="CollisionShape3D" type="CollisionShape3D" parent="NavigationRegion3D/Floor/StaticBody3D" unique_id=1446628130]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0036563873, -0.009703338, -0.00868988)
shape = SubResource("BoxShape3D_xtjak")
[node name="Obstacle" type="MeshInstance3D" parent="NavigationRegion3D" unique_id=710701082]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10.148018, 0.06508446, 0)
mesh = SubResource("BoxMesh_lmjyn")
[node name="StaticBody3D" type="StaticBody3D" parent="NavigationRegion3D/Obstacle" unique_id=67152580]
[node name="CollisionShape3D" type="CollisionShape3D" parent="NavigationRegion3D/Obstacle/StaticBody3D" unique_id=1663742898]
shape = SubResource("BoxShape3D_lmjyn")
[node name="AIBase" parent="." unique_id=1228675528 instance=ExtResource("1_a2xtd")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.48246834, 0.21202153, 0.11262059)
[node name="Camera3D" type="Camera3D" parent="." unique_id=1148396057]
transform = Transform3D(-2.0613477e-08, 0.8818225, -0.47158146, 3.854569e-08, 0.47158146, 0.8818225, 1, -3.5527137e-15, -4.371139e-08, -18.21907, 28.71355, 0)
[node name="WorldEnvironment" type="WorldEnvironment" parent="." unique_id=1772424900]
environment = SubResource("Environment_lmjyn")
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="." unique_id=269230449]
transform = Transform3D(1, 0, 0, 0, 0.17952333, 0.98375374, 0, -0.98375374, 0.17952333, 0, 18.920979, 0)
[node name="Control" type="Control" parent="." unique_id=1072240389]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="PanelContainer" type="PanelContainer" parent="Control" unique_id=1647272132]
layout_mode = 0
offset_left = 50.0
offset_top = 50.0
offset_right = 400.0
offset_bottom = 827.0
[node name="Label" type="Label" parent="Control/PanelContainer" unique_id=272421245]
custom_minimum_size = Vector2(1, 1)
layout_mode = 2
size_flags_vertical = 1
text = "System Logic:
- The NPC uses a finite state machine to switch between behaviors.
- State logic runs during physics updates, while movement is handled by the agent through NavigationAgent3D.
AI States:
- IdleState: The agent waits in place for the duration defined by wait_time.
- PatrolState: The agent selects a valid random destination and moves toward it.
Core Components:
- NavigationAgent3D: Calculates the path and reports when the destination has been reached.
- PatrolRadiusShape: Defines the random movement area used when choosing the next patrol point.
- StateMachine: Initializes the available states and handles transitions between them.
Parameters:
- Speed: Movement speed of the agent.
- Wait Time: Delay in seconds on the IdleState node.
- Area Radius: Radius of the SphereShape3D used by PatrolRadiusShape."
autowrap_mode = 2

View File

@@ -0,0 +1,7 @@
extends Node3D
@onready var gallery: Control = $%Gallery
func _on_button_gallery_pressed() -> void:
gallery.visible = !gallery.visible

View File

@@ -0,0 +1 @@
uid://7oglx4br38d5

View File

@@ -0,0 +1,138 @@
[gd_scene format=3 uid="uid://bwc8slnbu7dmn"]
[ext_resource type="Script" uid="uid://7oglx4br38d5" path="res://docs/gyms/photo_mode/gym_photo_mode.gd" id="1_cl1h5"]
[ext_resource type="PackedScene" uid="uid://vni5kjalum6d" path="res://core/photo_mode/runtime/photo_mode_controller.tscn" id="2_q5kgc"]
[ext_resource type="PackedScene" uid="uid://bmkxt6btcx8qr" path="res://core/photo_mode/runtime/collectible.tscn" id="3_734hf"]
[ext_resource type="Texture2D" uid="uid://c3grftlmap4q5" path="res://tgcc/chunk/prop/tree/leaf1_alpha.png" id="4_00joj"]
[ext_resource type="Script" uid="uid://bj34o0org55ei" path="res://core/photo_mode/data/collectible_resource.gd" id="5_crfij"]
[ext_resource type="PackedScene" uid="uid://bvw086glfpcba" path="res://core/photo_mode/ui/collectible_gallery.tscn" id="6_6aab5"]
[ext_resource type="PackedScene" uid="uid://b6r787sik5yil" path="res://core/photo_mode/ui/photo_gallery.tscn" id="7_tb1ii"]
[sub_resource type="Environment" id="Environment_48mla"]
[sub_resource type="PlaneMesh" id="PlaneMesh_hh1ka"]
[sub_resource type="BoxShape3D" id="BoxShape3D_ynvi2"]
size = Vector3(1.9942131, 0.09710693, 1.984024)
[sub_resource type="Resource" id="Resource_ynvi2"]
script = ExtResource("5_crfij")
id = &"gatto"
title = "Gatto"
image = ExtResource("4_00joj")
metadata/_custom_type_script = "uid://bj34o0org55ei"
[sub_resource type="BoxMesh" id="BoxMesh_hh1ka"]
[node name="GymPhotoMode" type="Node3D" unique_id=1314600330]
script = ExtResource("1_cl1h5")
[node name="WorldEnvironment" type="WorldEnvironment" parent="." unique_id=213183287]
environment = SubResource("Environment_48mla")
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="." unique_id=1274975837]
transform = Transform3D(1, 0, 0, 0, 0.17952333, 0.98375374, 0, -0.98375374, 0.17952333, 0, 18.920979, 0)
[node name="Floor" type="MeshInstance3D" parent="." unique_id=958865480]
transform = Transform3D(20, 0, 0, 0, 20, 0, 0, 0, 20, 0, -0.83473957, 0)
mesh = SubResource("PlaneMesh_hh1ka")
[node name="StaticBody3D" type="StaticBody3D" parent="Floor" unique_id=2096983240]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Floor/StaticBody3D" unique_id=188185045]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0036563873, -0.009703338, -0.00868988)
shape = SubResource("BoxShape3D_ynvi2")
[node name="PhotoModeController" parent="." unique_id=695158870 node_paths=PackedStringArray("rotation_target") instance=ExtResource("2_q5kgc")]
transform = Transform3D(1, 0, 0, 0, 0.49999994, 0.8660254, 0, -0.8660254, 0.49999994, 0, 30, 20)
movement_bounds = AABB(-5, -5, -5, 10, 10, 10)
rotation_target = NodePath("../Node3D")
[node name="Node3D" type="Node3D" parent="." unique_id=570786250]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 10, 0)
[node name="Node3D2" type="Node3D" parent="." unique_id=15037296]
[node name="Collectible" parent="Node3D2" unique_id=1229019813 instance=ExtResource("3_734hf")]
collectible_data = SubResource("Resource_ynvi2")
[node name="MeshInstance3D" type="MeshInstance3D" parent="Node3D2" unique_id=553040412]
mesh = SubResource("BoxMesh_hh1ka")
[node name="Control" type="Control" parent="." unique_id=1802496396]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
[node name="ButtonGallery" type="Button" parent="Control" unique_id=539195532]
layout_mode = 0
offset_left = 50.0
offset_top = 50.0
offset_right = 163.0
offset_bottom = 81.0
text = "Menu"
[node name="Gallery" type="HSplitContainer" parent="Control" unique_id=1388833682]
unique_name_in_owner = true
visible = false
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 420.0
grow_horizontal = 2
grow_vertical = 2
[node name="CollectibleGallery" parent="Control/Gallery" unique_id=354419843 instance=ExtResource("6_6aab5")]
layout_mode = 2
size_flags_horizontal = 3
[node name="PhotoGallery" parent="Control/Gallery" unique_id=263414560 instance=ExtResource("7_tb1ii")]
layout_mode = 2
size_flags_horizontal = 3
[node name="PanelContainer" type="PanelContainer" parent="Control" unique_id=2015953740]
layout_mode = 0
offset_left = 50.0
offset_top = 150.0
offset_right = 400.0
offset_bottom = 927.0
[node name="ScrollContainer" type="ScrollContainer" parent="Control/PanelContainer" unique_id=1474258594]
layout_mode = 2
[node name="Label" type="Label" parent="Control/PanelContainer/ScrollContainer" unique_id=1982569320]
custom_minimum_size = Vector2(1, 1)
layout_mode = 2
size_flags_horizontal = 3
text = "System Logic:
- The system allows players to toggle a free camera mode to photograph and collect museum items.
- Game Pause: Activating the mode pauses the SceneTree, freezing the world while allowing the camera to remain functional.
- Taking a photo saves the captured image to disk and checks which collectibles are visible and unobstructed before unlocking them.
- CollectionManager acts as a global singleton that tracks unlocked collectibles, saved photos, and the data used by the UI.
Photo Mode Actions:
- Toggle Mode(P): Switches between normal gameplay and the photo camera, capturing or releasing the mouse, and toggles the global pause state.
- Rotate(Mouse): The camera orbits around the configured target while photo mode is active.
- Pan(Input Actions): The camera can be moved horizontally and vertically within the configured bounds.
- Capture(F): Saves the current frame and performs frustum and raycast checks against collectibles in view.
Core Components:
- PhotoModeController: Manages camera inputs, movement logic, and the photo-taking process.
- Collectible: An Area3D node placed on objects to make them identifiable by the camera.
- CollectionManager: Handles the logic for unlocking items and provides data to the UI.
- CollectibleGallery: Displays all collectibles and visually highlights the unlocked ones.
- PhotoGallery: Displays the photos saved by the player during the session.
Parameters:
- Pan & Rotation Speed: Defines how fast the camera moves and rotates.
- Movement Bounds: An AABB that restricts the camera's panning area.
- Collectible Data: Resource files containing the ID, title, and image for each item.
- Library: A central list of all CollectibleResources registered in the game."
autowrap_mode = 2
[connection signal="pressed" from="Control/ButtonGallery" to="." method="_on_button_gallery_pressed"]

View File

@@ -0,0 +1,35 @@
extends Node3D
@onready var radio: Radio = $%Radio
@onready var button_pause_resume: Button = $%Button_Pause_Resume
@onready var settings_menu: SettingsMenu = $%SettingsMenu
func _on_button_play_pressed() -> void:
if !radio.playing:
radio.play_track()
func _on_button_pause_pressed() -> void:
radio.toggle_pause()
if !button_pause_resume:
button_pause_resume = $%Button_Pause_Resume
if radio.stream_paused:
button_pause_resume.text = "Resume"
else:
button_pause_resume.text = "Pause"
func _on_button_stop_pressed() -> void:
radio.stop_radio()
func _on_button_next_pressed() -> void:
radio.next_track()
func _on_button_previous_pressed() -> void:
radio.prev_track()
func _on_button_settings_menu_pressed() -> void:
settings_menu.visible = !settings_menu.visible

View File

@@ -0,0 +1 @@
uid://ew4b78u5tkiu

View File

@@ -0,0 +1,104 @@
[gd_scene format=3 uid="uid://bdkdhn1oallke"]
[ext_resource type="PackedScene" uid="uid://cpeyt1dgrtglc" path="res://core/radio/radio.tscn" id="1_8yomj"]
[ext_resource type="Script" uid="uid://ew4b78u5tkiu" path="res://docs/gyms/radio/gym_radio.gd" id="1_h5r8c"]
[ext_resource type="AudioStream" uid="uid://70cc8she43re" path="res://docs/gyms/radio/lofi_01.ogg" id="3_ltpvc"]
[ext_resource type="PackedScene" uid="uid://caqf471x0kttc" path="res://core/audio/settings/settings_menu.tscn" id="4_8pw2j"]
[node name="GymRadio" type="Node3D" unique_id=204859062]
script = ExtResource("1_h5r8c")
[node name="Radio" parent="." unique_id=1234112225 instance=ExtResource("1_8yomj")]
unique_name_in_owner = true
playlist = Array[AudioStream]([ExtResource("3_ltpvc")])
[node name="Control" type="Control" parent="." unique_id=1232082176]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="SettingsMenu" parent="Control" unique_id=1639777294 instance=ExtResource("4_8pw2j")]
unique_name_in_owner = true
visible = false
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
[node name="VBoxContainer2" type="VBoxContainer" parent="Control" unique_id=2092627240]
layout_mode = 1
anchors_preset = 9
anchor_bottom = 1.0
offset_right = 229.0
grow_vertical = 2
[node name="VBoxContainer" type="VBoxContainer" parent="Control/VBoxContainer2" unique_id=2097365775]
layout_mode = 2
[node name="Button_Play" type="Button" parent="Control/VBoxContainer2/VBoxContainer" unique_id=1422696340]
layout_mode = 2
text = "Play"
[node name="Button_Pause_Resume" type="Button" parent="Control/VBoxContainer2/VBoxContainer" unique_id=2016690081]
unique_name_in_owner = true
layout_mode = 2
text = "Pause"
[node name="Button_Stop" type="Button" parent="Control/VBoxContainer2/VBoxContainer" unique_id=61861870]
layout_mode = 2
text = "Stop"
[node name="Button_Next" type="Button" parent="Control/VBoxContainer2/VBoxContainer" unique_id=957606385]
layout_mode = 2
text = "Next"
[node name="Button_Previous" type="Button" parent="Control/VBoxContainer2/VBoxContainer" unique_id=929072518]
layout_mode = 2
text = "Previous"
[node name="Button_SettingsMenu" type="Button" parent="Control/VBoxContainer2/VBoxContainer" unique_id=431867154]
layout_mode = 2
text = "SettingsMenu"
[node name="PanelContainer" type="PanelContainer" parent="Control/VBoxContainer2" unique_id=1558442050]
layout_mode = 2
size_flags_vertical = 3
[node name="ScrollContainer" type="ScrollContainer" parent="Control/VBoxContainer2/PanelContainer" unique_id=7789304]
layout_mode = 2
[node name="Label" type="Label" parent="Control/VBoxContainer2/PanelContainer/ScrollContainer" unique_id=2043293564]
custom_minimum_size = Vector2(1, 1)
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 1
text = "System Logic:
- The system is an extension of AudioStreamPlayer designed to manage sequential audio playback.
- It automatically triggers the next track in the sequence when the current one finishes via the finished signal.
Core Functionality:
- Playlist Management: Stores a list of AudioStream resources and tracks the current song index.
- Track Navigation: Allows cycling forward and backward through the playlist with index wrapping (loops back to start/end).
- Playback Control: Supports jumping to specific tracks, toggling the pause state, and stopping the stream.
- Audio Settings: If the Music bus exists, the Settings menu can be used to test and adjust playback volume.
Key Methods:
- play_track: Loads a specific stream from the playlist and begins playback.
- next_track / prev_track: Increments or decrements the index to navigate the playlist.
- toggle_pause: Resumes or pauses the current stream without resetting its position.
Adjustable Parameters:
- Playlist: An Array in the inspector where you can assign one or more AudioStream resources."
autowrap_mode = 2
[connection signal="pressed" from="Control/VBoxContainer2/VBoxContainer/Button_Play" to="." method="_on_button_play_pressed"]
[connection signal="pressed" from="Control/VBoxContainer2/VBoxContainer/Button_Pause_Resume" to="." method="_on_button_pause_pressed"]
[connection signal="pressed" from="Control/VBoxContainer2/VBoxContainer/Button_Stop" to="." method="_on_button_stop_pressed"]
[connection signal="pressed" from="Control/VBoxContainer2/VBoxContainer/Button_Next" to="." method="_on_button_next_pressed"]
[connection signal="pressed" from="Control/VBoxContainer2/VBoxContainer/Button_Previous" to="." method="_on_button_previous_pressed"]
[connection signal="pressed" from="Control/VBoxContainer2/VBoxContainer/Button_SettingsMenu" to="." method="_on_button_settings_menu_pressed"]

BIN
docs/gyms/radio/lofi_01.ogg Normal file

Binary file not shown.

View File

@@ -0,0 +1,19 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://70cc8she43re"
path="res://.godot/imported/lofi_01.ogg-0aacd597266806080412021811923091.oggvorbisstr"
[deps]
source_file="res://docs/gyms/radio/lofi_01.ogg"
dest_files=["res://.godot/imported/lofi_01.ogg-0aacd597266806080412021811923091.oggvorbisstr"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

View File

@@ -9,10 +9,9 @@
[ext_resource type="PackedScene" uid="uid://crlk31ecl480n" path="res://tgcc/chunk/countryside/scene/chunk_country_corner_03.tscn" id="7_4elh6"] [ext_resource type="PackedScene" uid="uid://crlk31ecl480n" path="res://tgcc/chunk/countryside/scene/chunk_country_corner_03.tscn" id="7_4elh6"]
[ext_resource type="PackedScene" uid="uid://b8blm6bwintf7" path="res://tgcc/chunk/countryside/scene/chunk_country_empty_01.tscn" id="7_xgfli"] [ext_resource type="PackedScene" uid="uid://b8blm6bwintf7" path="res://tgcc/chunk/countryside/scene/chunk_country_empty_01.tscn" id="7_xgfli"]
[ext_resource type="PackedScene" uid="uid://brpp7fe5noq8v" path="res://tgcc/chunk/countryside/scene/chunk_country_cross_3_01.tscn" id="8_hvd8d"] [ext_resource type="PackedScene" uid="uid://brpp7fe5noq8v" path="res://tgcc/chunk/countryside/scene/chunk_country_cross_3_01.tscn" id="8_hvd8d"]
[ext_resource type="PackedScene" uid="uid://cjv1e8pc6gde1" path="res://tgcc/chunk/countryside/scene/chunk_country_corner_01.tscn" id="8_nurqm"]
[ext_resource type="PackedScene" uid="uid://cu2chsjh8wuvp" path="res://tgcc/chunk/countryside/scene/chunk_country_straight_02.tscn" id="9_51cxd"] [ext_resource type="PackedScene" uid="uid://cu2chsjh8wuvp" path="res://tgcc/chunk/countryside/scene/chunk_country_straight_02.tscn" id="9_51cxd"]
[ext_resource type="PackedScene" uid="uid://dqoai3665vb0a" path="res://tgcc/chunk/countryside/scene/chunk_country_corner_02.tscn" id="9_q6kbb"] [ext_resource type="PackedScene" uid="uid://dqoai3665vb0a" path="res://tgcc/chunk/countryside/scene/chunk_country_corner_02.tscn" id="9_q6kbb"]
[ext_resource type="PackedScene" uid="uid://c73yk6858dmwn" path="res://tgcc/chunk/countryside/scene/chunk_country_cross_4_01.tscn" id="10_ufarv"] [ext_resource type="PackedScene" uid="uid://cjv1e8pc6gde1" path="res://tgcc/chunk/countryside/scene/chunk_country_corner_01.tscn" id="10_ufarv"]
[ext_resource type="PackedScene" uid="uid://cv5xmnow451kl" path="res://core/camera.tscn" id="11_o1bk6"] [ext_resource type="PackedScene" uid="uid://cv5xmnow451kl" path="res://core/camera.tscn" id="11_o1bk6"]
[ext_resource type="Script" uid="uid://dboerd4a6dwj7" path="res://core/biome_generator/rails.gd" id="12_4is5r"] [ext_resource type="Script" uid="uid://dboerd4a6dwj7" path="res://core/biome_generator/rails.gd" id="12_4is5r"]
[ext_resource type="PackedScene" uid="uid://qmt8bkiksgj3" path="res://tgcc/chunk/countryside/scene/chunk_country_cross_3_02.tscn" id="12_81wux"] [ext_resource type="PackedScene" uid="uid://qmt8bkiksgj3" path="res://tgcc/chunk/countryside/scene/chunk_country_cross_3_02.tscn" id="12_81wux"]
@@ -28,11 +27,26 @@
[ext_resource type="AudioStream" uid="uid://creenugno7hm" path="res://core/daynight/sounds/thunder_4.mp3" id="18_lfsx4"] [ext_resource type="AudioStream" uid="uid://creenugno7hm" path="res://core/daynight/sounds/thunder_4.mp3" id="18_lfsx4"]
[ext_resource type="PackedScene" uid="uid://pxmcy0lhne5d" path="res://tgcc/chunk/countryside/scene/chunk_country_straight_03.tscn" id="19_ne4de"] [ext_resource type="PackedScene" uid="uid://pxmcy0lhne5d" path="res://tgcc/chunk/countryside/scene/chunk_country_straight_03.tscn" id="19_ne4de"]
[ext_resource type="AudioStream" uid="uid://bm6dq4jwsbxf6" path="res://core/daynight/sounds/thunder_5.mp3" id="19_niwdr"] [ext_resource type="AudioStream" uid="uid://bm6dq4jwsbxf6" path="res://core/daynight/sounds/thunder_5.mp3" id="19_niwdr"]
[ext_resource type="PackedScene" uid="uid://bs3dkwcc8w2uk" path="res://tgcc/chunk/river/scene/chunk_river_curve_1.tscn" id="20_q6kbb"]
[ext_resource type="AudioStream" uid="uid://byuxpukhy72n8" path="res://core/daynight/sounds/rain_1.mp3" id="20_quqod"] [ext_resource type="AudioStream" uid="uid://byuxpukhy72n8" path="res://core/daynight/sounds/rain_1.mp3" id="20_quqod"]
[ext_resource type="PackedScene" uid="uid://1c1ion0qnho4" path="res://tgcc/map/map_1/map_1.tscn" id="20_xkcqp"] [ext_resource type="PackedScene" uid="uid://1c1ion0qnho4" path="res://tgcc/map/map_1/map_1.tscn" id="20_xkcqp"]
[ext_resource type="PackedScene" uid="uid://btipd6wev016d" path="res://tgcc/chunk/river/scene/chunk_river_straight_1.tscn" id="21_81wux"]
[ext_resource type="AudioStream" uid="uid://h5yhjn1x3f4j" path="res://core/daynight/sounds/rain_2.mp3" id="21_appab"] [ext_resource type="AudioStream" uid="uid://h5yhjn1x3f4j" path="res://core/daynight/sounds/rain_2.mp3" id="21_appab"]
[ext_resource type="PackedScene" uid="uid://deaxxlxdipqvx" path="res://tgcc/chunk/river/scene/chunk_river_end_1.tscn" id="21_ky1rt"]
[ext_resource type="PackedScene" uid="uid://ct3084nflycla" path="res://tgcc/chunk/river/scene/chunk_river_mix1_1.tscn" id="22_5g563"]
[ext_resource type="AudioStream" uid="uid://elrjw0smm0cj" path="res://core/daynight/sounds/rain_3.mp3" id="22_yime3"] [ext_resource type="AudioStream" uid="uid://elrjw0smm0cj" path="res://core/daynight/sounds/rain_3.mp3" id="22_yime3"]
[ext_resource type="Script" uid="uid://cx2tlvxhvatj5" path="res://docs/museums/daynight/control.gd" id="23_ou3jn"] [ext_resource type="Script" uid="uid://cx2tlvxhvatj5" path="res://docs/museums/daynight/control.gd" id="23_ou3jn"]
[ext_resource type="PackedScene" uid="uid://bhvmmw8d8vns5" path="res://tgcc/chunk/river/scene/chunk_river_mix2_1.tscn" id="23_tbmwr"]
[ext_resource type="PackedScene" uid="uid://cqe4t842io22i" path="res://tgcc/chunk/river/scene/chunk_river_cross_1.tscn" id="24_ne4de"]
[ext_resource type="PackedScene" uid="uid://rjvefmcd4bpo" path="res://tgcc/chunk/river/scene/chunk_river_mix3_1.tscn" id="25_5g563"]
[ext_resource type="PackedScene" uid="uid://c6vpwol3k384y" path="res://tgcc/chunk/river/scene/chunk_river_mix4_1.tscn" id="26_7ykwn"]
[ext_resource type="PackedScene" uid="uid://cd3iyj71hkgcr" path="res://tgcc/chunk/river/scene/chunk_river_mix5_1.tscn" id="27_d1gyr"]
[ext_resource type="PackedScene" uid="uid://bh8kbw07bsu6n" path="res://tgcc/chunk/river/scene/chunk_river_mix6_1.tscn" id="28_3ldqx"]
[ext_resource type="PackedScene" uid="uid://ce6qvpb27fdpo" path="res://tgcc/chunk/river/scene/chunk_river_curve_2.tscn" id="29_d1gyr"]
[ext_resource type="PackedScene" uid="uid://7063xk3bwboc" path="res://tgcc/chunk/river/scene/chunk_river_straight_4.tscn" id="30_3ldqx"]
[ext_resource type="PackedScene" uid="uid://ccgd3uy68r88h" path="res://tgcc/chunk/river/scene/chunk_river_curve_3.tscn" id="31_dsw5k"]
[ext_resource type="PackedScene" uid="uid://mpgyaho52lii" path="res://tgcc/chunk/river/scene/chunk_river_straight_5.tscn" id="32_03yl6"]
[ext_resource type="PackedScene" uid="uid://q26mkh3cupic" path="res://tgcc/chunk/river/scene/chunk_river_cross_2.tscn" id="33_rlemp"]
[sub_resource type="FastNoiseLite" id="FastNoiseLite_wjpfq"] [sub_resource type="FastNoiseLite" id="FastNoiseLite_wjpfq"]
fractal_lacunarity = 1.915 fractal_lacunarity = 1.915
@@ -112,7 +126,7 @@ compositor_effects = Array[CompositorEffect]([SubResource("CompositorEffect_q52t
[sub_resource type="Resource" id="Resource_3qrd0"] [sub_resource type="Resource" id="Resource_3qrd0"]
script = ExtResource("6_s3jnv") script = ExtResource("6_s3jnv")
name = "countryside" name = "countryside"
available_chunks = Array[PackedScene]([ExtResource("7_xgfli"), ExtResource("8_nurqm"), ExtResource("9_q6kbb"), ExtResource("7_4elh6"), ExtResource("8_hvd8d"), ExtResource("12_81wux"), ExtResource("13_1ugwu"), ExtResource("10_ufarv"), ExtResource("15_ky1rt"), ExtResource("16_5g563"), ExtResource("17_tbmwr"), ExtResource("9_51cxd"), ExtResource("19_ne4de")]) available_chunks = Array[PackedScene]([ExtResource("7_xgfli"), ExtResource("10_ufarv"), ExtResource("9_q6kbb"), ExtResource("7_4elh6"), ExtResource("8_hvd8d"), ExtResource("12_81wux"), ExtResource("13_1ugwu"), ExtResource("10_ufarv"), ExtResource("15_ky1rt"), ExtResource("16_5g563"), ExtResource("17_tbmwr"), ExtResource("9_51cxd"), ExtResource("19_ne4de"), ExtResource("20_q6kbb"), ExtResource("21_81wux"), ExtResource("21_ky1rt"), ExtResource("22_5g563"), ExtResource("23_tbmwr"), ExtResource("24_ne4de"), ExtResource("25_5g563"), ExtResource("26_7ykwn"), ExtResource("27_d1gyr"), ExtResource("28_3ldqx"), ExtResource("29_d1gyr"), ExtResource("30_3ldqx"), ExtResource("31_dsw5k"), ExtResource("32_03yl6"), ExtResource("33_rlemp")])
metadata/_custom_type_script = "uid://wv6kcqkibium" metadata/_custom_type_script = "uid://wv6kcqkibium"
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_pypsn"] [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_pypsn"]
@@ -386,7 +400,7 @@ theme_override_colors/font_pressed_color = Color(1, 1, 1, 1)
theme_override_colors/font_hover_color = Color(1, 1, 1, 1) theme_override_colors/font_hover_color = Color(1, 1, 1, 1)
theme_override_colors/font_hover_pressed_color = Color(1, 1, 1, 1) theme_override_colors/font_hover_pressed_color = Color(1, 1, 1, 1)
theme_override_colors/font_outline_color = Color(1, 1, 1, 1) theme_override_colors/font_outline_color = Color(1, 1, 1, 1)
text = "Random Weather (10\")" text = "Random Weather"
[node name="WeatherEventLabel" type="Label" parent="Control" unique_id=641424797] [node name="WeatherEventLabel" type="Label" parent="Control" unique_id=641424797]
layout_mode = 0 layout_mode = 0
@@ -412,6 +426,20 @@ theme_override_colors/font_hover_pressed_color = Color(1, 1, 1, 1)
theme_override_colors/font_outline_color = Color(1, 1, 1, 1) theme_override_colors/font_outline_color = Color(1, 1, 1, 1)
text = "Fog" text = "Fog"
[node name="UpdateRails" type="Button" parent="Control" unique_id=267134156]
layout_mode = 0
offset_left = 12.0
offset_top = 351.0
offset_right = 195.0
offset_bottom = 382.0
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_colors/font_focus_color = Color(1, 1, 1, 1)
theme_override_colors/font_pressed_color = Color(1, 1, 1, 1)
theme_override_colors/font_hover_color = Color(1, 1, 1, 1)
theme_override_colors/font_hover_pressed_color = Color(1, 1, 1, 1)
theme_override_colors/font_outline_color = Color(1, 1, 1, 1)
text = "Update Rails"
[connection signal="toggled" from="Control/Snow" to="Control" method="_on_snow_toggled"] [connection signal="toggled" from="Control/Snow" to="Control" method="_on_snow_toggled"]
[connection signal="toggled" from="Control/Rain" to="Control" method="_on_rain_toggled"] [connection signal="toggled" from="Control/Rain" to="Control" method="_on_rain_toggled"]
[connection signal="toggled" from="Control/Wind" to="Control" method="_on_wind_toggled"] [connection signal="toggled" from="Control/Wind" to="Control" method="_on_wind_toggled"]
@@ -426,3 +454,4 @@ text = "Fog"
[connection signal="toggled" from="Control/Shadows" to="Control" method="_on_shadows_toggled"] [connection signal="toggled" from="Control/Shadows" to="Control" method="_on_shadows_toggled"]
[connection signal="pressed" from="Control/RandomWeather" to="Control" method="_on_random_weather_pressed"] [connection signal="pressed" from="Control/RandomWeather" to="Control" method="_on_random_weather_pressed"]
[connection signal="toggled" from="Control/Fog" to="Control" method="_on_fog_toggled"] [connection signal="toggled" from="Control/Fog" to="Control" method="_on_fog_toggled"]
[connection signal="pressed" from="Control/UpdateRails" to="Control" method="_on_update_rails_pressed"]

View File

@@ -7,6 +7,8 @@ extends Control
@onready var wind_slider: HSlider = $WindSlider @onready var wind_slider: HSlider = $WindSlider
@onready var day_time_option: OptionButton = $DayTimeOptions @onready var day_time_option: OptionButton = $DayTimeOptions
var default_random_event_duration: float = 10.0
func _ready() -> void: func _ready() -> void:
UIEvents.day_time_changed.connect(_on_day_time_changed) UIEvents.day_time_changed.connect(_on_day_time_changed)
UIEvents.day_time_option_changed.connect(_on_day_time_option_changed) UIEvents.day_time_option_changed.connect(_on_day_time_option_changed)
@@ -29,7 +31,10 @@ func _on_wind_slider_value_changed(value: float) -> void:
UIEvents.wind_change.emit(value) UIEvents.wind_change.emit(value)
func _on_random_weather_pressed() -> void: func _on_random_weather_pressed() -> void:
UIEvents.trigger_random_weather.emit(10.0) var duration: float = default_random_event_duration
if day_night != null and day_night.environment_config != null:
duration = day_night.environment_config.random_event_duration
UIEvents.trigger_random_weather.emit(duration)
func _on_fireflies_toggled(toggled_on: bool) -> void: func _on_fireflies_toggled(toggled_on: bool) -> void:
UIEvents.toggle_fireflies.emit(toggled_on) UIEvents.toggle_fireflies.emit(toggled_on)
@@ -99,3 +104,6 @@ func _on_option_button_item_selected(index: int) -> void:
func _on_fog_toggled(toggled_on: bool) -> void: func _on_fog_toggled(toggled_on: bool) -> void:
UIEvents.toggle_fog.emit(toggled_on) UIEvents.toggle_fog.emit(toggled_on)
func _on_update_rails_pressed() -> void:
UIEvents.update_rail_chunks.emit()

View File

@@ -2,7 +2,7 @@
[ext_resource type="PackedScene" uid="uid://cl2ast2tk7ifw" path="res://tgcc/chunk/railway/scene/chunk_railway_curve.tscn" id="14_ttcft"] [ext_resource type="PackedScene" uid="uid://cl2ast2tk7ifw" path="res://tgcc/chunk/railway/scene/chunk_railway_curve.tscn" id="14_ttcft"]
[ext_resource type="PackedScene" uid="uid://cewdxvcpqb53f" path="res://tgcc/chunk/railway/scene/chunk_railway_station_doubleside.tscn" id="15_oi62p"] [ext_resource type="PackedScene" uid="uid://cewdxvcpqb53f" path="res://tgcc/chunk/railway/scene/chunk_railway_station_doubleside.tscn" id="15_oi62p"]
[ext_resource type="PackedScene" uid="uid://bup6gwlxos0w2" path="res://tgcc/chunk/railway/scene/chunk_railway_station_hero.tscn" id="16_birpm"] [ext_resource type="PackedScene" uid="uid://bup6gwlxos0w2" path="res://tgcc/chunk/railway/hero/chunk_railway_station_hero.tscn" id="16_birpm"]
[ext_resource type="PackedScene" uid="uid://d3pcshw2bioic" path="res://tgcc/chunk/railway/scene/chunk_railway_station_oneside.tscn" id="17_esgqd"] [ext_resource type="PackedScene" uid="uid://d3pcshw2bioic" path="res://tgcc/chunk/railway/scene/chunk_railway_station_oneside.tscn" id="17_esgqd"]
[ext_resource type="PackedScene" uid="uid://bqxpqhla2kogq" path="res://tgcc/chunk/railway/scene/chunk_railway_straight.tscn" id="18_5ivsh"] [ext_resource type="PackedScene" uid="uid://bqxpqhla2kogq" path="res://tgcc/chunk/railway/scene/chunk_railway_straight.tscn" id="18_5ivsh"]
[ext_resource type="PackedScene" uid="uid://c3ub6rj0tlt6q" path="res://tgcc/chunk/railway/scene/chunk_railway_straight_2.tscn" id="19_yd4l5"] [ext_resource type="PackedScene" uid="uid://c3ub6rj0tlt6q" path="res://tgcc/chunk/railway/scene/chunk_railway_straight_2.tscn" id="19_yd4l5"]

View File

@@ -19,6 +19,9 @@ config/icon="uid://bfar1kk3pgq8f"
[autoload] [autoload]
UIEvents="*uid://dehu28iq27mbn" UIEvents="*uid://dehu28iq27mbn"
GameState="*uid://b17g2w2g101o6"
CollectionManager="*uid://c3kq1qddpm8tf"
AudioManager="*uid://dcttbbavtwtsg"
[display] [display]
@@ -34,6 +37,39 @@ weather_vegetables_node=""
wind_node="Materials to apply wind" wind_node="Materials to apply wind"
weather_node="" weather_node=""
[input]
photo_pan_left={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":65,"location":0,"echo":false,"script":null)
]
}
photo_pan_right={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":100,"location":0,"echo":false,"script":null)
]
}
photo_pan_up={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":119,"location":0,"echo":false,"script":null)
]
}
photo_pan_down={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"location":0,"echo":false,"script":null)
]
}
take_photo={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":70,"key_label":0,"unicode":102,"location":0,"echo":false,"script":null)
]
}
toggle_photo_mode={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":80,"key_label":0,"unicode":112,"location":0,"echo":false,"script":null)
]
}
[physics] [physics]
3d/physics_engine="Jolt Physics" 3d/physics_engine="Jolt Physics"

View File

@@ -4,11 +4,14 @@
[ext_resource type="Script" uid="uid://dg2h4kbqe8j3m" path="res://core/biome_generator/chunk_info.gd" id="2_4d433"] [ext_resource type="Script" uid="uid://dg2h4kbqe8j3m" path="res://core/biome_generator/chunk_info.gd" id="2_4d433"]
[ext_resource type="Material" uid="uid://blqelpjvdv23j" path="res://tgcc/chunk/material/grassflat_chunk.tres" id="2_ewqv4"] [ext_resource type="Material" uid="uid://blqelpjvdv23j" path="res://tgcc/chunk/material/grassflat_chunk.tres" id="2_ewqv4"]
[ext_resource type="Material" uid="uid://4xhpd6lust7w" path="res://tgcc/chunk/material/path_chunk.tres" id="3_4d433"] [ext_resource type="Material" uid="uid://4xhpd6lust7w" path="res://tgcc/chunk/material/path_chunk.tres" id="3_4d433"]
[ext_resource type="Script" uid="uid://dg6ngy4pmtsyc" path="res://core/biome_generator/prop_info.gd" id="3_ckjyx"]
[ext_resource type="Material" uid="uid://ce0bdk3mx2xao" path="res://tgcc/chunk/material/water_chunk.tres" id="4_r06ll"] [ext_resource type="Material" uid="uid://ce0bdk3mx2xao" path="res://tgcc/chunk/material/water_chunk.tres" id="4_r06ll"]
[ext_resource type="Material" uid="uid://fnjxocmx16b7" path="res://tgcc/chunk/prop/grass/grass_chunk.tres" id="5_sddh0"] [ext_resource type="Material" uid="uid://fnjxocmx16b7" path="res://tgcc/chunk/prop/grass/grass_chunk.tres" id="5_sddh0"]
[ext_resource type="PackedScene" uid="uid://d12t04rs47jq3" path="res://tgcc/chunk/prop/tree/tree_01.tscn" id="5_y2fk3"]
[ext_resource type="Material" uid="uid://jygb1hcokks5" path="res://tgcc/chunk/prop/grass/grass_bank.tres" id="6_ckjyx"] [ext_resource type="Material" uid="uid://jygb1hcokks5" path="res://tgcc/chunk/prop/grass/grass_bank.tres" id="6_ckjyx"]
[ext_resource type="Material" uid="uid://bjrb33qwp1p43" path="res://tgcc/chunk/prop/grass/grass_chunk_weeds.tres" id="7_y2fk3"] [ext_resource type="Material" uid="uid://bjrb33qwp1p43" path="res://tgcc/chunk/prop/grass/grass_chunk_weeds.tres" id="7_y2fk3"]
[ext_resource type="Material" uid="uid://0x17mj2v807r" path="res://tgcc/chunk/prop/grass/grass_chunk_weeds2.tres" id="8_vtfy7"] [ext_resource type="Material" uid="uid://0x17mj2v807r" path="res://tgcc/chunk/prop/grass/grass_chunk_weeds2.tres" id="8_vtfy7"]
[ext_resource type="PackedScene" uid="uid://bgb4pfflokl5s" path="res://tgcc/chunk/prop/pylon/pylon.tscn" id="10_r06ll"]
[sub_resource type="PlaneMesh" id="PlaneMesh_mm7rq"] [sub_resource type="PlaneMesh" id="PlaneMesh_mm7rq"]
size = Vector2(0.5, 0.5) size = Vector2(0.5, 0.5)
@@ -43,27 +46,35 @@ size = Vector2(1, 1)
[sub_resource type="PlaneMesh" id="PlaneMesh_oviqx"] [sub_resource type="PlaneMesh" id="PlaneMesh_oviqx"]
size = Vector2(1, 1) size = Vector2(1, 1)
[node name="chunk_country_corner_01" unique_id=200417581 instance=ExtResource("1_0ffx4")] [node name="chunk_country_corner_01" unique_id=200417581 node_paths=PackedStringArray("connection_left", "connection_right") instance=ExtResource("1_0ffx4")]
script = ExtResource("2_4d433") script = ExtResource("2_4d433")
south = true south = true
west = true west = true
have_lamppost = true
connection_left = [NodePath("PaloLuce/sx")]
connection_right = [NodePath("PaloLuce/dx")]
[node name="Argini_001" parent="." index="0" unique_id=1474838784] [node name="Prop1" type="Marker3D" parent="." index="0" unique_id=1846012620]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 2.1078086, 4.588761, 4.5396976)
script = ExtResource("3_ckjyx")
available_props = Array[PackedScene]([ExtResource("10_r06ll"), ExtResource("5_y2fk3")])
[node name="Argini_001" parent="." index="1" unique_id=1474838784]
surface_material_override/0 = ExtResource("2_ewqv4") surface_material_override/0 = ExtResource("2_ewqv4")
[node name="Chunk_005" parent="." index="1" unique_id=844192036] [node name="Chunk_005" parent="." index="2" unique_id=844192036]
surface_material_override/0 = ExtResource("2_ewqv4") surface_material_override/0 = ExtResource("2_ewqv4")
[node name="Chunk_036" parent="." index="2" unique_id=1584066508 groups=["weather_node"]] [node name="Chunk_036" parent="." index="3" unique_id=1584066508 groups=["weather_node"]]
surface_material_override/0 = ExtResource("3_4d433") surface_material_override/0 = ExtResource("3_4d433")
[node name="Chunk_037" parent="." index="3" unique_id=1100757609 groups=["weather_node"]] [node name="Chunk_037" parent="." index="4" unique_id=1100757609 groups=["weather_node"]]
surface_material_override/0 = ExtResource("3_4d433") surface_material_override/0 = ExtResource("3_4d433")
[node name="Water_003" parent="." index="4" unique_id=1047599796] [node name="Water_003" parent="." index="5" unique_id=1047599796]
surface_material_override/0 = ExtResource("4_r06ll") surface_material_override/0 = ExtResource("4_r06ll")
[node name="grass" type="Node3D" parent="." index="5" unique_id=924191951 groups=["weather_vegetables_node", "wind_node"]] [node name="grass" type="Node3D" parent="." index="6" unique_id=924191951 groups=["weather_vegetables_node", "wind_node"]]
[node name="grass_plane" type="MeshInstance3D" parent="grass" index="0" unique_id=1701437548] [node name="grass_plane" type="MeshInstance3D" parent="grass" index="0" unique_id=1701437548]
transform = Transform3D(1, 0, 0, 0, -4.371139e-08, -1, 0, 1, -4.371139e-08, 0, 0, 0) transform = Transform3D(1, 0, 0, 0, -4.371139e-08, -1, 0, 1, -4.371139e-08, 0, 0, 0)
@@ -94,7 +105,7 @@ material_override = ExtResource("8_vtfy7")
cast_shadow = 0 cast_shadow = 0
multimesh = SubResource("MultiMesh_sddh0") multimesh = SubResource("MultiMesh_sddh0")
[node name="rice" type="Node3D" parent="." index="6" unique_id=318026795 groups=["weather_vegetables_node", "wind_node"]] [node name="rice" type="Node3D" parent="." index="7" unique_id=318026795 groups=["weather_vegetables_node", "wind_node"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -86.08408, 0, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -86.08408, 0, 0)
[node name="rice_plane61" type="MeshInstance3D" parent="rice" index="0" unique_id=1796062490] [node name="rice_plane61" type="MeshInstance3D" parent="rice" index="0" unique_id=1796062490]
@@ -906,3 +917,8 @@ transform = Transform3D(-4.371139e-08, -1, 4.371139e-08, 0, -4.371139e-08, -1, 1
cast_shadow = 0 cast_shadow = 0
mesh = SubResource("PlaneMesh_oviqx") mesh = SubResource("PlaneMesh_oviqx")
surface_material_override/0 = ExtResource("7_y2fk3") surface_material_override/0 = ExtResource("7_y2fk3")
[node name="PaloLuce" parent="." index="8" unique_id=1607500596 instance=ExtResource("10_r06ll")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.4629593, 0, -1.4456635)
[editable path="PaloLuce"]

View File

@@ -9,6 +9,7 @@
[ext_resource type="Material" uid="uid://jygb1hcokks5" path="res://tgcc/chunk/prop/grass/grass_bank.tres" id="6_jqpht"] [ext_resource type="Material" uid="uid://jygb1hcokks5" path="res://tgcc/chunk/prop/grass/grass_bank.tres" id="6_jqpht"]
[ext_resource type="Material" uid="uid://bjrb33qwp1p43" path="res://tgcc/chunk/prop/grass/grass_chunk_weeds.tres" id="7_sun4k"] [ext_resource type="Material" uid="uid://bjrb33qwp1p43" path="res://tgcc/chunk/prop/grass/grass_chunk_weeds.tres" id="7_sun4k"]
[ext_resource type="Material" uid="uid://0x17mj2v807r" path="res://tgcc/chunk/prop/grass/grass_chunk_weeds2.tres" id="8_xu1ds"] [ext_resource type="Material" uid="uid://0x17mj2v807r" path="res://tgcc/chunk/prop/grass/grass_chunk_weeds2.tres" id="8_xu1ds"]
[ext_resource type="PackedScene" uid="uid://c7hdw2g6sbygr" path="res://tgcc/chunk/prop/tree/bambù/bambù.tscn" id="10_x1bjv"]
[sub_resource type="PlaneMesh" id="PlaneMesh_wt3n1"] [sub_resource type="PlaneMesh" id="PlaneMesh_wt3n1"]
size = Vector2(0.5, 0.5) size = Vector2(0.5, 0.5)
@@ -51,16 +52,16 @@ script = ExtResource("2_yfmnf")
south = true south = true
west = true west = true
[node name="Argini" parent="." index="0" unique_id=357182272] [node name="Argini" parent="." index="0" unique_id=487109030]
surface_material_override/0 = ExtResource("2_02qm6") surface_material_override/0 = ExtResource("2_02qm6")
[node name="Sentieri" parent="." index="1" unique_id=1704203551 groups=["weather_node"]] [node name="Sentieri" parent="." index="1" unique_id=320924856 groups=["weather_node"]]
surface_material_override/0 = ExtResource("3_yfmnf") surface_material_override/0 = ExtResource("3_yfmnf")
[node name="Terreno" parent="." index="2" unique_id=1478648388] [node name="Terreno" parent="." index="2" unique_id=1980435075]
surface_material_override/0 = ExtResource("2_02qm6") surface_material_override/0 = ExtResource("2_02qm6")
[node name="Water" parent="." index="3" unique_id=415433510] [node name="Water" parent="." index="3" unique_id=424969495]
surface_material_override/0 = ExtResource("4_x1bjv") surface_material_override/0 = ExtResource("4_x1bjv")
[node name="grass" type="Node3D" parent="." index="4" unique_id=543668848 groups=["weather_vegetables_node", "wind_node"]] [node name="grass" type="Node3D" parent="." index="4" unique_id=543668848 groups=["weather_vegetables_node", "wind_node"]]
@@ -642,3 +643,315 @@ transform = Transform3D(-4.371139e-08, -1, 4.371139e-08, 0, -4.371139e-08, -1, 1
cast_shadow = 0 cast_shadow = 0
mesh = SubResource("PlaneMesh_h2iw8") mesh = SubResource("PlaneMesh_h2iw8")
surface_material_override/0 = ExtResource("7_sun4k") surface_material_override/0 = ExtResource("7_sun4k")
[node name="Bambu" type="Node3D" parent="." index="6" unique_id=1385527421]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 40.689186, 0, 3.7492359)
[node name="Bambù15" parent="Bambu" index="0" unique_id=514636059 instance=ExtResource("10_x1bjv")]
transform = Transform3D(0.99893546, 0.04613013, 0, -0.046085197, 0.9979625, 0.044125047, 0.002035494, -0.044078074, 0.999026, -38.31033, 0, 3.3824284)
[node name="Bambù16" parent="Bambu" index="1" unique_id=1480420907 instance=ExtResource("10_x1bjv")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, -38.31033, -0.2565055, 4.251465)
[node name="Bambù21" parent="Bambu" index="2" unique_id=152072695 instance=ExtResource("10_x1bjv")]
transform = Transform3D(1, 0, 0, 0, 0.9999092, 0.013473534, 0, -0.013473534, 0.9999092, -38.31033, 0, 5.09443)
[node name="Bambù22" parent="Bambu" index="3" unique_id=779786550 instance=ExtResource("10_x1bjv")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, -38.31033, -0.3562231, 1.5652707)
[node name="Bambù23" parent="Bambu" index="4" unique_id=497536429 instance=ExtResource("10_x1bjv")]
transform = Transform3D(1, 0, 0, 0, 0.9999092, 0.013473534, 0, -0.013473534, 0.9999092, -38.31033, 0, 2.4082358)
[node name="Bambù24" parent="Bambu" index="5" unique_id=1708521479 instance=ExtResource("10_x1bjv")]
transform = Transform3D(0.99893546, 0.04613013, 0, -0.046085197, 0.9979625, 0.044125047, 0.002035494, -0.044078074, 0.999026, -37.989388, 4.7683716e-07, 1.7301171)
[node name="Bambù25" parent="Bambu" index="6" unique_id=1732587367 instance=ExtResource("10_x1bjv")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, -37.989388, 4.7683716e-07, 2.5991538)
[node name="Bambù41" parent="Bambu" index="7" unique_id=237404877 instance=ExtResource("10_x1bjv")]
transform = Transform3D(1, 0, 0, 0, 0.9999092, 0.013473534, 0, -0.013473534, 0.9999092, -37.989388, -0.2763033, 3.442119)
[node name="Bambù42" parent="Bambu" index="8" unique_id=1628476712 instance=ExtResource("10_x1bjv")]
transform = Transform3D(0.99893546, 0.04613013, 0, -0.046085197, 0.9979625, 0.044125047, 0.002035494, -0.044078074, 0.999026, -37.989388, 4.7683716e-07, 2.730117)
[node name="Bambù43" parent="Bambu" index="9" unique_id=1395253232 instance=ExtResource("10_x1bjv")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, -37.989388, 0.26429868, 3.5991528)
[node name="Bambù44" parent="Bambu" index="10" unique_id=2129495332 instance=ExtResource("10_x1bjv")]
transform = Transform3D(1, 0, 0, 0, 0.9999092, 0.013473534, 0, -0.013473534, 0.9999092, -37.989388, 4.7683716e-07, 4.4421186)
[node name="Bambù45" parent="Bambu" index="11" unique_id=862005943 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.6353606, 0.043886177, -0.77096754, 0.10135725, 0.99448574, -0.026919715, 0.76553476, -0.09524688, -0.6363053, -37.15841, -0.42294633, 5.3506317)
[node name="Bambù46" parent="Bambu" index="12" unique_id=1498068833 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.20654383, -0.019007795, -0.9782527, -0.09164066, 0.99579215, 0, 0.97413635, 0.089647725, -0.20741661, -35.881065, 0, 4.905528)
[node name="Bambù47" parent="Bambu" index="13" unique_id=804073666 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.20615207, -0.022868663, -0.9782527, -0.110254735, 0.99390334, 0, 0.9722886, 0.107857, -0.20741661, -36.7312, 0.32301903, 4.725275)
[node name="Bambù48" parent="Bambu" index="14" unique_id=637975928 instance=ExtResource("10_x1bjv")]
transform = Transform3D(0.88067085, -0.10227825, -0.46255592, 0.10135726, 0.9944858, -0.026919719, 0.46275857, -0.023175985, 0.88618135, -34.30868, -0.42294633, 5.2680883)
[node name="Bambù49" parent="Bambu" index="15" unique_id=1822564689 instance=ExtResource("10_x1bjv")]
transform = Transform3D(0.99579215, 0.09164066, 0, -0.09164066, 0.99579215, 0, 0, 0, 1, -35.009045, 0, 4.1108427)
[node name="Bambù50" parent="Bambu" index="16" unique_id=23861177 instance=ExtResource("10_x1bjv")]
transform = Transform3D(0.99390334, 0.110254735, 0, -0.110254735, 0.99390334, 0, 0, 0, 1, -35.009045, 0.32301903, 4.9798784)
[node name="Bambù17" parent="Bambu" index="17" unique_id=1649546931 instance=ExtResource("10_x1bjv")]
transform = Transform3D(0.99893546, 0.04613013, 0, -0.046085197, 0.9979625, 0.044125047, 0.002035494, -0.044078074, 0.999026, -36.41784, 0, 1.697335)
[node name="Bambù18" parent="Bambu" index="18" unique_id=1162519719 instance=ExtResource("10_x1bjv")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, -36.41784, -0.2565055, 2.5663717)
[node name="Bambù26" parent="Bambu" index="19" unique_id=748140647 instance=ExtResource("10_x1bjv")]
transform = Transform3D(1, 0, 0, 0, 0.9999092, 0.013473534, 0, -0.013473534, 0.9999092, -36.41784, 0, 3.4093368)
[node name="Bambù27" parent="Bambu" index="20" unique_id=1515557362 instance=ExtResource("10_x1bjv")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, -36.41784, -0.3562231, -0.11982274)
[node name="Bambù28" parent="Bambu" index="21" unique_id=1206347038 instance=ExtResource("10_x1bjv")]
transform = Transform3D(1, 0, 0, 0, 0.9999092, 0.013473534, 0, -0.013473534, 0.9999092, -36.41784, 0, 0.7231424)
[node name="Bambù29" parent="Bambu" index="22" unique_id=1895500093 instance=ExtResource("10_x1bjv")]
transform = Transform3D(0.99893546, 0.04613013, 0, -0.046085197, 0.9979625, 0.044125047, 0.002035494, -0.044078074, 0.999026, -36.096897, 4.7683716e-07, 0.04502368)
[node name="Bambù30" parent="Bambu" index="23" unique_id=1816904361 instance=ExtResource("10_x1bjv")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, -36.096897, 4.7683716e-07, 0.91406035)
[node name="Bambù51" parent="Bambu" index="24" unique_id=461505508 instance=ExtResource("10_x1bjv")]
transform = Transform3D(1, 0, 0, 0, 0.9999092, 0.013473534, 0, -0.013473534, 0.9999092, -36.096897, -0.2763033, 1.7570255)
[node name="Bambù52" parent="Bambu" index="25" unique_id=245194971 instance=ExtResource("10_x1bjv")]
transform = Transform3D(0.99893546, 0.04613013, 0, -0.046085197, 0.9979625, 0.044125047, 0.002035494, -0.044078074, 0.999026, -36.096897, 4.7683716e-07, 1.0450237)
[node name="Bambù53" parent="Bambu" index="26" unique_id=372543990 instance=ExtResource("10_x1bjv")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, -36.096897, 0.26429868, 1.9140594)
[node name="Bambù54" parent="Bambu" index="27" unique_id=1593384501 instance=ExtResource("10_x1bjv")]
transform = Transform3D(1, 0, 0, 0, 0.9999092, 0.013473534, 0, -0.013473534, 0.9999092, -36.096897, 4.7683716e-07, 2.7570255)
[node name="Bambù55" parent="Bambu" index="28" unique_id=838851368 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.6353606, 0.043886177, -0.77096754, 0.10135725, 0.99448574, -0.026919715, 0.76553476, -0.09524688, -0.6363053, -35.26592, -0.42294633, 3.6655385)
[node name="Bambù56" parent="Bambu" index="29" unique_id=1421474514 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.20654383, -0.019007795, -0.9782527, -0.09164066, 0.99579215, 0, 0.97413635, 0.089647725, -0.20741661, -33.988575, 0, 3.220435)
[node name="Bambù57" parent="Bambu" index="30" unique_id=776582209 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.20615207, -0.022868663, -0.9782527, -0.110254735, 0.99390334, 0, 0.9722886, 0.107857, -0.20741661, -34.83871, 0.32301903, 3.0401819)
[node name="Bambù58" parent="Bambu" index="31" unique_id=1984571319 instance=ExtResource("10_x1bjv")]
transform = Transform3D(0.88067085, -0.10227825, -0.46255592, 0.10135726, 0.9944858, -0.026919719, 0.46275857, -0.023175985, 0.88618135, -32.41619, -0.42294633, 3.5829952)
[node name="Bambù59" parent="Bambu" index="32" unique_id=541762193 instance=ExtResource("10_x1bjv")]
transform = Transform3D(0.99579215, 0.09164066, 0, -0.09164066, 0.99579215, 0, 0, 0, 1, -33.116554, 0, 2.4257495)
[node name="Bambù60" parent="Bambu" index="33" unique_id=817390138 instance=ExtResource("10_x1bjv")]
transform = Transform3D(0.99390334, 0.110254735, 0, -0.110254735, 0.99390334, 0, 0, 0, 1, -33.116554, 0.32301903, 3.2947853)
[node name="Bambù19" parent="Bambu" index="34" unique_id=456023603 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.99893546, -0.04613013, -8.7268496e-08, -0.046085197, 0.9979625, 0.044125043, -0.0020354062, 0.044078067, -0.999026, -34.58353, 0, -0.044016123)
[node name="Bambù20" parent="Bambu" index="35" unique_id=1236938691 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.9961887, -0.0872253, -8.7422784e-08, -0.0872253, 0.9961887, 0, 8.7089575e-08, 7.625477e-09, -1, -34.58353, -0.2565055, -0.9130528)
[node name="Bambù31" parent="Bambu" index="36" unique_id=1562537746 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-1, 1.1778938e-09, -8.741484e-08, 0, 0.9999092, 0.013473534, 8.742278e-08, 0.013473534, -0.9999092, -34.58353, 0, -1.7560179)
[node name="Bambù32" parent="Bambu" index="37" unique_id=1214045855 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.9961887, -0.0872253, -8.7422784e-08, -0.0872253, 0.9961887, 0, 8.7089575e-08, 7.625477e-09, -1, -34.58353, -0.3562231, 1.7731411)
[node name="Bambù33" parent="Bambu" index="38" unique_id=1403203384 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-1, 1.1778938e-09, -8.741484e-08, 0, 0.9999092, 0.013473534, 8.742278e-08, 0.013473534, -0.9999092, -34.58353, 0, 0.9301765)
[node name="Bambù34" parent="Bambu" index="39" unique_id=1850769055 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.99893546, -0.04613013, -8.7268496e-08, -0.046085197, 0.9979625, 0.044125043, -0.0020354062, 0.044078067, -0.999026, -34.904472, 4.7683716e-07, 1.6082957)
[node name="Bambù35" parent="Bambu" index="40" unique_id=1905859107 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.9961887, -0.0872253, -8.7422784e-08, -0.0872253, 0.9961887, 0, 8.7089575e-08, 7.625477e-09, -1, -34.904472, 4.7683716e-07, 0.7392585)
[node name="Bambù61" parent="Bambu" index="41" unique_id=1672384904 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-1, 1.1778938e-09, -8.741484e-08, 0, 0.9999092, 0.013473534, 8.742278e-08, 0.013473534, -0.9999092, -34.904472, -0.2763033, -0.1037066)
[node name="Bambù62" parent="Bambu" index="42" unique_id=825326507 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.99893546, -0.04613013, -8.7268496e-08, -0.046085197, 0.9979625, 0.044125043, -0.0020354062, 0.044078067, -0.999026, -34.904472, 4.7683716e-07, 0.6082952)
[node name="Bambù63" parent="Bambu" index="43" unique_id=1927852527 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.9961887, -0.0872253, -8.7422784e-08, -0.0872253, 0.9961887, 0, 8.7089575e-08, 7.625477e-09, -1, -34.904472, 0.26429868, -0.26074052)
[node name="Bambù64" parent="Bambu" index="44" unique_id=1393052564 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-1, 1.1778938e-09, -8.741484e-08, 0, 0.9999092, 0.013473534, 8.742278e-08, 0.013473534, -0.9999092, -34.904472, 4.7683716e-07, -1.1037066)
[node name="Bambù65" parent="Bambu" index="45" unique_id=218922169 instance=ExtResource("10_x1bjv")]
transform = Transform3D(0.63536054, -0.04388616, 0.7709676, 0.10135724, 0.9944857, -0.026919717, -0.76553476, 0.095246874, 0.63630515, -35.73545, -0.42294633, -2.0122197)
[node name="Bambù66" parent="Bambu" index="46" unique_id=1004212493 instance=ExtResource("10_x1bjv")]
transform = Transform3D(0.20654374, 0.019007787, 0.9782527, -0.09164065, 0.99579215, -1.5453742e-09, -0.97413635, -0.08964771, 0.20741652, -37.012794, 0, -1.567116)
[node name="Bambù67" parent="Bambu" index="47" unique_id=1582717696 instance=ExtResource("10_x1bjv")]
transform = Transform3D(0.20615196, 0.022868654, 0.9782527, -0.11025474, 0.99390346, -3.3675118e-09, -0.9722887, -0.10785699, 0.20741653, -36.16266, 0.32301903, -1.386863)
[node name="Bambù68" parent="Bambu" index="48" unique_id=973884661 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.8806709, 0.10227825, 0.46255583, 0.10135725, 0.99448574, -0.026919715, -0.46275845, 0.023175973, -0.88618135, -37.691097, -0.42294633, -0.72248435)
[node name="Bambù69" parent="Bambu" index="49" unique_id=499270978 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.99579215, -0.09164066, -8.742278e-08, -0.09164066, 0.99579215, 0, 8.7054914e-08, 8.011481e-09, -1, -36.990734, 0, 0.4347608)
[node name="Bambù70" parent="Bambu" index="50" unique_id=26287663 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.99390334, -0.110254735, -8.742278e-08, -0.110254735, 0.99390334, 0, 8.688979e-08, 9.638775e-09, -1, -36.990734, 0.32301903, -0.43427444)
[node name="Bambù100" parent="Bambu" index="51" unique_id=242552700 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.8806709, 0.10227825, 0.46255583, 0.10135725, 0.99448574, -0.026919715, -0.46275845, 0.023175973, -0.88618135, -34.035736, -0.42294633, 1.3774025)
[node name="Bambù101" parent="Bambu" index="52" unique_id=1626955951 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.99579215, -0.09164066, -8.742278e-08, -0.09164066, 0.99579215, 0, 8.7054914e-08, 8.011481e-09, -1, -33.335373, 0, 2.5346477)
[node name="Bambù102" parent="Bambu" index="53" unique_id=1549413066 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.99390334, -0.110254735, -8.742278e-08, -0.110254735, 0.99390334, 0, 8.688979e-08, 9.638775e-09, -1, -33.335373, 0.32301903, 1.6656125)
[node name="Bambù103" parent="Bambu" index="54" unique_id=1338645337 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.8806709, 0.10227825, 0.46255583, 0.10135725, 0.99448574, -0.026919715, -0.46275845, 0.023175973, -0.88618135, -34.06166, -0.42294633, 3.632837)
[node name="Bambù104" parent="Bambu" index="55" unique_id=1131209096 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.99579215, -0.09164066, -8.742278e-08, -0.09164066, 0.99579215, 0, 8.7054914e-08, 8.011481e-09, -1, -33.361298, 0, 4.790082)
[node name="Bambù105" parent="Bambu" index="56" unique_id=1653167272 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.99390334, -0.110254735, -8.742278e-08, -0.110254735, 0.99390334, 0, 8.688979e-08, 9.638775e-09, -1, -33.361298, 0.32301903, 3.921047)
[node name="Bambù106" parent="Bambu" index="57" unique_id=1671720951 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.8806709, 0.10227825, 0.46255583, 0.10135725, 0.99448574, -0.026919715, -0.46275845, 0.023175973, -0.88618135, -32.84321, -0.42294633, 0.65151525)
[node name="Bambù107" parent="Bambu" index="58" unique_id=221072840 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.99579215, -0.09164066, -8.742278e-08, -0.09164066, 0.99579215, 0, 8.7054914e-08, 8.011481e-09, -1, -32.142845, 0, 1.8087604)
[node name="Bambù108" parent="Bambu" index="59" unique_id=1620976585 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.99390334, -0.110254735, -8.742278e-08, -0.110254735, 0.99390334, 0, 8.688979e-08, 9.638775e-09, -1, -32.142845, 0.32301903, 0.93972516)
[node name="Bambù109" parent="Bambu" index="60" unique_id=836783603 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.8806709, 0.10227825, 0.46255583, 0.10135725, 0.99448574, -0.026919715, -0.46275845, 0.023175973, -0.88618135, -32.869133, -0.42294633, 4.0217037)
[node name="Bambù110" parent="Bambu" index="61" unique_id=251286294 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.99579215, -0.09164066, -8.742278e-08, -0.09164066, 0.99579215, 0, 8.7054914e-08, 8.011481e-09, -1, -32.16877, 0, 5.1789484)
[node name="Bambù111" parent="Bambu" index="62" unique_id=196602680 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.99390334, -0.110254735, -8.742278e-08, -0.110254735, 0.99390334, 0, 8.688979e-08, 9.638775e-09, -1, -32.16877, 0.32301903, 4.3099127)
[node name="Bambù112" parent="Bambu" index="63" unique_id=967443532 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.8806709, 0.10227825, 0.46255583, 0.10135725, 0.99448574, -0.026919715, -0.46275845, 0.023175973, -0.88618135, -32.869133, -0.42294633, -0.97829604)
[node name="Bambù113" parent="Bambu" index="64" unique_id=1482031422 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.99579215, -0.09164066, -8.742278e-08, -0.09164066, 0.99579215, 0, 8.7054914e-08, 8.011481e-09, -1, -32.16877, 0, 0.17894864)
[node name="Bambù114" parent="Bambu" index="65" unique_id=1379389822 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.99390334, -0.110254735, -8.742278e-08, -0.110254735, 0.99390334, 0, 8.688979e-08, 9.638775e-09, -1, -32.16877, 0.32301903, -0.6900871)
[node name="Bambù115" parent="Bambu" index="66" unique_id=975304912 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.015310675, 0.028615177, 0.9994732, 0.101357244, 0.9944857, -0.026919713, -0.99473214, 0.1008917, -0.018126577, -31.591593, -0.42294633, -2.9296694)
[node name="Bambù116" parent="Bambu" index="67" unique_id=2135974183 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.47670823, -0.043870457, 0.87796617, -0.09164066, 0.99579215, -8.881784e-16, -0.8742718, -0.0804574, -0.47872263, -32.272335, 0, -1.760775)
[node name="Bambù117" parent="Bambu" index="68" unique_id=478364536 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.47580403, -0.052781433, 0.87796617, -0.110254735, 0.99390334, 0, -0.8726135, -0.096799925, -0.47872263, -31.509352, 0.32301903, -2.1768017)
[node name="Bambù36" parent="Bambu" index="69" unique_id=758304427 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.99893546, -0.04613013, -8.7268496e-08, -0.046085197, 0.9979625, 0.044125043, -0.0020354062, 0.044078067, -0.999026, -33.26138, 0, -1.4439404)
[node name="Bambù37" parent="Bambu" index="70" unique_id=1213919388 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.9961887, -0.0872253, -8.7422784e-08, -0.0872253, 0.9961887, 0, 8.7089575e-08, 7.625477e-09, -1, -33.26138, -0.2565055, -2.312977)
[node name="Bambù38" parent="Bambu" index="71" unique_id=986726857 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-1, 1.1778938e-09, -8.741484e-08, 0, 0.9999092, 0.013473534, 8.742278e-08, 0.013473534, -0.9999092, -33.26138, 0, -3.1559422)
[node name="Bambù39" parent="Bambu" index="72" unique_id=1350182591 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.9961887, -0.0872253, -8.7422784e-08, -0.0872253, 0.9961887, 0, 8.7089575e-08, 7.625477e-09, -1, -33.26138, -0.3562231, 0.37321687)
[node name="Bambù40" parent="Bambu" index="73" unique_id=100164560 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-1, 1.1778938e-09, -8.741484e-08, 0, 0.9999092, 0.013473534, 8.742278e-08, 0.013473534, -0.9999092, -33.26138, 0, -0.46974778)
[node name="Bambù71" parent="Bambu" index="74" unique_id=233601894 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.99893546, -0.04613013, -8.7268496e-08, -0.046085197, 0.9979625, 0.044125043, -0.0020354062, 0.044078067, -0.999026, -33.58232, 4.7683716e-07, 0.2083714)
[node name="Bambù72" parent="Bambu" index="75" unique_id=1557143999 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.9961887, -0.0872253, -8.7422784e-08, -0.0872253, 0.9961887, 0, 8.7089575e-08, 7.625477e-09, -1, -33.58232, 4.7683716e-07, -0.66066575)
[node name="Bambù73" parent="Bambu" index="76" unique_id=1199352277 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-1, 1.1778938e-09, -8.741484e-08, 0, 0.9999092, 0.013473534, 8.742278e-08, 0.013473534, -0.9999092, -33.58232, -0.2763033, -1.5036309)
[node name="Bambù74" parent="Bambu" index="77" unique_id=962740386 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.99893546, -0.04613013, -8.7268496e-08, -0.046085197, 0.9979625, 0.044125043, -0.0020354062, 0.044078067, -0.999026, -33.58232, 4.7683716e-07, -0.7916291)
[node name="Bambù75" parent="Bambu" index="78" unique_id=1175179469 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.9961887, -0.0872253, -8.7422784e-08, -0.0872253, 0.9961887, 0, 8.7089575e-08, 7.625477e-09, -1, -33.58232, 0.26429868, -1.6606648)
[node name="Bambù76" parent="Bambu" index="79" unique_id=1994616556 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-1, 1.1778938e-09, -8.741484e-08, 0, 0.9999092, 0.013473534, 8.742278e-08, 0.013473534, -0.9999092, -33.58232, 4.7683716e-07, -2.5036309)
[node name="Bambù77" parent="Bambu" index="80" unique_id=274474376 instance=ExtResource("10_x1bjv")]
transform = Transform3D(0.63536054, -0.04388616, 0.7709676, 0.10135724, 0.9944857, -0.026919717, -0.76553476, 0.095246874, 0.63630515, -34.4133, -0.42294633, -3.412144)
[node name="Bambù78" parent="Bambu" index="81" unique_id=99925458 instance=ExtResource("10_x1bjv")]
transform = Transform3D(0.20654374, 0.019007787, 0.9782527, -0.09164065, 0.99579215, -1.5453742e-09, -0.97413635, -0.08964771, 0.20741652, -35.690643, 0, -2.9670403)
[node name="Bambù79" parent="Bambu" index="82" unique_id=2061154476 instance=ExtResource("10_x1bjv")]
transform = Transform3D(0.20615196, 0.022868654, 0.9782527, -0.11025474, 0.99390346, -3.3675118e-09, -0.9722887, -0.10785699, 0.20741653, -34.840508, 0.32301903, -2.7867873)
[node name="Bambù80" parent="Bambu" index="83" unique_id=662645315 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.8806709, 0.10227825, 0.46255583, 0.10135725, 0.99448574, -0.026919715, -0.46275845, 0.023175973, -0.88618135, -37.263027, -0.42294633, -3.3296)
[node name="Bambù81" parent="Bambu" index="84" unique_id=1672022163 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.99579215, -0.09164066, -8.742278e-08, -0.09164066, 0.99579215, 0, 8.7054914e-08, 8.011481e-09, -1, -36.562664, 0, -2.172355)
[node name="Bambù82" parent="Bambu" index="85" unique_id=1830293455 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.99390334, -0.110254735, -8.742278e-08, -0.110254735, 0.99390334, 0, 8.688979e-08, 9.638775e-09, -1, -36.562664, 0.32301903, -3.0413902)
[node name="Bambù83" parent="Bambu" index="86" unique_id=1745614643 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.99893546, -0.04613013, -8.7268496e-08, -0.046085197, 0.9979625, 0.044125043, -0.0020354062, 0.044078067, -0.999026, -32.40587, -0.15795898, -3.0512614)
[node name="Bambù84" parent="Bambu" index="87" unique_id=1417946289 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.9961887, -0.0872253, -8.7422784e-08, -0.0872253, 0.9961887, 0, 8.7089575e-08, 7.625477e-09, -1, -32.40587, -0.41446447, -3.920298)
[node name="Bambù85" parent="Bambu" index="88" unique_id=706143232 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-1, 1.1778938e-09, -8.741484e-08, 0, 0.9999092, 0.013473534, 8.742278e-08, 0.013473534, -0.9999092, -32.40587, -0.15795898, -4.763263)
[node name="Bambù86" parent="Bambu" index="89" unique_id=929818396 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.9961887, -0.0872253, -8.7422784e-08, -0.0872253, 0.9961887, 0, 8.7089575e-08, 7.625477e-09, -1, -32.40587, -0.5141821, -1.2341042)
[node name="Bambù87" parent="Bambu" index="90" unique_id=1421223174 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-1, 1.1778938e-09, -8.741484e-08, 0, 0.9999092, 0.013473534, 8.742278e-08, 0.013473534, -0.9999092, -32.40587, -0.15795898, -2.0770688)
[node name="Bambù88" parent="Bambu" index="91" unique_id=3127006 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.99893546, -0.04613013, -8.7268496e-08, -0.046085197, 0.9979625, 0.044125043, -0.0020354062, 0.044078067, -0.999026, -32.726814, -0.15795851, -1.3989496)
[node name="Bambù89" parent="Bambu" index="92" unique_id=267111895 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.9961887, -0.0872253, -8.7422784e-08, -0.0872253, 0.9961887, 0, 8.7089575e-08, 7.625477e-09, -1, -32.726814, -0.15795851, -2.2679868)
[node name="Bambù90" parent="Bambu" index="93" unique_id=1039626904 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-1, 1.1778938e-09, -8.741484e-08, 0, 0.9999092, 0.013473534, 8.742278e-08, 0.013473534, -0.9999092, -32.726814, -0.43426228, -3.110952)
[node name="Bambù91" parent="Bambu" index="94" unique_id=1994168253 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.99893546, -0.04613013, -8.7268496e-08, -0.046085197, 0.9979625, 0.044125043, -0.0020354062, 0.044078067, -0.999026, -32.726814, -0.15795851, -2.39895)
[node name="Bambù92" parent="Bambu" index="95" unique_id=187305983 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.9961887, -0.0872253, -8.7422784e-08, -0.0872253, 0.9961887, 0, 8.7089575e-08, 7.625477e-09, -1, -32.726814, 0.10633969, -3.2679858)
[node name="Bambù93" parent="Bambu" index="96" unique_id=1879946930 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-1, 1.1778938e-09, -8.741484e-08, 0, 0.9999092, 0.013473534, 8.742278e-08, 0.013473534, -0.9999092, -32.726814, -0.15795851, -4.110952)
[node name="Bambù94" parent="Bambu" index="97" unique_id=696009367 instance=ExtResource("10_x1bjv")]
transform = Transform3D(0.63536054, -0.04388616, 0.7709676, 0.10135724, 0.9944857, -0.026919717, -0.76553476, 0.095246874, 0.63630515, -33.557793, -0.5809053, -5.019465)
[node name="Bambù95" parent="Bambu" index="98" unique_id=1606460467 instance=ExtResource("10_x1bjv")]
transform = Transform3D(0.20654374, 0.019007787, 0.9782527, -0.09164065, 0.99579215, -1.5453742e-09, -0.97413635, -0.08964771, 0.20741652, -34.835136, -0.15795898, -4.5743613)
[node name="Bambù96" parent="Bambu" index="99" unique_id=602620642 instance=ExtResource("10_x1bjv")]
transform = Transform3D(0.20615196, 0.022868654, 0.9782527, -0.11025474, 0.99390346, -3.3675118e-09, -0.9722887, -0.10785699, 0.20741653, -33.985, 0.16506004, -4.3941083)
[node name="Bambù97" parent="Bambu" index="100" unique_id=1445277351 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.8806709, 0.10227825, 0.46255583, 0.10135725, 0.99448574, -0.026919715, -0.46275845, 0.023175973, -0.88618135, -36.407516, -0.5809053, -4.936921)
[node name="Bambù98" parent="Bambu" index="101" unique_id=421197506 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.99579215, -0.09164066, -8.742278e-08, -0.09164066, 0.99579215, 0, 8.7054914e-08, 8.011481e-09, -1, -35.707153, -0.15795898, -3.779676)
[node name="Bambù99" parent="Bambu" index="102" unique_id=1720440871 instance=ExtResource("10_x1bjv")]
transform = Transform3D(-0.99390334, -0.110254735, -8.742278e-08, -0.110254735, 0.99390334, 0, 8.688979e-08, 9.638775e-09, -1, -35.707153, 0.16506004, -4.648711)

View File

@@ -18,7 +18,9 @@
[ext_resource type="Material" uid="uid://f5uoreickew7" path="res://tgcc/chunk/prop/flower/flower.tres" id="12_5yfr5"] [ext_resource type="Material" uid="uid://f5uoreickew7" path="res://tgcc/chunk/prop/flower/flower.tres" id="12_5yfr5"]
[ext_resource type="PackedScene" uid="uid://d12t04rs47jq3" path="res://tgcc/chunk/prop/tree/tree_01.tscn" id="18_fqrww"] [ext_resource type="PackedScene" uid="uid://d12t04rs47jq3" path="res://tgcc/chunk/prop/tree/tree_01.tscn" id="18_fqrww"]
[ext_resource type="Shader" uid="uid://cs0xl7pc6e26h" path="res://core/daynight/tree_leaves.gdshader" id="19_s7klq"] [ext_resource type="Shader" uid="uid://cs0xl7pc6e26h" path="res://core/daynight/tree_leaves.gdshader" id="19_s7klq"]
[ext_resource type="PackedScene" uid="uid://bgb4pfflokl5s" path="res://tgcc/chunk/prop/pylon/pylon.tscn" id="20_fqrww"]
[ext_resource type="Texture2D" uid="uid://c3grftlmap4q5" path="res://tgcc/chunk/prop/tree/leaf1_alpha.png" id="20_q66oc"] [ext_resource type="Texture2D" uid="uid://c3grftlmap4q5" path="res://tgcc/chunk/prop/tree/leaf1_alpha.png" id="20_q66oc"]
[ext_resource type="PackedScene" uid="uid://5ap10ax3lnr7" path="res://tgcc/chunk/prop/vending machine/vending_machine_1.tscn" id="21_s7klq"]
[sub_resource type="PlaneMesh" id="PlaneMesh_fqrww"] [sub_resource type="PlaneMesh" id="PlaneMesh_fqrww"]
size = Vector2(0.5, 0.5) size = Vector2(0.5, 0.5)
@@ -72,71 +74,84 @@ shader_parameter/light_steps = 10.0
shader_parameter/random_mix = 0.0 shader_parameter/random_mix = 0.0
shader_parameter/cast_shadow_strength = 0.0 shader_parameter/cast_shadow_strength = 0.0
shader_parameter/wetness_darkening = 0.25 shader_parameter/wetness_darkening = 0.25
shader_parameter/snow_visibility = 1.0
[node name="chunk_country_corner_03" unique_id=1046737870 instance=ExtResource("1_jemyf")] [sub_resource type="Gradient" id="Gradient_5yfr5"]
offsets = PackedFloat32Array(1, 1)
colors = PackedColorArray(0, 0, 0, 0.5882353, 0, 0, 0, 0)
[sub_resource type="GradientTexture2D" id="GradientTexture2D_fqrww"]
gradient = SubResource("Gradient_5yfr5")
fill = 2
fill_from = Vector2(0.5, 0.5)
[node name="chunk_country_corner_03" unique_id=1046737870 node_paths=PackedStringArray("connection_left", "connection_right") instance=ExtResource("1_jemyf")]
script = ExtResource("2_ejpey") script = ExtResource("2_ejpey")
south = true south = true
west = true west = true
have_lamppost = true
connection_left = [NodePath("PaloLuce/sx")]
connection_right = [NodePath("PaloLuce/dx")]
[node name="Cavi_001" parent="." index="0" unique_id=1489236714] [node name="Cavi_001" parent="." index="0" unique_id=1776585264]
surface_material_override/0 = ExtResource("2_skxxm") surface_material_override/0 = ExtResource("2_skxxm")
[node name="Cube_227" parent="." index="1" unique_id=1343854496] [node name="Cube_227" parent="." index="1" unique_id=2133644431]
surface_material_override/0 = ExtResource("3_xcce4") surface_material_override/0 = ExtResource("3_xcce4")
surface_material_override/1 = ExtResource("4_w66q1") surface_material_override/1 = ExtResource("4_w66q1")
[node name="Flower_003" parent="." index="2" unique_id=588414494] [node name="Flower_003" parent="." index="2" unique_id=895385463]
visible = false visible = false
[node name="FlowerG" parent="." index="3" unique_id=1148144861] [node name="FlowerG" parent="." index="3" unique_id=271983880]
visible = false visible = false
[node name="Grass_004" parent="." index="4" unique_id=1413022109] [node name="Grass_004" parent="." index="4" unique_id=433080384]
surface_material_override/0 = ExtResource("5_rqsxa") surface_material_override/0 = ExtResource("5_rqsxa")
[node name="House_M_4" parent="." index="5" unique_id=846909534 groups=["weather_node"]] [node name="House_M_4" parent="." index="5" unique_id=1042574904 groups=["weather_node"]]
[node name="House_M_4|Cube_357|Dupli|" parent="House_M_4" index="0" unique_id=1022330799] [node name="House_M_4|Cube_357|Dupli|" parent="House_M_4" index="0" unique_id=374531053]
surface_material_override/0 = ExtResource("6_333a0") surface_material_override/0 = ExtResource("6_333a0")
surface_material_override/1 = ExtResource("4_w66q1") surface_material_override/1 = ExtResource("4_w66q1")
[node name="House_M_4_001" parent="." index="6" unique_id=2014179807 groups=["weather_node"]] [node name="House_M_4_001" parent="." index="6" unique_id=1658008130 groups=["weather_node"]]
[node name="House_M_4_001|Cube_357|Dupli|" parent="House_M_4_001" index="0" unique_id=1963982809] [node name="House_M_4_001|Cube_357|Dupli|" parent="House_M_4_001" index="0" unique_id=2144242896]
surface_material_override/0 = ExtResource("6_333a0") surface_material_override/0 = ExtResource("6_333a0")
surface_material_override/1 = ExtResource("4_w66q1") surface_material_override/1 = ExtResource("4_w66q1")
[node name="Lanterne_001" parent="." index="7" unique_id=877080306] [node name="Lanterne_001" parent="." index="7" unique_id=267697647]
surface_material_override/0 = ExtResource("4_w66q1") surface_material_override/0 = ExtResource("4_w66q1")
surface_material_override/1 = ExtResource("6_333a0") surface_material_override/1 = ExtResource("6_333a0")
[node name="MSH_Staccioanta_1_001" parent="." index="8" unique_id=2137478487 groups=["weather_node"]] [node name="MSH_Staccioanta_1_001" parent="." index="8" unique_id=1657352292]
surface_material_override/0 = ExtResource("7_333a0") surface_material_override/0 = ExtResource("7_333a0")
[node name="Palo_001" parent="." index="9" unique_id=1395117968] [node name="Palo_001" parent="." index="9" unique_id=910139738]
visible = false visible = false
surface_material_override/0 = ExtResource("8_cbpyt") surface_material_override/0 = ExtResource("8_cbpyt")
surface_material_override/1 = ExtResource("8_tnnlv") surface_material_override/1 = ExtResource("8_tnnlv")
[node name="Panchine_001" parent="." index="10" unique_id=1252724017 groups=["weather_node"]] [node name="Panchine_001" parent="." index="10" unique_id=1603364499 groups=["weather_node"]]
surface_material_override/0 = ExtResource("7_333a0") surface_material_override/0 = ExtResource("7_333a0")
[node name="Rocks" parent="." index="11" unique_id=395080391 groups=["weather_node"]] [node name="Rocks" parent="." index="11" unique_id=533371511 groups=["weather_node"]]
surface_material_override/0 = ExtResource("8_cbpyt") surface_material_override/0 = ExtResource("8_cbpyt")
surface_material_override/1 = ExtResource("3_xcce4") surface_material_override/1 = ExtResource("3_xcce4")
surface_material_override/2 = ExtResource("3_xcce4") surface_material_override/2 = ExtResource("3_xcce4")
[node name="Santuario" parent="." index="12" unique_id=1075151573 groups=["weather_node"]] [node name="Santuario" parent="." index="12" unique_id=1486207544 groups=["weather_node"]]
surface_material_override/0 = ExtResource("8_tnnlv") surface_material_override/0 = ExtResource("8_tnnlv")
surface_material_override/1 = ExtResource("3_xcce4") surface_material_override/1 = ExtResource("3_xcce4")
[node name="Strada" parent="." index="13" unique_id=1300376742 groups=["weather_node"]] [node name="Strada" parent="." index="13" unique_id=452244546 groups=["weather_node"]]
surface_material_override/0 = ExtResource("11_5yfr5") surface_material_override/0 = ExtResource("11_5yfr5")
[node name="Terreno_002" parent="." index="14" unique_id=1672498777 groups=["weather_node"]] [node name="Terreno_002" parent="." index="14" unique_id=1020879859 groups=["weather_node"]]
surface_material_override/0 = ExtResource("11_5yfr5") surface_material_override/0 = ExtResource("11_5yfr5")
[node name="tree_PH" parent="." index="15" unique_id=850970876 groups=["weather_node", "wind_node"]] [node name="tree_PH" parent="." index="15" unique_id=1550954564 groups=["weather_node", "wind_node"]]
visible = false visible = false
[node name="grass" type="Node3D" parent="." index="16" unique_id=607638887 groups=["weather_vegetables_node", "wind_node"]] [node name="grass" type="Node3D" parent="." index="16" unique_id=607638887 groups=["weather_vegetables_node", "wind_node"]]
@@ -186,21 +201,316 @@ multimesh = SubResource("MultiMesh_mkuur")
[node name="TreeTest3" parent="." index="18" unique_id=1532527216 instance=ExtResource("18_fqrww")] [node name="TreeTest3" parent="." index="18" unique_id=1532527216 instance=ExtResource("18_fqrww")]
transform = Transform3D(-0.13587202, 0, -0.8694474, 0, 0.88, 0, 0.8694474, 0, -0.13587202, 5.7668495, -0.16967964, -8.851597) transform = Transform3D(-0.13587202, 0, -0.8694474, 0, 0.88, 0, 0.8694474, 0, -0.13587202, 5.7668495, -0.16967964, -8.851597)
[node name="MultiMeshInstance3D" parent="TreeTest3/Leaf" parent_id_path=PackedInt32Array(1532527216, 2028330452) index="0" unique_id=153924119] [node name="MultiMeshInstance3D" parent="TreeTest3/Leaf" parent_id_path=PackedInt32Array(1532527216, 2098078578) index="0" unique_id=153924119]
material_override = SubResource("ShaderMaterial_mkuur") material_override = SubResource("ShaderMaterial_mkuur")
[node name="TreeTest4" parent="." index="19" unique_id=523194273 instance=ExtResource("18_fqrww")] [node name="TreeTest4" parent="." index="19" unique_id=523194273 instance=ExtResource("18_fqrww")]
transform = Transform3D(0.5726346, 0, 0.6681987, 0, 0.8800001, 0, -0.6681987, 0, 0.5726346, 8.081164, -0.16967964, -5.0532355) transform = Transform3D(0.5726346, 0, 0.6681987, 0, 0.8800001, 0, -0.6681987, 0, 0.5726346, 8.081164, -0.16967964, -5.0532355)
[node name="MultiMeshInstance3D" parent="TreeTest4/Leaf" parent_id_path=PackedInt32Array(523194273, 2028330452) index="0" unique_id=153924119] [node name="MultiMeshInstance3D" parent="TreeTest4/Leaf" parent_id_path=PackedInt32Array(523194273, 2098078578) index="0" unique_id=153924119]
material_override = SubResource("ShaderMaterial_mkuur") material_override = SubResource("ShaderMaterial_mkuur")
[node name="TreeTest5" parent="." index="20" unique_id=1732926892 instance=ExtResource("18_fqrww")] [node name="TreeTest5" parent="." index="20" unique_id=1732926892 instance=ExtResource("18_fqrww")]
transform = Transform3D(0.65072113, 0, 0.7593168, 0, 1, 0, -0.7593168, 0, 0.65072113, -6.0227623, -0.16967964, 5.4480567) transform = Transform3D(0.65072113, 0, 0.7593168, 0, 1, 0, -0.7593168, 0, 0.65072113, -6.0227623, -0.16967964, 5.4480567)
[node name="MultiMeshInstance3D" parent="TreeTest5/Leaf" parent_id_path=PackedInt32Array(1732926892, 2028330452) index="0" unique_id=153924119] [node name="MultiMeshInstance3D" parent="TreeTest5/Leaf" parent_id_path=PackedInt32Array(1732926892, 2098078578) index="0" unique_id=153924119]
material_override = SubResource("ShaderMaterial_mkuur") material_override = SubResource("ShaderMaterial_mkuur")
[node name="shadow" type="Node3D" parent="." index="21" unique_id=889585033]
[node name="Decal" type="Decal" parent="shadow" index="0" unique_id=1397107284]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6.330791, 0.118, 4.2886734)
size = Vector3(6.375206, 0.5, 10.401308)
texture_albedo = SubResource("GradientTexture2D_fqrww")
[node name="Decal2" type="Decal" parent="shadow" index="1" unique_id=1402560073]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, -4.3971567, 0.118, -6.4218)
size = Vector3(6.375206, 0.5, 10.401308)
texture_albedo = SubResource("GradientTexture2D_fqrww")
[node name="light" type="Node3D" parent="." index="22" unique_id=2139897359]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -24.189697, 0, 26.182838)
[node name="OmniLight3D24" type="OmniLight3D" parent="light" index="0" unique_id=394427892]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 17.771463, 1.6665113, -30.424273)
light_color = Color(0.9372549, 0.49411765, 0.14509805, 1)
light_energy = 0.5
light_indirect_energy = 0.0
light_volumetric_fog_energy = 0.0
light_specular = 0.0
light_bake_mode = 1
shadow_enabled = true
shadow_opacity = 0.96
omni_range = 10.0
omni_attenuation = 2.0
[node name="OmniLight3D27" type="OmniLight3D" parent="light" index="1" unique_id=533010245]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 19.76046, 1.6665113, -30.424273)
light_color = Color(0.9372549, 0.49411765, 0.14509805, 1)
light_energy = 0.5
light_indirect_energy = 0.0
light_volumetric_fog_energy = 0.0
light_specular = 0.0
light_bake_mode = 1
shadow_enabled = true
shadow_opacity = 0.96
omni_range = 10.0
omni_attenuation = 2.0
[node name="OmniLight3D28" type="OmniLight3D" parent="light" index="2" unique_id=352589915]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 21.742308, 1.6665113, -30.424273)
light_color = Color(0.9372549, 0.49411765, 0.14509805, 1)
light_energy = 0.5
light_indirect_energy = 0.0
light_volumetric_fog_energy = 0.0
light_specular = 0.0
light_bake_mode = 1
shadow_enabled = true
shadow_opacity = 0.96
omni_range = 10.0
omni_attenuation = 2.0
[node name="OmniLight3D29" type="OmniLight3D" parent="light" index="3" unique_id=537871599]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 17.790565, 1.6665113, -34.74778)
light_color = Color(0.9372549, 0.49411765, 0.14509805, 1)
light_energy = 0.5
light_indirect_energy = 0.0
light_volumetric_fog_energy = 0.0
light_specular = 0.0
light_bake_mode = 1
shadow_enabled = true
shadow_opacity = 0.96
omni_range = 10.0
omni_attenuation = 2.0
[node name="OmniLight3D30" type="OmniLight3D" parent="light" index="4" unique_id=58886502]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 19.779562, 1.6665113, -34.74778)
light_color = Color(0.9372549, 0.49411765, 0.14509805, 1)
light_energy = 0.5
light_indirect_energy = 0.0
light_volumetric_fog_energy = 0.0
light_specular = 0.0
light_bake_mode = 1
shadow_enabled = true
shadow_opacity = 0.96
omni_range = 10.0
omni_attenuation = 2.0
[node name="OmniLight3D31" type="OmniLight3D" parent="light" index="5" unique_id=1729443245]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 21.76141, 1.6665113, -34.74778)
light_color = Color(0.9372549, 0.49411765, 0.14509805, 1)
light_energy = 0.5
light_indirect_energy = 0.0
light_volumetric_fog_energy = 0.0
light_specular = 0.0
light_bake_mode = 1
shadow_enabled = true
shadow_opacity = 0.96
omni_range = 10.0
omni_attenuation = 2.0
[node name="OmniLight3D25" type="OmniLight3D" parent="light" index="6" unique_id=1404898221]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 15.58135, 1.6665113, -32.59843)
light_color = Color(0.9372549, 0.49411765, 0.14509805, 1)
light_energy = 0.5
light_indirect_energy = 0.0
light_volumetric_fog_energy = 0.0
light_specular = 0.0
light_bake_mode = 1
shadow_enabled = true
shadow_opacity = 0.96
omni_range = 10.0
omni_attenuation = 2.0
[node name="OmniLight3D32" type="OmniLight3D" parent="light" index="7" unique_id=1722040258]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 24.014132, 1.6665113, -32.626106)
light_color = Color(0.9372549, 0.49411765, 0.14509805, 1)
light_energy = 0.5
light_indirect_energy = 0.0
light_volumetric_fog_energy = 0.0
light_specular = 0.0
light_bake_mode = 1
shadow_enabled = true
shadow_opacity = 0.96
omni_range = 10.0
omni_attenuation = 2.0
[node name="OmniLight3D37" type="OmniLight3D" parent="light" index="8" unique_id=725743884]
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 28.33574, 1.6665113, -23.86904)
light_color = Color(0.9372549, 0.49411765, 0.14509805, 1)
light_energy = 0.5
light_indirect_energy = 0.0
light_volumetric_fog_energy = 0.0
light_specular = 0.0
light_bake_mode = 1
shadow_enabled = true
shadow_opacity = 0.96
omni_range = 10.0
omni_attenuation = 2.0
[node name="OmniLight3D38" type="OmniLight3D" parent="light" index="9" unique_id=1106424157]
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 28.33574, 1.6665113, -21.880045)
light_color = Color(0.9372549, 0.49411765, 0.14509805, 1)
light_energy = 0.5
light_indirect_energy = 0.0
light_volumetric_fog_energy = 0.0
light_specular = 0.0
light_bake_mode = 1
shadow_enabled = true
shadow_opacity = 0.96
omni_range = 10.0
omni_attenuation = 2.0
[node name="OmniLight3D39" type="OmniLight3D" parent="light" index="10" unique_id=944788080]
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 28.33574, 1.6665113, -19.898195)
light_color = Color(0.9372549, 0.49411765, 0.14509805, 1)
light_energy = 0.5
light_indirect_energy = 0.0
light_volumetric_fog_energy = 0.0
light_specular = 0.0
light_bake_mode = 1
shadow_enabled = true
shadow_opacity = 0.96
omni_range = 10.0
omni_attenuation = 2.0
[node name="OmniLight3D40" type="OmniLight3D" parent="light" index="11" unique_id=1308343844]
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 32.65925, 1.6665113, -23.84994)
light_color = Color(0.9372549, 0.49411765, 0.14509805, 1)
light_energy = 0.5
light_indirect_energy = 0.0
light_volumetric_fog_energy = 0.0
light_specular = 0.0
light_bake_mode = 1
shadow_enabled = true
shadow_opacity = 0.96
omni_range = 10.0
omni_attenuation = 2.0
[node name="OmniLight3D41" type="OmniLight3D" parent="light" index="12" unique_id=1079966604]
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 32.65925, 1.6665113, -21.86094)
light_color = Color(0.9372549, 0.49411765, 0.14509805, 1)
light_energy = 0.5
light_indirect_energy = 0.0
light_volumetric_fog_energy = 0.0
light_specular = 0.0
light_bake_mode = 1
shadow_enabled = true
shadow_opacity = 0.96
omni_range = 10.0
omni_attenuation = 2.0
[node name="OmniLight3D42" type="OmniLight3D" parent="light" index="13" unique_id=1988284193]
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 32.65925, 1.6665113, -19.879095)
light_color = Color(0.9372549, 0.49411765, 0.14509805, 1)
light_energy = 0.5
light_indirect_energy = 0.0
light_volumetric_fog_energy = 0.0
light_specular = 0.0
light_bake_mode = 1
shadow_enabled = true
shadow_opacity = 0.96
omni_range = 10.0
omni_attenuation = 2.0
[node name="OmniLight3D43" type="OmniLight3D" parent="light" index="14" unique_id=1412545630]
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 30.5099, 1.6665113, -26.059153)
light_color = Color(0.9372549, 0.49411765, 0.14509805, 1)
light_energy = 0.5
light_indirect_energy = 0.0
light_volumetric_fog_energy = 0.0
light_specular = 0.0
light_bake_mode = 1
shadow_enabled = true
shadow_opacity = 0.96
omni_range = 10.0
omni_attenuation = 2.0
[node name="OmniLight3D44" type="OmniLight3D" parent="light" index="15" unique_id=165754334]
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 30.537575, 1.6665113, -17.626371)
light_color = Color(0.9372549, 0.49411765, 0.14509805, 1)
light_energy = 0.5
light_indirect_energy = 0.0
light_volumetric_fog_energy = 0.0
light_specular = 0.0
light_bake_mode = 1
shadow_enabled = true
shadow_opacity = 0.96
omni_range = 10.0
omni_attenuation = 2.0
[node name="OmniLight3D26" type="OmniLight3D" parent="light" index="16" unique_id=1767599228]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 25.238956, 1.5113132, -34.584232)
light_color = Color(0.9372549, 0.49411765, 0.14509805, 1)
light_energy = 0.5
light_indirect_energy = 0.0
light_volumetric_fog_energy = 0.0
light_specular = 0.0
light_bake_mode = 1
shadow_enabled = true
shadow_opacity = 0.96
omni_range = 10.0
omni_attenuation = 2.0
[node name="OmniLight3D36" type="OmniLight3D" parent="light" index="17" unique_id=1750047436]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 25.238956, 1.5113132, -30.585411)
light_color = Color(0.9372549, 0.49411765, 0.14509805, 1)
light_energy = 0.5
light_indirect_energy = 0.0
light_volumetric_fog_energy = 0.0
light_specular = 0.0
light_bake_mode = 1
shadow_enabled = true
shadow_opacity = 0.96
omni_range = 10.0
omni_attenuation = 2.0
[node name="OmniLight3D33" type="OmniLight3D" parent="light" index="18" unique_id=1648463917]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 24.95372, 3.3977997, -31.297941)
light_color = Color(0.9372549, 0.49411765, 0.14509805, 1)
light_energy = 0.5
light_indirect_energy = 0.0
light_volumetric_fog_energy = 0.0
light_specular = 0.0
light_bake_mode = 1
shadow_enabled = true
shadow_opacity = 0.96
omni_range = 10.0
omni_attenuation = 2.0
[node name="OmniLight3D34" type="OmniLight3D" parent="light" index="19" unique_id=896020992]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 29.219215, 3.3977997, -26.916061)
light_color = Color(0.9372549, 0.49411765, 0.14509805, 1)
light_energy = 0.5
light_indirect_energy = 0.0
light_volumetric_fog_energy = 0.0
light_specular = 0.0
light_bake_mode = 1
shadow_enabled = true
shadow_opacity = 0.96
omni_range = 10.0
omni_attenuation = 2.0
[node name="OmniLight3D35" type="OmniLight3D" parent="light" index="20" unique_id=918128049]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 27.051067, 3.3234632, -29.109875)
light_color = Color(0.9372549, 0.49411765, 0.14509805, 1)
light_energy = 0.5
light_indirect_energy = 0.0
light_volumetric_fog_energy = 0.0
light_specular = 0.0
light_bake_mode = 1
shadow_enabled = true
shadow_opacity = 0.96
omni_range = 10.0
omni_attenuation = 2.0
[node name="PaloLuce" parent="." index="23" unique_id=1607500596 instance=ExtResource("20_fqrww")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.9962759, 0, -1.8516524)
[node name="VendingMachine_1" parent="." index="24" unique_id=1157270784 instance=ExtResource("21_s7klq")]
transform = Transform3D(-1, 0, 8.742278e-08, 0, 1, 0, -8.742278e-08, 0, -1, 0.91498923, 0, -0.5683732)
[editable path="TreeTest3"] [editable path="TreeTest3"]
[editable path="TreeTest4"] [editable path="TreeTest4"]
[editable path="TreeTest5"] [editable path="TreeTest5"]
[editable path="PaloLuce"]

View File

@@ -10,6 +10,10 @@
[ext_resource type="Material" uid="uid://jygb1hcokks5" path="res://tgcc/chunk/prop/grass/grass_bank.tres" id="7_fspb5"] [ext_resource type="Material" uid="uid://jygb1hcokks5" path="res://tgcc/chunk/prop/grass/grass_bank.tres" id="7_fspb5"]
[ext_resource type="Material" uid="uid://bjrb33qwp1p43" path="res://tgcc/chunk/prop/grass/grass_chunk_weeds.tres" id="8_uik3j"] [ext_resource type="Material" uid="uid://bjrb33qwp1p43" path="res://tgcc/chunk/prop/grass/grass_chunk_weeds.tres" id="8_uik3j"]
[ext_resource type="Material" uid="uid://0x17mj2v807r" path="res://tgcc/chunk/prop/grass/grass_chunk_weeds2.tres" id="9_52lxu"] [ext_resource type="Material" uid="uid://0x17mj2v807r" path="res://tgcc/chunk/prop/grass/grass_chunk_weeds2.tres" id="9_52lxu"]
[ext_resource type="PackedScene" uid="uid://c7hdw2g6sbygr" path="res://tgcc/chunk/prop/tree/bambù/bambù.tscn" id="11_s0twx"]
[ext_resource type="PackedScene" uid="uid://dluogg3j2kcgs" path="res://tgcc/chunk/prop/Tori/tori.tscn" id="12_on7te"]
[ext_resource type="PackedScene" uid="uid://be1px5nxfr4hs" path="res://tgcc/chunk/prop/scarecrow/scarecrow.tscn" id="13_fspb5"]
[ext_resource type="Shader" uid="uid://d0ch5ofrgf7y6" path="res://core/daynight/trunk_shader.gdshader" id="14_uik3j"]
[sub_resource type="PlaneMesh" id="PlaneMesh_piek1"] [sub_resource type="PlaneMesh" id="PlaneMesh_piek1"]
size = Vector2(0.5, 0.5) size = Vector2(0.5, 0.5)
@@ -47,26 +51,68 @@ size = Vector2(1, 1)
[sub_resource type="PlaneMesh" id="PlaneMesh_x3b0m"] [sub_resource type="PlaneMesh" id="PlaneMesh_x3b0m"]
size = Vector2(1, 1) size = Vector2(1, 1)
[sub_resource type="ShaderMaterial" id="ShaderMaterial_52lxu"]
render_priority = 0
shader = ExtResource("14_uik3j")
shader_parameter/albedo_color = Color(0.043069452, 0.26020306, 0.56825805, 1)
shader_parameter/use_texture = true
shader_parameter/uv_scale = Vector2(3, 3)
shader_parameter/palette_shift_y = 0.0
shader_parameter/gradient_start_y = 0.0
shader_parameter/gradient_end_y = 1.5
shader_parameter/light_steps = 3.0
shader_parameter/step_softness = 0.1
shader_parameter/shadow_color = Color(0.4, 0.4, 0.6, 1)
shader_parameter/shadow_offset = 0.0
shader_parameter/cast_shadow_strength = 0.6
shader_parameter/use_ghibli_glint = true
shader_parameter/glint_color = Color(1, 0.95, 0.85, 1)
shader_parameter/glint_intensity = 1.0
shader_parameter/glint_sharpness = 32.0
shader_parameter/emission_color = Color(0, 0, 0, 1)
shader_parameter/emission_energy = 0.0
[sub_resource type="ShaderMaterial" id="ShaderMaterial_fspb5"]
render_priority = 0
shader = ExtResource("14_uik3j")
shader_parameter/albedo_color = Color(0.38076818, 0.0014618272, 0.61723346, 1)
shader_parameter/use_texture = true
shader_parameter/uv_scale = Vector2(3, 3)
shader_parameter/palette_shift_y = 0.0
shader_parameter/gradient_start_y = 0.0
shader_parameter/gradient_end_y = 1.5
shader_parameter/light_steps = 3.0
shader_parameter/step_softness = 0.1
shader_parameter/shadow_color = Color(0.4, 0.4, 0.6, 1)
shader_parameter/shadow_offset = 0.0
shader_parameter/cast_shadow_strength = 0.6
shader_parameter/use_ghibli_glint = true
shader_parameter/glint_color = Color(1, 0.95, 0.85, 1)
shader_parameter/glint_intensity = 1.0
shader_parameter/glint_sharpness = 32.0
shader_parameter/emission_color = Color(0, 0, 0, 1)
shader_parameter/emission_energy = 0.0
[node name="chunk_country_cross3_01" unique_id=319840865 instance=ExtResource("1_d5ypx")] [node name="chunk_country_cross3_01" unique_id=319840865 instance=ExtResource("1_d5ypx")]
script = ExtResource("2_wjrum") script = ExtResource("2_wjrum")
north = true north = true
est = true est = true
south = true south = true
[node name="Argini_006" parent="." index="0" unique_id=185713343] [node name="Argini_006" parent="." index="0" unique_id=503381779]
surface_material_override/0 = ExtResource("2_6ig2p") surface_material_override/0 = ExtResource("2_6ig2p")
surface_material_override/1 = ExtResource("2_6ig2p") surface_material_override/1 = ExtResource("2_6ig2p")
[node name="Grass_009" parent="." index="1" unique_id=629886419] [node name="Grass_009" parent="." index="1" unique_id=845457056]
surface_material_override/0 = ExtResource("2_6ig2p") surface_material_override/0 = ExtResource("2_6ig2p")
[node name="MSH_Staccioanta_1_009" parent="." index="2" unique_id=802806256 groups=["weather_node"]] [node name="MSH_Staccioanta_1_009" parent="." index="2" unique_id=2079323499]
surface_material_override/0 = ExtResource("3_wjrum") surface_material_override/0 = ExtResource("3_wjrum")
[node name="Strada_007" parent="." index="3" unique_id=1200357449 groups=["weather_node"]] [node name="Strada_007" parent="." index="3" unique_id=1254411007 groups=["weather_node"]]
surface_material_override/0 = ExtResource("4_s0twx") surface_material_override/0 = ExtResource("4_s0twx")
[node name="Water_007" parent="." index="4" unique_id=787518082] [node name="Water_007" parent="." index="4" unique_id=403462512]
surface_material_override/0 = ExtResource("5_on7te") surface_material_override/0 = ExtResource("5_on7te")
surface_material_override/1 = ExtResource("5_on7te") surface_material_override/1 = ExtResource("5_on7te")
@@ -703,3 +749,216 @@ transform = Transform3D(-4.371139e-08, -1, 4.371139e-08, 0, -4.371139e-08, -1, 1
cast_shadow = 0 cast_shadow = 0
mesh = SubResource("PlaneMesh_x3b0m") mesh = SubResource("PlaneMesh_x3b0m")
surface_material_override/0 = ExtResource("8_uik3j") surface_material_override/0 = ExtResource("8_uik3j")
[node name="Bambu" type="Node3D" parent="." index="7" unique_id=1999704083]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.7030029, 0, 0)
[node name="Bambù15" parent="Bambu" index="0" unique_id=514636059 instance=ExtResource("11_s0twx")]
transform = Transform3D(0.99893546, 0.04613013, 0, -0.046085197, 0.9979625, 0.044125047, 0.002035494, -0.044078074, 0.999026, -3.1835556, 0, 7.4614506)
[node name="Bambù16" parent="Bambu" index="1" unique_id=1954346093 instance=ExtResource("11_s0twx")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, -3.1835556, -0.2565055, 8.330488)
[node name="Bambù21" parent="Bambu" index="2" unique_id=42929277 instance=ExtResource("11_s0twx")]
transform = Transform3D(1, 0, 0, 0, 0.9999092, 0.013473534, 0, -0.013473534, 0.9999092, -3.1835556, 0, 9.173452)
[node name="Bambù22" parent="Bambu" index="3" unique_id=361021749 instance=ExtResource("11_s0twx")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, -3.1835556, -0.3562231, 5.6442933)
[node name="Bambù23" parent="Bambu" index="4" unique_id=1847823683 instance=ExtResource("11_s0twx")]
transform = Transform3D(1, 0, 0, 0, 0.9999092, 0.013473534, 0, -0.013473534, 0.9999092, -3.1835556, 0, 6.4872584)
[node name="Bambù24" parent="Bambu" index="5" unique_id=1958123839 instance=ExtResource("11_s0twx")]
transform = Transform3D(0.99893546, 0.04613013, 0, -0.046085197, 0.9979625, 0.044125047, 0.002035494, -0.044078074, 0.999026, -2.8626137, 4.7683716e-07, 5.8091397)
[node name="Bambù25" parent="Bambu" index="6" unique_id=1901573942 instance=ExtResource("11_s0twx")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, -2.8626137, 4.7683716e-07, 6.6781764)
[node name="Bambù41" parent="Bambu" index="7" unique_id=47805921 instance=ExtResource("11_s0twx")]
transform = Transform3D(1, 0, 0, 0, 0.9999092, 0.013473534, 0, -0.013473534, 0.9999092, -2.8626137, -0.2763033, 7.521142)
[node name="Bambù42" parent="Bambu" index="8" unique_id=2054757941 instance=ExtResource("11_s0twx")]
transform = Transform3D(0.99893546, 0.04613013, 0, -0.046085197, 0.9979625, 0.044125047, 0.002035494, -0.044078074, 0.999026, -2.8626137, 4.7683716e-07, 6.8091397)
[node name="Bambù43" parent="Bambu" index="9" unique_id=453190292 instance=ExtResource("11_s0twx")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, -2.8626137, 0.26429868, 7.678176)
[node name="Bambù44" parent="Bambu" index="10" unique_id=1458581214 instance=ExtResource("11_s0twx")]
transform = Transform3D(1, 0, 0, 0, 0.9999092, 0.013473534, 0, -0.013473534, 0.9999092, -2.8626137, 4.7683716e-07, 8.521141)
[node name="Bambù18" parent="Bambu" index="11" unique_id=1056403055 instance=ExtResource("11_s0twx")]
transform = Transform3D(0.99893546, 0.04613013, 0, -0.046085197, 0.9979625, 0.044125047, 0.002035494, -0.044078074, 0.999026, -3.2905903, 0, -7.497928)
[node name="Bambù19" parent="Bambu" index="12" unique_id=296595434 instance=ExtResource("11_s0twx")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, -3.2905903, -0.2565055, -6.6288905)
[node name="Bambù26" parent="Bambu" index="13" unique_id=1108181054 instance=ExtResource("11_s0twx")]
transform = Transform3D(1, 0, 0, 0, 0.9999092, 0.013473534, 0, -0.013473534, 0.9999092, -3.2905903, 0, -5.7859263)
[node name="Bambù27" parent="Bambu" index="14" unique_id=1562603620 instance=ExtResource("11_s0twx")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, -3.2905903, -0.3562231, -9.315086)
[node name="Bambù28" parent="Bambu" index="15" unique_id=559053846 instance=ExtResource("11_s0twx")]
transform = Transform3D(1, 0, 0, 0, 0.9999092, 0.013473534, 0, -0.013473534, 0.9999092, -3.2905903, 0, -8.47212)
[node name="Bambù29" parent="Bambu" index="16" unique_id=233163335 instance=ExtResource("11_s0twx")]
transform = Transform3D(0.99893546, 0.04613013, 0, -0.046085197, 0.9979625, 0.044125047, 0.002035494, -0.044078074, 0.999026, -2.9696484, 4.7683716e-07, -9.15024)
[node name="Bambù30" parent="Bambu" index="17" unique_id=1342879225 instance=ExtResource("11_s0twx")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, -2.9696484, 4.7683716e-07, -8.281202)
[node name="Bambù45" parent="Bambu" index="18" unique_id=703015624 instance=ExtResource("11_s0twx")]
transform = Transform3D(1, 0, 0, 0, 0.9999092, 0.013473534, 0, -0.013473534, 0.9999092, -2.9696484, -0.2763033, -7.4382367)
[node name="Bambù46" parent="Bambu" index="19" unique_id=83558709 instance=ExtResource("11_s0twx")]
transform = Transform3D(0.99893546, 0.04613013, 0, -0.046085197, 0.9979625, 0.044125047, 0.002035494, -0.044078074, 0.999026, -2.9696484, 4.7683716e-07, -8.150239)
[node name="Bambù47" parent="Bambu" index="20" unique_id=891851311 instance=ExtResource("11_s0twx")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, -2.9696484, 0.26429868, -7.281203)
[node name="Bambù48" parent="Bambu" index="21" unique_id=1492062909 instance=ExtResource("11_s0twx")]
transform = Transform3D(1, 0, 0, 0, 0.9999092, 0.013473534, 0, -0.013473534, 0.9999092, -2.9696484, 4.7683716e-07, -6.4382377)
[node name="Bambù20" parent="Bambu" index="22" unique_id=683004573 instance=ExtResource("11_s0twx")]
transform = Transform3D(0.99893546, 0.04613013, 0, -0.046085197, 0.9979625, 0.044125047, 0.002035494, -0.044078074, 0.999026, 8.239307, 0, -7.497928)
[node name="Bambù31" parent="Bambu" index="23" unique_id=1166075867 instance=ExtResource("11_s0twx")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, 8.239307, -0.2565055, -6.6288905)
[node name="Bambù32" parent="Bambu" index="24" unique_id=1550621383 instance=ExtResource("11_s0twx")]
transform = Transform3D(1, 0, 0, 0, 0.9999092, 0.013473534, 0, -0.013473534, 0.9999092, -2.917448, -0.22205257, -4.929665)
[node name="Bambù33" parent="Bambu" index="25" unique_id=1674656626 instance=ExtResource("11_s0twx")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, 8.239307, -0.3562231, -9.315086)
[node name="Bambù34" parent="Bambu" index="26" unique_id=1669538331 instance=ExtResource("11_s0twx")]
transform = Transform3D(1, 0, 0, 0, 0.9999092, 0.013473534, 0, -0.013473534, 0.9999092, 8.239307, 0, -8.47212)
[node name="Bambù35" parent="Bambu" index="27" unique_id=237385787 instance=ExtResource("11_s0twx")]
transform = Transform3D(0.99893546, 0.04613013, 0, -0.046085197, 0.9979625, 0.044125047, 0.002035494, -0.044078074, 0.999026, 8.560249, 4.7683716e-07, -9.15024)
[node name="Bambù36" parent="Bambu" index="28" unique_id=1170872764 instance=ExtResource("11_s0twx")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, 8.560249, 4.7683716e-07, -8.281202)
[node name="Bambù49" parent="Bambu" index="29" unique_id=1849867240 instance=ExtResource("11_s0twx")]
transform = Transform3D(1, 0, 0, 0, 0.9999092, 0.013473534, 0, -0.013473534, 0.9999092, 8.560249, -0.2763033, -7.4382367)
[node name="Bambù50" parent="Bambu" index="30" unique_id=1199584830 instance=ExtResource("11_s0twx")]
transform = Transform3D(0.99893546, 0.04613013, 0, -0.046085197, 0.9979625, 0.044125047, 0.002035494, -0.044078074, 0.999026, 8.560249, 4.7683716e-07, -8.150239)
[node name="Bambù51" parent="Bambu" index="31" unique_id=317685493 instance=ExtResource("11_s0twx")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, 8.560249, 0.26429868, -7.281203)
[node name="Bambù52" parent="Bambu" index="32" unique_id=1345147511 instance=ExtResource("11_s0twx")]
transform = Transform3D(1, 0, 0, 0, 0.9999092, 0.013473534, 0, -0.013473534, 0.9999092, 8.560249, 4.7683716e-07, -6.4382377)
[node name="Bambù37" parent="Bambu" index="33" unique_id=1071137497 instance=ExtResource("11_s0twx")]
transform = Transform3D(0.99893546, 0.04613013, 0, -0.046085197, 0.9979625, 0.044125047, 0.002035494, -0.044078074, 0.999026, 8.239307, 0, 8.218842)
[node name="Bambù38" parent="Bambu" index="34" unique_id=121212224 instance=ExtResource("11_s0twx")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, 8.239307, -0.2565055, 9.087879)
[node name="Bambù39" parent="Bambu" index="35" unique_id=944682133 instance=ExtResource("11_s0twx")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, 8.239307, -0.3562231, 6.401683)
[node name="Bambù40" parent="Bambu" index="36" unique_id=203551499 instance=ExtResource("11_s0twx")]
transform = Transform3D(1, 0, 0, 0, 0.9999092, 0.013473534, 0, -0.013473534, 0.9999092, 8.239307, 0, 7.244649)
[node name="Bambù53" parent="Bambu" index="37" unique_id=2113808379 instance=ExtResource("11_s0twx")]
transform = Transform3D(0.99893546, 0.04613013, 0, -0.046085197, 0.9979625, 0.044125047, 0.002035494, -0.044078074, 0.999026, 8.560249, 4.7683716e-07, 6.5665293)
[node name="Bambù54" parent="Bambu" index="38" unique_id=293731974 instance=ExtResource("11_s0twx")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, 8.560249, 4.7683716e-07, 7.435567)
[node name="Bambù55" parent="Bambu" index="39" unique_id=1241354453 instance=ExtResource("11_s0twx")]
transform = Transform3D(1, 0, 0, 0, 0.9999092, 0.013473534, 0, -0.013473534, 0.9999092, 8.560249, -0.2763033, 8.278532)
[node name="Bambù56" parent="Bambu" index="40" unique_id=2015969748 instance=ExtResource("11_s0twx")]
transform = Transform3D(0.99893546, 0.04613013, 0, -0.046085197, 0.9979625, 0.044125047, 0.002035494, -0.044078074, 0.999026, 8.560249, 4.7683716e-07, 7.56653)
[node name="Bambù57" parent="Bambu" index="41" unique_id=2032587135 instance=ExtResource("11_s0twx")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, 8.560249, 0.26429868, 8.435566)
[node name="Bambù58" parent="Bambu" index="42" unique_id=338271013 instance=ExtResource("11_s0twx")]
transform = Transform3D(1, 0, 0, 0, 0.9999092, 0.013473534, 0, -0.013473534, 0.9999092, 8.560249, 4.7683716e-07, 9.278532)
[node name="Bambù59" parent="Bambu" index="43" unique_id=2135267736 instance=ExtResource("11_s0twx")]
transform = Transform3D(-0.0020355375, 0.044078063, -0.999026, -0.046085197, 0.9979625, 0.044125043, 0.99893546, 0.046130124, -4.3997797e-08, 5.7660995, 0, 8.747564)
[node name="Bambù60" parent="Bambu" index="44" unique_id=1996178166 instance=ExtResource("11_s0twx")]
transform = Transform3D(-4.354479e-08, -3.812739e-09, -1.0000001, -0.0872253, 0.9961887, 0, 0.9961886, 0.087225296, -4.371139e-08, 4.8970613, -0.2565055, 8.747564)
[node name="Bambù61" parent="Bambu" index="45" unique_id=1142314968 instance=ExtResource("11_s0twx")]
transform = Transform3D(-4.354479e-08, -3.812739e-09, -1.0000001, -0.0872253, 0.9961887, 0, 0.9961886, 0.087225296, -4.371139e-08, 7.5832577, -0.3562231, 8.747564)
[node name="Bambù62" parent="Bambu" index="46" unique_id=692230420 instance=ExtResource("11_s0twx")]
transform = Transform3D(-4.371139e-08, 0.013473534, -0.9999092, 0, 0.9999092, 0.013473534, 1, 5.889469e-10, -4.370742e-08, 6.740291, 0, 8.747564)
[node name="Bambù63" parent="Bambu" index="47" unique_id=1412502637 instance=ExtResource("11_s0twx")]
transform = Transform3D(-0.0020355375, 0.044078063, -0.999026, -0.046085197, 0.9979625, 0.044125043, 0.99893546, 0.046130124, -4.3997797e-08, 7.4184113, 4.7683716e-07, 9.068506)
[node name="Bambù64" parent="Bambu" index="48" unique_id=1439020299 instance=ExtResource("11_s0twx")]
transform = Transform3D(-4.354479e-08, -3.812739e-09, -1.0000001, -0.0872253, 0.9961887, 0, 0.9961886, 0.087225296, -4.371139e-08, 6.549373, 4.7683716e-07, 9.068506)
[node name="Bambù65" parent="Bambu" index="49" unique_id=1296643572 instance=ExtResource("11_s0twx")]
transform = Transform3D(-4.371139e-08, 0.013473534, -0.9999092, 0, 0.9999092, 0.013473534, 1, 5.889469e-10, -4.370742e-08, 5.706409, -0.2763033, 9.068506)
[node name="Bambù66" parent="Bambu" index="50" unique_id=1269906984 instance=ExtResource("11_s0twx")]
transform = Transform3D(-0.0020355375, 0.044078063, -0.999026, -0.046085197, 0.9979625, 0.044125043, 0.99893546, 0.046130124, -4.3997797e-08, 6.418411, 4.7683716e-07, 9.068506)
[node name="Bambù67" parent="Bambu" index="51" unique_id=1964373557 instance=ExtResource("11_s0twx")]
transform = Transform3D(-4.354479e-08, -3.812739e-09, -1.0000001, -0.0872253, 0.9961887, 0, 0.9961886, 0.087225296, -4.371139e-08, 5.549375, 0.26429868, 9.068506)
[node name="Bambù68" parent="Bambu" index="52" unique_id=2054959863 instance=ExtResource("11_s0twx")]
transform = Transform3D(-4.371139e-08, 0.013473534, -0.9999092, 0, 0.9999092, 0.013473534, 1, 5.889469e-10, -4.370742e-08, 4.7064085, 4.7683716e-07, 9.068506)
[node name="Bambù69" parent="Bambu" index="53" unique_id=41413912 instance=ExtResource("11_s0twx")]
transform = Transform3D(-0.0020355375, 0.044078063, -0.999026, -0.046085197, 0.9979625, 0.044125043, 0.99893546, 0.046130124, -4.3997797e-08, 5.7660995, 0, -9.709568)
[node name="Bambù70" parent="Bambu" index="54" unique_id=1098859020 instance=ExtResource("11_s0twx")]
transform = Transform3D(-4.354479e-08, -3.812739e-09, -1.0000001, -0.0872253, 0.9961887, 0, 0.9961886, 0.087225296, -4.371139e-08, 4.8970613, -0.2565055, -9.709568)
[node name="Bambù71" parent="Bambu" index="55" unique_id=1253907857 instance=ExtResource("11_s0twx")]
transform = Transform3D(-4.354479e-08, -3.812739e-09, -1.0000001, -0.0872253, 0.9961887, 0, 0.9961886, 0.087225296, -4.371139e-08, 7.5832577, -0.3562231, -9.709568)
[node name="Bambù72" parent="Bambu" index="56" unique_id=914925610 instance=ExtResource("11_s0twx")]
transform = Transform3D(-4.371139e-08, 0.013473534, -0.9999092, 0, 0.9999092, 0.013473534, 1, 5.889469e-10, -4.370742e-08, 6.740291, 0, -9.709568)
[node name="Bambù73" parent="Bambu" index="57" unique_id=61163812 instance=ExtResource("11_s0twx")]
transform = Transform3D(-0.0020355375, 0.044078063, -0.999026, -0.046085197, 0.9979625, 0.044125043, 0.99893546, 0.046130124, -4.3997797e-08, 7.4184113, 4.7683716e-07, -9.388626)
[node name="Bambù74" parent="Bambu" index="58" unique_id=1746505929 instance=ExtResource("11_s0twx")]
transform = Transform3D(-4.354479e-08, -3.812739e-09, -1.0000001, -0.0872253, 0.9961887, 0, 0.9961886, 0.087225296, -4.371139e-08, 6.549373, 4.7683716e-07, -9.388626)
[node name="Bambù75" parent="Bambu" index="59" unique_id=880897283 instance=ExtResource("11_s0twx")]
transform = Transform3D(-4.371139e-08, 0.013473534, -0.9999092, 0, 0.9999092, 0.013473534, 1, 5.889469e-10, -4.370742e-08, 5.706409, -0.2763033, -9.388626)
[node name="Bambù76" parent="Bambu" index="60" unique_id=2038811179 instance=ExtResource("11_s0twx")]
transform = Transform3D(-0.0020355375, 0.044078063, -0.999026, -0.046085197, 0.9979625, 0.044125043, 0.99893546, 0.046130124, -4.3997797e-08, 6.418411, 4.7683716e-07, -9.388626)
[node name="Bambù77" parent="Bambu" index="61" unique_id=1694847279 instance=ExtResource("11_s0twx")]
transform = Transform3D(-4.354479e-08, -3.812739e-09, -1.0000001, -0.0872253, 0.9961887, 0, 0.9961886, 0.087225296, -4.371139e-08, 5.549375, 0.26429868, -9.388626)
[node name="Bambù78" parent="Bambu" index="62" unique_id=1492632391 instance=ExtResource("11_s0twx")]
transform = Transform3D(-4.371139e-08, 0.013473534, -0.9999092, 0, 0.9999092, 0.013473534, 1, 5.889469e-10, -4.370742e-08, 4.7064085, 4.7683716e-07, -9.388626)
[node name="Tori" parent="." index="8" unique_id=426190097 instance=ExtResource("12_on7te")]
transform = Transform3D(-2.6226832e-08, 0, -0.59999996, 0, 0.59999996, 0, 0.59999996, 0, -2.6226832e-08, 8.541672, 0, 0)
[node name="scarecrow" parent="." index="9" unique_id=1320042610 instance=ExtResource("13_fspb5")]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, -6.283793, 0, -0.20404291)
[node name="scarecrow2" parent="." index="10" unique_id=1524877194 instance=ExtResource("13_fspb5")]
transform = Transform3D(-0.9989745, 0, 0.04527591, 0, 1, 0, -0.04527591, 0, -0.9989745, 5.994306, 0, -6.070919)
[node name="shirt" parent="scarecrow2" index="2" unique_id=1648916125]
surface_material_override/0 = SubResource("ShaderMaterial_52lxu")
[node name="scarecrow3" parent="." index="11" unique_id=1017203169 instance=ExtResource("13_fspb5")]
transform = Transform3D(-0.055246323, 0, 0.99847275, 0, 1, 0, -0.99847275, 0, -0.055246323, 5.994306, 0, 5.935006)
[node name="shirt" parent="scarecrow3" index="2" unique_id=1648916125]
surface_material_override/0 = SubResource("ShaderMaterial_fspb5")
[editable path="scarecrow2"]
[editable path="scarecrow3"]

View File

@@ -16,6 +16,8 @@
[ext_resource type="Material" uid="uid://ce0bdk3mx2xao" path="res://tgcc/chunk/material/water_chunk.tres" id="9_gqoia"] [ext_resource type="Material" uid="uid://ce0bdk3mx2xao" path="res://tgcc/chunk/material/water_chunk.tres" id="9_gqoia"]
[ext_resource type="Material" uid="uid://baot4vy3fqrdw" path="res://tgcc/chunk/prop/flower/bush.tres" id="10_uvq4s"] [ext_resource type="Material" uid="uid://baot4vy3fqrdw" path="res://tgcc/chunk/prop/flower/bush.tres" id="10_uvq4s"]
[ext_resource type="Material" uid="uid://f5uoreickew7" path="res://tgcc/chunk/prop/flower/flower.tres" id="11_w75rp"] [ext_resource type="Material" uid="uid://f5uoreickew7" path="res://tgcc/chunk/prop/flower/flower.tres" id="11_w75rp"]
[ext_resource type="PackedScene" uid="uid://c7hdw2g6sbygr" path="res://tgcc/chunk/prop/tree/bambù/bambù.tscn" id="17_rr5ye"]
[ext_resource type="PackedScene" uid="uid://5ap10ax3lnr7" path="res://tgcc/chunk/prop/vending machine/vending_machine_1.tscn" id="18_18gw6"]
[sub_resource type="PlaneMesh" id="PlaneMesh_kiycf"] [sub_resource type="PlaneMesh" id="PlaneMesh_kiycf"]
size = Vector2(0.5, 0.5) size = Vector2(0.5, 0.5)
@@ -62,55 +64,64 @@ buffer = PackedFloat32Array(-0.8020725, 0.5500147, -0.23699094, 3.4572377, -0.28
[sub_resource type="PlaneMesh" id="PlaneMesh_1bb53"] [sub_resource type="PlaneMesh" id="PlaneMesh_1bb53"]
size = Vector2(1, 1) size = Vector2(1, 1)
[sub_resource type="Gradient" id="Gradient_aoxux"]
offsets = PackedFloat32Array(1, 1)
colors = PackedColorArray(0, 0, 0, 0.5882353, 0, 0, 0, 0)
[sub_resource type="GradientTexture2D" id="GradientTexture2D_rr5ye"]
gradient = SubResource("Gradient_aoxux")
fill = 2
fill_from = Vector2(0.5, 0.5)
[node name="chunk_country_cross3_02" unique_id=1492245999 instance=ExtResource("1_2emma")] [node name="chunk_country_cross3_02" unique_id=1492245999 instance=ExtResource("1_2emma")]
script = ExtResource("2_aoxux") script = ExtResource("2_aoxux")
north = true north = true
est = true est = true
south = true south = true
[node name="Argini_008" parent="." index="0" unique_id=1970392493] [node name="Argini_008" parent="." index="0" unique_id=506700048]
surface_material_override/0 = ExtResource("2_jaet5") surface_material_override/0 = ExtResource("2_jaet5")
[node name="Cavi_004" parent="." index="1" unique_id=1226786589] [node name="Cavi_004" parent="." index="1" unique_id=253539518]
surface_material_override/0 = ExtResource("3_k52wx") surface_material_override/0 = ExtResource("3_k52wx")
surface_material_override/1 = ExtResource("3_k52wx") surface_material_override/1 = ExtResource("3_k52wx")
[node name="Flower_008" parent="." index="2" unique_id=8446212] [node name="Flower_008" parent="." index="2" unique_id=992129707]
visible = false visible = false
[node name="FlowerG_005" parent="." index="3" unique_id=2045663830] [node name="FlowerG_005" parent="." index="3" unique_id=1721720069]
visible = false visible = false
[node name="Grass_010" parent="." index="4" unique_id=1977147069] [node name="Grass_010" parent="." index="4" unique_id=2049316115]
surface_material_override/0 = ExtResource("2_jaet5") surface_material_override/0 = ExtResource("2_jaet5")
[node name="House_C_1_002" parent="." index="5" unique_id=628395080 groups=["weather_node"]] [node name="House_C_1_002" parent="." index="5" unique_id=1344987535 groups=["weather_node"]]
[node name="House_C_1_002|Cube_330|Dupli|" parent="House_C_1_002" index="0" unique_id=1454139767] [node name="House_C_1_002|Cube_330|Dupli|" parent="House_C_1_002" index="0" unique_id=141290732]
surface_material_override/0 = ExtResource("4_yg4ko") surface_material_override/0 = ExtResource("4_yg4ko")
surface_material_override/1 = ExtResource("5_yk001") surface_material_override/1 = ExtResource("5_yk001")
[node name="House_C_1_003" parent="." index="6" unique_id=224251697 groups=["weather_node"]] [node name="House_C_1_003" parent="." index="6" unique_id=5893163 groups=["weather_node"]]
[node name="House_C_1_003|Cube_330|Dupli|" parent="House_C_1_003" index="0" unique_id=682134143] [node name="House_C_1_003|Cube_330|Dupli|" parent="House_C_1_003" index="0" unique_id=1916361483]
surface_material_override/0 = ExtResource("4_yg4ko") surface_material_override/0 = ExtResource("4_yg4ko")
surface_material_override/1 = ExtResource("5_yk001") surface_material_override/1 = ExtResource("5_yk001")
[node name="Lanterne_002" parent="." index="7" unique_id=584972425] [node name="Lanterne_002" parent="." index="7" unique_id=174576336]
surface_material_override/0 = ExtResource("5_yk001") surface_material_override/0 = ExtResource("5_yk001")
surface_material_override/1 = ExtResource("4_yg4ko") surface_material_override/1 = ExtResource("4_yg4ko")
[node name="MSH_Staccioanta_1_007" parent="." index="8" unique_id=166305032] [node name="MSH_Staccioanta_1_007" parent="." index="8" unique_id=914751003]
surface_material_override/0 = ExtResource("6_k52wx") surface_material_override/0 = ExtResource("6_k52wx")
[node name="PaliLuci_003" parent="." index="9" unique_id=718749193 groups=["weather_node"]] [node name="PaliLuci_003" parent="." index="9" unique_id=860093688 groups=["weather_node"]]
surface_material_override/0 = ExtResource("7_yg4ko") surface_material_override/0 = ExtResource("7_yg4ko")
surface_material_override/1 = ExtResource("7_yg4ko") surface_material_override/1 = ExtResource("7_yg4ko")
[node name="Strada_008" parent="." index="10" unique_id=1129336513 groups=["weather_node"]] [node name="Strada_008" parent="." index="10" unique_id=1328236486 groups=["weather_node"]]
surface_material_override/0 = ExtResource("8_yk001") surface_material_override/0 = ExtResource("8_yk001")
[node name="Water_009" parent="." index="11" unique_id=764825976] [node name="Water_009" parent="." index="11" unique_id=803608688]
surface_material_override/0 = ExtResource("9_gqoia") surface_material_override/0 = ExtResource("9_gqoia")
[node name="grass" type="Node3D" parent="." index="12" unique_id=902068161 groups=["weather_vegetables_node", "wind_node"]] [node name="grass" type="Node3D" parent="." index="12" unique_id=902068161 groups=["weather_vegetables_node", "wind_node"]]
@@ -525,3 +536,245 @@ transform = Transform3D(1, 0, 0, 0, -4.371139e-08, -1, 0, 1, -4.371139e-08, 59.7
cast_shadow = 0 cast_shadow = 0
mesh = SubResource("PlaneMesh_1bb53") mesh = SubResource("PlaneMesh_1bb53")
surface_material_override/0 = ExtResource("8_rr5ye") surface_material_override/0 = ExtResource("8_rr5ye")
[node name="shadow" type="Node3D" parent="." index="15" unique_id=670702032]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 12.361658, 0, 0)
[node name="Decal2" type="Decal" parent="shadow" index="0" unique_id=922189540]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -5.7440257, 0.118, -6.3402376)
size = Vector3(6.375206, 0.5, 6.4011083)
texture_albedo = SubResource("GradientTexture2D_rr5ye")
[node name="Decal3" type="Decal" parent="shadow" index="1" unique_id=638863692]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -5.7588773, 0.118, 6.374588)
size = Vector3(6.375206, 0.5, 6.4011083)
texture_albedo = SubResource("GradientTexture2D_rr5ye")
[node name="light" type="Node3D" parent="." index="16" unique_id=855839615]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -22.554989, 0, 26.182838)
[node name="OmniLight3D23" type="OmniLight3D" parent="light" index="0" unique_id=1012201040]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 29.203798, 1.6665113, -34.696262)
light_color = Color(0.9372549, 0.49411765, 0.14509805, 1)
light_energy = 0.5
light_indirect_energy = 0.0
light_volumetric_fog_energy = 0.0
light_specular = 0.0
light_bake_mode = 1
shadow_enabled = true
shadow_opacity = 0.96
omni_range = 10.0
omni_attenuation = 2.0
[node name="OmniLight3D24" type="OmniLight3D" parent="light" index="1" unique_id=1909029879]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 29.203798, 1.6665113, -30.344786)
light_color = Color(0.9372549, 0.49411765, 0.14509805, 1)
light_energy = 0.5
light_indirect_energy = 0.0
light_volumetric_fog_energy = 0.0
light_specular = 0.0
light_bake_mode = 1
shadow_enabled = true
shadow_opacity = 0.96
omni_range = 10.0
omni_attenuation = 2.0
[node name="OmniLight3D25" type="OmniLight3D" parent="light" index="2" unique_id=1402698870]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 27.006886, 1.6665113, -32.461475)
light_color = Color(0.9372549, 0.49411765, 0.14509805, 1)
light_energy = 0.5
light_indirect_energy = 0.0
light_volumetric_fog_energy = 0.0
light_specular = 0.0
light_bake_mode = 1
shadow_enabled = true
shadow_opacity = 0.96
omni_range = 10.0
omni_attenuation = 2.0
[node name="OmniLight3D26" type="OmniLight3D" parent="light" index="3" unique_id=193646632]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 31.41166, 1.6665113, -32.461475)
light_color = Color(0.9372549, 0.49411765, 0.14509805, 1)
light_energy = 0.5
light_indirect_energy = 0.0
light_volumetric_fog_energy = 0.0
light_specular = 0.0
light_bake_mode = 1
shadow_enabled = true
shadow_opacity = 0.96
omni_range = 10.0
omni_attenuation = 2.0
[node name="OmniLight3D34" type="OmniLight3D" parent="light" index="4" unique_id=353951548]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 29.203798, 1.6665113, -21.9785)
light_color = Color(0.9372549, 0.49411765, 0.14509805, 1)
light_energy = 0.5
light_indirect_energy = 0.0
light_volumetric_fog_energy = 0.0
light_specular = 0.0
light_bake_mode = 1
shadow_enabled = true
shadow_opacity = 0.96
omni_range = 10.0
omni_attenuation = 2.0
[node name="OmniLight3D35" type="OmniLight3D" parent="light" index="5" unique_id=801665921]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 29.203798, 1.6665113, -17.627022)
light_color = Color(0.9372549, 0.49411765, 0.14509805, 1)
light_energy = 0.5
light_indirect_energy = 0.0
light_volumetric_fog_energy = 0.0
light_specular = 0.0
light_bake_mode = 1
shadow_enabled = true
shadow_opacity = 0.96
omni_range = 10.0
omni_attenuation = 2.0
[node name="OmniLight3D36" type="OmniLight3D" parent="light" index="6" unique_id=51976869]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 27.006886, 1.6665113, -19.743713)
light_color = Color(0.9372549, 0.49411765, 0.14509805, 1)
light_energy = 0.5
light_indirect_energy = 0.0
light_volumetric_fog_energy = 0.0
light_specular = 0.0
light_bake_mode = 1
shadow_enabled = true
shadow_opacity = 0.96
omni_range = 10.0
omni_attenuation = 2.0
[node name="OmniLight3D37" type="OmniLight3D" parent="light" index="7" unique_id=1086881090]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 31.41166, 1.6665113, -19.743713)
light_color = Color(0.9372549, 0.49411765, 0.14509805, 1)
light_energy = 0.5
light_indirect_energy = 0.0
light_volumetric_fog_energy = 0.0
light_specular = 0.0
light_bake_mode = 1
shadow_enabled = true
shadow_opacity = 0.96
omni_range = 10.0
omni_attenuation = 2.0
[node name="OmniLight3D33" type="OmniLight3D" parent="light" index="8" unique_id=149597706]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 24.405659, 3.161872, -26.186796)
light_color = Color(0.9372549, 0.49411765, 0.14509805, 1)
light_energy = 0.5
light_indirect_energy = 0.0
light_volumetric_fog_energy = 0.0
light_specular = 0.0
light_bake_mode = 1
shadow_enabled = true
shadow_opacity = 0.96
omni_range = 10.0
omni_attenuation = 2.0
[node name="OmniLight3D38" type="OmniLight3D" parent="light" index="9" unique_id=1165412202]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 32.378895, 3.161872, -26.186796)
light_color = Color(0.9372549, 0.49411765, 0.14509805, 1)
light_energy = 0.5
light_indirect_energy = 0.0
light_volumetric_fog_energy = 0.0
light_specular = 0.0
light_bake_mode = 1
shadow_enabled = true
shadow_opacity = 0.96
omni_range = 10.0
omni_attenuation = 2.0
[node name="Bambu" type="Node3D" parent="." index="17" unique_id=448001558]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -7.1752586, 0, 0)
[node name="Bambù15" parent="Bambu" index="0" unique_id=514636059 instance=ExtResource("17_rr5ye")]
transform = Transform3D(0.99893546, 0.04613013, 0, -0.046085197, 0.9979625, 0.044125047, 0.002035494, -0.044078074, 0.999026, 4.710951, 0, 7.851448)
[node name="Bambù16" parent="Bambu" index="1" unique_id=1113199509 instance=ExtResource("17_rr5ye")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, 4.710951, -0.2565055, 8.720485)
[node name="Bambù21" parent="Bambu" index="2" unique_id=323411216 instance=ExtResource("17_rr5ye")]
transform = Transform3D(1, 0, 0, 0, 0.9999092, 0.013473534, 0, -0.013473534, 0.9999092, 4.710951, 0, 9.56345)
[node name="Bambù22" parent="Bambu" index="3" unique_id=223818623 instance=ExtResource("17_rr5ye")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, 4.710951, -0.3562231, 6.0342903)
[node name="Bambù23" parent="Bambu" index="4" unique_id=1662355034 instance=ExtResource("17_rr5ye")]
transform = Transform3D(1, 0, 0, 0, 0.9999092, 0.013473534, 0, -0.013473534, 0.9999092, 4.710951, 0, 6.8772554)
[node name="Bambù24" parent="Bambu" index="5" unique_id=818989877 instance=ExtResource("17_rr5ye")]
transform = Transform3D(0.99893546, 0.04613013, 0, -0.046085197, 0.9979625, 0.044125047, 0.002035494, -0.044078074, 0.999026, 5.031893, 4.7683716e-07, 6.1991367)
[node name="Bambù25" parent="Bambu" index="6" unique_id=1715691457 instance=ExtResource("17_rr5ye")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, 5.031893, 4.7683716e-07, 7.0681734)
[node name="Bambù41" parent="Bambu" index="7" unique_id=285888953 instance=ExtResource("17_rr5ye")]
transform = Transform3D(1, 0, 0, 0, 0.9999092, 0.013473534, 0, -0.013473534, 0.9999092, 5.031893, -0.2763033, 7.9111385)
[node name="Bambù42" parent="Bambu" index="8" unique_id=1243079673 instance=ExtResource("17_rr5ye")]
transform = Transform3D(0.99893546, 0.04613013, 0, -0.046085197, 0.9979625, 0.044125047, 0.002035494, -0.044078074, 0.999026, 5.031893, 4.7683716e-07, 7.1991367)
[node name="Bambù43" parent="Bambu" index="9" unique_id=174399751 instance=ExtResource("17_rr5ye")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, 5.031893, 0.26429868, 8.068173)
[node name="Bambù44" parent="Bambu" index="10" unique_id=1664765048 instance=ExtResource("17_rr5ye")]
transform = Transform3D(1, 0, 0, 0, 0.9999092, 0.013473534, 0, -0.013473534, 0.9999092, 5.031893, 4.7683716e-07, 8.911139)
[node name="Bambù18" parent="Bambu" index="11" unique_id=1559539851 instance=ExtResource("17_rr5ye")]
transform = Transform3D(0.99893546, 0.04613013, 0, -0.046085197, 0.9979625, 0.044125047, 0.002035494, -0.044078074, 0.999026, 4.710951, 0, -4.343957)
[node name="Bambù19" parent="Bambu" index="12" unique_id=642406394 instance=ExtResource("17_rr5ye")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, 4.710951, -0.2565055, -3.4749203)
[node name="Bambù26" parent="Bambu" index="13" unique_id=706839361 instance=ExtResource("17_rr5ye")]
transform = Transform3D(1, 0, 0, 0, 0.9999092, 0.013473534, 0, -0.013473534, 0.9999092, 4.710951, 0, -2.6319551)
[node name="Bambù27" parent="Bambu" index="14" unique_id=1638985970 instance=ExtResource("17_rr5ye")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, 4.710951, -0.3562231, -6.1611147)
[node name="Bambù28" parent="Bambu" index="15" unique_id=978144063 instance=ExtResource("17_rr5ye")]
transform = Transform3D(1, 0, 0, 0, 0.9999092, 0.013473534, 0, -0.013473534, 0.9999092, 4.710951, 0, -5.3181496)
[node name="Bambù29" parent="Bambu" index="16" unique_id=2141305470 instance=ExtResource("17_rr5ye")]
transform = Transform3D(0.99893546, 0.04613013, 0, -0.046085197, 0.9979625, 0.044125047, 0.002035494, -0.044078074, 0.999026, 5.031893, 4.7683716e-07, -5.9962683)
[node name="Bambù30" parent="Bambu" index="17" unique_id=888892362 instance=ExtResource("17_rr5ye")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, 5.031893, 4.7683716e-07, -5.1272316)
[node name="Bambù51" parent="Bambu" index="18" unique_id=140566295 instance=ExtResource("17_rr5ye")]
transform = Transform3D(1, 0, 0, 0, 0.9999092, 0.013473534, 0, -0.013473534, 0.9999092, 5.031893, -0.2763033, -4.2842665)
[node name="Bambù52" parent="Bambu" index="19" unique_id=1699837022 instance=ExtResource("17_rr5ye")]
transform = Transform3D(0.99893546, 0.04613013, 0, -0.046085197, 0.9979625, 0.044125047, 0.002035494, -0.044078074, 0.999026, 5.031893, 4.7683716e-07, -4.9962683)
[node name="Bambù53" parent="Bambu" index="20" unique_id=798441618 instance=ExtResource("17_rr5ye")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, 5.031893, 0.26429868, -4.1272316)
[node name="Bambù54" parent="Bambu" index="21" unique_id=966882354 instance=ExtResource("17_rr5ye")]
transform = Transform3D(1, 0, 0, 0, 0.9999092, 0.013473534, 0, -0.013473534, 0.9999092, 5.031893, 4.7683716e-07, -3.2842665)
[node name="Bambù33" parent="Bambu" index="22" unique_id=1874865938 instance=ExtResource("17_rr5ye")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, 4.8432164, -0.3562231, -8.338741)
[node name="Bambù34" parent="Bambu" index="23" unique_id=1925300029 instance=ExtResource("17_rr5ye")]
transform = Transform3D(1, 0, 0, 0, 0.9999092, 0.013473534, 0, -0.013473534, 0.9999092, 4.8432164, 0, -7.4957776)
[node name="Bambù35" parent="Bambu" index="24" unique_id=739573115 instance=ExtResource("17_rr5ye")]
transform = Transform3D(0.99893546, 0.04613013, 0, -0.046085197, 0.9979625, 0.044125047, 0.002035494, -0.044078074, 0.999026, 5.1641583, 4.7683716e-07, -8.173897)
[node name="Bambù56" parent="Bambu" index="25" unique_id=1231729508 instance=ExtResource("17_rr5ye")]
transform = Transform3D(0.99893546, 0.04613013, 0, -0.046085197, 0.9979625, 0.044125047, 0.002035494, -0.044078074, 0.999026, 5.1641583, 4.7683716e-07, -7.1738963)
[node name="Bambù37" parent="Bambu" index="26" unique_id=536233487 instance=ExtResource("17_rr5ye")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, 4.8120065, -0.3562231, 3.8334446)
[node name="Bambù38" parent="Bambu" index="27" unique_id=87092145 instance=ExtResource("17_rr5ye")]
transform = Transform3D(1, 0, 0, 0, 0.9999092, 0.013473534, 0, -0.013473534, 0.9999092, 4.8120065, 0, 4.6764083)
[node name="Bambù39" parent="Bambu" index="28" unique_id=1707806049 instance=ExtResource("17_rr5ye")]
transform = Transform3D(0.99893546, 0.04613013, 0, -0.046085197, 0.9979625, 0.044125047, 0.002035494, -0.044078074, 0.999026, 5.1329484, 4.7683716e-07, 3.998289)
[node name="Bambù59" parent="Bambu" index="29" unique_id=510984514 instance=ExtResource("17_rr5ye")]
transform = Transform3D(0.99893546, 0.04613013, 0, -0.046085197, 0.9979625, 0.044125047, 0.002035494, -0.044078074, 0.999026, 5.1329484, 4.7683716e-07, 4.9982896)
[node name="VendingMachine_1" parent="." index="18" unique_id=1157270784 instance=ExtResource("18_18gw6")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.6109447, 0, 1.013597)

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -48,13 +48,13 @@ size = Vector2(1, 1)
[node name="chunk_country_empty_01" unique_id=385761952 instance=ExtResource("1_xc6vo")] [node name="chunk_country_empty_01" unique_id=385761952 instance=ExtResource("1_xc6vo")]
script = ExtResource("2_mfq5p") script = ExtResource("2_mfq5p")
[node name="Argini_002" parent="." index="0" unique_id=1558358546] [node name="Argini_002" parent="." index="0" unique_id=365771085]
surface_material_override/0 = ExtResource("2_w0lad") surface_material_override/0 = ExtResource("2_w0lad")
[node name="Chunk_026" parent="." index="1" unique_id=896079676] [node name="Chunk_026" parent="." index="1" unique_id=911079965]
surface_material_override/0 = ExtResource("2_w0lad") surface_material_override/0 = ExtResource("2_w0lad")
[node name="Water_001" parent="." index="2" unique_id=372952317] [node name="Water_001" parent="." index="2" unique_id=517615273]
surface_material_override/0 = ExtResource("3_mfq5p") surface_material_override/0 = ExtResource("3_mfq5p")
surface_material_override/1 = ExtResource("3_mfq5p") surface_material_override/1 = ExtResource("3_mfq5p")

View File

@@ -17,6 +17,9 @@
[ext_resource type="Material" uid="uid://0x17mj2v807r" path="res://tgcc/chunk/prop/grass/grass_chunk_weeds2.tres" id="14_j41gr"] [ext_resource type="Material" uid="uid://0x17mj2v807r" path="res://tgcc/chunk/prop/grass/grass_chunk_weeds2.tres" id="14_j41gr"]
[ext_resource type="Material" uid="uid://baot4vy3fqrdw" path="res://tgcc/chunk/prop/flower/bush.tres" id="15_eoxu8"] [ext_resource type="Material" uid="uid://baot4vy3fqrdw" path="res://tgcc/chunk/prop/flower/bush.tres" id="15_eoxu8"]
[ext_resource type="Material" uid="uid://f5uoreickew7" path="res://tgcc/chunk/prop/flower/flower.tres" id="16_ubhkt"] [ext_resource type="Material" uid="uid://f5uoreickew7" path="res://tgcc/chunk/prop/flower/flower.tres" id="16_ubhkt"]
[ext_resource type="PackedScene" uid="uid://c7hdw2g6sbygr" path="res://tgcc/chunk/prop/tree/bambù/bambù.tscn" id="18_0ehik"]
[ext_resource type="PackedScene" uid="uid://5ap10ax3lnr7" path="res://tgcc/chunk/prop/vending machine/vending_machine_1.tscn" id="19_j41gr"]
[ext_resource type="PackedScene" uid="uid://cff8d3fy3cd6b" path="res://tgcc/chunk/prop/well/wood/well_wood.tscn" id="20_eoxu8"]
[sub_resource type="PlaneMesh" id="PlaneMesh_7tu84"] [sub_resource type="PlaneMesh" id="PlaneMesh_7tu84"]
size = Vector2(0.5, 0.5) size = Vector2(0.5, 0.5)
@@ -66,61 +69,70 @@ buffer = PackedFloat32Array(-0.57898194, -0.039031368, -0.81563324, 0.4136602, -
[sub_resource type="PlaneMesh" id="PlaneMesh_2qvfo"] [sub_resource type="PlaneMesh" id="PlaneMesh_2qvfo"]
size = Vector2(1, 1) size = Vector2(1, 1)
[sub_resource type="Gradient" id="Gradient_qbybq"]
offsets = PackedFloat32Array(1, 1)
colors = PackedColorArray(0, 0, 0, 0.5882353, 0, 0, 0, 0)
[sub_resource type="GradientTexture2D" id="GradientTexture2D_mekjb"]
gradient = SubResource("Gradient_qbybq")
fill = 2
fill_from = Vector2(0.5, 0.5)
[node name="chunk_country_end_01" unique_id=913263516 instance=ExtResource("1_hoyg3")] [node name="chunk_country_end_01" unique_id=913263516 instance=ExtResource("1_hoyg3")]
script = ExtResource("2_mekjb") script = ExtResource("2_mekjb")
west = true west = true
[node name="Argini_004" parent="." index="0" unique_id=1858205185] [node name="Argini_004" parent="." index="0" unique_id=2092471339]
surface_material_override/0 = ExtResource("2_cltnj") surface_material_override/0 = ExtResource("2_cltnj")
[node name="Cart_001" parent="." index="1" unique_id=1835353896] [node name="Cart_001" parent="." index="1" unique_id=1302373818]
surface_material_override/0 = ExtResource("3_aj7xj") surface_material_override/0 = ExtResource("3_aj7xj")
surface_material_override/1 = ExtResource("4_nugyy") surface_material_override/1 = ExtResource("4_nugyy")
surface_material_override/2 = ExtResource("5_ygc8c") surface_material_override/2 = ExtResource("5_ygc8c")
[node name="Cavi_007" parent="." index="2" unique_id=994450170] [node name="Cavi_007" parent="." index="2" unique_id=891974148]
surface_material_override/0 = ExtResource("4_nugyy") surface_material_override/0 = ExtResource("4_nugyy")
surface_material_override/1 = ExtResource("4_nugyy") surface_material_override/1 = ExtResource("4_nugyy")
[node name="Cortile_002" parent="." index="3" unique_id=267016892 groups=["weather_node"]] [node name="Cortile_002" parent="." index="3" unique_id=1440977285 groups=["weather_node"]]
surface_material_override/0 = ExtResource("5_ygc8c") surface_material_override/0 = ExtResource("5_ygc8c")
[node name="Flower_005" parent="." index="4" unique_id=1549966189 groups=["weather_node", "wind_node"]] [node name="Flower_005" parent="." index="4" unique_id=1151898243 groups=["weather_node", "wind_node"]]
visible = false visible = false
[node name="FlowerG_003" parent="." index="5" unique_id=65871813 groups=["weather_node", "wind_node"]] [node name="FlowerG_003" parent="." index="5" unique_id=1421252949 groups=["weather_node", "wind_node"]]
visible = false visible = false
[node name="Grass_008" parent="." index="6" unique_id=1853173495] [node name="Grass_008" parent="." index="6" unique_id=565930716]
surface_material_override/0 = ExtResource("2_cltnj") surface_material_override/0 = ExtResource("2_cltnj")
[node name="House_M_3" parent="." index="7" unique_id=155596536 groups=["weather_node"]] [node name="House_M_3" parent="." index="7" unique_id=1248182939 groups=["weather_node"]]
[node name="House_M_3|Cube_212|Dupli|" parent="House_M_3" index="0" unique_id=1321014561] [node name="House_M_3|Cube_212|Dupli|" parent="House_M_3" index="0" unique_id=1251663089]
surface_material_override/0 = ExtResource("6_pjysl") surface_material_override/0 = ExtResource("6_pjysl")
surface_material_override/1 = ExtResource("7_0r8cm") surface_material_override/1 = ExtResource("7_0r8cm")
[node name="Lanterne_003" parent="." index="8" unique_id=595596056] [node name="Lanterne_003" parent="." index="8" unique_id=913131637]
surface_material_override/0 = ExtResource("7_0r8cm") surface_material_override/0 = ExtResource("7_0r8cm")
surface_material_override/1 = ExtResource("6_pjysl") surface_material_override/1 = ExtResource("6_pjysl")
[node name="MSH_Staccioanta_1_005" parent="." index="9" unique_id=1042751383 groups=["weather_node"]] [node name="MSH_Staccioanta_1_005" parent="." index="9" unique_id=615838630]
surface_material_override/0 = ExtResource("8_hmdr4") surface_material_override/0 = ExtResource("8_hmdr4")
[node name="PaliLuci_002" parent="." index="10" unique_id=1504995410] [node name="PaliLuci_002" parent="." index="10" unique_id=1928143564]
surface_material_override/0 = ExtResource("3_aj7xj") surface_material_override/0 = ExtResource("3_aj7xj")
surface_material_override/1 = ExtResource("3_aj7xj") surface_material_override/1 = ExtResource("3_aj7xj")
[node name="Panchina_002" parent="." index="11" unique_id=876085859 groups=["weather_node"]] [node name="Panchina_002" parent="." index="11" unique_id=1561611835 groups=["weather_node"]]
surface_material_override/0 = ExtResource("8_hmdr4") surface_material_override/0 = ExtResource("8_hmdr4")
[node name="Strada_006" parent="." index="12" unique_id=76888486 groups=["weather_node"]] [node name="Strada_006" parent="." index="12" unique_id=1433458432 groups=["weather_node"]]
surface_material_override/0 = ExtResource("5_ygc8c") surface_material_override/0 = ExtResource("5_ygc8c")
[node name="Water_005" parent="." index="13" unique_id=425747200] [node name="Water_005" parent="." index="13" unique_id=689760906]
surface_material_override/0 = ExtResource("9_mekjb") surface_material_override/0 = ExtResource("9_mekjb")
[node name="WoodPile_003" parent="." index="14" unique_id=1314797412 groups=["weather_node"]] [node name="WoodPile_003" parent="." index="14" unique_id=363736169 groups=["weather_node"]]
surface_material_override/0 = ExtResource("3_aj7xj") surface_material_override/0 = ExtResource("3_aj7xj")
surface_material_override/1 = ExtResource("10_0ehik") surface_material_override/1 = ExtResource("10_0ehik")
surface_material_override/2 = ExtResource("4_nugyy") surface_material_override/2 = ExtResource("4_nugyy")
@@ -537,3 +549,213 @@ transform = Transform3D(1, 0, 0, 0, -4.371139e-08, -1, 0, 1, -4.371139e-08, 51.4
cast_shadow = 0 cast_shadow = 0
mesh = SubResource("PlaneMesh_2qvfo") mesh = SubResource("PlaneMesh_2qvfo")
surface_material_override/0 = ExtResource("13_0ehik") surface_material_override/0 = ExtResource("13_0ehik")
[node name="shadow" type="Node3D" parent="." index="18" unique_id=928263077]
[node name="Decal3" type="Decal" parent="shadow" index="0" unique_id=1295361737]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -5.73047, 0.118, 5.7403393)
size = Vector3(8.417166, 0.5, 8.460018)
texture_albedo = SubResource("GradientTexture2D_mekjb")
[node name="light" type="Node3D" parent="." index="19" unique_id=1126111386]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -17.076332, 0, 0)
[node name="OmniLight3D16" type="OmniLight3D" parent="light" index="0" unique_id=1500547968]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 9.468554, 3.054298, -1.8575647)
light_color = Color(0.9372549, 0.49411765, 0.14509805, 1)
light_energy = 0.5
light_indirect_energy = 0.0
light_volumetric_fog_energy = 0.0
light_specular = 0.0
light_bake_mode = 1
shadow_enabled = true
shadow_opacity = 0.96
omni_range = 10.0
omni_attenuation = 2.0
[node name="OmniLight3D18" type="OmniLight3D" parent="light" index="1" unique_id=1160050588]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 13.137161, 3.054298, -1.8575647)
light_color = Color(0.9372549, 0.49411765, 0.14509805, 1)
light_energy = 0.5
light_indirect_energy = 0.0
light_volumetric_fog_energy = 0.0
light_specular = 0.0
light_bake_mode = 1
shadow_enabled = true
shadow_opacity = 0.96
omni_range = 10.0
omni_attenuation = 2.0
[node name="OmniLight3D24" type="OmniLight3D" parent="light" index="2" unique_id=2034038958]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 9.468554, 3.054298, -9.629128)
light_color = Color(0.9372549, 0.49411765, 0.14509805, 1)
light_energy = 0.5
light_indirect_energy = 0.0
light_volumetric_fog_energy = 0.0
light_specular = 0.0
light_bake_mode = 1
shadow_enabled = true
shadow_opacity = 0.96
omni_range = 10.0
omni_attenuation = 2.0
[node name="OmniLight3D25" type="OmniLight3D" parent="light" index="3" unique_id=1194713704]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 13.137161, 3.054298, -9.629128)
light_color = Color(0.9372549, 0.49411765, 0.14509805, 1)
light_energy = 0.5
light_indirect_energy = 0.0
light_volumetric_fog_energy = 0.0
light_specular = 0.0
light_bake_mode = 1
shadow_enabled = true
shadow_opacity = 0.96
omni_range = 10.0
omni_attenuation = 2.0
[node name="OmniLight3D27" type="OmniLight3D" parent="light" index="4" unique_id=2097725369]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 18.758806, 3.054298, -7.491688)
light_color = Color(0.9372549, 0.49411765, 0.14509805, 1)
light_energy = 0.5
light_indirect_energy = 0.0
light_volumetric_fog_energy = 0.0
light_specular = 0.0
light_bake_mode = 1
shadow_enabled = true
shadow_opacity = 0.96
omni_range = 10.0
omni_attenuation = 2.0
[node name="OmniLight3D17" type="OmniLight3D" parent="light" index="5" unique_id=1485814233]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10.340023, 1.5362331, 8.849056)
light_color = Color(0.9372549, 0.49411765, 0.14509805, 1)
light_energy = 0.5
light_indirect_energy = 0.0
light_volumetric_fog_energy = 0.0
light_specular = 0.0
light_bake_mode = 1
shadow_enabled = true
shadow_opacity = 0.96
omni_attenuation = 2.0
[node name="OmniLight3D19" type="OmniLight3D" parent="light" index="6" unique_id=1840060013]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 12.33099, 1.5362331, 8.849056)
light_color = Color(0.9372549, 0.49411765, 0.14509805, 1)
light_energy = 0.5
light_indirect_energy = 0.0
light_volumetric_fog_energy = 0.0
light_specular = 0.0
light_bake_mode = 1
shadow_enabled = true
shadow_opacity = 0.96
omni_attenuation = 2.0
[node name="OmniLight3D20" type="OmniLight3D" parent="light" index="7" unique_id=600999676]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10.283699, 1.5362331, 2.532782)
light_color = Color(0.9372549, 0.49411765, 0.14509805, 1)
light_energy = 0.5
light_indirect_energy = 0.0
light_volumetric_fog_energy = 0.0
light_specular = 0.0
light_bake_mode = 1
shadow_enabled = true
shadow_opacity = 0.96
omni_attenuation = 2.0
[node name="OmniLight3D22" type="OmniLight3D" parent="light" index="8" unique_id=97153208]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 8.165903, 1.6695246, 6.7571626)
light_color = Color(0.9372549, 0.49411765, 0.14509805, 1)
light_energy = 0.5
light_indirect_energy = 0.0
light_volumetric_fog_energy = 0.0
light_specular = 0.0
light_bake_mode = 1
shadow_enabled = true
shadow_opacity = 0.96
omni_attenuation = 2.0
[node name="OmniLight3D23" type="OmniLight3D" parent="light" index="9" unique_id=751447703]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 14.528693, 1.6695246, 6.7571626)
light_color = Color(0.9372549, 0.49411765, 0.14509805, 1)
light_energy = 0.5
light_indirect_energy = 0.0
light_volumetric_fog_energy = 0.0
light_specular = 0.0
light_bake_mode = 1
shadow_enabled = true
shadow_opacity = 0.96
omni_attenuation = 2.0
[node name="OmniLight3D21" type="OmniLight3D" parent="light" index="10" unique_id=2130298413]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 12.274666, 1.5362331, 2.532782)
light_color = Color(0.9372549, 0.49411765, 0.14509805, 1)
light_energy = 0.5
light_indirect_energy = 0.0
light_volumetric_fog_energy = 0.0
light_specular = 0.0
light_bake_mode = 1
shadow_enabled = true
shadow_opacity = 0.96
omni_attenuation = 2.0
[node name="Bambu" type="Node3D" parent="." index="20" unique_id=1267803823]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 40.689186, 0, 3.7492359)
[node name="Bambù15" parent="Bambu" index="0" unique_id=534355155 instance=ExtResource("18_0ehik")]
transform = Transform3D(0.99893546, 0.04613013, 0, -0.046085197, 0.9979625, 0.044125047, 0.002035494, -0.044078074, 0.999026, -41.930557, 0, 4.164069)
[node name="Bambù16" parent="Bambu" index="1" unique_id=1402891721 instance=ExtResource("18_0ehik")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, -41.930557, -0.2565055, 5.033106)
[node name="Bambù21" parent="Bambu" index="2" unique_id=1399559108 instance=ExtResource("18_0ehik")]
transform = Transform3D(1, 0, 0, 0, 0.9999092, 0.013473534, 0, -0.013473534, 0.9999092, -41.930557, 0, 5.876071)
[node name="Bambù22" parent="Bambu" index="3" unique_id=367054278 instance=ExtResource("18_0ehik")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, -41.930557, -0.3562231, 2.3469117)
[node name="Bambù23" parent="Bambu" index="4" unique_id=1748533049 instance=ExtResource("18_0ehik")]
transform = Transform3D(1, 0, 0, 0, 0.9999092, 0.013473534, 0, -0.013473534, 0.9999092, -41.930557, 0, 3.1898768)
[node name="Bambù24" parent="Bambu" index="5" unique_id=432872406 instance=ExtResource("18_0ehik")]
transform = Transform3D(0.99893546, 0.04613013, 0, -0.046085197, 0.9979625, 0.044125047, 0.002035494, -0.044078074, 0.999026, -41.609615, 4.7683716e-07, 2.511758)
[node name="Bambù25" parent="Bambu" index="6" unique_id=1999493993 instance=ExtResource("18_0ehik")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, -41.609615, 4.7683716e-07, 3.3807948)
[node name="Bambù41" parent="Bambu" index="7" unique_id=791666402 instance=ExtResource("18_0ehik")]
transform = Transform3D(1, 0, 0, 0, 0.9999092, 0.013473534, 0, -0.013473534, 0.9999092, -41.609615, -0.2763033, 4.2237597)
[node name="Bambù42" parent="Bambu" index="8" unique_id=331110478 instance=ExtResource("18_0ehik")]
transform = Transform3D(0.99893546, 0.04613013, 0, -0.046085197, 0.9979625, 0.044125047, 0.002035494, -0.044078074, 0.999026, -41.609615, 4.7683716e-07, 3.511758)
[node name="Bambù43" parent="Bambu" index="9" unique_id=634436332 instance=ExtResource("18_0ehik")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, -41.609615, 0.26429868, 4.3807936)
[node name="Bambù44" parent="Bambu" index="10" unique_id=999189637 instance=ExtResource("18_0ehik")]
transform = Transform3D(1, 0, 0, 0, 0.9999092, 0.013473534, 0, -0.013473534, 0.9999092, -41.609615, 4.7683716e-07, 5.2237597)
[node name="Bambù45" parent="Bambu" index="11" unique_id=1115334506 instance=ExtResource("18_0ehik")]
transform = Transform3D(-0.6353606, 0.043886177, -0.77096754, 0.10135725, 0.99448574, -0.026919715, 0.76553476, -0.09524688, -0.6363053, -40.778637, -0.42294633, 6.1322727)
[node name="Bambù46" parent="Bambu" index="12" unique_id=1777367086 instance=ExtResource("18_0ehik")]
transform = Transform3D(-0.20654383, -0.019007795, -0.9782527, -0.09164066, 0.99579215, 0, 0.97413635, 0.089647725, -0.20741661, -39.501293, 0, 5.687169)
[node name="Bambù47" parent="Bambu" index="13" unique_id=2088614993 instance=ExtResource("18_0ehik")]
transform = Transform3D(-0.20615207, -0.022868663, -0.9782527, -0.110254735, 0.99390334, 0, 0.9722886, 0.107857, -0.20741661, -40.35143, 0.32301903, 5.506916)
[node name="Bambù48" parent="Bambu" index="14" unique_id=70287242 instance=ExtResource("18_0ehik")]
transform = Transform3D(0.88067085, -0.10227825, -0.46255592, 0.10135726, 0.9944858, -0.026919719, 0.46275857, -0.023175985, 0.88618135, -37.92891, -0.42294633, 6.0497293)
[node name="Bambù49" parent="Bambu" index="15" unique_id=194277700 instance=ExtResource("18_0ehik")]
transform = Transform3D(0.99579215, 0.09164066, 0, -0.09164066, 0.99579215, 0, 0, 0, 1, -38.629272, 0, 4.8924837)
[node name="Bambù50" parent="Bambu" index="16" unique_id=1800416036 instance=ExtResource("18_0ehik")]
transform = Transform3D(0.99390334, 0.110254735, 0, -0.110254735, 0.99390334, 0, 0, 0, 1, -38.629272, 0.32301903, 5.7615194)
[node name="VendingMachine_1" parent="." index="21" unique_id=1157270784 instance=ExtResource("19_j41gr")]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 1.6880364, 0, -1.0264239)
[node name="VendingMachine_2" parent="." index="22" unique_id=100646015 instance=ExtResource("19_j41gr")]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 1.6880364, 0, 0.12624216)
[node name="well_wood" parent="." index="23" unique_id=2128929413 instance=ExtResource("20_eoxu8")]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, -3.5676882, 0, -3.665926)

View File

@@ -12,6 +12,9 @@
[ext_resource type="Material" uid="uid://0x17mj2v807r" path="res://tgcc/chunk/prop/grass/grass_chunk_weeds2.tres" id="9_15guu"] [ext_resource type="Material" uid="uid://0x17mj2v807r" path="res://tgcc/chunk/prop/grass/grass_chunk_weeds2.tres" id="9_15guu"]
[ext_resource type="Material" uid="uid://baot4vy3fqrdw" path="res://tgcc/chunk/prop/flower/bush.tres" id="10_qv1gu"] [ext_resource type="Material" uid="uid://baot4vy3fqrdw" path="res://tgcc/chunk/prop/flower/bush.tres" id="10_qv1gu"]
[ext_resource type="Material" uid="uid://f5uoreickew7" path="res://tgcc/chunk/prop/flower/flower.tres" id="11_7l6eg"] [ext_resource type="Material" uid="uid://f5uoreickew7" path="res://tgcc/chunk/prop/flower/flower.tres" id="11_7l6eg"]
[ext_resource type="PackedScene" uid="uid://c7hdw2g6sbygr" path="res://tgcc/chunk/prop/tree/bambù/bambù.tscn" id="13_i5qpy"]
[ext_resource type="PackedScene" uid="uid://bgb4pfflokl5s" path="res://tgcc/chunk/prop/pylon/pylon.tscn" id="14_15guu"]
[ext_resource type="PackedScene" uid="uid://l3inky72a783" path="res://tgcc/chunk/prop/well/stone/well_stone.tscn" id="15_qv1gu"]
[sub_resource type="PlaneMesh" id="PlaneMesh_xdgj3"] [sub_resource type="PlaneMesh" id="PlaneMesh_xdgj3"]
size = Vector2(0.5, 0.5) size = Vector2(0.5, 0.5)
@@ -58,30 +61,33 @@ size = Vector2(1, 1)
[sub_resource type="PlaneMesh" id="PlaneMesh_dmw3x"] [sub_resource type="PlaneMesh" id="PlaneMesh_dmw3x"]
size = Vector2(1, 1) size = Vector2(1, 1)
[node name="chunk_country_end_02" unique_id=1712924087 instance=ExtResource("1_k5c0x")] [node name="chunk_country_end_02" unique_id=1712924087 node_paths=PackedStringArray("connection_left", "connection_right") instance=ExtResource("1_k5c0x")]
script = ExtResource("2_dmw3x") script = ExtResource("2_dmw3x")
west = true west = true
have_lamppost = true
connection_left = [NodePath("PaloLuce/sx")]
connection_right = [NodePath("PaloLuce/dx")]
[node name="Argini_007" parent="." index="0" unique_id=942724962] [node name="Argini_007" parent="." index="0" unique_id=177965672]
surface_material_override/0 = ExtResource("2_25r6y") surface_material_override/0 = ExtResource("2_25r6y")
surface_material_override/1 = ExtResource("2_25r6y") surface_material_override/1 = ExtResource("2_25r6y")
[node name="Chunk_012" parent="." index="1" unique_id=1078763244] [node name="Chunk_012" parent="." index="1" unique_id=1129018249]
surface_material_override/0 = ExtResource("2_25r6y") surface_material_override/0 = ExtResource("2_25r6y")
[node name="Chunk_041" parent="." index="2" unique_id=632981721 groups=["weather_node"]] [node name="Chunk_041" parent="." index="2" unique_id=801339042 groups=["weather_node"]]
surface_material_override/0 = ExtResource("3_gelvl") surface_material_override/0 = ExtResource("3_gelvl")
[node name="Flower_006" parent="." index="3" unique_id=909770430 groups=["weather_node", "wind_node"]] [node name="Flower_006" parent="." index="3" unique_id=1662862427 groups=["weather_node", "wind_node"]]
visible = false visible = false
[node name="FlowerG_004" parent="." index="4" unique_id=381594965 groups=["weather_node", "wind_node"]] [node name="FlowerG_004" parent="." index="4" unique_id=346905577 groups=["weather_node", "wind_node"]]
visible = false visible = false
[node name="MSH_Staccioanta_1_006" parent="." index="5" unique_id=337379290] [node name="MSH_Staccioanta_1_006" parent="." index="5" unique_id=2035111258]
surface_material_override/0 = ExtResource("4_t26nr") surface_material_override/0 = ExtResource("4_t26nr")
[node name="Water_008" parent="." index="6" unique_id=2127881508] [node name="Water_008" parent="." index="6" unique_id=189541301]
surface_material_override/0 = ExtResource("5_5xj2s") surface_material_override/0 = ExtResource("5_5xj2s")
surface_material_override/1 = ExtResource("5_5xj2s") surface_material_override/1 = ExtResource("5_5xj2s")
@@ -689,3 +695,98 @@ transform = Transform3D(1, 0, 0, 0, -4.371139e-08, -1, 0, 1, -4.371139e-08, 16.8
cast_shadow = 0 cast_shadow = 0
mesh = SubResource("PlaneMesh_dmw3x") mesh = SubResource("PlaneMesh_dmw3x")
surface_material_override/0 = ExtResource("8_i5qpy") surface_material_override/0 = ExtResource("8_i5qpy")
[node name="Bambu" type="Node3D" parent="." index="10" unique_id=1288418220]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 25.91278, 0, 0)
[node name="Bambù" parent="Bambu" index="0" unique_id=514636059 instance=ExtResource("13_i5qpy")]
transform = Transform3D(0.99893546, 0.04613013, 0, -0.046085197, 0.9979625, 0.044125047, 0.002035494, -0.044078074, 0.999026, -24.729073, 0, -3.7419598)
[node name="Bambù2" parent="Bambu" index="1" unique_id=471574480 instance=ExtResource("13_i5qpy")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, -24.729073, -0.2565055, -2.8729231)
[node name="Bambù3" parent="Bambu" index="2" unique_id=692280954 instance=ExtResource("13_i5qpy")]
transform = Transform3D(1, 0, 0, 0, 0.9999092, 0.013473534, 0, -0.013473534, 0.9999092, -24.729073, 0, -2.0299575)
[node name="Bambù6" parent="Bambu" index="3" unique_id=871887186 instance=ExtResource("13_i5qpy")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, -24.729073, -0.3562231, -5.5591173)
[node name="Bambù7" parent="Bambu" index="4" unique_id=768813669 instance=ExtResource("13_i5qpy")]
transform = Transform3D(1, 0, 0, 0, 0.9999092, 0.013473534, 0, -0.013473534, 0.9999092, -24.729073, 0, -4.716152)
[node name="Bambù8" parent="Bambu" index="5" unique_id=587831506 instance=ExtResource("13_i5qpy")]
transform = Transform3D(0.99893546, 0.04613013, 0, -0.046085197, 0.9979625, 0.044125047, 0.002035494, -0.044078074, 0.999026, -24.40813, 4.7683716e-07, -5.394271)
[node name="Bambù9" parent="Bambu" index="6" unique_id=403469656 instance=ExtResource("13_i5qpy")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, -24.40813, 4.7683716e-07, -4.525234)
[node name="Bambù10" parent="Bambu" index="7" unique_id=408565559 instance=ExtResource("13_i5qpy")]
transform = Transform3D(1, 0, 0, 0, 0.9999092, 0.013473534, 0, -0.013473534, 0.9999092, -24.40813, -0.2763033, -3.6822689)
[node name="Bambù11" parent="Bambu" index="8" unique_id=1315065088 instance=ExtResource("13_i5qpy")]
transform = Transform3D(0.99893546, 0.04613013, 0, -0.046085197, 0.9979625, 0.044125047, 0.002035494, -0.044078074, 0.999026, -24.40813, 4.7683716e-07, -4.394271)
[node name="Bambù12" parent="Bambu" index="9" unique_id=1431647885 instance=ExtResource("13_i5qpy")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, -24.40813, 0.26429868, -3.5252345)
[node name="Bambù17" parent="Bambu" index="10" unique_id=1783933868 instance=ExtResource("13_i5qpy")]
transform = Transform3D(1, 0, 0, 0, 0.9999092, 0.013473534, 0, -0.013473534, 0.9999092, -24.40813, 4.7683716e-07, -2.6822689)
[node name="Bambù15" parent="Bambu" index="11" unique_id=890309980 instance=ExtResource("13_i5qpy")]
transform = Transform3D(0.99893546, 0.04613013, 0, -0.046085197, 0.9979625, 0.044125047, 0.002035494, -0.044078074, 0.999026, -24.729073, 0, 3.538574)
[node name="Bambù16" parent="Bambu" index="12" unique_id=614098157 instance=ExtResource("13_i5qpy")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, -24.729073, -0.2565055, 4.407611)
[node name="Bambù21" parent="Bambu" index="13" unique_id=153704709 instance=ExtResource("13_i5qpy")]
transform = Transform3D(1, 0, 0, 0, 0.9999092, 0.013473534, 0, -0.013473534, 0.9999092, -24.729073, 0, 5.250576)
[node name="Bambù22" parent="Bambu" index="14" unique_id=746959550 instance=ExtResource("13_i5qpy")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, -24.729073, -0.3562231, 1.7214165)
[node name="Bambù23" parent="Bambu" index="15" unique_id=1511191311 instance=ExtResource("13_i5qpy")]
transform = Transform3D(1, 0, 0, 0, 0.9999092, 0.013473534, 0, -0.013473534, 0.9999092, -24.729073, 0, 2.5643816)
[node name="Bambù24" parent="Bambu" index="16" unique_id=973076067 instance=ExtResource("13_i5qpy")]
transform = Transform3D(0.99893546, 0.04613013, 0, -0.046085197, 0.9979625, 0.044125047, 0.002035494, -0.044078074, 0.999026, -24.40813, 4.7683716e-07, 1.8862629)
[node name="Bambù25" parent="Bambu" index="17" unique_id=551326409 instance=ExtResource("13_i5qpy")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, -24.40813, 4.7683716e-07, 2.7552996)
[node name="Bambù41" parent="Bambu" index="18" unique_id=288183091 instance=ExtResource("13_i5qpy")]
transform = Transform3D(1, 0, 0, 0, 0.9999092, 0.013473534, 0, -0.013473534, 0.9999092, -24.40813, -0.2763033, 3.598265)
[node name="Bambù42" parent="Bambu" index="19" unique_id=666165992 instance=ExtResource("13_i5qpy")]
transform = Transform3D(0.99893546, 0.04613013, 0, -0.046085197, 0.9979625, 0.044125047, 0.002035494, -0.044078074, 0.999026, -24.40813, 4.7683716e-07, 2.886263)
[node name="Bambù43" parent="Bambu" index="20" unique_id=889454067 instance=ExtResource("13_i5qpy")]
transform = Transform3D(0.9961886, 0.087225296, 0, -0.087225296, 0.9961886, 0, 0, 0, 1, -24.40813, 0.26429868, 3.7552993)
[node name="Bambù44" parent="Bambu" index="21" unique_id=647105334 instance=ExtResource("13_i5qpy")]
transform = Transform3D(1, 0, 0, 0, 0.9999092, 0.013473534, 0, -0.013473534, 0.9999092, -24.40813, 4.7683716e-07, 4.5982647)
[node name="Bambù45" parent="Bambu" index="22" unique_id=2111107795 instance=ExtResource("13_i5qpy")]
transform = Transform3D(0.88067085, -0.10227825, -0.46255592, 0.10135726, 0.9944858, -0.026919719, 0.46275857, -0.023175985, 0.88618135, -16.286797, -0.42294633, 9.557026)
[node name="Bambù46" parent="Bambu" index="23" unique_id=901101839 instance=ExtResource("13_i5qpy")]
transform = Transform3D(0.99579215, 0.09164066, 0, -0.09164066, 0.99579215, 0, 0, 0, 1, -16.987162, 0, 8.39978)
[node name="Bambù47" parent="Bambu" index="24" unique_id=488480749 instance=ExtResource("13_i5qpy")]
transform = Transform3D(0.99390334, 0.110254735, 0, -0.110254735, 0.99390334, 0, 0, 0, 1, -16.987162, 0.32301903, 9.268816)
[node name="Bambù48" parent="Bambu" index="25" unique_id=334979797 instance=ExtResource("13_i5qpy")]
transform = Transform3D(0.88067085, -0.10227825, -0.46255592, 0.10135726, 0.9944858, -0.026919719, 0.46275857, -0.023175985, 0.88618135, -23.286797, -0.42294633, 9.557026)
[node name="Bambù49" parent="Bambu" index="26" unique_id=225142251 instance=ExtResource("13_i5qpy")]
transform = Transform3D(0.99579215, 0.09164066, 0, -0.09164066, 0.99579215, 0, 0, 0, 1, -23.987162, 0, 8.39978)
[node name="Bambù50" parent="Bambu" index="27" unique_id=1233888059 instance=ExtResource("13_i5qpy")]
transform = Transform3D(0.99390334, 0.110254735, 0, -0.110254735, 0.99390334, 0, 0, 0, 1, -23.987162, 0.32301903, 9.268816)
[node name="PaloLuce" parent="." index="11" unique_id=1607500596 instance=ExtResource("14_15guu")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.5209084, 0, -0.26294994)
[node name="well_stone" parent="." index="12" unique_id=2044144917 instance=ExtResource("15_qv1gu")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.16394329, 0.10199118, -7.7422237)
[editable path="PaloLuce"]

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More