add river chunk

This commit is contained in:
Matteo Sonaglioni
2026-05-06 21:43:34 +02:00
parent 9827b98b3e
commit f4c8775a45
15 changed files with 1825 additions and 39 deletions

View File

@@ -39,6 +39,9 @@
[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"]
[sub_resource type="FastNoiseLite" id="FastNoiseLite_wjpfq"]
fractal_lacunarity = 1.915
@@ -118,7 +121,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("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")])
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")])
metadata/_custom_type_script = "uid://wv6kcqkibium"
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_pypsn"]

View 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

View File

@@ -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

View File

@@ -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

View 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;
}

View File

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

Binary file not shown.

View File

@@ -0,0 +1,44 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://5g7rjcw5v4jq"
path="res://.godot/imported/chunk_river_mix4_1.fbx-b255675860fb09c0f41baaa90f73bf3d.scn"
[deps]
source_file="res://tgcc/chunk/river/mesh/chunk_river_mix4_1.fbx"
dest_files=["res://.godot/imported/chunk_river_mix4_1.fbx-b255675860fb09c0f41baaa90f73bf3d.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

Binary file not shown.

View File

@@ -0,0 +1,44 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://46smcgxcylp"
path="res://.godot/imported/chunk_river_mix5_1.fbx-8c1cd47cee958891888155d684f11c3f.scn"
[deps]
source_file="res://tgcc/chunk/river/mesh/chunk_river_mix5_1.fbx"
dest_files=["res://.godot/imported/chunk_river_mix5_1.fbx-8c1cd47cee958891888155d684f11c3f.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

Binary file not shown.

View File

@@ -0,0 +1,44 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://mwy0sb5xmtax"
path="res://.godot/imported/chunk_river_mix6_1.fbx-b3211aad9976bff7788366590900e5b2.scn"
[deps]
source_file="res://tgcc/chunk/river/mesh/chunk_river_mix6_1.fbx"
dest_files=["res://.godot/imported/chunk_river_mix6_1.fbx-b3211aad9976bff7788366590900e5b2.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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long