Compare commits
34 Commits
394c4babd1
...
polish3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7006b2a6f0 | ||
|
|
02311f2ac5 | ||
|
|
4408e0d933 | ||
| 64a9efcbc3 | |||
| ee8d6458ed | |||
|
|
7331b71877 | ||
| fcab02469a | |||
| 0e56a84a95 | |||
|
|
4bd878d2a8 | ||
| 22877bffbe | |||
| b4a2bb6144 | |||
|
|
c2a6b991dd | ||
| 90b9739ee0 | |||
| 43556ac110 | |||
| c5232d1082 | |||
| 7ea515c824 | |||
| 4658250206 | |||
| c25e3bb4f6 | |||
|
|
c796ea289d | ||
|
|
a18dc64a4f | ||
| c52b11388a | |||
| ce8a977541 | |||
| 8ceb6cb16b | |||
| bcf854fd74 | |||
| 10b437d236 | |||
| 9c41da14a6 | |||
| 2aa7d1f7d4 | |||
| 040ded5f0b | |||
| ddec91d515 | |||
| d8efa735dd | |||
|
|
9bc7f38d07 | ||
|
|
f4c8775a45 | ||
|
|
9827b98b3e | ||
|
|
977e8012aa |
@@ -2,6 +2,7 @@ extends CharacterBody3D
|
||||
|
||||
class_name AIBase
|
||||
|
||||
@export_group("Movement")
|
||||
@export var speed: float = 4.0
|
||||
var _enable_state_machine: bool = true
|
||||
@export var enable_state_machine: bool:
|
||||
@@ -11,11 +12,17 @@ var _enable_state_machine: bool = true
|
||||
get:
|
||||
return _enable_state_machine
|
||||
|
||||
|
||||
@onready var patrol_radius_shape: CollisionShape3D = $%PatrolRadiusShape
|
||||
@onready var nav_agent: NavigationAgent3D = $%NavigationAgent3D
|
||||
@onready var state_machine: StateMachine = $%StateMachine
|
||||
|
||||
@export_group("Entities")
|
||||
enum EntityType { HUMANOID, ANIMAL }
|
||||
@export var entity_type: EntityType = EntityType.HUMANOID
|
||||
@export var entity_name: String = ""
|
||||
@export var allowed_biomes: Array[String] = []
|
||||
@export_range(0.0, 100.0, 0.1) var spawn_uniqueness: float = 1.0
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
randomize()
|
||||
|
||||
@@ -14,6 +14,7 @@ radius = 20.0
|
||||
|
||||
[node name="AiBase" type="CharacterBody3D" unique_id=1228675528]
|
||||
script = ExtResource("1_4d1nn")
|
||||
entity_name = "Humanoid"
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="." unique_id=214482161]
|
||||
mesh = SubResource("CapsuleMesh_mh3lg")
|
||||
|
||||
@@ -1,42 +1,81 @@
|
||||
extends Node3D
|
||||
|
||||
#constants about biome, pieces and entity spawn
|
||||
const CHUNK_TYPE_BIOME: int = 0
|
||||
const CHUNK_TYPE_STRAIGHT_TRACK: int = 1
|
||||
const CHUNK_TYPE_CURVED_TRACK: int = 2
|
||||
const ENTITY_TYPE_HUMANOID: int = 0
|
||||
const ENTITY_TYPE_ANIMAL: int = 1
|
||||
const ENTITY_SPAWN_ANY: int = 0
|
||||
const ENTITY_SPAWN_HUMANOID_ONLY: int = 1
|
||||
const ENTITY_SPAWN_ANIMAL_ONLY: int = 2
|
||||
|
||||
const CHUNK_GENERATION_STEPS_PER_FRAME: int = 2
|
||||
const CHUNK_CLEANUP_STEPS_PER_FRAME: int = 4
|
||||
const LAMPPOST_WIRE_STEPS_PER_FRAME: int = 1
|
||||
const RAILWAY_SCENE_DIRECTORY: String = "res://tgcc/chunk/railway/scene"
|
||||
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 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 var rail_path: Path3D
|
||||
@export var rail_path: Path3D #rail path
|
||||
@export var railway_pool: Resource
|
||||
|
||||
@export_group("Biomes")
|
||||
@export var biome_list: Array[Biome]
|
||||
@export var biome_list: Array[Biome] #list of scenes for the biome
|
||||
|
||||
@export_group("Entities")
|
||||
@export var entity_pool: Resource
|
||||
@export_range(0.0, 1.0, 0.01) var entity_spawn_probability: float = 0.6
|
||||
@export_range(0, 20, 1) var max_entities_per_chunk: int = 3
|
||||
|
||||
@export_group("Grid and Area")
|
||||
@export var chunk_size: float = 20.0
|
||||
@export var eye_line: int = 3
|
||||
@export var district_scale: float = 0.05
|
||||
@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 #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 #noise value to distribuite biome; low values create large area, high values create biome with more variants
|
||||
|
||||
@export_group("Lamppost")
|
||||
@export var lamppost_wire_material: ShaderMaterial
|
||||
@export_range(0.01, 1.0) var wire_thickness: float = 0.05
|
||||
@export var lamppost_dist_factor: int = 10
|
||||
@export var lamppost_dist_factor: int = 10 #max distance of connections
|
||||
|
||||
var board: Dictionary = {}
|
||||
var last_pos_train: Vector2i = Vector2i(999999, 999999)
|
||||
var noise_generator: FastNoiseLite
|
||||
var altitude_generator: FastNoiseLite
|
||||
var wire_connections: Dictionary = {}
|
||||
var chunk_candidate_cache: Dictionary = {}
|
||||
var chunk_candidate_cache: Dictionary = {} #node cache (metadata)
|
||||
var prop_candidate_cache: Dictionary = {}
|
||||
var entity_candidate_cache: Dictionary = {}
|
||||
var pending_generation_cells: Array[Vector2i] = []
|
||||
var pending_cleanup_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_radar_update: bool = false
|
||||
var rail_chunk_catalogue: Dictionary = {}
|
||||
var rail_chunk_catalogue: Dictionary = {} #rails chunk list
|
||||
|
||||
var manual_biome: Biome = null
|
||||
|
||||
@@ -45,7 +84,8 @@ func _ready() -> void:
|
||||
|
||||
#connect events
|
||||
UIEvents.update_rail_chunks.connect(_update_rail_chunks)
|
||||
|
||||
|
||||
#noise generator for biome and altitute
|
||||
noise_generator = FastNoiseLite.new()
|
||||
noise_generator.noise_type = FastNoiseLite.TYPE_PERLIN
|
||||
noise_generator.seed = randi()
|
||||
@@ -56,8 +96,11 @@ func _ready() -> void:
|
||||
altitude_generator.seed = randi()
|
||||
altitude_generator.frequency = district_scale * 0.5
|
||||
|
||||
#fill cache with available chunk
|
||||
_warm_chunk_candidate_cache()
|
||||
_warm_entity_candidate_cache()
|
||||
_warm_rail_chunk_catalogue()
|
||||
#set unique pieces
|
||||
_update_set_pieces()
|
||||
|
||||
func _update_set_pieces() -> void:
|
||||
@@ -72,7 +115,7 @@ func _update_set_pieces() -> void:
|
||||
|
||||
var local_biome = ""
|
||||
if manual_biome != null:
|
||||
local_biome = manual_biome.nome
|
||||
local_biome = manual_biome.name
|
||||
else:
|
||||
var grid_x = roundi(sp.global_position.x / chunk_size)
|
||||
var grid_z = roundi(sp.global_position.z / chunk_size)
|
||||
@@ -90,6 +133,7 @@ func _update_set_pieces() -> void:
|
||||
|
||||
func _destroy_and_regenrate_world() -> void:
|
||||
_warm_chunk_candidate_cache()
|
||||
_warm_entity_candidate_cache()
|
||||
_clear_pending_world_work()
|
||||
|
||||
#Turn off old temples
|
||||
@@ -98,7 +142,7 @@ func _destroy_and_regenrate_world() -> void:
|
||||
#Destroy all models
|
||||
for pos in board.keys():
|
||||
var cella = board[pos]
|
||||
if cella["type"] != "obstacle":
|
||||
if not _is_persistent_obstacle(cella):
|
||||
if cella.has("node") and is_instance_valid(cella["node"]):
|
||||
cella["node"].queue_free()
|
||||
|
||||
@@ -112,16 +156,13 @@ func _destroy_and_regenrate_world() -> void:
|
||||
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))
|
||||
_refresh_world(current_pos)
|
||||
pending_radar_update = true
|
||||
|
||||
func _process(_delta: float) -> void:
|
||||
#based on time budgets the queues are evaluated by frame and not all together
|
||||
_drain_cleanup_queue()
|
||||
_drain_generation_queue()
|
||||
_drain_wire_queue()
|
||||
|
||||
if pending_radar_update:
|
||||
pending_radar_update = false
|
||||
|
||||
func _physics_process(_delta: float) -> void:
|
||||
if rail_path == null or rail_path.train_instance == null: return
|
||||
|
||||
@@ -133,7 +174,6 @@ func _physics_process(_delta: float) -> void:
|
||||
if current_pos != last_pos_train:
|
||||
last_pos_train = current_pos
|
||||
_refresh_world(current_pos)
|
||||
pending_radar_update = true
|
||||
|
||||
func collect_all_chunkinfo(root: Node, list: Array[Node]) -> void:
|
||||
if root == null: return
|
||||
@@ -144,6 +184,33 @@ func collect_all_chunkinfo(root: Node, list: Array[Node]) -> void:
|
||||
for child in root.get_children():
|
||||
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 collect_all_entityinfo(root: Node, list: Array[Node]) -> void:
|
||||
if root == null: return
|
||||
|
||||
if "entity_type" in root:
|
||||
list.append(root)
|
||||
|
||||
for child in root.get_children():
|
||||
collect_all_entityinfo(child, list)
|
||||
|
||||
func collect_all_entity_spawn_points(root: Node, list: Array[Node]) -> void:
|
||||
if root == null: return
|
||||
|
||||
if "allowed_type" in root or root.is_in_group("entity_spawn_point"):
|
||||
list.append(root)
|
||||
|
||||
for child in root.get_children():
|
||||
collect_all_entity_spawn_points(child, list)
|
||||
|
||||
func _warm_chunk_candidate_cache() -> void:
|
||||
var unique_scenes: Dictionary = {}
|
||||
|
||||
@@ -164,27 +231,30 @@ func _warm_chunk_candidate_cache() -> void:
|
||||
for scene in unique_scenes.values():
|
||||
_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:
|
||||
func _warm_entity_candidate_cache() -> void:
|
||||
entity_candidate_cache.clear()
|
||||
if entity_pool == null or not "available_entities" in entity_pool:
|
||||
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()
|
||||
for scene in entity_pool.available_entities:
|
||||
if scene == null:
|
||||
continue
|
||||
_get_entity_scene_metadata(scene)
|
||||
|
||||
func _warm_rail_chunk_catalogue() -> void:
|
||||
rail_chunk_catalogue.clear()
|
||||
if railway_pool == null or not "available_railways" in railway_pool:
|
||||
return
|
||||
|
||||
for scene in railway_pool.available_railways:
|
||||
if scene == null:
|
||||
continue
|
||||
|
||||
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)
|
||||
|
||||
func _get_chunk_scene_cache_key(scene: PackedScene) -> String:
|
||||
if scene == null:
|
||||
@@ -226,6 +296,7 @@ func _get_chunk_scene_metadata(scene: PackedScene) -> Dictionary:
|
||||
"info_path": info_path,
|
||||
"rotations": rotations,
|
||||
"has_lamppost": "have_lamppost" in info_node and info_node.have_lamppost,
|
||||
"uniqueness": _get_chunk_uniqueness_from_info(info_node),
|
||||
}
|
||||
preview_chunk.queue_free()
|
||||
chunk_candidate_cache[key] = metadata
|
||||
@@ -259,8 +330,10 @@ func _clear_pending_world_work() -> void:
|
||||
pending_generation_cells.clear()
|
||||
pending_cleanup_cells.clear()
|
||||
pending_wire_cells.clear()
|
||||
pending_generation_cursor = 0
|
||||
pending_cleanup_cursor = 0
|
||||
pending_wire_cursor = 0
|
||||
pending_wire_lookup.clear()
|
||||
pending_radar_update = false
|
||||
|
||||
func _collect_replaceable_rail_chunks(root: Node, result: Array[Node3D]) -> void:
|
||||
if root == null:
|
||||
@@ -268,7 +341,7 @@ func _collect_replaceable_rail_chunks(root: Node, result: Array[Node3D]) -> void
|
||||
|
||||
if root is Node3D:
|
||||
var node_3d := root as Node3D
|
||||
if node_3d.scene_file_path.begins_with(RAILWAY_SCENE_DIRECTORY):
|
||||
if _is_railway_scene_registered(node_3d.scene_file_path):
|
||||
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
|
||||
@@ -281,6 +354,17 @@ func _collect_replaceable_rail_chunks(root: Node, result: Array[Node3D]) -> void
|
||||
for child in root.get_children():
|
||||
_collect_replaceable_rail_chunks(child, result)
|
||||
|
||||
func _is_railway_scene_registered(scene_path: String) -> bool:
|
||||
if scene_path == "":
|
||||
return false
|
||||
|
||||
for candidates in rail_chunk_catalogue.values():
|
||||
for candidate in candidates:
|
||||
var scene := candidate as PackedScene
|
||||
if scene != null and scene.resource_path == scene_path:
|
||||
return true
|
||||
return false
|
||||
|
||||
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():
|
||||
@@ -327,6 +411,8 @@ func _replace_rail_chunk_instance(chunk_root: Node3D) -> bool:
|
||||
chunk_root.queue_free()
|
||||
return true
|
||||
|
||||
#rebuild the scene catalogue from railway_pool,
|
||||
#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()
|
||||
@@ -354,8 +440,12 @@ func _refresh_world(center: Vector2i) -> void:
|
||||
_rebuild_generation_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:
|
||||
pending_generation_cells.clear()
|
||||
pending_generation_cursor = 0
|
||||
|
||||
for radius in range(eye_line + 1):
|
||||
for x in range(-radius, radius + 1):
|
||||
@@ -368,13 +458,17 @@ func _rebuild_generation_queue(center: Vector2i) -> void:
|
||||
continue
|
||||
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:
|
||||
pending_cleanup_cells.clear()
|
||||
pending_cleanup_cursor = 0
|
||||
var safe_margin = 2
|
||||
|
||||
for grid_pos in board.keys():
|
||||
var cell = board[grid_pos]
|
||||
if cell["type"] == "obstacle":
|
||||
if _is_persistent_obstacle(cell):
|
||||
continue
|
||||
|
||||
var dist_x = abs(grid_pos.x - center.x)
|
||||
@@ -382,10 +476,16 @@ func _rebuild_cleanup_queue(center: Vector2i) -> void:
|
||||
if dist_x > eye_line + safe_margin or dist_z > eye_line + safe_margin:
|
||||
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:
|
||||
var processed = 0
|
||||
while processed < CHUNK_GENERATION_STEPS_PER_FRAME and not pending_generation_cells.is_empty():
|
||||
var grid_pos = pending_generation_cells.pop_front()
|
||||
var processed: int = 0
|
||||
var start_usec: int = Time.get_ticks_usec()
|
||||
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):
|
||||
continue
|
||||
|
||||
@@ -394,15 +494,21 @@ func _drain_generation_queue() -> void:
|
||||
_add_compatible_biome(grid_pos)
|
||||
processed += 1
|
||||
|
||||
if pending_generation_cursor >= pending_generation_cells.size():
|
||||
pending_generation_cells.clear()
|
||||
pending_generation_cursor = 0
|
||||
|
||||
func _drain_cleanup_queue() -> void:
|
||||
var processed = 0
|
||||
while processed < CHUNK_CLEANUP_STEPS_PER_FRAME and not pending_cleanup_cells.is_empty():
|
||||
var grid_pos = pending_cleanup_cells.pop_front()
|
||||
var processed: int = 0
|
||||
var start_usec: int = Time.get_ticks_usec()
|
||||
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):
|
||||
continue
|
||||
|
||||
var cell = board[grid_pos]
|
||||
if cell["type"] == "obstacle":
|
||||
if _is_persistent_obstacle(cell):
|
||||
continue
|
||||
|
||||
if cell.has("node") and is_instance_valid(cell["node"]):
|
||||
@@ -410,6 +516,10 @@ func _drain_cleanup_queue() -> void:
|
||||
board.erase(grid_pos)
|
||||
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:
|
||||
if pending_wire_lookup.has(grid_pos):
|
||||
return
|
||||
@@ -417,9 +527,11 @@ func _queue_lamppost_wire_connection(grid_pos: Vector2i) -> void:
|
||||
pending_wire_cells.append(grid_pos)
|
||||
|
||||
func _drain_wire_queue() -> void:
|
||||
var processed = 0
|
||||
while processed < LAMPPOST_WIRE_STEPS_PER_FRAME and not pending_wire_cells.is_empty():
|
||||
var grid_pos = pending_wire_cells.pop_front()
|
||||
var processed: int = 0
|
||||
var start_usec: int = Time.get_ticks_usec()
|
||||
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)
|
||||
|
||||
if not board.has(grid_pos):
|
||||
@@ -430,6 +542,10 @@ func _drain_wire_queue() -> void:
|
||||
_connect_lamppost_wires(grid_pos)
|
||||
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:
|
||||
for x in range(-eye_line, eye_line + 1):
|
||||
for z in range(-eye_line, eye_line + 1):
|
||||
@@ -440,6 +556,8 @@ func _generate_pieces_around_train(center: Vector2i) -> void:
|
||||
if not ce_obstacle:
|
||||
_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]:
|
||||
if manual_biome != null:
|
||||
return manual_biome.available_chunks
|
||||
@@ -449,6 +567,13 @@ func _choose_catalogue_by_cell(grid_pos: Vector2i) -> Array[PackedScene]:
|
||||
var indice = clamp(int(normalized_value * biome_list.size()), 0, biome_list.size() - 1)
|
||||
return biome_list[indice].available_chunks
|
||||
|
||||
func _choose_biome_name_by_cell(grid_pos: Vector2i) -> String:
|
||||
if manual_biome != null:
|
||||
return manual_biome.name
|
||||
|
||||
var value = noise_generator.get_noise_2d(grid_pos.x, grid_pos.y)
|
||||
return _get_procedural_biome_name(value)
|
||||
|
||||
func _get_procedural_biome_name(value: float) -> String:
|
||||
if manual_biome != null:
|
||||
return manual_biome.name
|
||||
@@ -457,6 +582,262 @@ func _get_procedural_biome_name(value: float) -> String:
|
||||
var index = clamp(int(normalized_value * biome_list.size()), 0, biome_list.size() - 1)
|
||||
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_entity_scene_cache_key(scene: PackedScene) -> String:
|
||||
if scene == null:
|
||||
return ""
|
||||
if scene.resource_path != "":
|
||||
return scene.resource_path
|
||||
return "entity_scene_%s" % scene.get_instance_id()
|
||||
|
||||
func _get_entity_scene_metadata(scene: PackedScene) -> Dictionary:
|
||||
if scene == null:
|
||||
return {}
|
||||
|
||||
var key = _get_entity_scene_cache_key(scene)
|
||||
if entity_candidate_cache.has(key):
|
||||
return entity_candidate_cache[key]
|
||||
|
||||
var preview_entity = scene.instantiate()
|
||||
var entity_info_list: Array[Node] = []
|
||||
collect_all_entityinfo(preview_entity, entity_info_list)
|
||||
var info_node = entity_info_list[0] if entity_info_list.size() > 0 else null
|
||||
|
||||
if info_node == null:
|
||||
preview_entity.queue_free()
|
||||
entity_candidate_cache[key] = {}
|
||||
return {}
|
||||
|
||||
var metadata = {
|
||||
"type": info_node.entity_type,
|
||||
"name": info_node.entity_name if "entity_name" in info_node else "",
|
||||
"allowed_biomes": info_node.allowed_biomes.duplicate() if "allowed_biomes" in info_node else [],
|
||||
"weight": maxf(info_node.spawn_uniqueness if "spawn_uniqueness" in info_node else 1.0, 0.0001)
|
||||
}
|
||||
preview_entity.queue_free()
|
||||
entity_candidate_cache[key] = metadata
|
||||
return metadata
|
||||
|
||||
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
|
||||
|
||||
func _spawn_entities_for_chunk(root: Node, biome_name: String) -> void:
|
||||
if entity_pool == null or not "available_entities" in entity_pool:
|
||||
return
|
||||
if entity_pool.available_entities.is_empty():
|
||||
return
|
||||
if entity_spawn_probability <= 0.0 or max_entities_per_chunk <= 0:
|
||||
return
|
||||
if entity_candidate_cache.is_empty():
|
||||
_warm_entity_candidate_cache()
|
||||
|
||||
var spawn_points: Array[Node] = []
|
||||
collect_all_entity_spawn_points(root, spawn_points)
|
||||
if spawn_points.is_empty():
|
||||
return
|
||||
|
||||
spawn_points.shuffle()
|
||||
var spawned_count: int = 0
|
||||
for spawn_point in spawn_points:
|
||||
if spawned_count >= max_entities_per_chunk:
|
||||
break
|
||||
|
||||
var point_node = spawn_point as Node3D
|
||||
if point_node == null:
|
||||
continue
|
||||
|
||||
var spawn_chance = entity_spawn_probability
|
||||
if "spawn_chance" in spawn_point:
|
||||
spawn_chance *= spawn_point.spawn_chance
|
||||
if randf() > spawn_chance:
|
||||
continue
|
||||
|
||||
var entity_scene = _pick_compatible_entity(biome_name, _get_spawn_point_type_filter(spawn_point))
|
||||
if entity_scene == null:
|
||||
continue
|
||||
|
||||
var entity_instance = entity_scene.instantiate()
|
||||
var entity_node = entity_instance as Node3D
|
||||
if entity_node == null:
|
||||
entity_instance.queue_free()
|
||||
continue
|
||||
|
||||
root.add_child(entity_node)
|
||||
entity_node.global_transform = point_node.global_transform
|
||||
if "random_y_rotation" in spawn_point and spawn_point.random_y_rotation:
|
||||
entity_node.rotate_y(randf() * TAU)
|
||||
spawned_count += 1
|
||||
|
||||
func _get_spawn_point_type_filter(spawn_point: Node) -> int:
|
||||
if "allowed_type" in spawn_point:
|
||||
match spawn_point.allowed_type:
|
||||
ENTITY_SPAWN_HUMANOID_ONLY:
|
||||
return ENTITY_TYPE_HUMANOID
|
||||
ENTITY_SPAWN_ANIMAL_ONLY:
|
||||
return ENTITY_TYPE_ANIMAL
|
||||
return -1
|
||||
|
||||
func _pick_compatible_entity(biome_name: String, type_filter: int) -> PackedScene:
|
||||
if entity_pool == null or not "available_entities" in entity_pool:
|
||||
return null
|
||||
|
||||
var candidates = []
|
||||
for entity_scene in entity_pool.available_entities:
|
||||
if entity_scene == null:
|
||||
continue
|
||||
|
||||
var metadata = _get_entity_scene_metadata(entity_scene)
|
||||
if metadata.is_empty():
|
||||
continue
|
||||
if type_filter != -1 and int(metadata["type"]) != type_filter:
|
||||
continue
|
||||
|
||||
var allowed_biomes: Array = metadata.get("allowed_biomes", [])
|
||||
if not allowed_biomes.is_empty() and not allowed_biomes.has(biome_name):
|
||||
continue
|
||||
|
||||
candidates.append({
|
||||
"scene": entity_scene,
|
||||
"weight": float(metadata.get("weight", 1.0))
|
||||
})
|
||||
|
||||
if candidates.is_empty():
|
||||
return null
|
||||
return _pick_weighted_candidate(candidates).scene
|
||||
|
||||
#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:
|
||||
if board.has(grid_pos): return true
|
||||
|
||||
@@ -504,6 +885,7 @@ func _register_cell_with_ray(grid_pos: Vector2i) -> bool:
|
||||
var river_exit_found = {"north": false, "est": false, "south": false, "west": false}
|
||||
var height_found = {"north": 0, "est": 0, "south": 0, "west": 0}
|
||||
var have_lamppost = false
|
||||
var uniqueness = 0
|
||||
|
||||
#Get node info
|
||||
if right_info_node != null:
|
||||
@@ -517,6 +899,8 @@ func _register_cell_with_ray(grid_pos: Vector2i) -> bool:
|
||||
if "have_lamppost" in right_info_node:
|
||||
have_lamppost = right_info_node.have_lamppost
|
||||
|
||||
uniqueness = _get_chunk_uniqueness_from_info(right_info_node)
|
||||
|
||||
#Add piece to the grid
|
||||
board[grid_pos] = {
|
||||
"type": "obstacle",
|
||||
@@ -525,7 +909,9 @@ func _register_cell_with_ray(grid_pos: Vector2i) -> bool:
|
||||
"heights": height_found,
|
||||
"node": root_chunk,
|
||||
"info": right_info_node,
|
||||
"have_lamppost": have_lamppost
|
||||
"have_lamppost": have_lamppost,
|
||||
"uniqueness": uniqueness,
|
||||
"persistent": true
|
||||
}
|
||||
|
||||
if have_lamppost:
|
||||
@@ -534,6 +920,11 @@ func _register_cell_with_ray(grid_pos: Vector2i) -> bool:
|
||||
return true
|
||||
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:
|
||||
var req_conn_north = _needed_connection(grid_pos + Vector2i(0, -1), "south")
|
||||
var req_conn_est = _needed_connection(grid_pos + Vector2i(1, 0), "west")
|
||||
@@ -553,6 +944,7 @@ func _add_compatible_biome(grid_pos: Vector2i) -> void:
|
||||
var height_target = clamp(roundi((height_noise + 1.0) / 2.0), 0, 1)
|
||||
|
||||
var zone_catalogue = _choose_catalogue_by_cell(grid_pos)
|
||||
var biome_name = _choose_biome_name_by_cell(grid_pos)
|
||||
var valid_candidates = []
|
||||
|
||||
for scene in zone_catalogue:
|
||||
@@ -566,6 +958,9 @@ func _add_compatible_biome(grid_pos: Vector2i) -> void:
|
||||
var u_conn = data["connections"]
|
||||
var u_river_conn = data["river_connections"]
|
||||
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_e = (req_conn_est == -1) or ((req_conn_est == 1) == u_conn["est"])
|
||||
@@ -594,7 +989,14 @@ func _add_compatible_biome(grid_pos: Vector2i) -> void:
|
||||
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
|
||||
|
||||
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:
|
||||
var max_score = -1
|
||||
@@ -605,37 +1007,48 @@ func _add_compatible_biome(grid_pos: Vector2i) -> void:
|
||||
for c in valid_candidates:
|
||||
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()
|
||||
new_chunk.position = Vector3(grid_pos.x * chunk_size, 0, grid_pos.y * chunk_size)
|
||||
new_chunk.rotation.y = choise.rotation * (-PI / 2.0)
|
||||
add_child(new_chunk)
|
||||
_spawn_props_for_chunk(new_chunk)
|
||||
_spawn_entities_for_chunk(new_chunk, biome_name)
|
||||
|
||||
var info_new = _get_cached_chunk_info(new_chunk, choise.scene)
|
||||
|
||||
var have_lamppost = false
|
||||
if info_new != null and "have_lamppost" in info_new:
|
||||
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] = {
|
||||
"type": "bioma",
|
||||
"type": "biome",
|
||||
"exit": choise.data["connections"],
|
||||
"river_exit": choise.data["river_connections"],
|
||||
"river_flow_direction": river_flow_direction,
|
||||
"heights": choise.data["heights"],
|
||||
"node": new_chunk,
|
||||
"info": info_new,
|
||||
"have_lamppost": have_lamppost
|
||||
"have_lamppost": have_lamppost,
|
||||
"uniqueness": choise.uniqueness
|
||||
}
|
||||
|
||||
if have_lamppost:
|
||||
_queue_lamppost_wire_connection(grid_pos)
|
||||
|
||||
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)
|
||||
add_child(backup)
|
||||
_spawn_props_for_chunk(backup)
|
||||
_spawn_entities_for_chunk(backup, biome_name)
|
||||
|
||||
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 = {
|
||||
"north": req_height_north if req_height_north != -1 else height_target,
|
||||
@@ -647,12 +1060,112 @@ func _add_compatible_biome(grid_pos: Vector2i) -> void:
|
||||
"type": "biome",
|
||||
"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,
|
||||
"node": 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:
|
||||
if not board.has(near_pos):
|
||||
_register_cell_with_ray(near_pos)
|
||||
@@ -742,37 +1255,6 @@ func _connect_lamppost_wires(new_board_pos: Vector2i) -> void:
|
||||
p_sx_your_best = closest_sx[i_t]
|
||||
p_dx_your_best = closest_dx[i_t]
|
||||
|
||||
if best_closest_to_root == null:
|
||||
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 * lamppost_dist_factor
|
||||
|
||||
if best_closest_to_root != null and best_distance < max_dist:
|
||||
@@ -791,7 +1273,7 @@ func _connect_lamppost_wires(new_board_pos: Vector2i) -> void:
|
||||
if not wire_connections.has(closest_id): wire_connections[closest_id] = 0
|
||||
wire_connections[closest_id] += 1
|
||||
|
||||
#draw lamppost
|
||||
#draw lamppost wires
|
||||
func _draw_parable(p1: Vector3, p2: Vector3, parent: Node3D) -> void:
|
||||
var segments = 15
|
||||
var lowering = 1.5
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
|
||||
[ext_resource type="Script" uid="uid://ct2k25kslaxe5" path="res://core/biome_generator/biome_generator.gd" id="1_c7ilo"]
|
||||
[ext_resource type="Material" uid="uid://b8p1sjxisi522" path="res://core/biome_generator/wires.tres" id="2_w42pm"]
|
||||
[ext_resource type="Resource" path="res://core/biome_generator/railway_pool.tres" id="3_railway_pool"]
|
||||
|
||||
[node name="biome_generator" type="Node3D" unique_id=1861369341]
|
||||
script = ExtResource("1_c7ilo")
|
||||
railway_pool = ExtResource("3_railway_pool")
|
||||
lamppost_wire_material = ExtResource("2_w42pm")
|
||||
|
||||
@@ -5,6 +5,7 @@ class_name ChunkInfo
|
||||
|
||||
@export_group("Set Piece Rules (Unique pieces)")
|
||||
@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 var north: bool = false
|
||||
|
||||
9
core/biome_generator/entities_pool.tres
Normal file
9
core/biome_generator/entities_pool.tres
Normal file
@@ -0,0 +1,9 @@
|
||||
[gd_resource type="Resource" script_class="EntityPool" format=3 uid="uid://cmd6s6thq4f7r"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://clx701xdwelgx" path="res://core/ai/agents/base/ai_base.tscn" id="1_0kfj8"]
|
||||
[ext_resource type="Script" uid="uid://53ryr0fsqiq7" path="res://core/biome_generator/entity_pool.gd" id="1_vccp2"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_vccp2")
|
||||
name = "Entity Pool"
|
||||
available_entities = Array[PackedScene]([ExtResource("1_0kfj8")])
|
||||
5
core/biome_generator/entity_pool.gd
Normal file
5
core/biome_generator/entity_pool.gd
Normal file
@@ -0,0 +1,5 @@
|
||||
extends Resource
|
||||
class_name EntityPool
|
||||
|
||||
@export var name: String = "New Entity Pool"
|
||||
@export var available_entities: Array[PackedScene] = []
|
||||
1
core/biome_generator/entity_pool.gd.uid
Normal file
1
core/biome_generator/entity_pool.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://53ryr0fsqiq7
|
||||
8
core/biome_generator/entity_spawn_point.gd
Normal file
8
core/biome_generator/entity_spawn_point.gd
Normal file
@@ -0,0 +1,8 @@
|
||||
extends Marker3D
|
||||
class_name EntitySpawnPoint
|
||||
|
||||
enum AllowedType { ANY, HUMANOID_ONLY, ANIMAL_ONLY }
|
||||
|
||||
@export var allowed_type: AllowedType = AllowedType.ANY
|
||||
@export_range(0.0, 1.0, 0.01) var spawn_chance: float = 1.0
|
||||
@export var random_y_rotation: bool = true
|
||||
1
core/biome_generator/entity_spawn_point.gd.uid
Normal file
1
core/biome_generator/entity_spawn_point.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://c5ercbqy7srx3
|
||||
5
core/biome_generator/prop_info.gd
Normal file
5
core/biome_generator/prop_info.gd
Normal 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
|
||||
1
core/biome_generator/prop_info.gd.uid
Normal file
1
core/biome_generator/prop_info.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://dg6ngy4pmtsyc
|
||||
5
core/biome_generator/railway_pool.gd
Normal file
5
core/biome_generator/railway_pool.gd
Normal file
@@ -0,0 +1,5 @@
|
||||
extends Resource
|
||||
class_name RailwayPool
|
||||
|
||||
@export var name: String = "New Railway Pool"
|
||||
@export var available_railways: Array[PackedScene] = []
|
||||
1
core/biome_generator/railway_pool.gd.uid
Normal file
1
core/biome_generator/railway_pool.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://c374rv220mvh1
|
||||
16
core/biome_generator/railway_pool.tres
Normal file
16
core/biome_generator/railway_pool.tres
Normal file
@@ -0,0 +1,16 @@
|
||||
[gd_resource type="Resource" script_class="RailwayPool" format=3 uid="uid://nrm040srfjwo"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://cl2ast2tk7ifw" path="res://tgcc/chunk/railway/scene/chunk_railway_curve.tscn" id="1_86h1y"]
|
||||
[ext_resource type="PackedScene" uid="uid://85l80b6jcdhr" path="res://tgcc/chunk/railway/scene/chunk_railway_curve_2.tscn" id="2_r0882"]
|
||||
[ext_resource type="PackedScene" uid="uid://cewdxvcpqb53f" path="res://tgcc/chunk/railway/scene/chunk_railway_station_doubleside.tscn" id="3_3auto"]
|
||||
[ext_resource type="PackedScene" uid="uid://d3pcshw2bioic" path="res://tgcc/chunk/railway/scene/chunk_railway_station_oneside.tscn" id="4_i1umq"]
|
||||
[ext_resource type="PackedScene" uid="uid://bqxpqhla2kogq" path="res://tgcc/chunk/railway/scene/chunk_railway_straight.tscn" id="5_x44at"]
|
||||
[ext_resource type="PackedScene" uid="uid://c3ub6rj0tlt6q" path="res://tgcc/chunk/railway/scene/chunk_railway_straight_2.tscn" id="6_vrrkw"]
|
||||
[ext_resource type="PackedScene" uid="uid://cqevecsd1cm1v" path="res://tgcc/chunk/railway/scene/chunk_railway_straight_3.tscn" id="7_l17bw"]
|
||||
[ext_resource type="PackedScene" uid="uid://f53hfrjaxkwa" path="res://tgcc/chunk/railway/scene/chunk_railway_straight_bridge.tscn" id="8_qcl5o"]
|
||||
[ext_resource type="Script" uid="uid://c374rv220mvh1" path="res://core/biome_generator/railway_pool.gd" id="9_8tdc7"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("9_8tdc7")
|
||||
name = "Railway Pool"
|
||||
available_railways = Array[PackedScene]([ExtResource("1_86h1y"), ExtResource("2_r0882"), ExtResource("3_3auto"), ExtResource("4_i1umq"), ExtResource("5_x44at"), ExtResource("6_vrrkw"), ExtResource("7_l17bw"), ExtResource("8_qcl5o")])
|
||||
@@ -32,6 +32,7 @@ render_priority = 0
|
||||
shader = ExtResource("2_r4tfj")
|
||||
shader_parameter/use_red_as_alpha = true
|
||||
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/texture_scale = Vector2(1, 1)
|
||||
shader_parameter/edge_softness_y = 0.2
|
||||
@@ -66,12 +67,12 @@ grad_intensity_morning = 0.05
|
||||
grad_intensity_afternoon = 0.1
|
||||
grad_intensity_night = 0.5
|
||||
fog_color_morning = Color(0.7490196, 0.8509804, 0.9490196, 1)
|
||||
fog_color_afternoon = Color(0.9647059, 0.5882353, 0.7607843, 1)
|
||||
fog_color_night = Color(0.14901961, 0.101960786, 0.2509804, 1)
|
||||
fog_color_afternoon = Color(0.9823975, 0.8034449, 0.8778439, 1)
|
||||
fog_color_night = Color(0.38409987, 0.28720453, 0.5907528, 1)
|
||||
fog_density_morning = 0.01
|
||||
fog_density_afternoon = 0.02
|
||||
glow_morning = 0.4
|
||||
glow_night = 0.6
|
||||
glow_night = 0.8
|
||||
material_fog = SubResource("ShaderMaterial_b5atu")
|
||||
material_drops = SubResource("StandardMaterial3D_r4tfj")
|
||||
material_clouds = SubResource("ShaderMaterial_ruhh7")
|
||||
@@ -80,7 +81,7 @@ lightning_min = 2
|
||||
lightning_max = 4
|
||||
lightning_scale_min = 2.0
|
||||
lightning_scale_max = 5.0
|
||||
godray_max_rain = 60
|
||||
godray_max_rain = 30
|
||||
godray_spawn_radius = 100.0
|
||||
godray_spawn_offset = Vector3(20, 80, 20)
|
||||
godray_rotation_degrees = Vector3(50, 30, 0)
|
||||
@@ -261,6 +262,7 @@ shader = ExtResource("2_r4tfj")
|
||||
shader_parameter/fog_noise = ExtResource("11_tuauy")
|
||||
shader_parameter/use_red_as_alpha = true
|
||||
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/texture_scale = Vector2(1, 1)
|
||||
shader_parameter/edge_softness_y = 0.16400000779
|
||||
|
||||
@@ -3,7 +3,6 @@ extends Node3D
|
||||
|
||||
const NOISE_TEXTURE: Texture2D = preload("res://core/daynight/noise.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
|
||||
|
||||
@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)
|
||||
|
||||
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():
|
||||
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)
|
||||
|
||||
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:
|
||||
if node.is_in_group("weather_vegetables_node"):
|
||||
_clear_weather_overlay_from_node(node)
|
||||
return
|
||||
|
||||
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():
|
||||
_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:
|
||||
#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
|
||||
|
||||
@@ -67,7 +67,6 @@ void fragment() {
|
||||
float is_center = step(center_sharpness, internal_n);
|
||||
|
||||
ALBEDO = shadow_color;
|
||||
|
||||
ALPHA = mix(opacity_edge, opacity_center, is_center) * final_fade;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ uniform bool use_red_as_alpha = true;
|
||||
|
||||
group_uniforms Settings;
|
||||
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 texture_scale = vec2(1.0, 1.0);
|
||||
|
||||
@@ -36,5 +37,5 @@ void fragment() {
|
||||
vec3 dark_fog = tinted_fog * 0.5;
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -8,10 +8,12 @@ global uniform float global_wind_speed;
|
||||
global uniform float global_wind_strength;
|
||||
global uniform vec2 global_wind_direction;
|
||||
//global uniform sampler2D global_wind_noise : filter_linear_mipmap;
|
||||
global uniform float global_snow_start_time;
|
||||
global uniform float global_snow_accumulation_speed;
|
||||
global uniform float global_snow_melt_time;
|
||||
global uniform float global_snow_melt_speed;
|
||||
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 float global_rain_intensity;
|
||||
|
||||
// --- PARAMETRI ESTETICI ---
|
||||
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 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 ---
|
||||
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 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 float v_shade_factor;
|
||||
@@ -52,6 +56,21 @@ float hash(vec3 p) {
|
||||
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() {
|
||||
vec3 instance_pos = MODEL_MATRIX[3].xyz;
|
||||
v_world_pos = instance_pos; // Salviamo la posizione dell'istanza
|
||||
@@ -113,17 +132,10 @@ void fragment() {
|
||||
// Applichiamo la variazione al colore finale dell'erba
|
||||
vec3 varied_grass_color = mix(v_final_color, variance_color.rgb, noise_sample * variance_intensity);
|
||||
|
||||
float snow_amount = 0.0;
|
||||
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 snow_amount = smoothstep(0.0, 1.0, get_snow_progress());
|
||||
|
||||
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);
|
||||
|
||||
vec3 dark_snow = snow_color.rgb * (1.0 - shadow_intensity);
|
||||
@@ -131,12 +143,15 @@ void fragment() {
|
||||
|
||||
// Mescoliamo il colore variato con la neve
|
||||
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;
|
||||
ALPHA = tex.r * opacity;
|
||||
ALPHA_SCISSOR_THRESHOLD = 0.5;
|
||||
|
||||
ROUGHNESS = 0.02;
|
||||
ROUGHNESS = final_roughness;
|
||||
}
|
||||
|
||||
void light() {
|
||||
|
||||
@@ -2,9 +2,10 @@ shader_type spatial;
|
||||
render_mode blend_mix, cull_back, depth_draw_opaque;
|
||||
|
||||
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_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);
|
||||
|
||||
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 snow_amount = 0.0;
|
||||
float snow_amount = clamp(global_snow_amount, 0.0, 1.0);
|
||||
if (global_snow_start_time >= 0.0) {
|
||||
snow_amount = clamp(
|
||||
float timed_amount = clamp(
|
||||
(TIME - global_snow_start_time) * global_snow_accumulation_speed,
|
||||
0.0,
|
||||
1.0
|
||||
);
|
||||
snow_amount = max(snow_amount, timed_amount);
|
||||
}
|
||||
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);
|
||||
snow_amount = min(snow_amount, 1.0 - melt);
|
||||
}
|
||||
return snow_amount;
|
||||
}
|
||||
|
||||
@@ -6,12 +6,12 @@ global uniform vec2 global_wind_direction;
|
||||
global uniform float global_wind_scale;
|
||||
global uniform float global_wind_strength;
|
||||
global uniform float global_wind_fade;
|
||||
/*
|
||||
global uniform float global_snow_start_time;
|
||||
global uniform float global_snow_accumulation_speed;
|
||||
global uniform float global_snow_melt_time;
|
||||
global uniform float global_snow_melt_speed;
|
||||
global uniform vec4 global_snow_color;*/
|
||||
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;
|
||||
global uniform float global_rain_intensity;
|
||||
|
||||
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 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 snow_visibility : hint_range(0.0, 1.0) = 1.0;
|
||||
|
||||
varying vec3 v_final_color;
|
||||
varying float v_shade_factor;
|
||||
@@ -41,6 +42,21 @@ float hash(vec3 p) {
|
||||
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() {
|
||||
vec3 instance_pos = MODEL_MATRIX[3].xyz;
|
||||
|
||||
@@ -88,24 +104,16 @@ void fragment() {
|
||||
vec2 shifted_uv = UV + texture_offset;
|
||||
vec4 tex = texture(alpha_texture, shifted_uv);
|
||||
|
||||
//// Snow accumulation
|
||||
//float snow_amount = 0.0;
|
||||
//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);
|
||||
// Snow accumulation
|
||||
float snow_amount = pow(get_snow_progress(), 0.55);
|
||||
|
||||
//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);
|
||||
vec3 final_albedo = v_final_color;
|
||||
float top_mask = 1.0 - shifted_uv.y;
|
||||
float snow_mask = smoothstep(1.0 - snow_amount * 1.35, 1.08 - snow_amount * 1.35, top_mask) * snow_visibility;
|
||||
snow_mask *= step(0.01, snow_amount);
|
||||
|
||||
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
|
||||
float rain_int = clamp(global_rain_intensity, 0.0, 1.0);
|
||||
|
||||
@@ -3,6 +3,12 @@ render_mode blend_mix, depth_draw_always;
|
||||
|
||||
global uniform float global_rain_intensity;
|
||||
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
|
||||
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 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() {
|
||||
world_pos_xz = (MODEL_MATRIX * vec4(VERTEX, 1.0)).xz;
|
||||
local_uv = UV;
|
||||
@@ -82,8 +103,15 @@ void fragment() {
|
||||
float is_sky = step(ref_depth_raw, 0.00001); // Protezione anti-cielo
|
||||
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);
|
||||
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;
|
||||
|
||||
|
||||
241
core/daynight/water_river.gdshader
Normal file
241
core/daynight/water_river.gdshader
Normal 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
|
||||
1
core/daynight/water_river.gdshader.uid
Normal file
1
core/daynight/water_river.gdshader.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://cb12c2j8rfu6a
|
||||
@@ -34,12 +34,15 @@ var rain_tween: Tween
|
||||
var rain_audio_tween: Tween
|
||||
var puddle_tween: Tween
|
||||
var puddle_amount: float = 0.0
|
||||
var clouds_tween: Tween
|
||||
|
||||
var snow_tween: Tween
|
||||
var snow_weather_tween: Tween
|
||||
var snow_particles_tween: Tween
|
||||
var is_snowing: bool = false
|
||||
var is_snow_accumulated: bool = false
|
||||
var actual_snow_amount: float = 0.0
|
||||
var snow_weather_amount: float = 0.0
|
||||
|
||||
var is_storm: bool = false
|
||||
var cold_tween: Tween
|
||||
@@ -188,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_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_sky_top = final_sky_top.lerp(final_sky_top * environment_config.snow_mode_color, actual_snow_amount)
|
||||
final_sky_horizon = final_sky_horizon.lerp(final_sky_horizon * environment_config.snow_mode_color, actual_snow_amount)
|
||||
final_fog_color = final_fog_color.lerp(final_fog_color * 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, snow_weather_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, snow_weather_amount)
|
||||
|
||||
#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))
|
||||
@@ -205,8 +208,8 @@ func _process(delta: float) -> void:
|
||||
var night_val = clamp(day_time - 2.0, 0.0, 1.0)
|
||||
|
||||
#Snow exposure compensation
|
||||
var snow_light_attenuation = lerp(1.0, 0.55, actual_snow_amount * (1.0 - night_val))
|
||||
var snow_glow_attenuation = lerp(1.0, 0.5, actual_snow_amount)
|
||||
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, snow_weather_amount)
|
||||
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
|
||||
@@ -247,15 +250,36 @@ func _process(delta: float) -> void:
|
||||
sky_mat.set_shader_parameter("sun_color", final_tint)
|
||||
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:
|
||||
var current_density = lerp(0.4, 1.0, rain_intensity)
|
||||
environment_config.material_clouds.set_shader_parameter("cloud_density", current_density)
|
||||
var current_sharpness = lerp(0.14, 0.0, rain_intensity)
|
||||
environment_config.material_clouds.set_shader_parameter("cloud_density", current_cloud_density)
|
||||
var current_sharpness = lerp(0.14, 0.0, cloud_density_amount)
|
||||
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:
|
||||
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("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():
|
||||
rain_audio_player = AudioStreamPlayer.new()
|
||||
@@ -666,7 +690,7 @@ func toggle_rain(value: bool):
|
||||
|
||||
if puddle_tween and puddle_tween.is_valid():
|
||||
puddle_tween.kill()
|
||||
|
||||
|
||||
if is_raining:
|
||||
particles_rain.amount_ratio = 0.0
|
||||
particles_rain.emitting = true
|
||||
@@ -786,8 +810,23 @@ func toggle_snow(value: bool):
|
||||
var target_snow_amount: float = 1.0 if is_snowing else 0.0
|
||||
if snow_tween and snow_tween.is_valid():
|
||||
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.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()
|
||||
|
||||
func _emit_weather_event_label() -> void:
|
||||
@@ -811,6 +850,7 @@ func _emit_weather_event_label() -> void:
|
||||
#disable snow and set default values and shader
|
||||
func init_snow(value: float = 0.0):
|
||||
actual_snow_amount = value
|
||||
snow_weather_amount = value
|
||||
RenderingServer.global_shader_parameter_set("global_snow_amount", value)
|
||||
|
||||
if particles_snow:
|
||||
@@ -835,6 +875,9 @@ func init_snow_amount(value: float):
|
||||
actual_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:
|
||||
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)
|
||||
@@ -843,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_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
|
||||
|
||||
#region Post-Process
|
||||
|
||||
@@ -3,7 +3,7 @@ render_mode blend_mix, depth_draw_never;
|
||||
|
||||
//Snow globals
|
||||
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_speed = 0.1;
|
||||
global uniform float global_snow_amount = 0.0;
|
||||
@@ -72,18 +72,15 @@ float fbm(vec2 p) {
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
if (has_snow_timeline) {
|
||||
snow_progress = 0.0;
|
||||
if (global_snow_start_time >= 0.0) {
|
||||
snow_progress = 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_progress *= (1.0 - melt);
|
||||
}
|
||||
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;
|
||||
@@ -130,12 +127,13 @@ void fragment() {
|
||||
float snow_edge = smoothstep(
|
||||
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 snow_coverage = smoothstep(0.0, 0.6, noise_val + snow_progress - 0.4 + flat_accumulation * 0.25);
|
||||
float snow_factor = max(snow_edge * snow_coverage * snow_progress, flat_accumulation);
|
||||
float snow_opacity = smoothstep(0.04, 0.28, snow_factor);
|
||||
float snow_variation = mix(0.75, 1.15, noise_val);
|
||||
float snow_coverage = clamp(snow_progress * snow_variation + flat_accumulation * 0.25, 0.0, 1.0);
|
||||
float snow_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);
|
||||
|
||||
float shade = mix(-snow_color_variation, snow_color_variation, noise_val);
|
||||
|
||||
@@ -2,10 +2,11 @@ shader_type spatial;
|
||||
render_mode blend_mix, depth_draw_never, cull_disabled;
|
||||
|
||||
// Snow globals
|
||||
global uniform float global_snow_start_time;
|
||||
global uniform float global_snow_accumulation_speed;
|
||||
global uniform float global_snow_melt_time;
|
||||
global uniform float global_snow_melt_speed;
|
||||
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;
|
||||
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;
|
||||
@@ -34,6 +35,21 @@ float ripple_ring(vec2 uv, float time_offset) {
|
||||
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() {
|
||||
vec3 world_pos = (INV_VIEW_MATRIX * vec4(VERTEX, 1.0)).xyz;
|
||||
|
||||
@@ -41,18 +57,10 @@ void fragment() {
|
||||
float facing_up = 1.0;
|
||||
|
||||
// Snow accumulation
|
||||
float snow_amount = 0.0;
|
||||
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 snow_amount = get_snow_progress();
|
||||
|
||||
// UV-based snow mask: accumulates from the top of the quad
|
||||
float top_mask = 1.0 - UV.y;
|
||||
float snow_mask = smoothstep(1.0 - snow_amount, 1.0 - snow_amount + snow_edge_softness, top_mask);
|
||||
// Plain surfaces fade in uniformly to avoid patchy strip-like accumulation.
|
||||
float snow_mask = smoothstep(0.0, 1.0, snow_amount);
|
||||
snow_mask *= step(0.01, snow_amount);
|
||||
|
||||
// Snow color with slight variation
|
||||
|
||||
@@ -98,6 +98,7 @@ extends Resource
|
||||
@export var material_fog: ShaderMaterial #Fog overlay shader material
|
||||
@export var material_drops: StandardMaterial3D #Rain drops material (albedo tinted by sky)
|
||||
@export var material_clouds: ShaderMaterial #Cloud layer shader material
|
||||
@export var base_cloud_density: float = 0.4 #default cloud density
|
||||
|
||||
#Rain weather settings
|
||||
@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 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 rain_cloud_density: float = 1.0 #the cloud density when is rainy
|
||||
|
||||
#Storm settings (applied on top of rain when storm is active)
|
||||
@export_group("Storm")
|
||||
@@ -136,7 +138,7 @@ extends Resource
|
||||
|
||||
#Train start settings
|
||||
@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
|
||||
|
||||
#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_fade_time: float = 5.0 #Seconds for snow particles to fade in/out
|
||||
@export var snow_threshold: float = 0.4 #Normal Y threshold for snow accumulation on surfaces
|
||||
@export var snow_accumulation_speed: float = 0.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 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
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
@tool
|
||||
extends Control
|
||||
|
||||
class_name ArrowButton
|
||||
|
||||
signal on_pressed
|
||||
|
||||
@export var image: Texture:
|
||||
set(value):
|
||||
image = value
|
||||
@@ -19,3 +23,7 @@ func _ready():
|
||||
$%Texture.texture = image
|
||||
$%Texture.flip_h = flip_h
|
||||
|
||||
|
||||
func _on_gui_input(event: InputEvent) -> void:
|
||||
if event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_LEFT and event.pressed:
|
||||
on_pressed.emit()
|
||||
|
||||
@@ -34,3 +34,5 @@ metadata/_edit_use_anchors_ = true
|
||||
[node name="HooverTween" parent="." unique_id=2115829120 node_paths=PackedStringArray("detector_node", "visual_node") instance=ExtResource("3_hu4cn")]
|
||||
detector_node = NodePath("..")
|
||||
visual_node = NodePath("../Texture")
|
||||
|
||||
[connection signal="gui_input" from="." to="." method="_on_gui_input"]
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
@tool
|
||||
extends Control
|
||||
|
||||
class_name TrainColorPicker
|
||||
|
||||
signal on_color_selected(color_picker: TrainColorPicker)
|
||||
|
||||
@export var image: Texture:
|
||||
set(value):
|
||||
image = value
|
||||
@@ -9,6 +13,8 @@ extends Control
|
||||
|
||||
@onready var color: Color
|
||||
|
||||
var selected: bool = false
|
||||
|
||||
func _ready():
|
||||
if image != null and has_node("%Texture"):
|
||||
$%Texture.texture = image
|
||||
@@ -17,3 +23,18 @@ func _ready():
|
||||
color = img.get_pixel(0, 0)
|
||||
else:
|
||||
color = Color.BLACK
|
||||
|
||||
|
||||
func _on_gui_input(event: InputEvent) -> void:
|
||||
if event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_LEFT and event.pressed:
|
||||
on_color_selected.emit(self)
|
||||
|
||||
|
||||
func select() -> void:
|
||||
selected = true
|
||||
$%Border.color.a = 1
|
||||
|
||||
|
||||
func deselect() -> void:
|
||||
selected = false
|
||||
$%Border.color.a = 0
|
||||
|
||||
@@ -15,9 +15,25 @@ grow_vertical = 2
|
||||
script = ExtResource("2_323rd")
|
||||
image = ExtResource("1_us0rx")
|
||||
|
||||
[node name="Texture" type="TextureRect" parent="." unique_id=329703623]
|
||||
[node name="Border" type="ColorRect" parent="." unique_id=1774696864]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -30.0
|
||||
offset_top = -30.0
|
||||
offset_right = 30.0
|
||||
offset_bottom = 30.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
pivot_offset_ratio = Vector2(0.5, 0.5)
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="Texture" type="TextureRect" parent="Border" unique_id=329703623]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(53, 53)
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
@@ -36,4 +52,6 @@ texture = ExtResource("1_us0rx")
|
||||
|
||||
[node name="HooverTween" parent="." unique_id=160227524 node_paths=PackedStringArray("detector_node", "visual_node") instance=ExtResource("3_264kt")]
|
||||
detector_node = NodePath("..")
|
||||
visual_node = NodePath("../Texture")
|
||||
visual_node = NodePath("../Border")
|
||||
|
||||
[connection signal="gui_input" from="." to="." method="_on_gui_input"]
|
||||
|
||||
@@ -4,26 +4,6 @@ extends Control
|
||||
@onready var resume_button: Control = $%ResumeButton
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
GameState.on_game_paused.connect(_on_game_paused)
|
||||
GameState.on_game_resumed.connect(_on_game_resumed)
|
||||
resume_button.hide()
|
||||
|
||||
|
||||
func _on_game_paused() -> void:
|
||||
play_button.hide()
|
||||
resume_button.show()
|
||||
|
||||
|
||||
func _on_game_resumed() -> void:
|
||||
play_button.show()
|
||||
resume_button.hide()
|
||||
|
||||
|
||||
func _on_play_button_on_button_pressed() -> void:
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
func _on_resume_button_on_button_pressed() -> void:
|
||||
GameState.resume_game()
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
[ext_resource type="PackedScene" uid="uid://c3alhtb3083qs" path="res://core/game_menu/option_menu_button.tscn" id="2_cd2sv"]
|
||||
[ext_resource type="Texture2D" uid="uid://dd1exrppb6bjq" path="res://core/game_menu/assets/page_3/resume_button.png" id="2_htoi2"]
|
||||
[ext_resource type="Texture2D" uid="uid://cmhx3mscwrwft" path="res://core/game_menu/assets/page_3/save_button.png" id="3_vwpol"]
|
||||
[ext_resource type="Texture2D" uid="uid://cu8e7pl0y4owq" path="res://core/game_menu/assets/page_3/settings_button.png" id="4_8w45m"]
|
||||
[ext_resource type="Texture2D" uid="uid://v7e7467fkdec" path="res://core/game_menu/assets/page_3/quit_button.png" id="4_cd2sv"]
|
||||
|
||||
[node name="OptionMenu" type="Control" unique_id=1055457221]
|
||||
@@ -20,12 +21,15 @@ script = ExtResource("1_cd2sv")
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
anchor_left = 0.41927084
|
||||
anchor_top = 0.30925927
|
||||
anchor_top = 0.2537037
|
||||
anchor_right = 0.5807292
|
||||
anchor_bottom = 0.69074076
|
||||
anchor_bottom = 0.7462963
|
||||
offset_top = 60.0
|
||||
offset_bottom = -60.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
theme_override_constants/separation = 8
|
||||
metadata/_edit_use_anchors_ = true
|
||||
|
||||
[node name="PlayButton" parent="VBoxContainer" unique_id=1990327704 instance=ExtResource("2_cd2sv")]
|
||||
@@ -39,6 +43,12 @@ custom_minimum_size = Vector2(310, 100)
|
||||
layout_mode = 2
|
||||
image = ExtResource("2_htoi2")
|
||||
|
||||
[node name="SettingsButton" parent="VBoxContainer" unique_id=1931222561 instance=ExtResource("2_cd2sv")]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(310, 100)
|
||||
layout_mode = 2
|
||||
image = ExtResource("4_8w45m")
|
||||
|
||||
[node name="SaveButton" parent="VBoxContainer" unique_id=1161034414 instance=ExtResource("2_cd2sv")]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(310, 100)
|
||||
@@ -51,7 +61,6 @@ custom_minimum_size = Vector2(310, 100)
|
||||
layout_mode = 2
|
||||
image = ExtResource("4_cd2sv")
|
||||
|
||||
[connection signal="on_button_pressed" from="VBoxContainer/PlayButton" to="." method="_on_play_button_on_button_pressed"]
|
||||
[connection signal="on_button_pressed" from="VBoxContainer/ResumeButton" to="." method="_on_resume_button_on_button_pressed"]
|
||||
[connection signal="on_button_pressed" from="VBoxContainer/SaveButton" to="." method="_on_save_button_on_button_pressed"]
|
||||
[connection signal="on_button_pressed" from="VBoxContainer/QuitButton" to="." method="_on_quit_button_on_button_pressed"]
|
||||
|
||||
@@ -27,7 +27,6 @@ grow_vertical = 2
|
||||
pivot_offset_ratio = Vector2(0.5, 0.5)
|
||||
mouse_filter = 2
|
||||
texture = ExtResource("1_movd1")
|
||||
stretch_mode = 5
|
||||
metadata/_edit_use_anchors_ = true
|
||||
|
||||
[node name="HooverTween" parent="." unique_id=160227524 node_paths=PackedStringArray("detector_node", "visual_node") instance=ExtResource("3_am666")]
|
||||
|
||||
@@ -16,9 +16,6 @@ grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="Background" parent="." index="0" unique_id=1203110384]
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="ChooseyourtrainText" type="TextureRect" parent="." index="1" unique_id=1883940124]
|
||||
layout_mode = 0
|
||||
offset_left = 350.0
|
||||
@@ -29,10 +26,10 @@ texture = ExtResource("3_t5hmd")
|
||||
|
||||
[node name="TrainSelector" parent="." index="2" unique_id=1039769375 instance=ExtResource("3_ijm38")]
|
||||
layout_mode = 0
|
||||
offset_left = 246.0
|
||||
offset_left = 211.0
|
||||
offset_top = 469.0
|
||||
offset_right = 814.0
|
||||
offset_bottom = 758.0
|
||||
offset_right = 871.0
|
||||
offset_bottom = 778.0
|
||||
|
||||
[node name="ChooseyourbiomeText" type="TextureRect" parent="." index="3" unique_id=1133714914]
|
||||
layout_mode = 0
|
||||
|
||||
@@ -35,9 +35,17 @@ offset_bottom = 563.0
|
||||
grow_horizontal = 1
|
||||
grow_vertical = 1
|
||||
|
||||
[node name="PlayButton" parent="OptionMenu/VBoxContainer" parent_id_path=PackedInt32Array(1055457221, 508055524) index="0" unique_id=1990327704]
|
||||
visible = false
|
||||
|
||||
[node name="SettingsButton" parent="OptionMenu/VBoxContainer" parent_id_path=PackedInt32Array(1055457221, 508055524) index="2" unique_id=1931222561]
|
||||
visible = false
|
||||
|
||||
[node name="SettingsMenu" parent="." index="3" unique_id=1639777294 instance=ExtResource("4_twko7")]
|
||||
layout_mode = 1
|
||||
offset_left = 365.0
|
||||
offset_top = 304.0
|
||||
offset_right = 365.0
|
||||
offset_bottom = 304.0
|
||||
|
||||
[editable path="OptionMenu"]
|
||||
|
||||
38
core/game_menu/train_selector.gd
Normal file
38
core/game_menu/train_selector.gd
Normal file
@@ -0,0 +1,38 @@
|
||||
extends VBoxContainer
|
||||
|
||||
@onready var color_pickers: Array[TrainColorPicker] = [$%ColorPicker1, $%ColorPicker2, $%ColorPicker3, $%ColorPicker4, $%ColorPicker5, $%ColorPicker6]
|
||||
@onready var left_arrow: ArrowButton = $%ArrowButtonLeft
|
||||
@onready var right_arrow: ArrowButton = $%ArrowButtonRight
|
||||
var selected_color: Color
|
||||
var selected_color_index: int = 0
|
||||
|
||||
func _ready() -> void:
|
||||
for color_picker in color_pickers:
|
||||
color_picker.on_color_selected.connect(_on_color_selected)
|
||||
color_picker.deselect()
|
||||
|
||||
selected_color = color_pickers[0].color
|
||||
color_pickers[0].select()
|
||||
|
||||
left_arrow.on_pressed.connect(_select_prev_color)
|
||||
right_arrow.on_pressed.connect(_select_next_color)
|
||||
|
||||
func _on_color_selected(selected_color_picker: TrainColorPicker) -> void:
|
||||
for i in range(color_pickers.size()):
|
||||
if color_pickers[i].color == selected_color_picker.color:
|
||||
selected_color_picker.select()
|
||||
selected_color_index = i
|
||||
else:
|
||||
color_pickers[i].deselect()
|
||||
|
||||
func _select_prev_color() -> void:
|
||||
for color_picker in color_pickers:
|
||||
color_picker.deselect()
|
||||
selected_color_index = (selected_color_index - 1 + color_pickers.size()) % color_pickers.size()
|
||||
color_pickers[selected_color_index].select()
|
||||
|
||||
func _select_next_color() -> void:
|
||||
for color_picker in color_pickers:
|
||||
color_picker.deselect()
|
||||
selected_color_index = (selected_color_index + 1) % color_pickers.size()
|
||||
color_pickers[selected_color_index].select()
|
||||
1
core/game_menu/train_selector.gd.uid
Normal file
1
core/game_menu/train_selector.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://8k1msabobhks
|
||||
@@ -1,5 +1,6 @@
|
||||
[gd_scene format=3 uid="uid://bh1kxsp5jyxfx"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://8k1msabobhks" path="res://core/game_menu/train_selector.gd" id="1_puip6"]
|
||||
[ext_resource type="Texture2D" uid="uid://cqvani6n2h3fw" path="res://core/game_menu/assets/page_1/train_texture.png" id="1_wfiis"]
|
||||
[ext_resource type="PackedScene" uid="uid://dm3skv22c60tm" path="res://core/game_menu/arrow_button.tscn" id="2_puip6"]
|
||||
[ext_resource type="PackedScene" uid="uid://ch1st1oryjoio" path="res://core/game_menu/color_picker.tscn" id="3_i2rs1"]
|
||||
@@ -10,8 +11,9 @@
|
||||
[ext_resource type="Texture2D" uid="uid://d4l5ih723j3md" path="res://core/game_menu/assets/page_1/customizecolor-2.png" id="8_tuh6m"]
|
||||
|
||||
[node name="TrainSelector" type="VBoxContainer" unique_id=1039769375]
|
||||
offset_right = 568.0
|
||||
offset_bottom = 289.0
|
||||
offset_right = 625.0
|
||||
offset_bottom = 309.0
|
||||
script = ExtResource("1_puip6")
|
||||
|
||||
[node name="TrainTexture" type="TextureRect" parent="." unique_id=2095010706]
|
||||
layout_mode = 2
|
||||
@@ -22,6 +24,7 @@ stretch_mode = 3
|
||||
layout_mode = 2
|
||||
|
||||
[node name="ArrowButtonLeft" parent="HBoxContainer2" unique_id=103192648 instance=ExtResource("2_puip6")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
flip_h = true
|
||||
|
||||
@@ -29,34 +32,47 @@ flip_h = true
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 18
|
||||
|
||||
[node name="ColorPicker" parent="HBoxContainer2/HBoxContainer" unique_id=59169767 instance=ExtResource("3_i2rs1")]
|
||||
[node name="ColorPicker1" parent="HBoxContainer2/HBoxContainer" unique_id=59169767 instance=ExtResource("3_i2rs1")]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(60, 60)
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 4
|
||||
image = ExtResource("4_cfvtr")
|
||||
|
||||
[node name="ColorPicker2" parent="HBoxContainer2/HBoxContainer" unique_id=584054476 instance=ExtResource("3_i2rs1")]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(60, 60)
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 4
|
||||
image = ExtResource("5_jnto8")
|
||||
|
||||
[node name="ColorPicker3" parent="HBoxContainer2/HBoxContainer" unique_id=889429149 instance=ExtResource("3_i2rs1")]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(60, 60)
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 4
|
||||
image = ExtResource("6_dxnpq")
|
||||
|
||||
[node name="ColorPicker4" parent="HBoxContainer2/HBoxContainer" unique_id=466686411 instance=ExtResource("3_i2rs1")]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(60, 60)
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 4
|
||||
image = ExtResource("7_d1sdr")
|
||||
|
||||
[node name="ColorPicker5" parent="HBoxContainer2/HBoxContainer" unique_id=675841518 instance=ExtResource("3_i2rs1")]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(60, 60)
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 4
|
||||
|
||||
[node name="ColorPicker6" parent="HBoxContainer2/HBoxContainer" unique_id=1698412911 instance=ExtResource("3_i2rs1")]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(60, 60)
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 4
|
||||
image = ExtResource("8_tuh6m")
|
||||
|
||||
[node name="ArrowButtonRight" parent="HBoxContainer2" unique_id=68298624 instance=ExtResource("2_puip6")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
|
||||
@@ -45,4 +45,4 @@ func resume_game() -> void:
|
||||
get_tree().paused = false
|
||||
|
||||
func quit_game() -> void:
|
||||
get_tree().quit()
|
||||
SceneManager.quit_game()
|
||||
|
||||
BIN
core/main_menu/assets/photo_2025-08-27_17-35-14.jpg
Normal file
BIN
core/main_menu/assets/photo_2025-08-27_17-35-14.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 197 KiB |
40
core/main_menu/assets/photo_2025-08-27_17-35-14.jpg.import
Normal file
40
core/main_menu/assets/photo_2025-08-27_17-35-14.jpg.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://b1wg4lif82dxp"
|
||||
path="res://.godot/imported/photo_2025-08-27_17-35-14.jpg-78d5e1b9cf2d920968331a684da2ca42.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://core/main_menu/assets/photo_2025-08-27_17-35-14.jpg"
|
||||
dest_files=["res://.godot/imported/photo_2025-08-27_17-35-14.jpg-78d5e1b9cf2d920968331a684da2ca42.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
10
core/main_menu/main_menu.gd
Normal file
10
core/main_menu/main_menu.gd
Normal file
@@ -0,0 +1,10 @@
|
||||
extends Control
|
||||
|
||||
@onready var settings_menu: Control = $%SettingsMenu
|
||||
|
||||
func _on_play_button_on_button_pressed() -> void:
|
||||
SceneManager.change_scene(SceneConfig.SceneName.GAME)
|
||||
|
||||
|
||||
func _on_settings_button_on_button_pressed() -> void:
|
||||
$%SettingsMenu.visible = !$%SettingsMenu.visible
|
||||
1
core/main_menu/main_menu.gd.uid
Normal file
1
core/main_menu/main_menu.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://csqxuftsnv1br
|
||||
62
core/main_menu/main_menu.tscn
Normal file
62
core/main_menu/main_menu.tscn
Normal file
@@ -0,0 +1,62 @@
|
||||
[gd_scene format=3 uid="uid://btcpge7cj2041"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://csqxuftsnv1br" path="res://core/main_menu/main_menu.gd" id="1_g1whv"]
|
||||
[ext_resource type="PackedScene" uid="uid://cxf8s80ivwj1p" path="res://core/game_menu/option_menu.tscn" id="1_uvy4f"]
|
||||
[ext_resource type="Texture2D" uid="uid://b1wg4lif82dxp" path="res://core/main_menu/assets/photo_2025-08-27_17-35-14.jpg" id="2_mloc8"]
|
||||
[ext_resource type="PackedScene" uid="uid://caqf471x0kttc" path="res://core/game_menu/settings_menu.tscn" id="3_26agx"]
|
||||
|
||||
[node name="MainMenu" type="Control" unique_id=889720172]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_g1whv")
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="." unique_id=11805511]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
texture = ExtResource("2_mloc8")
|
||||
|
||||
[node name="OptionMenu" parent="." unique_id=1055457221 instance=ExtResource("1_uvy4f")]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = 492.0
|
||||
offset_top = 274.0
|
||||
offset_right = 492.0
|
||||
offset_bottom = 274.0
|
||||
|
||||
[node name="VBoxContainer" parent="OptionMenu" index="0" unique_id=508055524]
|
||||
anchor_top = 0.3037037
|
||||
anchor_bottom = 0.6962963
|
||||
offset_top = 6.0
|
||||
offset_bottom = -6.0
|
||||
|
||||
[node name="ResumeButton" parent="OptionMenu/VBoxContainer" index="1" unique_id=635721927]
|
||||
visible = false
|
||||
|
||||
[node name="SaveButton" parent="OptionMenu/VBoxContainer" index="3" unique_id=1161034414]
|
||||
visible = false
|
||||
|
||||
[node name="SettingsMenu" parent="." unique_id=1639777294 instance=ExtResource("3_26agx")]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
offset_left = 639.0
|
||||
offset_top = 566.0
|
||||
offset_right = 639.0
|
||||
offset_bottom = 566.0
|
||||
|
||||
[connection signal="on_button_pressed" from="OptionMenu/VBoxContainer/PlayButton" to="." method="_on_play_button_on_button_pressed"]
|
||||
[connection signal="on_button_pressed" from="OptionMenu/VBoxContainer/SettingsButton" to="." method="_on_settings_button_on_button_pressed"]
|
||||
|
||||
[editable path="OptionMenu"]
|
||||
@@ -3,7 +3,7 @@ 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")
|
||||
@export var collectibles_library: CollectibleLibrary
|
||||
|
||||
var unlocked_collectibles_ids: Array[StringName] = []
|
||||
var saved_photos: Array[String] = []
|
||||
|
||||
8
core/photo_mode/managers/collection_manager.tscn
Normal file
8
core/photo_mode/managers/collection_manager.tscn
Normal file
@@ -0,0 +1,8 @@
|
||||
[gd_scene format=3 uid="uid://22orqdm34hfm"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c3kq1qddpm8tf" path="res://core/photo_mode/managers/collection_manager.gd" id="1_qf21s"]
|
||||
[ext_resource type="Resource" uid="uid://c6pkpvsvimafb" path="res://core/photo_mode/data/collectible_library.tres" id="2_pxvtd"]
|
||||
|
||||
[node name="CollectionManager" type="Node" unique_id=1532057831]
|
||||
script = ExtResource("1_qf21s")
|
||||
collectibles_library = ExtResource("2_pxvtd")
|
||||
7
core/scene_manager/scene_config.gd
Normal file
7
core/scene_manager/scene_config.gd
Normal file
@@ -0,0 +1,7 @@
|
||||
class_name SceneConfig
|
||||
extends Resource
|
||||
|
||||
enum SceneName { MAIN_MENU, GAME }
|
||||
|
||||
@export var scenes: Dictionary[SceneName, PackedScene] = {
|
||||
}
|
||||
1
core/scene_manager/scene_config.gd.uid
Normal file
1
core/scene_manager/scene_config.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://bbgyhmb8a17i7
|
||||
13
core/scene_manager/scene_config.tres
Normal file
13
core/scene_manager/scene_config.tres
Normal file
@@ -0,0 +1,13 @@
|
||||
[gd_resource type="Resource" script_class="SceneConfig" format=3 uid="uid://dr612tmciq8pg"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://btcpge7cj2041" path="res://core/main_menu/main_menu.tscn" id="1_72aup"]
|
||||
[ext_resource type="Script" uid="uid://bbgyhmb8a17i7" path="res://core/scene_manager/scene_config.gd" id="1_km45g"]
|
||||
[ext_resource type="PackedScene" uid="uid://cae0mnf353dy3" path="res://docs/museums/biome_generator/museum_biome_generator.tscn" id="2_prsyo"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_km45g")
|
||||
scenes = Dictionary[int, PackedScene]({
|
||||
0: ExtResource("1_72aup"),
|
||||
1: ExtResource("2_prsyo")
|
||||
})
|
||||
metadata/_custom_type_script = "uid://bbgyhmb8a17i7"
|
||||
43
core/scene_manager/scene_manager.gd
Normal file
43
core/scene_manager/scene_manager.gd
Normal file
@@ -0,0 +1,43 @@
|
||||
extends CanvasLayer
|
||||
|
||||
@export var config: SceneConfig
|
||||
@onready var color_rect = $ColorRect
|
||||
@onready var loading_screen = $LoadingScreen
|
||||
@export var transition_duration: float = 1
|
||||
|
||||
func _ready() -> void:
|
||||
color_rect.color.a = 0.0
|
||||
color_rect.mouse_filter = Control.MOUSE_FILTER_IGNORE
|
||||
loading_screen.hide()
|
||||
|
||||
func change_scene(scene_enum: SceneConfig.SceneName) -> void:
|
||||
if not config or not config.scenes.has(scene_enum):
|
||||
return
|
||||
|
||||
var target_scene: PackedScene = config.scenes[scene_enum]
|
||||
|
||||
color_rect.mouse_filter = Control.MOUSE_FILTER_STOP
|
||||
|
||||
var tween_in = create_tween()
|
||||
tween_in.tween_property(color_rect, "color:a", 1.0, transition_duration)
|
||||
await tween_in.finished
|
||||
|
||||
loading_screen.show()
|
||||
await get_tree().process_frame
|
||||
|
||||
get_tree().change_scene_to_packed(target_scene)
|
||||
|
||||
loading_screen.hide()
|
||||
|
||||
var tween_out = create_tween()
|
||||
tween_out.tween_property(color_rect, "color:a", 0.0, transition_duration)
|
||||
await tween_out.finished
|
||||
|
||||
color_rect.mouse_filter = Control.MOUSE_FILTER_IGNORE
|
||||
|
||||
func quit_game() -> void:
|
||||
color_rect.mouse_filter = Control.MOUSE_FILTER_STOP
|
||||
var tween = create_tween()
|
||||
tween.tween_property(color_rect, "color:a", 1.0, transition_duration)
|
||||
await tween.finished
|
||||
get_tree().quit()
|
||||
1
core/scene_manager/scene_manager.gd.uid
Normal file
1
core/scene_manager/scene_manager.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://bf1f2kp8ghtei
|
||||
44
core/scene_manager/scene_manager.tscn
Normal file
44
core/scene_manager/scene_manager.tscn
Normal file
@@ -0,0 +1,44 @@
|
||||
[gd_scene format=3 uid="uid://bw8hwkw55j675"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bf1f2kp8ghtei" path="res://core/scene_manager/scene_manager.gd" id="1_7resu"]
|
||||
[ext_resource type="Resource" uid="uid://dr612tmciq8pg" path="res://core/scene_manager/scene_config.tres" id="2_vtdwt"]
|
||||
|
||||
[node name="SceneManager" type="CanvasLayer" unique_id=399843239]
|
||||
layer = 100
|
||||
script = ExtResource("1_7resu")
|
||||
config = ExtResource("2_vtdwt")
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="." unique_id=1075660170]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
color = Color(0, 0, 0, 0)
|
||||
|
||||
[node name="LoadingScreen" type="Control" parent="." unique_id=1075176512]
|
||||
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="Label" type="Label" parent="LoadingScreen" unique_id=887425331]
|
||||
layout_mode = 1
|
||||
anchors_preset = 3
|
||||
anchor_left = 1.0
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -169.0
|
||||
offset_top = -65.0
|
||||
offset_right = -20.0
|
||||
offset_bottom = -20.0
|
||||
grow_horizontal = 0
|
||||
grow_vertical = 0
|
||||
theme_override_constants/outline_size = 24
|
||||
theme_override_font_sizes/font_size = 32
|
||||
text = "Loading..."
|
||||
@@ -43,6 +43,8 @@ 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)
|
||||
speed = 5.0
|
||||
enable_state_machine = true
|
||||
|
||||
[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)
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
[ext_resource type="Texture2D" uid="uid://dest0qa7vaid0" path="res://core/daynight/stars_albedo.png" id="3_ncg1s"]
|
||||
[ext_resource type="Script" uid="uid://brcimd12tx3dm" path="res://core/daynight/edge_detection_compositor.gd" id="4_5uio4"]
|
||||
[ext_resource type="PackedScene" uid="uid://ujv2f1l4d2ps" path="res://core/biome_generator/biome_generator.tscn" id="5_yeh4a"]
|
||||
[ext_resource type="Resource" uid="uid://nrm040srfjwo" path="res://core/biome_generator/railway_pool.tres" id="6_awm2r"]
|
||||
[ext_resource type="Script" uid="uid://wv6kcqkibium" path="res://core/biome_generator/biome.gd" id="6_s3jnv"]
|
||||
[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://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://dqoai3665vb0a" path="res://tgcc/chunk/countryside/scene/chunk_country_corner_02.tscn" id="9_q6kbb"]
|
||||
[ext_resource type="PackedScene" uid="uid://cjv1e8pc6gde1" path="res://tgcc/chunk/countryside/scene/chunk_country_corner_01.tscn" id="10_ufarv"]
|
||||
@@ -28,13 +28,27 @@
|
||||
[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="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_r_l_1.tscn" id="20_q6kbb"]
|
||||
[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="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_r_r_1.tscn" id="21_81wux"]
|
||||
[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="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="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"]
|
||||
[ext_resource type="Resource" uid="uid://cmd6s6thq4f7r" path="res://core/biome_generator/entities_pool.tres" id="35_hmtvu"]
|
||||
|
||||
[sub_resource type="FastNoiseLite" id="FastNoiseLite_wjpfq"]
|
||||
fractal_lacunarity = 1.915
|
||||
@@ -114,7 +128,7 @@ compositor_effects = Array[CompositorEffect]([SubResource("CompositorEffect_q52t
|
||||
[sub_resource type="Resource" id="Resource_3qrd0"]
|
||||
script = ExtResource("6_s3jnv")
|
||||
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"), ExtResource("20_q6kbb"), ExtResource("21_81wux")])
|
||||
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"
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_pypsn"]
|
||||
@@ -147,7 +161,9 @@ compositor = SubResource("Compositor_mb5yv")
|
||||
|
||||
[node name="biome_generator" parent="." unique_id=1861369341 node_paths=PackedStringArray("rail_path") instance=ExtResource("5_yeh4a")]
|
||||
rail_path = NodePath("../rail")
|
||||
railway_pool = ExtResource("6_awm2r")
|
||||
biome_list = Array[ExtResource("6_s3jnv")]([SubResource("Resource_3qrd0")])
|
||||
entity_pool = ExtResource("35_hmtvu")
|
||||
eye_line = 5
|
||||
|
||||
[node name="Terrain" type="MeshInstance3D" parent="." unique_id=219178561]
|
||||
|
||||
@@ -1,156 +1,8 @@
|
||||
[gd_scene format=3 uid="uid://0kgjaqijaqku"]
|
||||
|
||||
[ext_resource type="Shader" uid="uid://d0ch5ofrgf7y6" path="res://core/daynight/trunk_shader.gdshader" id="2_0y2rr"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_m6haf"]
|
||||
render_priority = 0
|
||||
shader = ExtResource("2_0y2rr")
|
||||
shader_parameter/albedo_color = Color(0.08235294, 0.105882354, 0.10980392, 1)
|
||||
shader_parameter/use_texture = true
|
||||
shader_parameter/uv_scale = Vector2(1, 1)
|
||||
shader_parameter/palette_shift_y = 0.0
|
||||
shader_parameter/gradient_start_y = 0.0
|
||||
shader_parameter/gradient_end_y = 10.0
|
||||
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_duyun"]
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_w0ibq"]
|
||||
size = Vector3(0.2, 0.2, 2)
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_fttrp"]
|
||||
render_priority = 0
|
||||
shader = ExtResource("2_0y2rr")
|
||||
shader_parameter/albedo_color = Color(0.08061289, 0.10506997, 0.11154168, 1)
|
||||
shader_parameter/use_texture = true
|
||||
shader_parameter/uv_scale = Vector2(1, 1)
|
||||
shader_parameter/palette_shift_y = 0.0
|
||||
shader_parameter/gradient_start_y = 0.0
|
||||
shader_parameter/gradient_end_y = 10.0
|
||||
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_hb1ej"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_pp4r2"]
|
||||
render_priority = 0
|
||||
shader = ExtResource("2_0y2rr")
|
||||
shader_parameter/albedo_color = Color(0.2584173, 0.19781098, 0.10103748, 1)
|
||||
shader_parameter/use_texture = true
|
||||
shader_parameter/uv_scale = Vector2(1, 1)
|
||||
shader_parameter/palette_shift_y = 0.0
|
||||
shader_parameter/gradient_start_y = 0.0
|
||||
shader_parameter/gradient_end_y = 10.0
|
||||
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_pur2n"]
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_ysg1u"]
|
||||
size = Vector3(2.5, 0.15, 0.5)
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_x2uev"]
|
||||
render_priority = 0
|
||||
shader = ExtResource("2_0y2rr")
|
||||
shader_parameter/albedo_color = Color(0.25882354, 0.19607843, 0.101960786, 1)
|
||||
shader_parameter/use_texture = true
|
||||
shader_parameter/uv_scale = Vector2(1, 1)
|
||||
shader_parameter/palette_shift_y = 0.0
|
||||
shader_parameter/gradient_start_y = 0.0
|
||||
shader_parameter/gradient_end_y = 10.0
|
||||
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_qv8m2"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_5u2u8"]
|
||||
render_priority = 0
|
||||
shader = ExtResource("2_0y2rr")
|
||||
shader_parameter/albedo_color = Color(0.22494644, 0.08867701, 0.01631488, 1)
|
||||
shader_parameter/use_texture = false
|
||||
shader_parameter/uv_scale = Vector2(1, 1)
|
||||
shader_parameter/palette_shift_y = 0.0
|
||||
shader_parameter/gradient_start_y = 0.0
|
||||
shader_parameter/gradient_end_y = 10.0
|
||||
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="BoxMesh" id="BoxMesh_m6haf"]
|
||||
size = Vector3(3.705, 0.2, 1.92)
|
||||
[ext_resource type="PackedScene" uid="uid://dtee3qewqnqpm" path="res://tgcc/train/rail.tscn" id="2_u53q0"]
|
||||
|
||||
[node name="rails" type="Node3D" unique_id=1464572050 groups=["weather_node", "wind_node"]]
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="." unique_id=1040579890]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.7, 0.214, 0)
|
||||
material_override = SubResource("ShaderMaterial_m6haf")
|
||||
material_overlay = SubResource("ShaderMaterial_duyun")
|
||||
mesh = SubResource("BoxMesh_w0ibq")
|
||||
|
||||
[node name="MeshInstance3D2" type="MeshInstance3D" parent="." unique_id=1870708237]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.7, 0.214, 0)
|
||||
material_override = SubResource("ShaderMaterial_fttrp")
|
||||
material_overlay = SubResource("ShaderMaterial_hb1ej")
|
||||
mesh = SubResource("BoxMesh_w0ibq")
|
||||
|
||||
[node name="MeshInstance3D3" type="MeshInstance3D" parent="." unique_id=170245195]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.05, 0.5)
|
||||
material_override = SubResource("ShaderMaterial_pp4r2")
|
||||
material_overlay = SubResource("ShaderMaterial_pur2n")
|
||||
mesh = SubResource("BoxMesh_ysg1u")
|
||||
|
||||
[node name="MeshInstance3D4" type="MeshInstance3D" parent="." unique_id=1389288735]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.05, -0.5)
|
||||
material_override = SubResource("ShaderMaterial_x2uev")
|
||||
material_overlay = SubResource("ShaderMaterial_qv8m2")
|
||||
mesh = SubResource("BoxMesh_ysg1u")
|
||||
|
||||
[node name="MeshInstance3D5" type="MeshInstance3D" parent="." unique_id=1376217081]
|
||||
visible = false
|
||||
material_override = SubResource("ShaderMaterial_5u2u8")
|
||||
mesh = SubResource("BoxMesh_m6haf")
|
||||
[node name="rail" parent="." unique_id=651719760 instance=ExtResource("2_u53q0")]
|
||||
transform = Transform3D(1.53, 0, 0, 0, 1.53, 0, 0, 0, 1.53, 0, 0, 0)
|
||||
|
||||
@@ -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://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://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"]
|
||||
|
||||
@@ -22,6 +22,7 @@ UIEvents="*uid://dehu28iq27mbn"
|
||||
GameState="*uid://b17g2w2g101o6"
|
||||
CollectionManager="*uid://c3kq1qddpm8tf"
|
||||
AudioManager="*uid://dcttbbavtwtsg"
|
||||
SceneManager="*uid://bw8hwkw55j675"
|
||||
|
||||
[display]
|
||||
|
||||
|
||||
@@ -4,9 +4,14 @@
|
||||
[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://4xhpd6lust7w" path="res://tgcc/chunk/material/path_chunk.tres" id="3_4d433"]
|
||||
[ext_resource type="Script" uid="uid://c5ercbqy7srx3" path="res://core/biome_generator/entity_spawn_point.gd" id="3_sddh0"]
|
||||
[ext_resource type="Material" uid="uid://ce0bdk3mx2xao" path="res://tgcc/chunk/material/water_chunk.tres" id="4_r06ll"]
|
||||
[ext_resource type="PackedScene" uid="uid://be1px5nxfr4hs" path="res://tgcc/chunk/prop/scarecrow/scarecrow.tscn" id="4_vtfy7"]
|
||||
[ext_resource type="PackedScene" uid="uid://chhdorj82bkus" path="res://tgcc/chunk/prop/scarecrow/scarecrow2.tscn" id="5_mm7rq"]
|
||||
[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://dn2b3f3nr6btn" path="res://tgcc/chunk/prop/scarecrow/scarecrow3.tscn" id="6_bpm3x"]
|
||||
[ext_resource type="Material" uid="uid://jygb1hcokks5" path="res://tgcc/chunk/prop/grass/grass_bank.tres" id="6_ckjyx"]
|
||||
[ext_resource type="PackedScene" uid="uid://cn2n7ehlt6hya" path="res://tgcc/chunk/prop/empty.tscn" id="7_mm7rq"]
|
||||
[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="PackedScene" uid="uid://bgb4pfflokl5s" path="res://tgcc/chunk/prop/pylon/pylon.tscn" id="10_r06ll"]
|
||||
@@ -52,22 +57,32 @@ have_lamppost = true
|
||||
connection_left = [NodePath("PaloLuce/sx")]
|
||||
connection_right = [NodePath("PaloLuce/dx")]
|
||||
|
||||
[node name="Argini_001" parent="." index="0" unique_id=439223507]
|
||||
[node name="Prop_Humanoid" 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_sddh0")
|
||||
allowed_type = 1
|
||||
|
||||
[node name="Prop_Animal" type="Marker3D" parent="." index="1" unique_id=537927515]
|
||||
transform = Transform3D(-1, 0, 8.742278e-08, 0, 1, 0, -8.742278e-08, 0, -1, 6.568111, 8.177522, 6.6475058)
|
||||
script = ExtResource("3_sddh0")
|
||||
allowed_type = 2
|
||||
|
||||
[node name="Argini_001" parent="." index="2" unique_id=1474838784]
|
||||
surface_material_override/0 = ExtResource("2_ewqv4")
|
||||
|
||||
[node name="Chunk_005" parent="." index="1" unique_id=1955568282]
|
||||
[node name="Chunk_005" parent="." index="3" unique_id=844192036]
|
||||
surface_material_override/0 = ExtResource("2_ewqv4")
|
||||
|
||||
[node name="Chunk_036" parent="." index="2" unique_id=1808067169 groups=["weather_node"]]
|
||||
[node name="Chunk_036" parent="." index="4" unique_id=1584066508 groups=["weather_node"]]
|
||||
surface_material_override/0 = ExtResource("3_4d433")
|
||||
|
||||
[node name="Chunk_037" parent="." index="3" unique_id=1338393481 groups=["weather_node"]]
|
||||
[node name="Chunk_037" parent="." index="5" unique_id=1100757609 groups=["weather_node"]]
|
||||
surface_material_override/0 = ExtResource("3_4d433")
|
||||
|
||||
[node name="Water_003" parent="." index="4" unique_id=1175879696]
|
||||
[node name="Water_003" parent="." index="6" unique_id=1047599796]
|
||||
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="7" unique_id=924191951 groups=["weather_vegetables_node", "wind_node"]]
|
||||
|
||||
[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)
|
||||
@@ -98,7 +113,7 @@ material_override = ExtResource("8_vtfy7")
|
||||
cast_shadow = 0
|
||||
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="8" unique_id=318026795 groups=["weather_vegetables_node", "wind_node"]]
|
||||
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]
|
||||
@@ -911,7 +926,7 @@ cast_shadow = 0
|
||||
mesh = SubResource("PlaneMesh_oviqx")
|
||||
surface_material_override/0 = ExtResource("7_y2fk3")
|
||||
|
||||
[node name="PaloLuce" parent="." index="7" unique_id=1607500596 instance=ExtResource("10_r06ll")]
|
||||
[node name="PaloLuce" parent="." index="9" 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"]
|
||||
|
||||
@@ -10,6 +10,11 @@
|
||||
[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="PackedScene" uid="uid://c7hdw2g6sbygr" path="res://tgcc/chunk/prop/tree/bambù/bambù.tscn" id="10_x1bjv"]
|
||||
[ext_resource type="Script" uid="uid://dg6ngy4pmtsyc" path="res://core/biome_generator/prop_info.gd" id="11_wt3n1"]
|
||||
[ext_resource type="PackedScene" uid="uid://be1px5nxfr4hs" path="res://tgcc/chunk/prop/scarecrow/scarecrow.tscn" id="12_wjqm7"]
|
||||
[ext_resource type="PackedScene" uid="uid://chhdorj82bkus" path="res://tgcc/chunk/prop/scarecrow/scarecrow2.tscn" id="13_newgk"]
|
||||
[ext_resource type="PackedScene" uid="uid://dn2b3f3nr6btn" path="res://tgcc/chunk/prop/scarecrow/scarecrow3.tscn" id="14_lgi3t"]
|
||||
[ext_resource type="PackedScene" uid="uid://cn2n7ehlt6hya" path="res://tgcc/chunk/prop/empty.tscn" id="15_8pj4d"]
|
||||
|
||||
[sub_resource type="PlaneMesh" id="PlaneMesh_wt3n1"]
|
||||
size = Vector2(0.5, 0.5)
|
||||
@@ -955,3 +960,13 @@ transform = Transform3D(-0.99579215, -0.09164066, -8.742278e-08, -0.09164066, 0.
|
||||
|
||||
[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)
|
||||
|
||||
[node name="Prop1" type="Marker3D" parent="." index="7" unique_id=308396303]
|
||||
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, -5.899247, 0.35683155, 5.9334393)
|
||||
script = ExtResource("11_wt3n1")
|
||||
available_props = Array[PackedScene]([ExtResource("12_wjqm7"), ExtResource("13_newgk"), ExtResource("14_lgi3t"), ExtResource("15_8pj4d")])
|
||||
|
||||
[node name="Prop2" type="Marker3D" parent="." index="8" unique_id=1683081972]
|
||||
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, -0.00079250336, 0.35683155, -5.8335304)
|
||||
script = ExtResource("11_wt3n1")
|
||||
available_props = Array[PackedScene]([ExtResource("12_wjqm7"), ExtResource("13_newgk"), ExtResource("14_lgi3t"), ExtResource("15_8pj4d")])
|
||||
|
||||
@@ -16,10 +16,11 @@
|
||||
[ext_resource type="Material" uid="uid://4xhpd6lust7w" path="res://tgcc/chunk/material/path_chunk.tres" id="11_5yfr5"]
|
||||
[ext_resource type="Material" uid="uid://baot4vy3fqrdw" path="res://tgcc/chunk/prop/flower/bush.tres" id="11_sjr85"]
|
||||
[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/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="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="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"]
|
||||
size = Vector2(0.5, 0.5)
|
||||
@@ -73,6 +74,7 @@ shader_parameter/light_steps = 10.0
|
||||
shader_parameter/random_mix = 0.0
|
||||
shader_parameter/cast_shadow_strength = 0.0
|
||||
shader_parameter/wetness_darkening = 0.25
|
||||
shader_parameter/snow_visibility = 1.0
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_5yfr5"]
|
||||
offsets = PackedFloat32Array(1, 1)
|
||||
@@ -503,7 +505,10 @@ 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, 0.92608833, 0, -0.97701275)
|
||||
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="TreeTest4"]
|
||||
|
||||
@@ -12,6 +12,15 @@
|
||||
[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="Script" uid="uid://dg6ngy4pmtsyc" path="res://core/biome_generator/prop_info.gd" id="13_3qh3w"]
|
||||
[ext_resource type="PackedScene" uid="uid://be1px5nxfr4hs" path="res://tgcc/chunk/prop/scarecrow/scarecrow.tscn" id="13_fspb5"]
|
||||
[ext_resource type="PackedScene" uid="uid://chhdorj82bkus" path="res://tgcc/chunk/prop/scarecrow/scarecrow2.tscn" id="15_yg7g5"]
|
||||
[ext_resource type="PackedScene" uid="uid://dn2b3f3nr6btn" path="res://tgcc/chunk/prop/scarecrow/scarecrow3.tscn" id="16_x3b0m"]
|
||||
[ext_resource type="PackedScene" uid="uid://cn2n7ehlt6hya" path="res://tgcc/chunk/prop/empty.tscn" id="17_fo87f"]
|
||||
[ext_resource type="PackedScene" uid="uid://dho6nfkjoyqls" path="res://tgcc/chunk/prop/sign/scene/sign_2.tscn" id="18_aebao"]
|
||||
[ext_resource type="PackedScene" uid="uid://blev8k57qnb6v" path="res://tgcc/chunk/prop/sign/scene/sign_1.tscn" id="19_13g36"]
|
||||
[ext_resource type="PackedScene" uid="uid://swbs2s3libd3" path="res://tgcc/chunk/prop/sign/scene/sign_3.tscn" id="20_le1e5"]
|
||||
[ext_resource type="PackedScene" uid="uid://b5fhktgyjcxhn" path="res://tgcc/chunk/prop/sign/scene/sign_4.tscn" id="21_f427r"]
|
||||
|
||||
[sub_resource type="PlaneMesh" id="PlaneMesh_piek1"]
|
||||
size = Vector2(0.5, 0.5)
|
||||
@@ -900,3 +909,28 @@ transform = Transform3D(-4.371139e-08, 0.013473534, -0.9999092, 0, 0.9999092, 0.
|
||||
|
||||
[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="Prop2" type="Marker3D" parent="." index="9" unique_id=778261734]
|
||||
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, -6.009877, 0.35683155, 0.043001175)
|
||||
script = ExtResource("13_3qh3w")
|
||||
available_props = Array[PackedScene]([ExtResource("13_fspb5"), ExtResource("15_yg7g5"), ExtResource("16_x3b0m"), ExtResource("17_fo87f")])
|
||||
|
||||
[node name="Prop3" type="Marker3D" parent="." index="10" unique_id=820130140]
|
||||
transform = Transform3D(-1, 0, 8.742278e-08, 0, 1, 0, -8.742278e-08, 0, -1, 5.9794493, 0.7136631, -5.921642)
|
||||
script = ExtResource("13_3qh3w")
|
||||
available_props = Array[PackedScene]([ExtResource("13_fspb5"), ExtResource("15_yg7g5"), ExtResource("16_x3b0m"), ExtResource("17_fo87f")])
|
||||
|
||||
[node name="Prop4" type="Marker3D" parent="." index="11" unique_id=632231780]
|
||||
transform = Transform3D(1.3113416e-07, 0, 1, 0, 1, 0, -1, 0, 1.3113416e-07, 5.927927, 1.0704947, 6.158152)
|
||||
script = ExtResource("13_3qh3w")
|
||||
available_props = Array[PackedScene]([ExtResource("13_fspb5"), ExtResource("15_yg7g5"), ExtResource("16_x3b0m"), ExtResource("17_fo87f")])
|
||||
|
||||
[node name="Prop6" type="Marker3D" parent="." index="12" unique_id=871422935]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.1217992, 0.042618692, 9.309157)
|
||||
script = ExtResource("13_3qh3w")
|
||||
available_props = Array[PackedScene]([ExtResource("17_fo87f"), ExtResource("19_13g36"), ExtResource("18_aebao"), ExtResource("21_f427r"), ExtResource("20_le1e5")])
|
||||
|
||||
[node name="Prop7" type="Marker3D" parent="." index="13" unique_id=1199373586]
|
||||
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 1.663, 0, -1.181)
|
||||
script = ExtResource("13_3qh3w")
|
||||
available_props = Array[PackedScene]([ExtResource("17_fo87f"), ExtResource("19_13g36"), ExtResource("18_aebao"), ExtResource("21_f427r"), ExtResource("20_le1e5")])
|
||||
|
||||
@@ -17,6 +17,17 @@
|
||||
[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="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"]
|
||||
[ext_resource type="Script" uid="uid://dg6ngy4pmtsyc" path="res://core/biome_generator/prop_info.gd" id="19_mw0dk"]
|
||||
[ext_resource type="PackedScene" uid="uid://cn2n7ehlt6hya" path="res://tgcc/chunk/prop/empty.tscn" id="20_qayvj"]
|
||||
[ext_resource type="PackedScene" uid="uid://blev8k57qnb6v" path="res://tgcc/chunk/prop/sign/scene/sign_1.tscn" id="21_6iw0h"]
|
||||
[ext_resource type="PackedScene" uid="uid://dho6nfkjoyqls" path="res://tgcc/chunk/prop/sign/scene/sign_2.tscn" id="22_e3wev"]
|
||||
[ext_resource type="PackedScene" uid="uid://b5fhktgyjcxhn" path="res://tgcc/chunk/prop/sign/scene/sign_4.tscn" id="23_xydfo"]
|
||||
[ext_resource type="PackedScene" uid="uid://swbs2s3libd3" path="res://tgcc/chunk/prop/sign/scene/sign_3.tscn" id="24_1bb53"]
|
||||
[ext_resource type="PackedScene" uid="uid://be1px5nxfr4hs" path="res://tgcc/chunk/prop/scarecrow/scarecrow.tscn" id="25_e3wev"]
|
||||
[ext_resource type="PackedScene" uid="uid://chhdorj82bkus" path="res://tgcc/chunk/prop/scarecrow/scarecrow2.tscn" id="26_xydfo"]
|
||||
[ext_resource type="PackedScene" uid="uid://dn2b3f3nr6btn" path="res://tgcc/chunk/prop/scarecrow/scarecrow3.tscn" id="27_1bb53"]
|
||||
[ext_resource type="PackedScene" uid="uid://co2r77xcdktu1" path="res://tgcc/chunk/prop/windhousedecoration/wind_decoration.tscn" id="28_xydfo"]
|
||||
|
||||
[sub_resource type="PlaneMesh" id="PlaneMesh_kiycf"]
|
||||
size = Vector2(0.5, 0.5)
|
||||
@@ -774,3 +785,22 @@ transform = Transform3D(0.99893546, 0.04613013, 0, -0.046085197, 0.9979625, 0.04
|
||||
|
||||
[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)
|
||||
|
||||
[node name="Prop7" type="Marker3D" parent="." index="19" unique_id=228771879]
|
||||
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 1.7960589, 0.042618692, -0.8912107)
|
||||
script = ExtResource("19_mw0dk")
|
||||
available_props = Array[PackedScene]([ExtResource("20_qayvj"), ExtResource("21_6iw0h"), ExtResource("22_e3wev"), ExtResource("23_xydfo"), ExtResource("24_1bb53")])
|
||||
|
||||
[node name="Prop2" type="Marker3D" parent="." index="20" unique_id=1453317700]
|
||||
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, -6.009877, 0.35683155, 0.043001175)
|
||||
script = ExtResource("19_mw0dk")
|
||||
available_props = Array[PackedScene]([ExtResource("25_e3wev"), ExtResource("26_xydfo"), ExtResource("27_1bb53"), ExtResource("20_qayvj")])
|
||||
|
||||
[node name="WindDecoration" parent="." index="21" unique_id=2146740679 instance=ExtResource("28_xydfo")]
|
||||
transform = Transform3D(1.9905398, 0.19395185, 0.011580614, -0.19368553, 1.9901968, -0.04003887, -0.015406657, 0.03872799, 1.9995658, 4.4318647, 2.1423423, -3.9336014)
|
||||
|
||||
[node name="WindDecoration2" parent="." index="22" unique_id=1273410990 instance=ExtResource("28_xydfo")]
|
||||
transform = Transform3D(1.999275, -0.053754073, 0.003284915, 0.05310862, 1.9881506, 0.21080151, -0.008931173, -0.21063784, 1.9888572, 4.7311583, 2.1197329, -3.9115348)
|
||||
|
||||
@@ -20,8 +20,17 @@
|
||||
[ext_resource type="Material" uid="uid://bjrb33qwp1p43" path="res://tgcc/chunk/prop/grass/grass_chunk_weeds.tres" id="15_eqqqg"]
|
||||
[ext_resource type="Material" uid="uid://0x17mj2v807r" path="res://tgcc/chunk/prop/grass/grass_chunk_weeds2.tres" id="16_gwwx4"]
|
||||
[ext_resource type="PackedScene" uid="uid://c7hdw2g6sbygr" path="res://tgcc/chunk/prop/tree/bambù/bambù.tscn" id="20_nekti"]
|
||||
[ext_resource type="PackedScene" uid="uid://d12t04rs47jq3" path="res://tgcc/chunk/prop/tree/tree_01.tscn" id="21_jphge"]
|
||||
[ext_resource type="PackedScene" uid="uid://d12t04rs47jq3" path="res://tgcc/chunk/prop/tree/tree_01/tree_01.tscn" id="21_jphge"]
|
||||
[ext_resource type="PackedScene" uid="uid://dluogg3j2kcgs" path="res://tgcc/chunk/prop/Tori/tori.tscn" id="22_jphge"]
|
||||
[ext_resource type="PackedScene" uid="uid://5ap10ax3lnr7" path="res://tgcc/chunk/prop/vending machine/vending_machine_1.tscn" id="23_aj7x1"]
|
||||
[ext_resource type="PackedScene" uid="uid://l3inky72a783" path="res://tgcc/chunk/prop/well/stone/well_stone.tscn" id="24_ufr67"]
|
||||
[ext_resource type="Script" uid="uid://dg6ngy4pmtsyc" path="res://core/biome_generator/prop_info.gd" id="25_8sefc"]
|
||||
[ext_resource type="PackedScene" uid="uid://cn2n7ehlt6hya" path="res://tgcc/chunk/prop/empty.tscn" id="26_dvfkd"]
|
||||
[ext_resource type="PackedScene" uid="uid://blev8k57qnb6v" path="res://tgcc/chunk/prop/sign/scene/sign_1.tscn" id="27_ap8sf"]
|
||||
[ext_resource type="PackedScene" uid="uid://dho6nfkjoyqls" path="res://tgcc/chunk/prop/sign/scene/sign_2.tscn" id="28_mtqws"]
|
||||
[ext_resource type="PackedScene" uid="uid://b5fhktgyjcxhn" path="res://tgcc/chunk/prop/sign/scene/sign_4.tscn" id="29_kujqa"]
|
||||
[ext_resource type="PackedScene" uid="uid://swbs2s3libd3" path="res://tgcc/chunk/prop/sign/scene/sign_3.tscn" id="30_jwe44"]
|
||||
[ext_resource type="PackedScene" uid="uid://e08y0isvh5xs" path="res://tgcc/chunk/prop/tenda noren/tenda1.tscn" id="31_dvfkd"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_en6je"]
|
||||
render_priority = 0
|
||||
@@ -81,6 +90,7 @@ shader_parameter/light_steps = 10.0
|
||||
shader_parameter/random_mix = 0.0
|
||||
shader_parameter/cast_shadow_strength = 0.0
|
||||
shader_parameter/wetness_darkening = 0.25
|
||||
shader_parameter/snow_visibility = 1.0
|
||||
|
||||
[sub_resource type="MultiMesh" id="MultiMesh_eqqqg"]
|
||||
transform_format = 1
|
||||
@@ -134,6 +144,28 @@ shader_parameter/light_steps = 10.0
|
||||
shader_parameter/random_mix = 0.0
|
||||
shader_parameter/cast_shadow_strength = 0.0
|
||||
shader_parameter/wetness_darkening = 0.25
|
||||
shader_parameter/snow_visibility = 1.0
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_ufr67"]
|
||||
render_priority = 0
|
||||
shader = ExtResource("6_badpr")
|
||||
shader_parameter/albedo_color = Color(0.14418072, 0.1760445, 0.47109693, 1)
|
||||
shader_parameter/use_texture = true
|
||||
shader_parameter/uv_scale = Vector2(1, 1)
|
||||
shader_parameter/palette_shift_y = 0.0
|
||||
shader_parameter/gradient_start_y = 0.0
|
||||
shader_parameter/gradient_end_y = 10.0
|
||||
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_03" unique_id=643218732 instance=ExtResource("1_udhcw")]
|
||||
script = ExtResource("2_cu4ct")
|
||||
@@ -152,6 +184,12 @@ surface_material_override/0 = ExtResource("5_dwl4p")
|
||||
[node name="Cortile_003" parent="." index="2" unique_id=1183773984 groups=["weather_node"]]
|
||||
surface_material_override/0 = ExtResource("5_dwl4p")
|
||||
|
||||
[node name="Cube_041" parent="." index="3" unique_id=2123223496]
|
||||
visible = false
|
||||
|
||||
[node name="Cube_042" parent="." index="4" unique_id=1973044231]
|
||||
visible = false
|
||||
|
||||
[node name="Cylinder_007" parent="." index="5" unique_id=1954949661]
|
||||
surface_material_override/0 = SubResource("ShaderMaterial_en6je")
|
||||
|
||||
@@ -510,5 +548,36 @@ material_override = SubResource("ShaderMaterial_aj7x1")
|
||||
[node name="Tori" parent="." index="22" unique_id=426190097 instance=ExtResource("22_jphge")]
|
||||
transform = Transform3D(4.5298744e-08, 0, -0.6, 0, 0.6, 0, 0.6, 0, 4.5298744e-08, 8.327267, 0, 0)
|
||||
|
||||
[node name="VendingMachine_1" parent="." index="23" unique_id=595764774 instance=ExtResource("23_aj7x1")]
|
||||
transform = Transform3D(0.785, 0, 0, 0, 0.785, 0, 0, 0, 0.785, -2.9157195, 0, 4.0503273)
|
||||
|
||||
[node name="Cartello" parent="VendingMachine_1" index="0" unique_id=83833849]
|
||||
visible = false
|
||||
|
||||
[node name="VendingMachine_2" parent="." index="24" unique_id=200256890 instance=ExtResource("23_aj7x1")]
|
||||
transform = Transform3D(0.785, 0, 0, 0, 0.785, 0, 0, 0, 0.785, -2.9157195, 0, 2.9496164)
|
||||
|
||||
[node name="Cartello" parent="VendingMachine_2" index="0" unique_id=83833849]
|
||||
visible = false
|
||||
|
||||
[node name="Vending machine" parent="VendingMachine_2" index="2" unique_id=989971963]
|
||||
surface_material_override/1 = SubResource("ShaderMaterial_ufr67")
|
||||
|
||||
[node name="well_stone" parent="." index="25" unique_id=2044144917 instance=ExtResource("24_ufr67")]
|
||||
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, -7.960206, 0, -7.837294)
|
||||
|
||||
[node name="Prop7" type="Marker3D" parent="." index="26" unique_id=1712576644]
|
||||
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 1.7960589, 0.042618692, -0.8912107)
|
||||
script = ExtResource("25_8sefc")
|
||||
available_props = Array[PackedScene]([ExtResource("26_dvfkd"), ExtResource("27_ap8sf"), ExtResource("28_mtqws"), ExtResource("29_kujqa"), ExtResource("30_jwe44")])
|
||||
|
||||
[node name="Tenda" parent="." index="27" unique_id=1345812366 instance=ExtResource("31_dvfkd")]
|
||||
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, -3.3930097, 0.71891594, -1.0331697)
|
||||
|
||||
[node name="Tenda2" parent="." index="28" unique_id=1021665362 instance=ExtResource("31_dvfkd")]
|
||||
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, -3.3930097, 0.71891594, -3.0399761)
|
||||
|
||||
[editable path="TreeTest5"]
|
||||
[editable path="TreeTest6"]
|
||||
[editable path="VendingMachine_1"]
|
||||
[editable path="VendingMachine_2"]
|
||||
|
||||
@@ -14,6 +14,13 @@
|
||||
[ext_resource type="Material" uid="uid://0x17mj2v807r" path="res://tgcc/chunk/prop/grass/grass_chunk_weeds2.tres" id="11_an7hd"]
|
||||
[ext_resource type="Material" uid="uid://baot4vy3fqrdw" path="res://tgcc/chunk/prop/flower/bush.tres" id="12_k6uxv"]
|
||||
[ext_resource type="Material" uid="uid://f5uoreickew7" path="res://tgcc/chunk/prop/flower/flower.tres" id="13_24u1s"]
|
||||
[ext_resource type="PackedScene" uid="uid://5ap10ax3lnr7" path="res://tgcc/chunk/prop/vending machine/vending_machine_1.tscn" id="15_an7hd"]
|
||||
[ext_resource type="Script" uid="uid://dg6ngy4pmtsyc" path="res://core/biome_generator/prop_info.gd" id="16_8x1q3"]
|
||||
[ext_resource type="PackedScene" uid="uid://cn2n7ehlt6hya" path="res://tgcc/chunk/prop/empty.tscn" id="17_jc462"]
|
||||
[ext_resource type="PackedScene" uid="uid://blev8k57qnb6v" path="res://tgcc/chunk/prop/sign/scene/sign_1.tscn" id="18_e8hed"]
|
||||
[ext_resource type="PackedScene" uid="uid://dho6nfkjoyqls" path="res://tgcc/chunk/prop/sign/scene/sign_2.tscn" id="19_3vlla"]
|
||||
[ext_resource type="PackedScene" uid="uid://b5fhktgyjcxhn" path="res://tgcc/chunk/prop/sign/scene/sign_4.tscn" id="20_qj7ai"]
|
||||
[ext_resource type="PackedScene" uid="uid://swbs2s3libd3" path="res://tgcc/chunk/prop/sign/scene/sign_3.tscn" id="21_jjc32"]
|
||||
|
||||
[sub_resource type="PlaneMesh" id="PlaneMesh_8pfxb"]
|
||||
size = Vector2(0.5, 0.5)
|
||||
@@ -70,54 +77,54 @@ est = true
|
||||
south = true
|
||||
west = true
|
||||
|
||||
[node name="Cavi_003" parent="." index="0" unique_id=1536880121]
|
||||
[node name="Cavi_003" parent="." index="0" unique_id=1683040552]
|
||||
surface_material_override/0 = ExtResource("2_k6fna")
|
||||
surface_material_override/1 = ExtResource("2_k6fna")
|
||||
|
||||
[node name="Chunk_008" parent="." index="1" unique_id=2026223215]
|
||||
[node name="Chunk_008" parent="." index="1" unique_id=978229734]
|
||||
surface_material_override/0 = ExtResource("3_0aavg")
|
||||
|
||||
[node name="Chunk_015" parent="." index="2" unique_id=983339955 groups=["weather_node"]]
|
||||
[node name="Chunk_015" parent="." index="2" unique_id=916064359 groups=["weather_node"]]
|
||||
surface_material_override/0 = ExtResource("4_642yp")
|
||||
|
||||
[node name="Flower_016" parent="." index="3" unique_id=2061052125]
|
||||
[node name="Flower_016" parent="." index="3" unique_id=1070776780]
|
||||
visible = false
|
||||
|
||||
[node name="FlowerG_015" parent="." index="4" unique_id=1164829892]
|
||||
[node name="FlowerG_015" parent="." index="4" unique_id=824525481]
|
||||
visible = false
|
||||
|
||||
[node name="House_C_1_004" parent="." index="5" unique_id=1513162211 groups=["weather_node"]]
|
||||
[node name="House_C_1_004" parent="." index="5" unique_id=518805396 groups=["weather_node"]]
|
||||
|
||||
[node name="House_C_1_004|Cube_023|Dupli|" parent="House_C_1_004" index="0" unique_id=2055325984]
|
||||
[node name="House_C_1_004|Cube_023|Dupli|" parent="House_C_1_004" index="0" unique_id=2033854223]
|
||||
surface_material_override/0 = ExtResource("5_wbwk3")
|
||||
surface_material_override/1 = ExtResource("6_b82gs")
|
||||
|
||||
[node name="House_C_1_005" parent="." index="6" unique_id=1325920285 groups=["weather_node"]]
|
||||
[node name="House_C_1_005" parent="." index="6" unique_id=68402630 groups=["weather_node"]]
|
||||
|
||||
[node name="House_C_1_005|Cube_023|Dupli|" parent="House_C_1_005" index="0" unique_id=803929754]
|
||||
[node name="House_C_1_005|Cube_023|Dupli|" parent="House_C_1_005" index="0" unique_id=1370013707]
|
||||
surface_material_override/0 = ExtResource("5_wbwk3")
|
||||
surface_material_override/1 = ExtResource("6_b82gs")
|
||||
|
||||
[node name="House_C_1_006" parent="." index="7" unique_id=2001122787 groups=["weather_node"]]
|
||||
[node name="House_C_1_006" parent="." index="7" unique_id=1206949995 groups=["weather_node"]]
|
||||
|
||||
[node name="House_C_1_006|Cube_023|Dupli|" parent="House_C_1_006" index="0" unique_id=1405616088]
|
||||
[node name="House_C_1_006|Cube_023|Dupli|" parent="House_C_1_006" index="0" unique_id=2100645541]
|
||||
surface_material_override/0 = ExtResource("5_wbwk3")
|
||||
surface_material_override/1 = ExtResource("6_b82gs")
|
||||
|
||||
[node name="House_C_1_007" parent="." index="8" unique_id=464621197 groups=["weather_node"]]
|
||||
[node name="House_C_1_007" parent="." index="8" unique_id=746675923 groups=["weather_node"]]
|
||||
|
||||
[node name="House_C_1_007|Cube_023|Dupli|" parent="House_C_1_007" index="0" unique_id=1780113381]
|
||||
[node name="House_C_1_007|Cube_023|Dupli|" parent="House_C_1_007" index="0" unique_id=869496471]
|
||||
surface_material_override/0 = ExtResource("5_wbwk3")
|
||||
surface_material_override/1 = ExtResource("6_b82gs")
|
||||
|
||||
[node name="Lanterne_004" parent="." index="9" unique_id=993819881]
|
||||
[node name="Lanterne_004" parent="." index="9" unique_id=1013830129]
|
||||
surface_material_override/0 = ExtResource("6_b82gs")
|
||||
surface_material_override/1 = ExtResource("5_wbwk3")
|
||||
|
||||
[node name="MSH_Staccioanta_1_017" parent="." index="10" unique_id=845283196 groups=["weather_node"]]
|
||||
[node name="MSH_Staccioanta_1_017" parent="." index="10" unique_id=1757093874 groups=["weather_node"]]
|
||||
surface_material_override/0 = ExtResource("7_be1u8")
|
||||
|
||||
[node name="PaliLuci_001" parent="." index="11" unique_id=1390758113]
|
||||
[node name="PaliLuci_001" parent="." index="11" unique_id=239883314]
|
||||
surface_material_override/0 = ExtResource("8_vvemo")
|
||||
surface_material_override/1 = ExtResource("8_vvemo")
|
||||
|
||||
@@ -475,3 +482,19 @@ shadow_enabled = true
|
||||
shadow_opacity = 0.96
|
||||
omni_range = 10.0
|
||||
omni_attenuation = 2.0
|
||||
|
||||
[node name="VendingMachine_1" parent="." index="16" unique_id=1157270784 instance=ExtResource("15_an7hd")]
|
||||
transform = Transform3D(-1, 0, 8.742278e-08, 0, 1, 0, -8.742278e-08, 0, -1, 1.384242, 0, 5.3458323)
|
||||
|
||||
[node name="VendingMachine_2" parent="." index="17" unique_id=2140135902 instance=ExtResource("15_an7hd")]
|
||||
transform = Transform3D(-1, 0, 8.742278e-08, 0, 1, 0, -8.742278e-08, 0, -1, 1.384242, 0, 6.6892433)
|
||||
|
||||
[node name="Prop7" type="Marker3D" parent="." index="18" unique_id=704248250]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.0779345, 0.042618692, 1.6671067)
|
||||
script = ExtResource("16_8x1q3")
|
||||
available_props = Array[PackedScene]([ExtResource("17_jc462"), ExtResource("18_e8hed"), ExtResource("19_3vlla"), ExtResource("20_qj7ai"), ExtResource("21_jjc32")])
|
||||
|
||||
[node name="Prop8" type="Marker3D" parent="." index="19" unique_id=572971113]
|
||||
transform = Transform3D(-1, 0, 8.742278e-08, 0, 1, 0, -8.742278e-08, 0, -1, -1.4561574, 0.042618692, -1.8439876)
|
||||
script = ExtResource("16_8x1q3")
|
||||
available_props = Array[PackedScene]([ExtResource("17_jc462"), ExtResource("18_e8hed"), ExtResource("19_3vlla"), ExtResource("20_qj7ai"), ExtResource("21_jjc32")])
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
[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="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"]
|
||||
[ext_resource type="PackedScene" uid="uid://e08y0isvh5xs" path="res://tgcc/chunk/prop/tenda noren/tenda1.tscn" id="21_ubhkt"]
|
||||
|
||||
[sub_resource type="PlaneMesh" id="PlaneMesh_7tu84"]
|
||||
size = Vector2(0.5, 0.5)
|
||||
@@ -748,3 +751,18 @@ transform = Transform3D(0.99579215, 0.09164066, 0, -0.09164066, 0.99579215, 0, 0
|
||||
|
||||
[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)
|
||||
|
||||
[node name="Tenda" parent="." index="24" unique_id=1345812366 instance=ExtResource("21_ubhkt")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6.7619095, 1.1459794, 8.959272)
|
||||
|
||||
[node name="Tenda2" parent="." index="25" unique_id=319841493 instance=ExtResource("21_ubhkt")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -4.7519994, 1.1459794, 8.959272)
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
[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"]
|
||||
size = Vector2(0.5, 0.5)
|
||||
@@ -785,4 +786,7 @@ transform = Transform3D(0.99390334, 0.110254735, 0, -0.110254735, 0.99390334, 0,
|
||||
[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"]
|
||||
|
||||
@@ -17,6 +17,9 @@
|
||||
[ext_resource type="Material" uid="uid://baot4vy3fqrdw" path="res://tgcc/chunk/prop/flower/bush.tres" id="15_eoqtk"]
|
||||
[ext_resource type="Material" uid="uid://f5uoreickew7" path="res://tgcc/chunk/prop/flower/flower.tres" id="16_d4do4"]
|
||||
[ext_resource type="PackedScene" uid="uid://c7hdw2g6sbygr" path="res://tgcc/chunk/prop/tree/bambù/bambù.tscn" id="17_lb2j0"]
|
||||
[ext_resource type="PackedScene" uid="uid://5ap10ax3lnr7" path="res://tgcc/chunk/prop/vending machine/vending_machine_1.tscn" id="18_x237o"]
|
||||
[ext_resource type="Shader" uid="uid://d0ch5ofrgf7y6" path="res://core/daynight/trunk_shader.gdshader" id="19_cl3bn"]
|
||||
[ext_resource type="PackedScene" uid="uid://e08y0isvh5xs" path="res://tgcc/chunk/prop/tenda noren/tenda1.tscn" id="20_eoqtk"]
|
||||
|
||||
[sub_resource type="PlaneMesh" id="PlaneMesh_g6h4y"]
|
||||
size = Vector2(0.5, 0.5)
|
||||
@@ -60,6 +63,48 @@ gradient = SubResource("Gradient_n2ly8")
|
||||
fill = 2
|
||||
fill_from = Vector2(0.5, 0.5)
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_cl3bn"]
|
||||
render_priority = 0
|
||||
shader = ExtResource("19_cl3bn")
|
||||
shader_parameter/albedo_color = Color(0.023529412, 0.23529412, 0.36078432, 1)
|
||||
shader_parameter/use_texture = true
|
||||
shader_parameter/uv_scale = Vector2(1, 1)
|
||||
shader_parameter/palette_shift_y = 0.0
|
||||
shader_parameter/gradient_start_y = 0.0
|
||||
shader_parameter/gradient_end_y = 10.0
|
||||
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_eoqtk"]
|
||||
render_priority = 0
|
||||
shader = ExtResource("19_cl3bn")
|
||||
shader_parameter/albedo_color = Color(0.024344679, 0.23358715, 0.3590951, 1)
|
||||
shader_parameter/use_texture = true
|
||||
shader_parameter/uv_scale = Vector2(1, 1)
|
||||
shader_parameter/palette_shift_y = 0.0
|
||||
shader_parameter/gradient_start_y = 0.0
|
||||
shader_parameter/gradient_end_y = 10.0
|
||||
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_straight_01" unique_id=926368352 instance=ExtResource("1_37ch6")]
|
||||
script = ExtResource("2_n2ly8")
|
||||
north = true
|
||||
@@ -523,3 +568,24 @@ transform = Transform3D(0.99579215, 0.09164066, 0, -0.09164066, 0.99579215, 0, 0
|
||||
|
||||
[node name="Bambù14" parent="Bambu" index="32" unique_id=136590564 instance=ExtResource("17_lb2j0")]
|
||||
transform = Transform3D(0.99390334, 0.110254735, 0, -0.110254735, 0.99390334, 0, 0, 0, 1, -7.7769127, 0.32301903, 5.6648054)
|
||||
|
||||
[node name="VendingMachine_1" parent="." index="20" unique_id=1157270784 instance=ExtResource("18_x237o")]
|
||||
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 1.4071379, -4.7683716e-07, 7.076941)
|
||||
|
||||
[node name="VendingMachine_2" parent="." index="21" unique_id=1783997867 instance=ExtResource("18_x237o")]
|
||||
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 1.4071379, -4.7683716e-07, 8.278086)
|
||||
|
||||
[node name="Cartello" parent="VendingMachine_2" index="0" unique_id=83833849]
|
||||
visible = false
|
||||
|
||||
[node name="CartelloUp" parent="VendingMachine_2" index="1" unique_id=237539239]
|
||||
surface_material_override/1 = SubResource("ShaderMaterial_cl3bn")
|
||||
|
||||
[node name="Vending machine" parent="VendingMachine_2" index="2" unique_id=989971963]
|
||||
surface_material_override/1 = SubResource("ShaderMaterial_eoqtk")
|
||||
|
||||
[node name="Tenda" parent="." index="22" unique_id=1345812366 instance=ExtResource("20_eoqtk")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -5.6964254, 1.0923817, -4.089067)
|
||||
|
||||
[editable path="VendingMachine_1"]
|
||||
[editable path="VendingMachine_2"]
|
||||
|
||||
@@ -21,6 +21,14 @@
|
||||
[ext_resource type="Material" uid="uid://f5uoreickew7" path="res://tgcc/chunk/prop/flower/flower.tres" id="18_ujo6s"]
|
||||
[ext_resource type="PackedScene" uid="uid://c7hdw2g6sbygr" path="res://tgcc/chunk/prop/tree/bambù/bambù.tscn" id="20_rrmel"]
|
||||
[ext_resource type="PackedScene" uid="uid://bgb4pfflokl5s" path="res://tgcc/chunk/prop/pylon/pylon.tscn" id="21_527eb"]
|
||||
[ext_resource type="PackedScene" uid="uid://5ap10ax3lnr7" path="res://tgcc/chunk/prop/vending machine/vending_machine_1.tscn" id="22_tsii7"]
|
||||
[ext_resource type="PackedScene" uid="uid://cff8d3fy3cd6b" path="res://tgcc/chunk/prop/well/wood/well_wood.tscn" id="23_5fhuo"]
|
||||
[ext_resource type="Script" uid="uid://dg6ngy4pmtsyc" path="res://core/biome_generator/prop_info.gd" id="24_vmqe2"]
|
||||
[ext_resource type="PackedScene" uid="uid://be1px5nxfr4hs" path="res://tgcc/chunk/prop/scarecrow/scarecrow.tscn" id="25_g8i5r"]
|
||||
[ext_resource type="PackedScene" uid="uid://chhdorj82bkus" path="res://tgcc/chunk/prop/scarecrow/scarecrow2.tscn" id="26_tmdaq"]
|
||||
[ext_resource type="PackedScene" uid="uid://dn2b3f3nr6btn" path="res://tgcc/chunk/prop/scarecrow/scarecrow3.tscn" id="27_w64vi"]
|
||||
[ext_resource type="PackedScene" uid="uid://cn2n7ehlt6hya" path="res://tgcc/chunk/prop/empty.tscn" id="28_1wvnd"]
|
||||
[ext_resource type="PackedScene" uid="uid://e08y0isvh5xs" path="res://tgcc/chunk/prop/tenda noren/tenda1.tscn" id="29_g8i5r"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_q2s76"]
|
||||
render_priority = 0
|
||||
@@ -165,54 +173,54 @@ have_lamppost = true
|
||||
connection_left = [NodePath("PaloLuce/sx")]
|
||||
connection_right = [NodePath("PaloLuce/dx")]
|
||||
|
||||
[node name="Argini_005" parent="." index="0" unique_id=255857931]
|
||||
[node name="Argini_005" parent="." index="0" unique_id=1699913806]
|
||||
surface_material_override/0 = ExtResource("2_t65ww")
|
||||
|
||||
[node name="Bags" parent="." index="1" unique_id=2117673123]
|
||||
[node name="Bags" parent="." index="1" unique_id=885374680]
|
||||
surface_material_override/0 = SubResource("ShaderMaterial_q2s76")
|
||||
|
||||
[node name="Cart" parent="." index="2" unique_id=884973125 groups=["weather_node"]]
|
||||
[node name="Cart" parent="." index="2" unique_id=1431553734 groups=["weather_node"]]
|
||||
surface_material_override/0 = ExtResource("11_iulsg")
|
||||
surface_material_override/1 = SubResource("ShaderMaterial_mqw0y")
|
||||
surface_material_override/2 = SubResource("ShaderMaterial_dxwao")
|
||||
|
||||
[node name="Chunk_045" parent="." index="3" unique_id=121750865 groups=["weather_node"]]
|
||||
[node name="Chunk_045" parent="." index="3" unique_id=905054485 groups=["weather_node"]]
|
||||
surface_material_override/0 = ExtResource("4_eev23")
|
||||
|
||||
[node name="Cortile" parent="." index="4" unique_id=91819151 groups=["weather_node"]]
|
||||
[node name="Cortile" parent="." index="4" unique_id=1916980077 groups=["weather_node"]]
|
||||
surface_material_override/0 = ExtResource("4_eev23")
|
||||
|
||||
[node name="Flower_002" parent="." index="5" unique_id=833640333 groups=["weather_vegetables_node", "wind_node"]]
|
||||
[node name="Flower_002" parent="." index="5" unique_id=879662150 groups=["weather_vegetables_node", "wind_node"]]
|
||||
visible = false
|
||||
|
||||
[node name="FlowerG_001" parent="." index="6" unique_id=1651138709 groups=["weather_vegetables_node", "wind_node"]]
|
||||
[node name="FlowerG_001" parent="." index="6" unique_id=506605481 groups=["weather_vegetables_node", "wind_node"]]
|
||||
visible = false
|
||||
|
||||
[node name="Grass_006" parent="." index="7" unique_id=2081004392 groups=["weather_vegetables_node", "wind_node"]]
|
||||
[node name="Grass_006" parent="." index="7" unique_id=921275290 groups=["weather_vegetables_node", "wind_node"]]
|
||||
surface_material_override/0 = ExtResource("2_t65ww")
|
||||
|
||||
[node name="House_L_2" parent="." index="8" unique_id=1993375668 groups=["weather_node"]]
|
||||
[node name="House_L_2" parent="." index="8" unique_id=1330804574 groups=["weather_node"]]
|
||||
|
||||
[node name="House_L_2|Cube_349|Dupli|" parent="House_L_2" index="0" unique_id=18124515]
|
||||
[node name="House_L_2|Cube_349|Dupli|" parent="House_L_2" index="0" unique_id=1823344237]
|
||||
surface_material_override/0 = ExtResource("5_0oa1i")
|
||||
surface_material_override/1 = ExtResource("7_q2s76")
|
||||
|
||||
[node name="MSH_Staccioanta_1_003" parent="." index="9" unique_id=568627289]
|
||||
[node name="MSH_Staccioanta_1_003" parent="." index="9" unique_id=1980961732]
|
||||
surface_material_override/0 = ExtResource("7_apgpv")
|
||||
|
||||
[node name="Rocks_001" parent="." index="10" unique_id=2004921299 groups=["weather_node"]]
|
||||
[node name="Rocks_001" parent="." index="10" unique_id=375547626 groups=["weather_node"]]
|
||||
surface_material_override/0 = ExtResource("5_sy58u")
|
||||
surface_material_override/1 = ExtResource("5_sy58u")
|
||||
surface_material_override/2 = ExtResource("6_eev23")
|
||||
|
||||
[node name="Statue" parent="." index="11" unique_id=1814801509]
|
||||
[node name="Statue" parent="." index="11" unique_id=1169373891]
|
||||
surface_material_override/0 = ExtResource("5_sy58u")
|
||||
surface_material_override/1 = ExtResource("7_q2s76")
|
||||
|
||||
[node name="Water_006" parent="." index="12" unique_id=1352334701]
|
||||
[node name="Water_006" parent="." index="12" unique_id=2064105008]
|
||||
surface_material_override/0 = ExtResource("10_r4bww")
|
||||
|
||||
[node name="WoodPile" parent="." index="13" unique_id=1088104699]
|
||||
[node name="WoodPile" parent="." index="13" unique_id=1512653267]
|
||||
surface_material_override/0 = ExtResource("11_iulsg")
|
||||
surface_material_override/1 = ExtResource("12_ytk0o")
|
||||
surface_material_override/2 = SubResource("ShaderMaterial_ytk0o")
|
||||
@@ -768,4 +776,23 @@ transform = Transform3D(-0.42840073, -0.10062032, -0.8979694, 0.015782116, 0.992
|
||||
[node name="PaloLuce" parent="." index="20" unique_id=1607500596 instance=ExtResource("21_527eb")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.3137894, 0, 1.503645)
|
||||
|
||||
[node name="VendingMachine_1" parent="." index="21" unique_id=1157270784 instance=ExtResource("22_tsii7")]
|
||||
transform = Transform3D(-1, 0, 8.742278e-08, 0, 1, 0, -8.742278e-08, 0, -1, 1.674514, 0, 1.5681319)
|
||||
|
||||
[node name="well_wood" parent="." index="22" unique_id=2128929413 instance=ExtResource("23_5fhuo")]
|
||||
transform = Transform3D(-1, 0, 8.742278e-08, 0, 1, 0, -8.742278e-08, 0, -1, 5.7742014, 0, 1.0249029)
|
||||
|
||||
[node name="Prop2" type="Marker3D" parent="." index="23" unique_id=1220014029]
|
||||
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 5.8930645, 0.35683155, -5.7293277)
|
||||
script = ExtResource("24_vmqe2")
|
||||
available_props = Array[PackedScene]([ExtResource("25_g8i5r"), ExtResource("26_tmdaq"), ExtResource("27_w64vi"), ExtResource("28_1wvnd")])
|
||||
|
||||
[node name="Prop2" type="Marker3D" parent="Prop2" index="0" unique_id=1596157579]
|
||||
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 11.625584, 0.35683155, 0.003191471)
|
||||
script = ExtResource("24_vmqe2")
|
||||
available_props = Array[PackedScene]([ExtResource("25_g8i5r"), ExtResource("26_tmdaq"), ExtResource("27_w64vi"), ExtResource("28_1wvnd")])
|
||||
|
||||
[node name="Tenda" parent="." index="24" unique_id=1345812366 instance=ExtResource("29_g8i5r")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -4.8348045, 1.0869424, -1.5693097)
|
||||
|
||||
[editable path="PaloLuce"]
|
||||
|
||||
@@ -11,6 +11,13 @@
|
||||
[ext_resource type="Material" uid="uid://bjrb33qwp1p43" path="res://tgcc/chunk/prop/grass/grass_chunk_weeds.tres" id="8_mds5d"]
|
||||
[ext_resource type="Material" uid="uid://0x17mj2v807r" path="res://tgcc/chunk/prop/grass/grass_chunk_weeds2.tres" id="9_5s0jh"]
|
||||
[ext_resource type="PackedScene" uid="uid://c7hdw2g6sbygr" path="res://tgcc/chunk/prop/tree/bambù/bambù.tscn" id="11_7lasv"]
|
||||
[ext_resource type="Script" uid="uid://dg6ngy4pmtsyc" path="res://core/biome_generator/prop_info.gd" id="12_keqgb"]
|
||||
[ext_resource type="PackedScene" uid="uid://l3inky72a783" path="res://tgcc/chunk/prop/well/stone/well_stone.tscn" id="12_kkc6w"]
|
||||
[ext_resource type="PackedScene" uid="uid://cn2n7ehlt6hya" path="res://tgcc/chunk/prop/empty.tscn" id="13_45od3"]
|
||||
[ext_resource type="PackedScene" uid="uid://cff8d3fy3cd6b" path="res://tgcc/chunk/prop/well/wood/well_wood.tscn" id="15_2hsar"]
|
||||
[ext_resource type="PackedScene" uid="uid://be1px5nxfr4hs" path="res://tgcc/chunk/prop/scarecrow/scarecrow.tscn" id="16_gable"]
|
||||
[ext_resource type="PackedScene" uid="uid://chhdorj82bkus" path="res://tgcc/chunk/prop/scarecrow/scarecrow2.tscn" id="17_a0gn5"]
|
||||
[ext_resource type="PackedScene" uid="uid://dn2b3f3nr6btn" path="res://tgcc/chunk/prop/scarecrow/scarecrow3.tscn" id="18_e3c12"]
|
||||
|
||||
[sub_resource type="PlaneMesh" id="PlaneMesh_uf7g8"]
|
||||
size = Vector2(1, 1)
|
||||
@@ -862,3 +869,18 @@ transform = Transform3D(-0.99722904, 0.034301233, -0.06601266, 0.034376215, 0.99
|
||||
|
||||
[node name="Bambù20" parent="rice" index="135" unique_id=790042848 instance=ExtResource("11_7lasv")]
|
||||
transform = Transform3D(-0.92917824, 0.06943477, 0.363052, 0.08790589, 0.9955283, 0.0345845, -0.3590272, 0.06404955, -0.9311271, -1.6899307, 0, 3.5738397)
|
||||
|
||||
[node name="Prop1" type="Marker3D" parent="." index="7" unique_id=362853951]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.8943415, 0.35683155, 0.043001175)
|
||||
script = ExtResource("12_keqgb")
|
||||
available_props = Array[PackedScene]([ExtResource("13_45od3"), ExtResource("12_kkc6w"), ExtResource("15_2hsar")])
|
||||
|
||||
[node name="Prop2" type="Marker3D" parent="." index="8" unique_id=1556303512]
|
||||
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, -6.009877, 0.35683155, 0.043001175)
|
||||
script = ExtResource("12_keqgb")
|
||||
available_props = Array[PackedScene]([ExtResource("16_gable"), ExtResource("17_a0gn5"), ExtResource("18_e3c12"), ExtResource("13_45od3")])
|
||||
|
||||
[node name="Prop3" type="Marker3D" parent="." index="9" unique_id=1117362414]
|
||||
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 6.1461954, 0.35683155, 0.043001175)
|
||||
script = ExtResource("12_keqgb")
|
||||
available_props = Array[PackedScene]([ExtResource("16_gable"), ExtResource("17_a0gn5"), ExtResource("18_e3c12"), ExtResource("13_45od3")])
|
||||
|
||||
File diff suppressed because one or more lines are too long
16
tgcc/chunk/material/glass.tres
Normal file
16
tgcc/chunk/material/glass.tres
Normal file
@@ -0,0 +1,16 @@
|
||||
[gd_resource type="ShaderMaterial" format=3 uid="uid://lt21ti7jo8yj"]
|
||||
|
||||
[ext_resource type="Shader" path="res://tgcc/chunk/material/script/glass.gdshader" id="1_yqmqd"]
|
||||
|
||||
[resource]
|
||||
render_priority = 0
|
||||
shader = ExtResource("1_yqmqd")
|
||||
shader_parameter/colore_vetro = Color(0.4, 0.7, 0.9, 0.4)
|
||||
shader_parameter/colore_bordo = Color(1, 1, 1, 0.8)
|
||||
shader_parameter/spessore_bordo = 2.5
|
||||
shader_parameter/dimensione_riflesso = 0.05
|
||||
shader_parameter/intensita_riflesso = 2.0
|
||||
shader_parameter/usa_strisce = true
|
||||
shader_parameter/colore_strisce = Color(1, 1, 1, 0.3)
|
||||
shader_parameter/densita_strisce = 6.0
|
||||
shader_parameter/spessore_strisce = 0.2
|
||||
15
tgcc/chunk/material/noise/roadnoise.tres
Normal file
15
tgcc/chunk/material/noise/roadnoise.tres
Normal file
@@ -0,0 +1,15 @@
|
||||
[gd_resource type="NoiseTexture2D" format=3 uid="uid://3y34uyq47ldc"]
|
||||
|
||||
[sub_resource type="FastNoiseLite" id="FastNoiseLite_12d2r"]
|
||||
noise_type = 2
|
||||
frequency = 0.05
|
||||
fractal_type = 3
|
||||
fractal_octaves = 3
|
||||
cellular_distance_function = 1
|
||||
cellular_return_type = 0
|
||||
domain_warp_enabled = true
|
||||
domain_warp_fractal_octaves = 1
|
||||
|
||||
[resource]
|
||||
noise = SubResource("FastNoiseLite_12d2r")
|
||||
seamless = true
|
||||
@@ -1,24 +1,12 @@
|
||||
[gd_resource type="ShaderMaterial" format=3 uid="uid://4xhpd6lust7w"]
|
||||
|
||||
[ext_resource type="Shader" uid="uid://d0ch5ofrgf7y6" path="res://core/daynight/trunk_shader.gdshader" id="1_vdxi4"]
|
||||
[ext_resource type="Shader" uid="uid://bteuuiddfgkpy" path="res://tgcc/chunk/material/script/path_chunk.gdshader" id="1_87s7i"]
|
||||
[ext_resource type="Texture2D" uid="uid://3y34uyq47ldc" path="res://tgcc/chunk/material/noise/roadnoise.tres" id="2_12d2r"]
|
||||
|
||||
[resource]
|
||||
render_priority = 0
|
||||
shader = ExtResource("1_vdxi4")
|
||||
shader_parameter/albedo_color = Color(0.42352942, 0.28235295, 0.14901961, 1)
|
||||
shader_parameter/use_texture = true
|
||||
shader_parameter/uv_scale = Vector2(1, 1)
|
||||
shader_parameter/palette_shift_y = 0.0
|
||||
shader_parameter/gradient_start_y = 0.0
|
||||
shader_parameter/gradient_end_y = 10.0
|
||||
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
|
||||
shader = ExtResource("1_87s7i")
|
||||
shader_parameter/colore_base = Color(0.6468814, 0.40295276, 0.23953745, 1)
|
||||
shader_parameter/colore_variazione = Color(0.764913, 0.46885282, 0.18989512, 1)
|
||||
shader_parameter/noise_tex = ExtResource("2_12d2r")
|
||||
shader_parameter/scala_noise = 0.1
|
||||
|
||||
@@ -1,24 +1,12 @@
|
||||
[gd_resource type="ShaderMaterial" format=3 uid="uid://b4luvp3fi0p43"]
|
||||
|
||||
[ext_resource type="Shader" uid="uid://d0ch5ofrgf7y6" path="res://core/daynight/trunk_shader.gdshader" id="1_r420k"]
|
||||
[ext_resource type="Shader" uid="uid://bteuuiddfgkpy" path="res://tgcc/chunk/material/script/path_chunk.gdshader" id="1_dmrgn"]
|
||||
[ext_resource type="Texture2D" uid="uid://3y34uyq47ldc" path="res://tgcc/chunk/material/noise/roadnoise.tres" id="2_avr54"]
|
||||
|
||||
[resource]
|
||||
render_priority = 0
|
||||
shader = ExtResource("1_r420k")
|
||||
shader_parameter/albedo_color = Color(0.29857817, 0.19353586, 0.0940836, 1)
|
||||
shader_parameter/use_texture = true
|
||||
shader_parameter/uv_scale = Vector2(1, 1)
|
||||
shader_parameter/palette_shift_y = 0.0
|
||||
shader_parameter/gradient_start_y = 0.0
|
||||
shader_parameter/gradient_end_y = 10.0
|
||||
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
|
||||
shader = ExtResource("1_dmrgn")
|
||||
shader_parameter/colore_base = Color(0.39256963, 0.25898555, 0.13550848, 1)
|
||||
shader_parameter/colore_variazione = Color(0.47384387, 0.31593436, 0.17293933, 1)
|
||||
shader_parameter/noise_tex = ExtResource("2_avr54")
|
||||
shader_parameter/scala_noise = 0.1
|
||||
|
||||
65
tgcc/chunk/material/script/glass.gdshader
Normal file
65
tgcc/chunk/material/script/glass.gdshader
Normal file
@@ -0,0 +1,65 @@
|
||||
shader_type spatial;
|
||||
// cull_disabled permette di vedere il vetro da entrambi i lati (utile se è un singolo piano)
|
||||
// depth_draw_opaque evita bug visivi di sovrapposizione tra oggetti trasparenti
|
||||
render_mode blend_mix, depth_draw_opaque, cull_disabled, shadows_disabled;
|
||||
|
||||
uniform vec4 colore_vetro : source_color = vec4(0.4, 0.7, 0.9, 0.4);
|
||||
|
||||
// --- EFFETTO BORDO (FRESNEL) ---
|
||||
uniform vec4 colore_bordo : source_color = vec4(1.0, 1.0, 1.0, 0.8);
|
||||
uniform float spessore_bordo : hint_range(0.0, 10.0) = 2.5;
|
||||
|
||||
// --- RIFLESSO DEL SOLE (SPECULAR) ---
|
||||
uniform float dimensione_riflesso : hint_range(0.0, 1.0) = 0.05;
|
||||
uniform float intensita_riflesso : hint_range(0.0, 5.0) = 2.0;
|
||||
|
||||
// --- STRISCE DIAGONALI (Opzionali, in stile Anime) ---
|
||||
uniform bool usa_strisce = true;
|
||||
uniform vec4 colore_strisce : source_color = vec4(1.0, 1.0, 1.0, 0.3);
|
||||
uniform float densita_strisce : hint_range(0.0, 20.0) = 6.0;
|
||||
uniform float spessore_strisce : hint_range(0.0, 1.0) = 0.2;
|
||||
|
||||
void fragment() {
|
||||
// 1. Calcoliamo il Fresnel (l'angolo di visuale rispetto alla normale del vetro)
|
||||
float fresnel = 1.0 - clamp(dot(NORMAL, VIEW), 0.0, 1.0);
|
||||
|
||||
// Applichiamo una curva "a gradino" (smoothstep) per renderlo in stile Toon (netto)
|
||||
float toon_fresnel = smoothstep(0.4, 0.45, pow(fresnel, spessore_bordo));
|
||||
|
||||
// 2. Calcoliamo le strisce diagonali
|
||||
float strisce = 0.0;
|
||||
if (usa_strisce) {
|
||||
// Crea linee diagonali basate sulle coordinate UV
|
||||
float pattern = fract((UV.x + UV.y) * densita_strisce);
|
||||
strisce = step(1.0 - spessore_strisce, pattern);
|
||||
}
|
||||
|
||||
// 3. Mescoliamo i colori
|
||||
vec3 colore_finale = mix(colore_vetro.rgb, colore_strisce.rgb, strisce * colore_strisce.a);
|
||||
colore_finale = mix(colore_finale, colore_bordo.rgb, toon_fresnel);
|
||||
|
||||
// 4. L'opacità aumenta sui bordi e sulle strisce
|
||||
float alpha_finale = colore_vetro.a;
|
||||
alpha_finale = max(alpha_finale, strisce * colore_strisce.a);
|
||||
alpha_finale = max(alpha_finale, toon_fresnel * colore_bordo.a);
|
||||
|
||||
ALBEDO = colore_finale;
|
||||
ALPHA = clamp(alpha_finale, 0.0, 1.0);
|
||||
}
|
||||
|
||||
void light() {
|
||||
// --- RIFLESSO TAGLIENTE DEL SOLE ---
|
||||
// Calcoliamo dove la luce colpisce il vetro rispetto alla telecamera
|
||||
vec3 half_vector = normalize(VIEW + LIGHT);
|
||||
float spec_dot = max(dot(NORMAL, half_vector), 0.0);
|
||||
|
||||
// Taglio netto per renderlo stile Toon (invece di una sfumatura realistica)
|
||||
float spec_toon = smoothstep(1.0 - dimensione_riflesso - 0.01, 1.0 - dimensione_riflesso, spec_dot);
|
||||
|
||||
// Luce Diffusa standard (piatta, ideale per il toon)
|
||||
float diff_dot = max(dot(NORMAL, LIGHT), 0.0);
|
||||
DIFFUSE_LIGHT += LIGHT_COLOR * ALBEDO * diff_dot * ATTENUATION;
|
||||
|
||||
// Aggiungiamo il riflesso speculare, moltiplicato per il colore della luce (così al tramonto è arancione!)
|
||||
SPECULAR_LIGHT += LIGHT_COLOR * spec_toon * intensita_riflesso * ATTENUATION;
|
||||
}
|
||||
1
tgcc/chunk/material/script/glass.gdshader.uid
Normal file
1
tgcc/chunk/material/script/glass.gdshader.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://dw42rl0af5h1m
|
||||
29
tgcc/chunk/material/script/path_chunk.gdshader
Normal file
29
tgcc/chunk/material/script/path_chunk.gdshader
Normal file
@@ -0,0 +1,29 @@
|
||||
shader_type spatial;
|
||||
|
||||
uniform vec3 colore_base : source_color = vec3(0.2, 0.2, 0.2);
|
||||
uniform vec3 colore_variazione : source_color = vec3(0.3, 0.3, 0.3);
|
||||
uniform sampler2D noise_tex;
|
||||
uniform float scala_noise = 0.1; // Più è basso, più la variazione è ampia e morbida
|
||||
|
||||
varying vec3 world_pos;
|
||||
|
||||
void vertex() {
|
||||
// Calcoliamo la posizione del vertice nello spazio del mondo
|
||||
world_pos = (MODEL_MATRIX * vec4(VERTEX, 1.0)).xyz;
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
// Usiamo le coordinate X e Z del mondo come UV per il noise
|
||||
// Questo rende il noise "immobile" rispetto al mondo, perfetto per i chunk
|
||||
vec2 uv_mondo = world_pos.xz * scala_noise;
|
||||
|
||||
// Campioniamo il noise
|
||||
float n = texture(noise_tex, uv_mondo).r;
|
||||
|
||||
// Mescoliamo i colori in base al valore del noise
|
||||
vec3 colore_finale = mix(colore_base, colore_variazione, n);
|
||||
|
||||
ALBEDO = colore_finale;
|
||||
METALLIC = 0.0;
|
||||
ROUGHNESS = 0.8;
|
||||
}
|
||||
1
tgcc/chunk/material/script/path_chunk.gdshader.uid
Normal file
1
tgcc/chunk/material/script/path_chunk.gdshader.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://bteuuiddfgkpy
|
||||
@@ -5,7 +5,7 @@
|
||||
[resource]
|
||||
render_priority = 0
|
||||
shader = ExtResource("1_vresk")
|
||||
shader_parameter/albedo_color = Color(0.48413807, 0.37183177, 0.06357419, 1)
|
||||
shader_parameter/albedo_color = Color(0.79855084, 0.6236654, 0.12806374, 1)
|
||||
shader_parameter/use_texture = true
|
||||
shader_parameter/uv_scale = Vector2(1, 1)
|
||||
shader_parameter/palette_shift_y = 0.0
|
||||
|
||||
44
tgcc/chunk/material/water_river.tres
Normal file
44
tgcc/chunk/material/water_river.tres
Normal file
@@ -0,0 +1,44 @@
|
||||
[gd_resource type="ShaderMaterial" format=3 uid="uid://d37iugof887py"]
|
||||
|
||||
[ext_resource type="Shader" uid="uid://cb12c2j8rfu6a" path="res://core/daynight/water_river.gdshader" id="1_qxgaw"]
|
||||
|
||||
[sub_resource type="FastNoiseLite" id="FastNoiseLite_qxgaw"]
|
||||
|
||||
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_ix712"]
|
||||
noise = SubResource("FastNoiseLite_qxgaw")
|
||||
seamless = true
|
||||
|
||||
[sub_resource type="FastNoiseLite" id="FastNoiseLite_ssur3"]
|
||||
frequency = 0.0228
|
||||
fractal_type = 2
|
||||
|
||||
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_qgvya"]
|
||||
noise = SubResource("FastNoiseLite_ssur3")
|
||||
seamless = true
|
||||
|
||||
[resource]
|
||||
render_priority = 1
|
||||
shader = ExtResource("1_qxgaw")
|
||||
shader_parameter/surface_color = Color(0.2, 1, 0.8, 1)
|
||||
shader_parameter/depth_color = Color(0.18124294, 0.496769, 0.33694285, 1)
|
||||
shader_parameter/foam_color = Color(0.6663343, 0.7351854, 0.66567737, 1)
|
||||
shader_parameter/depth_size = 12.0
|
||||
shader_parameter/surface_roughness = 0.05
|
||||
shader_parameter/foam_roughness = 0.05
|
||||
shader_parameter/caustics_strength = 2.0
|
||||
shader_parameter/caustics_scale = Vector2(0.5, 0.5)
|
||||
shader_parameter/wave_texture = SubResource("NoiseTexture2D_qgvya")
|
||||
shader_parameter/wave_softness = 2.80000004172336
|
||||
shader_parameter/wave_scale = Vector2(0.2, 0.2)
|
||||
shader_parameter/wave_layer_scale = Vector2(1.5, 1.5)
|
||||
shader_parameter/wave_highlight = 1.0
|
||||
shader_parameter/wave_velocity = Vector2(0.01, 0.15)
|
||||
shader_parameter/foam_texture = SubResource("NoiseTexture2D_ix712")
|
||||
shader_parameter/edge_foam_depth_size = 1.0
|
||||
shader_parameter/wave_foam_amount = 0.3499999921768
|
||||
shader_parameter/foam_start = 0.15000000223518
|
||||
shader_parameter/foam_end = 0.35000000521542
|
||||
shader_parameter/foam_exponent = 2.0
|
||||
shader_parameter/refraction_amount = 0.5
|
||||
shader_parameter/refraction_exponent = 0.5
|
||||
shader_parameter/displacement_amount = 0.0
|
||||
@@ -16,7 +16,7 @@ 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/use_ghibli_glint = false
|
||||
shader_parameter/glint_color = Color(1, 0.95, 0.85, 1)
|
||||
shader_parameter/glint_intensity = 1.0
|
||||
shader_parameter/glint_sharpness = 32.0
|
||||
|
||||
24
tgcc/chunk/material/wood_bridge.tres
Normal file
24
tgcc/chunk/material/wood_bridge.tres
Normal file
@@ -0,0 +1,24 @@
|
||||
[gd_resource type="ShaderMaterial" format=3 uid="uid://dbepc80w602ce"]
|
||||
|
||||
[ext_resource type="Shader" uid="uid://d0ch5ofrgf7y6" path="res://core/daynight/trunk_shader.gdshader" id="1_36htg"]
|
||||
|
||||
[resource]
|
||||
render_priority = 0
|
||||
shader = ExtResource("1_36htg")
|
||||
shader_parameter/albedo_color = Color(0.5128612, 0.093720816, 0.060247816, 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
|
||||
BIN
tgcc/chunk/prop/climax/Climax1.fbx
Normal file
BIN
tgcc/chunk/prop/climax/Climax1.fbx
Normal file
Binary file not shown.
44
tgcc/chunk/prop/climax/Climax1.fbx.import
Normal file
44
tgcc/chunk/prop/climax/Climax1.fbx.import
Normal file
@@ -0,0 +1,44 @@
|
||||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://cg7uflsb2i6ne"
|
||||
path="res://.godot/imported/Climax1.fbx-9b9155ea182f3dd72c214967d792819b.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://tgcc/chunk/prop/climax/Climax1.fbx"
|
||||
dest_files=["res://.godot/imported/Climax1.fbx-9b9155ea182f3dd72c214967d792819b.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type=""
|
||||
nodes/root_name=""
|
||||
nodes/root_script=null
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
nodes/use_name_suffixes=true
|
||||
nodes/use_node_type_suffixes=true
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=1
|
||||
meshes/lightmap_texel_size=0.2
|
||||
meshes/force_disable_compression=false
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=30
|
||||
animation/trimming=true
|
||||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
materials/extract=0
|
||||
materials/extract_format=0
|
||||
materials/extract_path=""
|
||||
_subresources={}
|
||||
fbx/importer=0
|
||||
fbx/allow_geometry_helper_nodes=false
|
||||
fbx/embedded_image_handling=1
|
||||
fbx/naming_version=2
|
||||
BIN
tgcc/chunk/prop/climax/Climax2.fbx
Normal file
BIN
tgcc/chunk/prop/climax/Climax2.fbx
Normal file
Binary file not shown.
44
tgcc/chunk/prop/climax/Climax2.fbx.import
Normal file
44
tgcc/chunk/prop/climax/Climax2.fbx.import
Normal file
@@ -0,0 +1,44 @@
|
||||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://cwp628nomm6ha"
|
||||
path="res://.godot/imported/Climax2.fbx-40270dfb4e624e6a5571edeecf83a72c.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://tgcc/chunk/prop/climax/Climax2.fbx"
|
||||
dest_files=["res://.godot/imported/Climax2.fbx-40270dfb4e624e6a5571edeecf83a72c.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type=""
|
||||
nodes/root_name=""
|
||||
nodes/root_script=null
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
nodes/use_name_suffixes=true
|
||||
nodes/use_node_type_suffixes=true
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=1
|
||||
meshes/lightmap_texel_size=0.2
|
||||
meshes/force_disable_compression=false
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=30
|
||||
animation/trimming=true
|
||||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
materials/extract=0
|
||||
materials/extract_format=0
|
||||
materials/extract_path=""
|
||||
_subresources={}
|
||||
fbx/importer=0
|
||||
fbx/allow_geometry_helper_nodes=false
|
||||
fbx/embedded_image_handling=1
|
||||
fbx/naming_version=2
|
||||
101
tgcc/chunk/prop/climax/climax_1.tscn
Normal file
101
tgcc/chunk/prop/climax/climax_1.tscn
Normal file
@@ -0,0 +1,101 @@
|
||||
[gd_scene format=3 uid="uid://cqsp8pai6vw22"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://cg7uflsb2i6ne" path="res://tgcc/chunk/prop/climax/Climax1.fbx" id="1_nwuw7"]
|
||||
[ext_resource type="Material" uid="uid://d4vsl672lwv7" path="res://tgcc/chunk/material/rocks2.tres" id="2_4fwq4"]
|
||||
[ext_resource type="Shader" uid="uid://d0ch5ofrgf7y6" path="res://core/daynight/trunk_shader.gdshader" id="2_nhw2c"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_iswk2"]
|
||||
render_priority = 0
|
||||
shader = ExtResource("2_nhw2c")
|
||||
shader_parameter/albedo_color = Color(0.27450982, 0.07450981, 0.0627451, 1)
|
||||
shader_parameter/use_texture = true
|
||||
shader_parameter/uv_scale = Vector2(1, 1)
|
||||
shader_parameter/palette_shift_y = 0.0
|
||||
shader_parameter/gradient_start_y = 0.0
|
||||
shader_parameter/gradient_end_y = 10.0
|
||||
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_4fwq4"]
|
||||
render_priority = 0
|
||||
shader = ExtResource("2_nhw2c")
|
||||
shader_parameter/albedo_color = Color(0.16078432, 0.16078432, 0.14509805, 1)
|
||||
shader_parameter/use_texture = true
|
||||
shader_parameter/uv_scale = Vector2(1, 1)
|
||||
shader_parameter/palette_shift_y = 0.0
|
||||
shader_parameter/gradient_start_y = 0.0
|
||||
shader_parameter/gradient_end_y = 10.0
|
||||
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_mkhd8"]
|
||||
render_priority = 0
|
||||
shader = ExtResource("2_nhw2c")
|
||||
shader_parameter/albedo_color = Color(0.07058824, 0.07058824, 0.05882353, 1)
|
||||
shader_parameter/use_texture = true
|
||||
shader_parameter/uv_scale = Vector2(1, 1)
|
||||
shader_parameter/palette_shift_y = 0.0
|
||||
shader_parameter/gradient_start_y = 0.0
|
||||
shader_parameter/gradient_end_y = 10.0
|
||||
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_omht8"]
|
||||
render_priority = 0
|
||||
shader = ExtResource("2_nhw2c")
|
||||
shader_parameter/albedo_color = Color(0.22560775, 0.11085694, 0.011946052, 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="Climax1" unique_id=550260579 instance=ExtResource("1_nwuw7")]
|
||||
transform = Transform3D(-1, 0, 8.742278e-08, 0, 1, 0, -8.742278e-08, 0, -1, 0, 0, 0)
|
||||
|
||||
[node name="Climax1" parent="." index="0" unique_id=767839486]
|
||||
surface_material_override/0 = ExtResource("2_4fwq4")
|
||||
surface_material_override/1 = SubResource("ShaderMaterial_iswk2")
|
||||
surface_material_override/2 = SubResource("ShaderMaterial_4fwq4")
|
||||
surface_material_override/3 = SubResource("ShaderMaterial_mkhd8")
|
||||
|
||||
[node name="Wood" parent="." index="1" unique_id=733616168]
|
||||
surface_material_override/0 = SubResource("ShaderMaterial_omht8")
|
||||
81
tgcc/chunk/prop/climax/climax_2.tscn
Normal file
81
tgcc/chunk/prop/climax/climax_2.tscn
Normal file
@@ -0,0 +1,81 @@
|
||||
[gd_scene format=3 uid="uid://bklpig8fmtajl"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://cwp628nomm6ha" path="res://tgcc/chunk/prop/climax/Climax2.fbx" id="1_ne5e5"]
|
||||
[ext_resource type="Material" uid="uid://cn20mp8ep3yxu" path="res://tgcc/chunk/material/wires.tres" id="2_1wkfs"]
|
||||
[ext_resource type="Material" uid="uid://o31kp0jm07q3" path="res://tgcc/chunk/material/rocks.tres" id="2_k5n4y"]
|
||||
[ext_resource type="Shader" uid="uid://d0ch5ofrgf7y6" path="res://core/daynight/trunk_shader.gdshader" id="4_mg6bi"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_pmph7"]
|
||||
render_priority = 0
|
||||
shader = ExtResource("4_mg6bi")
|
||||
shader_parameter/albedo_color = Color(0.2730324, 0.07571889, 0.061361544, 1)
|
||||
shader_parameter/use_texture = true
|
||||
shader_parameter/uv_scale = Vector2(1, 1)
|
||||
shader_parameter/palette_shift_y = 0.0
|
||||
shader_parameter/gradient_start_y = 0.0
|
||||
shader_parameter/gradient_end_y = 10.0
|
||||
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_mg6bi"]
|
||||
render_priority = 0
|
||||
shader = ExtResource("4_mg6bi")
|
||||
shader_parameter/albedo_color = Color(0.15983945, 0.15983495, 0.14455321, 1)
|
||||
shader_parameter/use_texture = true
|
||||
shader_parameter/uv_scale = Vector2(1, 1)
|
||||
shader_parameter/palette_shift_y = 0.0
|
||||
shader_parameter/gradient_start_y = 0.0
|
||||
shader_parameter/gradient_end_y = 10.0
|
||||
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_pmvmt"]
|
||||
render_priority = 0
|
||||
shader = ExtResource("4_mg6bi")
|
||||
shader_parameter/albedo_color = Color(0.06964318, 0.06964233, 0.060149997, 1)
|
||||
shader_parameter/use_texture = true
|
||||
shader_parameter/uv_scale = Vector2(1, 1)
|
||||
shader_parameter/palette_shift_y = 0.0
|
||||
shader_parameter/gradient_start_y = 0.0
|
||||
shader_parameter/gradient_end_y = 10.0
|
||||
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="Climax2" unique_id=801526857 instance=ExtResource("1_ne5e5")]
|
||||
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 0, 0, 0)
|
||||
|
||||
[node name="Climax2" parent="." index="0" unique_id=1222631639]
|
||||
surface_material_override/0 = ExtResource("2_k5n4y")
|
||||
surface_material_override/1 = SubResource("ShaderMaterial_pmph7")
|
||||
surface_material_override/2 = SubResource("ShaderMaterial_mg6bi")
|
||||
surface_material_override/3 = SubResource("ShaderMaterial_pmvmt")
|
||||
|
||||
[node name="wallsupport" parent="." index="1" unique_id=1089897955]
|
||||
surface_material_override/0 = ExtResource("2_1wkfs")
|
||||
3
tgcc/chunk/prop/empty.tscn
Normal file
3
tgcc/chunk/prop/empty.tscn
Normal file
@@ -0,0 +1,3 @@
|
||||
[gd_scene format=3 uid="uid://cn2n7ehlt6hya"]
|
||||
|
||||
[node name="Empty" type="Node3D" unique_id=1197211154]
|
||||
@@ -20,6 +20,7 @@ shader_parameter/variance_scale = 0.1
|
||||
shader_parameter/variance_color = Color(0.09803922, 0.18039216, 0.05490196, 1)
|
||||
shader_parameter/variance_intensity = 0.90000004275
|
||||
shader_parameter/snow_color = Color(0.85, 0.9, 0.95, 1)
|
||||
shader_parameter/snow_visibility = 1.0
|
||||
shader_parameter/height_min = 0.0
|
||||
shader_parameter/height_max = 5.0
|
||||
shader_parameter/shadow_intensity = 0.610000028975
|
||||
@@ -27,3 +28,4 @@ shader_parameter/highlight_intensity = 0.0
|
||||
shader_parameter/light_steps = 2.150000054625
|
||||
shader_parameter/random_mix = 0.0
|
||||
shader_parameter/cast_shadow_strength = 0.6
|
||||
shader_parameter/wetness_darkening = 0.25
|
||||
|
||||
@@ -28,6 +28,7 @@ shader_parameter/variance_scale = 0.06
|
||||
shader_parameter/variance_color = Color(0.3, 0.5, 0.2, 1)
|
||||
shader_parameter/variance_intensity = 0.350000016625
|
||||
shader_parameter/snow_color = Color(0.85, 0.9, 0.95, 1)
|
||||
shader_parameter/snow_visibility = 1.0
|
||||
shader_parameter/height_min = 0.0
|
||||
shader_parameter/height_max = 5.0
|
||||
shader_parameter/shadow_intensity = 0.6000000285
|
||||
@@ -35,3 +36,4 @@ shader_parameter/highlight_intensity = 0.10000000475
|
||||
shader_parameter/light_steps = 8.600000361
|
||||
shader_parameter/random_mix = 0.0150000007125
|
||||
shader_parameter/cast_shadow_strength = 0.6
|
||||
shader_parameter/wetness_darkening = 0.25
|
||||
|
||||
@@ -22,3 +22,4 @@ shader_parameter/light_steps = 10.0
|
||||
shader_parameter/random_mix = 0.138000006555
|
||||
shader_parameter/cast_shadow_strength = 0.6
|
||||
shader_parameter/wetness_darkening = 0.25
|
||||
shader_parameter/snow_visibility = 1.0
|
||||
|
||||
@@ -22,3 +22,4 @@ shader_parameter/light_steps = 10.0
|
||||
shader_parameter/random_mix = 0.010000000475
|
||||
shader_parameter/cast_shadow_strength = 0.6
|
||||
shader_parameter/wetness_darkening = 0.25
|
||||
shader_parameter/snow_visibility = 1.0
|
||||
|
||||
BIN
tgcc/chunk/prop/housevendingmachine/House Vending machine 1.fbx
Normal file
BIN
tgcc/chunk/prop/housevendingmachine/House Vending machine 1.fbx
Normal file
Binary file not shown.
@@ -0,0 +1,44 @@
|
||||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://dc8so4s7hv8wl"
|
||||
path="res://.godot/imported/House Vending machine 1.fbx-e8a6b76c263a96dba26091b2286561ab.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://tgcc/chunk/prop/housevendingmachine/House Vending machine 1.fbx"
|
||||
dest_files=["res://.godot/imported/House Vending machine 1.fbx-e8a6b76c263a96dba26091b2286561ab.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type=""
|
||||
nodes/root_name=""
|
||||
nodes/root_script=null
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
nodes/use_name_suffixes=true
|
||||
nodes/use_node_type_suffixes=true
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=1
|
||||
meshes/lightmap_texel_size=0.2
|
||||
meshes/force_disable_compression=false
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=30
|
||||
animation/trimming=true
|
||||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
materials/extract=0
|
||||
materials/extract_format=0
|
||||
materials/extract_path=""
|
||||
_subresources={}
|
||||
fbx/importer=0
|
||||
fbx/allow_geometry_helper_nodes=false
|
||||
fbx/embedded_image_handling=1
|
||||
fbx/naming_version=2
|
||||
BIN
tgcc/chunk/prop/housevendingmachine/House Vending machine 2.fbx
Normal file
BIN
tgcc/chunk/prop/housevendingmachine/House Vending machine 2.fbx
Normal file
Binary file not shown.
@@ -0,0 +1,44 @@
|
||||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://djk8mvn4flypv"
|
||||
path="res://.godot/imported/House Vending machine 2.fbx-e658506dbafa47d8fc9d43fca4b38c2f.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://tgcc/chunk/prop/housevendingmachine/House Vending machine 2.fbx"
|
||||
dest_files=["res://.godot/imported/House Vending machine 2.fbx-e658506dbafa47d8fc9d43fca4b38c2f.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type=""
|
||||
nodes/root_name=""
|
||||
nodes/root_script=null
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
nodes/use_name_suffixes=true
|
||||
nodes/use_node_type_suffixes=true
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=1
|
||||
meshes/lightmap_texel_size=0.2
|
||||
meshes/force_disable_compression=false
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=30
|
||||
animation/trimming=true
|
||||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
materials/extract=0
|
||||
materials/extract_format=0
|
||||
materials/extract_path=""
|
||||
_subresources={}
|
||||
fbx/importer=0
|
||||
fbx/allow_geometry_helper_nodes=false
|
||||
fbx/embedded_image_handling=1
|
||||
fbx/naming_version=2
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user