diff --git a/asset/models/decorations/asset_Jalan_Batu_1.res b/asset/models/decorations/asset_Jalan_Batu_1.res index fa41e60..9c11233 100644 Binary files a/asset/models/decorations/asset_Jalan_Batu_1.res and b/asset/models/decorations/asset_Jalan_Batu_1.res differ diff --git a/asset/models/decorations/asset_Jalan_Batu_2.res b/asset/models/decorations/asset_Jalan_Batu_2.res index 61e70a5..b172ebc 100644 Binary files a/asset/models/decorations/asset_Jalan_Batu_2.res and b/asset/models/decorations/asset_Jalan_Batu_2.res differ diff --git a/asset/models/decorations/asset_Jalan_Batu_3.res b/asset/models/decorations/asset_Jalan_Batu_3.res index f355d78..c97761d 100644 Binary files a/asset/models/decorations/asset_Jalan_Batu_3.res and b/asset/models/decorations/asset_Jalan_Batu_3.res differ diff --git a/asset/models/decorations/asset_Jalan_Batu_4.res b/asset/models/decorations/asset_Jalan_Batu_4.res index 75abf0e..16245eb 100644 Binary files a/asset/models/decorations/asset_Jalan_Batu_4.res and b/asset/models/decorations/asset_Jalan_Batu_4.res differ diff --git a/asset/models/decorations/asset_Jalan_Batu_5.res b/asset/models/decorations/asset_Jalan_Batu_5.res index b5d2b96..7a3806a 100644 Binary files a/asset/models/decorations/asset_Jalan_Batu_5.res and b/asset/models/decorations/asset_Jalan_Batu_5.res differ diff --git a/asset/models/decorations/asset_Pagar_1.res b/asset/models/decorations/asset_Pagar_1.res index 015e39c..16d2b54 100644 Binary files a/asset/models/decorations/asset_Pagar_1.res and b/asset/models/decorations/asset_Pagar_1.res differ diff --git a/asset/models/decorations/asset_Pagar_2.res b/asset/models/decorations/asset_Pagar_2.res index 65e85c1..5504af9 100644 Binary files a/asset/models/decorations/asset_Pagar_2.res and b/asset/models/decorations/asset_Pagar_2.res differ diff --git a/asset/models/decorations/asset_Pinus_1.res b/asset/models/decorations/asset_Pinus_1.res index 9decfff..05fbe4a 100644 Binary files a/asset/models/decorations/asset_Pinus_1.res and b/asset/models/decorations/asset_Pinus_1.res differ diff --git a/asset/models/decorations/asset_Pinus_2.res b/asset/models/decorations/asset_Pinus_2.res index 3d9c0fa..2cb94c0 100644 Binary files a/asset/models/decorations/asset_Pinus_2.res and b/asset/models/decorations/asset_Pinus_2.res differ diff --git a/asset/models/decorations/asset_Pinus_3.res b/asset/models/decorations/asset_Pinus_3.res index 0bd94af..bee97df 100644 Binary files a/asset/models/decorations/asset_Pinus_3.res and b/asset/models/decorations/asset_Pinus_3.res differ diff --git a/asset/models/decorations/asset_Pinus_4.res b/asset/models/decorations/asset_Pinus_4.res index 5a3cba0..4ff4881 100644 Binary files a/asset/models/decorations/asset_Pinus_4.res and b/asset/models/decorations/asset_Pinus_4.res differ diff --git a/asset/models/decorations/asset_Pinus_5.res b/asset/models/decorations/asset_Pinus_5.res index fd4a9bf..a7c8a55 100644 Binary files a/asset/models/decorations/asset_Pinus_5.res and b/asset/models/decorations/asset_Pinus_5.res differ diff --git a/asset/models/decorations/asset_Pohon_1.res b/asset/models/decorations/asset_Pohon_1.res index 71a4f97..57d21ed 100644 Binary files a/asset/models/decorations/asset_Pohon_1.res and b/asset/models/decorations/asset_Pohon_1.res differ diff --git a/asset/models/decorations/asset_Pohon_2.res b/asset/models/decorations/asset_Pohon_2.res index d38a31e..a676e73 100644 Binary files a/asset/models/decorations/asset_Pohon_2.res and b/asset/models/decorations/asset_Pohon_2.res differ diff --git a/asset/models/decorations/asset_Pohon_3.res b/asset/models/decorations/asset_Pohon_3.res index f38ed70..328f418 100644 Binary files a/asset/models/decorations/asset_Pohon_3.res and b/asset/models/decorations/asset_Pohon_3.res differ diff --git a/asset/models/decorations/asset_Rumah_1.res b/asset/models/decorations/asset_Rumah_1.res index 0741466..9d8bbb6 100644 Binary files a/asset/models/decorations/asset_Rumah_1.res and b/asset/models/decorations/asset_Rumah_1.res differ diff --git a/asset/models/decorations/asset_Rumah_2.res b/asset/models/decorations/asset_Rumah_2.res index 8bab8fb..6dd4a69 100644 Binary files a/asset/models/decorations/asset_Rumah_2.res and b/asset/models/decorations/asset_Rumah_2.res differ diff --git a/asset/models/decorations/asset_Rumah_3.res b/asset/models/decorations/asset_Rumah_3.res index 7e9309a..59253a2 100644 Binary files a/asset/models/decorations/asset_Rumah_3.res and b/asset/models/decorations/asset_Rumah_3.res differ diff --git a/asset/models/decorations/asset_Rumah_4.res b/asset/models/decorations/asset_Rumah_4.res index d5a629d..9ab0e81 100644 Binary files a/asset/models/decorations/asset_Rumah_4.res and b/asset/models/decorations/asset_Rumah_4.res differ diff --git a/asset/models/decorations/asset_Rumah_5.res b/asset/models/decorations/asset_Rumah_5.res index 1bde714..e55f9c8 100644 Binary files a/asset/models/decorations/asset_Rumah_5.res and b/asset/models/decorations/asset_Rumah_5.res differ diff --git a/asset/models/decorations/asset_Rumput_1.res b/asset/models/decorations/asset_Rumput_1.res index 4adc4b0..f4a71be 100644 Binary files a/asset/models/decorations/asset_Rumput_1.res and b/asset/models/decorations/asset_Rumput_1.res differ diff --git a/asset/models/decorations/asset_Rumput_2.res b/asset/models/decorations/asset_Rumput_2.res index 9b7aa2b..c98edc4 100644 Binary files a/asset/models/decorations/asset_Rumput_2.res and b/asset/models/decorations/asset_Rumput_2.res differ diff --git a/asset/models/decorations/asset_Rumput_3.res b/asset/models/decorations/asset_Rumput_3.res index e220f5d..e3878eb 100644 Binary files a/asset/models/decorations/asset_Rumput_3.res and b/asset/models/decorations/asset_Rumput_3.res differ diff --git a/asset/models/decorations/asset_Rumput_4.res b/asset/models/decorations/asset_Rumput_4.res index 5efdd0b..1bfe2df 100644 Binary files a/asset/models/decorations/asset_Rumput_4.res and b/asset/models/decorations/asset_Rumput_4.res differ diff --git a/asset/models/decorations/asset_Sumur.res b/asset/models/decorations/asset_Sumur.res index 12e86f8..ccad53d 100644 Binary files a/asset/models/decorations/asset_Sumur.res and b/asset/models/decorations/asset_Sumur.res differ diff --git a/asset/models/maps/TsunamiMap.res b/asset/models/maps/TsunamiMap.res index 62358db..d58936a 100644 Binary files a/asset/models/maps/TsunamiMap.res and b/asset/models/maps/TsunamiMap.res differ diff --git a/cobaspawn.tscn b/cobaspawn.tscn new file mode 100644 index 0000000..70f760b --- /dev/null +++ b/cobaspawn.tscn @@ -0,0 +1,20 @@ +[gd_scene load_steps=4 format=3 uid="uid://3v8e7eibusbf"] + +[ext_resource type="Script" path="res://Scripts/coba.gd" id="1_axcba"] + +[sub_resource type="BoxMesh" id="BoxMesh_bmx2b"] + +[sub_resource type="CapsuleMesh" id="CapsuleMesh_gg5ic"] + +[node name="Node3D" type="Node3D"] + +[node name="MeshInstance3D" type="MeshInstance3D" parent="."] +transform = Transform3D(19.3778, 0, 0, 0, 1, 0, 0, 0, 23.1683, 0, 0, 0) +mesh = SubResource("BoxMesh_bmx2b") + +[node name="SpawnPartikelonFire" type="Node3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 5.04189, 0) +script = ExtResource("1_axcba") + +[node name="MeshInstance3D" type="MeshInstance3D" parent="SpawnPartikelonFire"] +mesh = SubResource("CapsuleMesh_gg5ic") diff --git a/nyobaspawn.tscn b/nyobaspawn.tscn new file mode 100644 index 0000000..2551511 --- /dev/null +++ b/nyobaspawn.tscn @@ -0,0 +1,12 @@ +[gd_scene load_steps=3 format=3 uid="uid://c45gxeh03ac2b"] + +[sub_resource type="BoxMesh" id="BoxMesh_ftemr"] + +[sub_resource type="BoxShape3D" id="BoxShape3D_llie3"] + +[node name="MeshInstance3D" type="MeshInstance3D"] +transform = Transform3D(38.2099, 0, 0, 0, 1, 0, 0, 0, 23.6784, 0, 0, 0) +mesh = SubResource("BoxMesh_ftemr") + +[node name="CollisionShape3D" type="CollisionShape3D" parent="."] +shape = SubResource("BoxShape3D_llie3") diff --git a/project.godot b/project.godot index 8aaf7c4..21cb34f 100644 --- a/project.godot +++ b/project.godot @@ -46,6 +46,16 @@ jump={ "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":32,"echo":false,"script":null) ] } +spawn_flame={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":71,"key_label":0,"unicode":103,"echo":false,"script":null) +] +} +Sprint={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194325,"key_label":0,"unicode":0,"echo":false,"script":null) +] +} [rendering] diff --git a/scenes/Bukit.tscn b/scenes/Bukit.tscn index bc6e296..2a712d9 100644 --- a/scenes/Bukit.tscn +++ b/scenes/Bukit.tscn @@ -1,8 +1,116 @@ -[gd_scene load_steps=2 format=3 uid="uid://chnbt23f826lj"] +[gd_scene load_steps=23 format=3 uid="uid://chnbt23f826lj"] [ext_resource type="PackedScene" uid="uid://cfda6q4u17mpq" path="res://asset/models/maps/Bukit.glb" id="1_dh35g"] +[ext_resource type="PackedScene" uid="uid://xhsrdb700uow" path="res://scenes/Forest/river.tscn" id="2_aegqr"] +[ext_resource type="PackedScene" uid="uid://cb1iwxp77nqof" path="res://scenes/characters.tscn" id="2_j0y0q"] +[ext_resource type="Texture2D" uid="uid://upx1xvrix683" path="res://scenes/Forest/Material/farm_field_puresky_2k.hdr" id="4_hkx8d"] +[ext_resource type="Script" path="res://addons/proton_scatter/src/scatter.gd" id="5_8lf41"] +[ext_resource type="Script" path="res://addons/proton_scatter/src/stack/modifier_stack.gd" id="6_j5ec3"] +[ext_resource type="Script" path="res://addons/proton_scatter/src/modifiers/create_inside_random.gd" id="7_pj3oc"] +[ext_resource type="Script" path="res://addons/proton_scatter/src/modifiers/randomize_transforms.gd" id="8_32m2u"] +[ext_resource type="Script" path="res://addons/proton_scatter/src/modifiers/relax.gd" id="9_bc4ri"] +[ext_resource type="Script" path="res://addons/proton_scatter/src/modifiers/project_on_geometry.gd" id="10_c4abl"] +[ext_resource type="Script" path="res://addons/proton_scatter/src/scatter_item.gd" id="11_x5crm"] +[ext_resource type="Script" path="res://addons/proton_scatter/src/scatter_shape.gd" id="12_uw8g4"] +[ext_resource type="Script" path="res://addons/proton_scatter/src/shapes/box_shape.gd" id="13_4ogwv"] + +[sub_resource type="PanoramaSkyMaterial" id="PanoramaSkyMaterial_nsq7r"] +panorama = ExtResource("4_hkx8d") + +[sub_resource type="Sky" id="Sky_5tmio"] +sky_material = SubResource("PanoramaSkyMaterial_nsq7r") + +[sub_resource type="Environment" id="Environment_i1goh"] +background_mode = 2 +background_energy_multiplier = 0.4 +sky = SubResource("Sky_5tmio") +ambient_light_sky_contribution = 0.5 +ambient_light_energy = 0.3 + +[sub_resource type="Resource" id="Resource_ps2gt"] +script = ExtResource("7_pj3oc") +amount = 75 +enabled = true +override_global_seed = false +custom_seed = 0 +restrict_height = true +reference_frame = 1 + +[sub_resource type="Resource" id="Resource_ll5b7"] +script = ExtResource("8_32m2u") +position = Vector3(0.15, 0.15, 0.15) +rotation = Vector3(20, 360, 20) +scale = Vector3(0.1, 0.1, 0.1) +enabled = true +override_global_seed = false +custom_seed = 0 +restrict_height = false +reference_frame = 2 + +[sub_resource type="Resource" id="Resource_gfoi1"] +script = ExtResource("9_bc4ri") +iterations = 3 +offset_step = 0.2 +consecutive_step_multiplier = 0.75 +use_computeshader = true +enabled = true +override_global_seed = false +custom_seed = 0 +restrict_height = true +reference_frame = 0 + +[sub_resource type="Resource" id="Resource_2n0o2"] +script = ExtResource("10_c4abl") +ray_direction = Vector3(0, -1, 0) +ray_length = 5.0 +ray_offset = 5.0 +remove_points_on_miss = false +align_with_collision_normal = false +max_slope = 90.0 +collision_mask = 1 +exclude_mask = 0 +enabled = true +override_global_seed = false +custom_seed = 0 +restrict_height = false +reference_frame = 0 + +[sub_resource type="Resource" id="Resource_5kd2f"] +script = ExtResource("6_j5ec3") +stack = Array[Resource("res://addons/proton_scatter/src/modifiers/base_modifier.gd")]([SubResource("Resource_ps2gt"), SubResource("Resource_ll5b7"), SubResource("Resource_gfoi1"), SubResource("Resource_2n0o2")]) + +[sub_resource type="Resource" id="Resource_7kssd"] +script = ExtResource("13_4ogwv") +size = Vector3(153.761, 10, 50) [node name="Bukit" instance=ExtResource("1_dh35g")] +[node name="river" parent="." index="0" instance=ExtResource("2_aegqr")] +transform = Transform3D(150, 0, 0, 0, 1, 0, 0, 0, 150, -5.72327, 1.52873, 26.6085) + [node name="CollisionShape3D" parent="Bukit/Bukit" index="0"] transform = Transform3D(1, 0, 0, 0, 1, -2.84217e-14, 0, 2.84217e-14, 1, 0, 0, 0) +visible = false + +[node name="Characters" parent="." index="2" instance=ExtResource("2_j0y0q")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -5.72327, 14.603, 26.6085) + +[node name="WorldEnvironment2" type="WorldEnvironment" parent="." index="3"] +environment = SubResource("Environment_i1goh") + +[node name="ProtonScatter" type="Node3D" parent="." index="4"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -41.3929, 22.2534, 16.5762) +script = ExtResource("5_8lf41") +modifier_stack = SubResource("Resource_5kd2f") +Performance/use_chunks = true +Performance/chunk_dimensions = Vector3(15, 15, 15) + +[node name="ScatterItem" type="Node3D" parent="ProtonScatter" index="0"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0) +script = ExtResource("11_x5crm") +path = "res://addons/proton_scatter/demos/assets/pine_tree.tscn" + +[node name="ScatterShape" type="Node3D" parent="ProtonScatter" index="1"] +transform = Transform3D(1, 0, -2.98023e-08, 2.30684e-08, 0.633123, 0.774049, 1.88685e-08, -0.774049, 0.633123, 0, -10.653, 24.3309) +script = ExtResource("12_uw8g4") +shape = SubResource("Resource_7kssd") diff --git a/scenes/Forest/Flametscn.tscn b/scenes/Forest/Flametscn.tscn new file mode 100644 index 0000000..fab4c97 --- /dev/null +++ b/scenes/Forest/Flametscn.tscn @@ -0,0 +1,156 @@ +[gd_scene load_steps=22 format=3 uid="uid://b4v3mde23oqfm"] + +[ext_resource type="Shader" uid="uid://bridpgkt844f8" path="res://scenes/Forest/Shader/fireShader.tres" id="1_27vih"] +[ext_resource type="Script" path="res://Scripts/Flametscn.gd" id="1_sn0s3"] +[ext_resource type="Texture2D" uid="uid://baa3l1xiuxpva" path="res://scenes/Forest/Material/firePartikel2.png" id="2_hrm3o"] +[ext_resource type="Texture2D" uid="uid://dtqf6onf3yj5n" path="res://scenes/Forest/Material/20240826_193718.png" id="2_mvmp0"] +[ext_resource type="Shader" uid="uid://b6kdppa3vcm41" path="res://scenes/Forest/Shader/fireShader2.tres" id="4_qm6ec"] +[ext_resource type="Shader" uid="uid://kcbjhjtn4xyb" path="res://scenes/Forest/Shader/fireParticel.tres" id="5_xwqh5"] +[ext_resource type="Texture2D" uid="uid://e3yamwbg3sx0" path="res://scenes/Forest/Material/muzzle_02.png" id="6_d2lwl"] +[ext_resource type="Texture2D" uid="uid://q4715ffk8gch" path="res://scenes/Forest/Material/light_03.png" id="7_fbuce"] + +[sub_resource type="GDScript" id="GDScript_w6obq"] +script/source = "extends MeshInstance3D + +# Called when the node enters the scene tree for the first time. +func _ready(): + pass # Replace with function body. + +# +## Called every frame. 'delta' is the elapsed time since the previous frame. +#func _process(delta): + #pass +func spawn(): + var spawned_scene = load(\"res://cobaspawn.tscn\") + var spawned_scene_copy = spawned_scene.instance() + spawned_scene_copy.translation.x = randi() % 5 + add_child(spawned_scene_copy) + + +func _process(delta): + pass + if Input.is_action_just_pressed(\"spawn_flame\"): + spawn() +" + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_21mdp"] +render_priority = 0 +shader = ExtResource("1_27vih") +shader_parameter/Dissolvetilling = Vector2(0.575, 0.425) +shader_parameter/DissolveSpeed = Vector2(0.01, 0.15) +shader_parameter/DissolveAmmount = 0.703 +shader_parameter/Texture2DParameter = ExtResource("2_mvmp0") +shader_parameter/DissolveTexture = ExtResource("2_hrm3o") + +[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_fjhy3"] +gravity = Vector3(0, 0, 0) +scale_min = 100.0 +scale_max = 125.0 +color = Color(64.247, 1.5, 0, 1) + +[sub_resource type="QuadMesh" id="QuadMesh_outog"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_ty245"] +render_priority = 0 +shader = ExtResource("4_qm6ec") +shader_parameter/Dissolvetilling = Vector2(1, 1) +shader_parameter/DissolveSpeed = Vector2(0, 0) +shader_parameter/DissolveAmmount = 0.0 +shader_parameter/Texture2DParameter = ExtResource("6_d2lwl") +shader_parameter/DissolveTexture = ExtResource("2_hrm3o") + +[sub_resource type="Curve" id="Curve_rjnxv"] +_data = [Vector2(0.00773196, 0), 0.0, 0.0, 0, 0, Vector2(0.156504, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), -1.18148, 0.0, 0, 0] +point_count = 3 + +[sub_resource type="CurveTexture" id="CurveTexture_qb35q"] +curve = SubResource("Curve_rjnxv") + +[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_b4sjh"] +emission_shape = 1 +emission_sphere_radius = 0.2 +angle_min = 360.0 +angle_max = 360.0 +gravity = Vector3(0, 5, 0) +damping_min = 0.5 +damping_max = 1.0 +scale_min = 100.0 +scale_max = 125.0 +scale_curve = SubResource("CurveTexture_qb35q") +color = Color(64.247, 1.5, 0, 1) + +[sub_resource type="QuadMesh" id="QuadMesh_4x8an"] + +[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_hhqma"] +resource_local_to_scene = true +emission_shape = 1 +emission_sphere_radius = 0.2 +angle_min = 360.0 +angle_max = 360.0 +gravity = Vector3(0, 12, 0) +damping_min = 0.5 +damping_max = 1.0 +scale_min = 100.0 +scale_max = 200.0 +scale_curve = SubResource("CurveTexture_qb35q") +color = Color(0.560955, 0.560955, 0.560955, 1) + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_v5f63"] +render_priority = 0 +shader = ExtResource("5_xwqh5") +shader_parameter/Texture2DParameter = ExtResource("7_fbuce") + +[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_k4c6l"] +emission_shape = 1 +emission_sphere_radius = 0.6 +gravity = Vector3(0, 5, 0) +scale_min = 10.0 +scale_max = 12.0 +color = Color(64.247, 1.5, 0, 1) +turbulence_enabled = true +turbulence_noise_strength = 2.0 +turbulence_noise_scale = 5.0 + +[sub_resource type="QuadMesh" id="QuadMesh_vidp8"] + +[node name="Node3D" type="Node3D"] +script = ExtResource("1_sn0s3") + +[node name="MeshInstance3D2" type="MeshInstance3D" parent="."] +script = SubResource("GDScript_w6obq") + +[node name="GPUParticles3D" type="GPUParticles3D" parent="MeshInstance3D2"] + +[node name="Flame" type="GPUParticles3D" parent="MeshInstance3D2/GPUParticles3D"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 5.59834, 0) +material_override = SubResource("ShaderMaterial_21mdp") +amount = 1 +lifetime = 5.0 +process_material = SubResource("ParticleProcessMaterial_fjhy3") +draw_pass_1 = SubResource("QuadMesh_outog") + +[node name="Flames1" type="GPUParticles3D" parent="MeshInstance3D2/GPUParticles3D"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0780703, 5.57316, 0) +material_override = SubResource("ShaderMaterial_ty245") +amount = 20 +lifetime = 1.2 +process_material = SubResource("ParticleProcessMaterial_b4sjh") +draw_pass_1 = SubResource("QuadMesh_4x8an") + +[node name="Smoke" type="GPUParticles3D" parent="MeshInstance3D2/GPUParticles3D"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0780703, 5.57316, 0) +sorting_offset = -1.0 +material_override = SubResource("ShaderMaterial_ty245") +amount = 20 +lifetime = 1.2 +process_material = SubResource("ParticleProcessMaterial_hhqma") +draw_pass_1 = SubResource("QuadMesh_4x8an") + +[node name="Particel" type="GPUParticles3D" parent="MeshInstance3D2/GPUParticles3D"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 5.53042, 0) +sorting_offset = 1.0 +material_override = SubResource("ShaderMaterial_v5f63") +amount = 50 +lifetime = 2.0 +process_material = SubResource("ParticleProcessMaterial_k4c6l") +draw_pass_1 = SubResource("QuadMesh_vidp8") diff --git a/scenes/Forest/Forest.tscn b/scenes/Forest/Forest.tscn index 85105c5..f45f915 100644 --- a/scenes/Forest/Forest.tscn +++ b/scenes/Forest/Forest.tscn @@ -1,6 +1,7 @@ -[gd_scene load_steps=27 format=3 uid="uid://dbv76e8baxow2"] +[gd_scene load_steps=30 format=3 uid="uid://dbv76e8baxow2"] [ext_resource type="Texture2D" uid="uid://upx1xvrix683" path="res://scenes/Forest/Material/farm_field_puresky_2k.hdr" id="1_5ncdk"] +[ext_resource type="Script" path="res://Scripts/Forest.gd" id="1_6c3er"] [ext_resource type="Material" uid="uid://bje341ix20jjf" path="res://scenes/Forest/Material/tress.tres" id="1_d0iq0"] [ext_resource type="Script" path="res://addons/proton_scatter/src/scatter.gd" id="3_7ah5r"] [ext_resource type="Script" path="res://addons/proton_scatter/src/stack/modifier_stack.gd" id="4_c2q18"] @@ -15,21 +16,22 @@ [ext_resource type="PackedScene" uid="uid://cb1iwxp77nqof" path="res://scenes/characters.tscn" id="14_c3le2"] [ext_resource type="PackedScene" uid="uid://xhsrdb700uow" path="res://scenes/Forest/river.tscn" id="15_4qsuh"] [ext_resource type="PackedScene" uid="uid://brw0vhcrfxclj" path="res://scenes/Forest/Material/bridge.glb" id="15_e4gru"] +[ext_resource type="PackedScene" uid="uid://b4v3mde23oqfm" path="res://scenes/Forest/Flametscn.tscn" id="17_1qrcl"] [sub_resource type="PanoramaSkyMaterial" id="PanoramaSkyMaterial_eq7f2"] panorama = ExtResource("1_5ncdk") -[sub_resource type="Sky" id="Sky_5tmio"] +[sub_resource type="Sky" id="Sky_fmyih"] sky_material = SubResource("PanoramaSkyMaterial_eq7f2") [sub_resource type="Environment" id="Environment_2cic6"] background_mode = 2 background_energy_multiplier = 0.4 -sky = SubResource("Sky_5tmio") +sky = SubResource("Sky_fmyih") ambient_light_sky_contribution = 0.5 ambient_light_energy = 0.3 -[sub_resource type="Resource" id="Resource_h0but"] +[sub_resource type="Resource" id="Resource_8g32c"] script = ExtResource("5_sn2ft") amount = 5000 enabled = true @@ -38,7 +40,7 @@ custom_seed = 0 restrict_height = true reference_frame = 1 -[sub_resource type="Resource" id="Resource_18skq"] +[sub_resource type="Resource" id="Resource_tn3pq"] script = ExtResource("6_2ajgw") position = Vector3(0.15, 0.15, 0.15) rotation = Vector3(5, 50, 5) @@ -49,7 +51,7 @@ custom_seed = 0 restrict_height = false reference_frame = 2 -[sub_resource type="Resource" id="Resource_tl68c"] +[sub_resource type="Resource" id="Resource_or1cn"] script = ExtResource("7_mvsr3") iterations = 3 offset_step = 0.2 @@ -61,7 +63,7 @@ custom_seed = 0 restrict_height = true reference_frame = 0 -[sub_resource type="Resource" id="Resource_xx8lb"] +[sub_resource type="Resource" id="Resource_l4phd"] script = ExtResource("8_5o828") ray_direction = Vector3(0, -1, 0) ray_length = 5.0 @@ -77,14 +79,18 @@ custom_seed = 0 restrict_height = false reference_frame = 0 -[sub_resource type="Resource" id="Resource_ws2nk"] +[sub_resource type="Resource" id="Resource_wqef5"] script = ExtResource("4_c2q18") -stack = Array[Resource("res://addons/proton_scatter/src/modifiers/base_modifier.gd")]([SubResource("Resource_h0but"), SubResource("Resource_18skq"), SubResource("Resource_tl68c"), SubResource("Resource_xx8lb")]) +stack = Array[Resource("res://addons/proton_scatter/src/modifiers/base_modifier.gd")]([SubResource("Resource_8g32c"), SubResource("Resource_tn3pq"), SubResource("Resource_or1cn"), SubResource("Resource_l4phd")]) [sub_resource type="Resource" id="Resource_sfagw"] script = ExtResource("12_wglmp") size = Vector3(1, 1, 1) +[sub_resource type="Resource" id="Resource_kv2ay"] +script = ExtResource("12_wglmp") +size = Vector3(1, 1, 1) + [sub_resource type="Resource" id="Resource_fdj15"] script = ExtResource("12_wglmp") size = Vector3(1, 1, 1) @@ -94,36 +100,56 @@ script = ExtResource("12_wglmp") size = Vector3(1, 1, 1) [node name="Forest" type="Node3D"] +script = ExtResource("1_6c3er") [node name="WorldEnvironment" type="WorldEnvironment" parent="."] environment = SubResource("Environment_2cic6") -[node name="floor" type="CSGBox3D" parent="."] +[node name="Node3D" type="Node3D" parent="."] + +[node name="floor" type="CSGBox3D" parent="Node3D"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.013, -5, -0.02) -visible = false material_override = ExtResource("1_d0iq0") use_collision = true -size = Vector3(50, 1, 50) +size = Vector3(100, 1, 100) + +[node name="floor7" type="CSGBox3D" parent="Node3D"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.125427, -3.55973, -0.152309) +material_override = ExtResource("1_d0iq0") +use_collision = true +size = Vector3(70, 1, 70) + +[node name="floor8" type="CSGBox3D" parent="Node3D"] +transform = Transform3D(1, 0, 0, 0, 0.957797, 0.287444, 0, -0.287444, 0.957797, 0.125427, -3.66065, -30.9483) +material_override = ExtResource("1_d0iq0") +use_collision = true +size = Vector3(70, 1, 10) -[node name="floor2" type="CSGBox3D" parent="."] +[node name="floor6" type="CSGBox3D" parent="Node3D"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.013, -3.61869, -0.02) +material_override = ExtResource("1_d0iq0") +use_collision = true +size = Vector3(100, 1, 100) + +[node name="floor2" type="CSGBox3D" parent="Node3D"] transform = Transform3D(1, 0, 0, 0, 3.85199, 0, 0, 0, 1, -11.9673, -3.60269, -0.02) material_override = ExtResource("1_d0iq0") use_collision = true size = Vector3(25, 1, 50) -[node name="floor3" type="CSGBox3D" parent="."] -transform = Transform3D(1, 0, 0, 0, 3.85199, 0, 0, 0, 1, 0.491068, -3.60269, -13.9607) +[node name="floor3" type="CSGBox3D" parent="Node3D"] +transform = Transform3D(1, 0, 0, 0, 3.85199, 0, 0, 0, 1, 0.491068, -3.2639, -13.9607) material_override = ExtResource("1_d0iq0") use_collision = true size = Vector3(50, 1, 25) -[node name="floor4" type="CSGBox3D" parent="."] +[node name="floor4" type="CSGBox3D" parent="Node3D"] transform = Transform3D(1, 0, 0, 0, 3.85199, 0, 0, 0, 1, 16.788, -3.60269, 17.4199) material_override = ExtResource("1_d0iq0") use_collision = true size = Vector3(15, 1, 15) -[node name="floor5" type="CSGBox3D" parent="."] +[node name="sa" type="CSGBox3D" parent="Node3D"] transform = Transform3D(1, 0, 0, 0, 3.85199, 0, 0, 0, 1, 7.31919, -3.60269, 19.1795) visible = false material_override = ExtResource("1_d0iq0") @@ -133,7 +159,7 @@ size = Vector3(15, 1, 1.65527) [node name="ProtonScatter" type="Node3D" parent="."] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1.18909, 0) script = ExtResource("3_7ah5r") -modifier_stack = SubResource("Resource_ws2nk") +modifier_stack = SubResource("Resource_wqef5") Performance/use_chunks = true Performance/chunk_dimensions = Vector3(15, 15, 15) @@ -145,13 +171,12 @@ path = "res://addons/proton_scatter/demos/assets/small_rock.tscn" [node name="tree" type="Node3D" parent="ProtonScatter"] transform = Transform3D(0.986957, -0.160984, 0, 0.160984, 0.986957, 0, 0, 0, 1, 0, 0, 0) script = ExtResource("9_vlymg") -proportion = 60 -source_scale_multiplier = 1.5 +source_scale_multiplier = 1.7 path = "res://addons/proton_scatter/demos/assets/pine_tree.tscn" [node name="Grass" type="Node3D" parent="ProtonScatter"] script = ExtResource("9_vlymg") -proportion = 500 +proportion = 700 source_scale_multiplier = 1.5 path = "res://addons/proton_scatter/demos/assets/grass_2.tscn" @@ -160,12 +185,23 @@ script = ExtResource("9_vlymg") proportion = 300 path = "res://addons/proton_scatter/demos/assets/bush.tscn" +[node name="Grass3" type="Node3D" parent="ProtonScatter"] +script = ExtResource("9_vlymg") +proportion = 10 +path = "res://addons/proton_scatter/demos/assets/large_rock.tscn" + [node name="ScatterShape" type="Node3D" parent="ProtonScatter"] transform = Transform3D(50, 0, -1.49011e-06, 0, 1, 0, 1.49011e-06, 0, 50, 0, 0, 0) visible = false script = ExtResource("10_gtfh4") shape = SubResource("Resource_sfagw") +[node name="ScatterShape4" type="Node3D" parent="ProtonScatter"] +transform = Transform3D(100, 0, -2.98022e-06, 0, 1, 0, 2.98022e-06, 0, 100, 0, 0, 0) +visible = false +script = ExtResource("10_gtfh4") +shape = SubResource("Resource_kv2ay") + [node name="ScatterShape2" type="Node3D" parent="ProtonScatter"] transform = Transform3D(23, 0, 0, 0, 1, 0, 0, 0, 10, 13.1633, -0.231185, 4.30711) visible = false @@ -190,7 +226,10 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.57757, 1.81317, 8.89749) transform = Transform3D(3.24778, 0, 0, 0, 2.18124, 0, 0, 0, 1.42023, 7.59141, -4.26844, 4.67385) [node name="river2" parent="." instance=ExtResource("15_4qsuh")] -transform = Transform3D(-1.41965e-07, 0, 1, 0, 2.18124, 0, -3.24778, 0, -4.37114e-08, 5.38823, -4.26844, 9.86598) +transform = Transform3D(-5.45637e-07, 0, 1, 0, 3.12165, 0, -12.4827, 0, -4.37114e-08, 5.44302, -5.27712, 26.1199) [node name="Sketchfab_Scene2" parent="." instance=ExtResource("15_e4gru")] transform = Transform3D(-4.37114e-10, 0, 0.016003, 0, 0.01, 0, -0.01, 0, -6.99516e-10, 5.04575, -2.38821, 19.141) + +[node name="FireFlame" parent="." instance=ExtResource("17_1qrcl")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 30.5753, -3.29115, -32.7851) diff --git a/scenes/Forest/Material/20240826_193718.png b/scenes/Forest/Material/20240826_193718.png new file mode 100644 index 0000000..8185fb9 Binary files /dev/null and b/scenes/Forest/Material/20240826_193718.png differ diff --git a/scenes/Forest/Material/20240826_193718.png.import b/scenes/Forest/Material/20240826_193718.png.import new file mode 100644 index 0000000..bf866a6 --- /dev/null +++ b/scenes/Forest/Material/20240826_193718.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dtqf6onf3yj5n" +path.s3tc="res://.godot/imported/20240826_193718.png-d5b30b5a689abf5a0ee3805a8aaf4a8c.s3tc.ctex" +metadata={ +"imported_formats": ["s3tc_bptc"], +"vram_texture": true +} + +[deps] + +source_file="res://scenes/Forest/Material/20240826_193718.png" +dest_files=["res://.godot/imported/20240826_193718.png-d5b30b5a689abf5a0ee3805a8aaf4a8c.s3tc.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=true +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +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=0 diff --git a/scenes/Forest/Material/firePartikel2.png b/scenes/Forest/Material/firePartikel2.png new file mode 100644 index 0000000..3a0d103 Binary files /dev/null and b/scenes/Forest/Material/firePartikel2.png differ diff --git a/scenes/Forest/Material/firePartikel2.png.import b/scenes/Forest/Material/firePartikel2.png.import new file mode 100644 index 0000000..906a3a2 --- /dev/null +++ b/scenes/Forest/Material/firePartikel2.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://baa3l1xiuxpva" +path.s3tc="res://.godot/imported/firePartikel2.png-b6a8710958a3a37cd786c567bf29fe6f.s3tc.ctex" +metadata={ +"imported_formats": ["s3tc_bptc"], +"vram_texture": true +} + +[deps] + +source_file="res://scenes/Forest/Material/firePartikel2.png" +dest_files=["res://.godot/imported/firePartikel2.png-b6a8710958a3a37cd786c567bf29fe6f.s3tc.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=true +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +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=0 diff --git a/scenes/Forest/Material/light_03.png b/scenes/Forest/Material/light_03.png new file mode 100644 index 0000000..2ca26ca Binary files /dev/null and b/scenes/Forest/Material/light_03.png differ diff --git a/scenes/Forest/Material/light_03.png.import b/scenes/Forest/Material/light_03.png.import new file mode 100644 index 0000000..e565139 --- /dev/null +++ b/scenes/Forest/Material/light_03.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://q4715ffk8gch" +path.s3tc="res://.godot/imported/light_03.png-ba1706c6ca1c4c9b34a14aafc7b952e3.s3tc.ctex" +metadata={ +"imported_formats": ["s3tc_bptc"], +"vram_texture": true +} + +[deps] + +source_file="res://scenes/Forest/Material/light_03.png" +dest_files=["res://.godot/imported/light_03.png-ba1706c6ca1c4c9b34a14aafc7b952e3.s3tc.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=true +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +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=0 diff --git a/scenes/Forest/Material/muzzle_02.png b/scenes/Forest/Material/muzzle_02.png new file mode 100644 index 0000000..cfd2a7c Binary files /dev/null and b/scenes/Forest/Material/muzzle_02.png differ diff --git a/scenes/Forest/Material/muzzle_02.png.import b/scenes/Forest/Material/muzzle_02.png.import new file mode 100644 index 0000000..2f8c57f --- /dev/null +++ b/scenes/Forest/Material/muzzle_02.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://e3yamwbg3sx0" +path.s3tc="res://.godot/imported/muzzle_02.png-ad486edda5e4857838ba4e45bd4f7255.s3tc.ctex" +metadata={ +"imported_formats": ["s3tc_bptc"], +"vram_texture": true +} + +[deps] + +source_file="res://scenes/Forest/Material/muzzle_02.png" +dest_files=["res://.godot/imported/muzzle_02.png-ad486edda5e4857838ba4e45bd4f7255.s3tc.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=true +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +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=0 diff --git a/scenes/Forest/Shader/fireParticel.tres b/scenes/Forest/Shader/fireParticel.tres new file mode 100644 index 0000000..7f5f3cc --- /dev/null +++ b/scenes/Forest/Shader/fireParticel.tres @@ -0,0 +1,75 @@ +[gd_resource type="VisualShader" load_steps=8 format=3 uid="uid://kcbjhjtn4xyb"] + +[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_d4g8j"] + +[sub_resource type="VisualShaderNodeTexture" id="VisualShaderNodeTexture_cg52y"] +texture = SubResource("CompressedTexture2D_d4g8j") + +[sub_resource type="VisualShaderNodeTexture2DParameter" id="VisualShaderNodeTexture2DParameter_d6ywd"] +parameter_name = "Texture2DParameter" + +[sub_resource type="VisualShaderNodeTexture" id="VisualShaderNodeTexture_kkeqo"] +source = 5 + +[sub_resource type="VisualShaderNodeVectorDecompose" id="VisualShaderNodeVectorDecompose_sxtfl"] +default_input_values = [0, Quaternion(0, 0, 0, 0)] +op_type = 2 + +[sub_resource type="VisualShaderNodeInput" id="VisualShaderNodeInput_mqedt"] +input_name = "color" + +[sub_resource type="VisualShaderNodeVectorOp" id="VisualShaderNodeVectorOp_m53hx"] +default_input_values = [0, Quaternion(0, 0, 0, 0), 1, Quaternion(0, 0, 0, 0)] +op_type = 2 +operator = 2 + +[resource] +code = "shader_type spatial; +render_mode blend_mix, depth_draw_opaque, cull_back, diffuse_lambert, specular_schlick_ggx; + +uniform sampler2D Texture2DParameter; + + + +void fragment() { +// Input:5 + vec4 n_out5p0 = COLOR; + + + vec4 n_out3p0; +// Texture2D:3 + n_out3p0 = texture(Texture2DParameter, UV); + + +// VectorOp:6 + vec4 n_out6p0 = n_out5p0 * n_out3p0; + + +// VectorDecompose:4 + float n_out4p0 = n_out6p0.x; + float n_out4p1 = n_out6p0.y; + float n_out4p2 = n_out6p0.z; + float n_out4p3 = n_out6p0.w; + + +// Output:0 + ALBEDO = vec3(n_out6p0.xyz); + ALPHA = n_out4p3; + + +} +" +nodes/fragment/0/position = Vector2(540, 140) +nodes/fragment/2/node = SubResource("VisualShaderNodeTexture2DParameter_d6ywd") +nodes/fragment/2/position = Vector2(-460, 0) +nodes/fragment/3/node = SubResource("VisualShaderNodeTexture_kkeqo") +nodes/fragment/3/position = Vector2(-180, 140) +nodes/fragment/4/node = SubResource("VisualShaderNodeVectorDecompose_sxtfl") +nodes/fragment/4/position = Vector2(320, 360) +nodes/fragment/5/node = SubResource("VisualShaderNodeInput_mqedt") +nodes/fragment/5/position = Vector2(-120, -40) +nodes/fragment/6/node = SubResource("VisualShaderNodeVectorOp_m53hx") +nodes/fragment/6/position = Vector2(180, 200) +nodes/fragment/10/node = SubResource("VisualShaderNodeTexture_cg52y") +nodes/fragment/10/position = Vector2(437.053, 453.887) +nodes/fragment/connections = PackedInt32Array(2, 0, 3, 2, 4, 3, 0, 1, 5, 0, 6, 0, 6, 0, 0, 0, 6, 0, 4, 0, 3, 0, 6, 1) diff --git a/scenes/Forest/Shader/fireShader.tres b/scenes/Forest/Shader/fireShader.tres new file mode 100644 index 0000000..506ac61 --- /dev/null +++ b/scenes/Forest/Shader/fireShader.tres @@ -0,0 +1,196 @@ +[gd_resource type="VisualShader" load_steps=20 format=3 uid="uid://bridpgkt844f8"] + +[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_d4g8j"] + +[sub_resource type="VisualShaderNodeTexture" id="VisualShaderNodeTexture_cg52y"] +texture = SubResource("CompressedTexture2D_d4g8j") + +[sub_resource type="VisualShaderNodeMix" id="VisualShaderNodeMix_ijncn"] +default_input_values = [0, Quaternion(0, 0, 0, 0), 1, Quaternion(1, 1, 1, 1), 2, 0.5] +op_type = 6 + +[sub_resource type="VisualShaderNodeFloatParameter" id="VisualShaderNodeFloatParameter_jkk0k"] +parameter_name = "DissolveAmmount" +hint = 1 +default_value_enabled = true + +[sub_resource type="VisualShaderNodeUVFunc" id="VisualShaderNodeUVFunc_cjtno"] + +[sub_resource type="VisualShaderNodeInput" id="VisualShaderNodeInput_28sn1"] +input_name = "time" + +[sub_resource type="VisualShaderNodeVectorOp" id="VisualShaderNodeVectorOp_gws4n"] +default_input_values = [0, Vector2(0, 0), 1, Vector2(0, 0)] +op_type = 0 +operator = 2 + +[sub_resource type="VisualShaderNodeVec2Parameter" id="VisualShaderNodeVec2Parameter_4c47s"] +parameter_name = "DissolveSpeed" +default_value_enabled = true + +[sub_resource type="VisualShaderNodeVec2Parameter" id="VisualShaderNodeVec2Parameter_2utm6"] +parameter_name = "Dissolvetilling" +default_value_enabled = true +default_value = Vector2(1, 1) + +[sub_resource type="VisualShaderNodeInput" id="VisualShaderNodeInput_nlksu"] +input_name = "uv" + +[sub_resource type="VisualShaderNodeTexture2DParameter" id="VisualShaderNodeTexture2DParameter_d6ywd"] +parameter_name = "Texture2DParameter" + +[sub_resource type="VisualShaderNodeVectorOp" id="VisualShaderNodeVectorOp_d48wo"] +default_input_values = [0, Vector2(0, 0), 1, Vector2(0, 0)] +op_type = 0 +operator = 2 + +[sub_resource type="VisualShaderNodeTexture" id="VisualShaderNodeTexture_kkeqo"] +source = 5 + +[sub_resource type="VisualShaderNodeVectorDecompose" id="VisualShaderNodeVectorDecompose_sxtfl"] +default_input_values = [0, Quaternion(0, 0, 0, 0)] +op_type = 2 + +[sub_resource type="VisualShaderNodeInput" id="VisualShaderNodeInput_mqedt"] +input_name = "color" + +[sub_resource type="VisualShaderNodeVectorOp" id="VisualShaderNodeVectorOp_m53hx"] +default_input_values = [0, Quaternion(0, 0, 0, 0), 1, Quaternion(0, 0, 0, 0)] +op_type = 2 +operator = 2 + +[sub_resource type="VisualShaderNodeTexture2DParameter" id="VisualShaderNodeTexture2DParameter_eyv8d"] +parameter_name = "DissolveTexture" + +[sub_resource type="VisualShaderNodeTexture" id="VisualShaderNodeTexture_1lm4e"] +source = 5 + +[sub_resource type="VisualShaderNodeVectorOp" id="VisualShaderNodeVectorOp_656e5"] +default_input_values = [0, Quaternion(0, 0, 0, 0), 1, Quaternion(0, 0, 0, 0)] +op_type = 2 +operator = 2 + +[resource] +code = "shader_type spatial; +render_mode blend_mix, depth_draw_opaque, cull_back, diffuse_lambert, specular_schlick_ggx; + +uniform sampler2D Texture2DParameter; +uniform vec2 Dissolvetilling = vec2(1.000000, 1.000000); +uniform vec2 DissolveSpeed = vec2(0.000000, 0.000000); +uniform sampler2D DissolveTexture; +uniform float DissolveAmmount : hint_range(0, 1) = 0; + + + +void fragment() { +// Input:5 + vec4 n_out5p0 = COLOR; + + + vec4 n_out3p0; +// Texture2D:3 + n_out3p0 = texture(Texture2DParameter, UV); + + +// Input:19 + vec2 n_out19p0 = UV; + + +// Vector2Parameter:18 + vec2 n_out18p0 = Dissolvetilling; + + +// VectorOp:20 + vec2 n_out20p0 = n_out19p0 * n_out18p0; + + +// Input:15 + float n_out15p0 = TIME; + + +// Vector2Parameter:17 + vec2 n_out17p0 = DissolveSpeed; + + +// VectorOp:16 + vec2 n_out16p0 = vec2(n_out15p0) * n_out17p0; + + +// UVFunc:13 + vec2 n_in13p1 = vec2(1.00000, 1.00000); + vec2 n_out13p0 = n_out16p0 * n_in13p1 + n_out20p0; + + + vec4 n_out8p0; +// Texture2D:8 + n_out8p0 = texture(DissolveTexture, n_out13p0); + + +// VectorOp:9 + vec4 n_out9p0 = n_out3p0 * n_out8p0; + + +// FloatParameter:12 + float n_out12p0 = DissolveAmmount; + + +// Mix:11 + vec4 n_out11p0 = mix(n_out3p0, n_out9p0, n_out12p0); + + +// VectorOp:6 + vec4 n_out6p0 = n_out5p0 * n_out11p0; + + +// VectorDecompose:4 + float n_out4p0 = n_out6p0.x; + float n_out4p1 = n_out6p0.y; + float n_out4p2 = n_out6p0.z; + float n_out4p3 = n_out6p0.w; + + +// Output:0 + ALBEDO = vec3(n_out6p0.xyz); + ALPHA = n_out4p3; + + +} +" +nodes/fragment/0/position = Vector2(540, 140) +nodes/fragment/2/node = SubResource("VisualShaderNodeTexture2DParameter_d6ywd") +nodes/fragment/2/position = Vector2(-900, -20) +nodes/fragment/3/node = SubResource("VisualShaderNodeTexture_kkeqo") +nodes/fragment/3/position = Vector2(-620, 120) +nodes/fragment/4/node = SubResource("VisualShaderNodeVectorDecompose_sxtfl") +nodes/fragment/4/position = Vector2(320, 360) +nodes/fragment/5/node = SubResource("VisualShaderNodeInput_mqedt") +nodes/fragment/5/position = Vector2(-400, 120) +nodes/fragment/6/node = SubResource("VisualShaderNodeVectorOp_m53hx") +nodes/fragment/6/position = Vector2(180, 200) +nodes/fragment/7/node = SubResource("VisualShaderNodeTexture2DParameter_eyv8d") +nodes/fragment/7/position = Vector2(-1160, 760) +nodes/fragment/8/node = SubResource("VisualShaderNodeTexture_1lm4e") +nodes/fragment/8/position = Vector2(-640, 780) +nodes/fragment/9/node = SubResource("VisualShaderNodeVectorOp_656e5") +nodes/fragment/9/position = Vector2(-340, 480) +nodes/fragment/10/node = SubResource("VisualShaderNodeTexture_cg52y") +nodes/fragment/10/position = Vector2(437.053, 453.887) +nodes/fragment/11/node = SubResource("VisualShaderNodeMix_ijncn") +nodes/fragment/11/position = Vector2(120, 380) +nodes/fragment/12/node = SubResource("VisualShaderNodeFloatParameter_jkk0k") +nodes/fragment/12/position = Vector2(-100, 640) +nodes/fragment/13/node = SubResource("VisualShaderNodeUVFunc_cjtno") +nodes/fragment/13/position = Vector2(-960, 320) +nodes/fragment/15/node = SubResource("VisualShaderNodeInput_28sn1") +nodes/fragment/15/position = Vector2(-1460, 420) +nodes/fragment/16/node = SubResource("VisualShaderNodeVectorOp_gws4n") +nodes/fragment/16/position = Vector2(-1192.5, 402.097) +nodes/fragment/17/node = SubResource("VisualShaderNodeVec2Parameter_4c47s") +nodes/fragment/17/position = Vector2(-1540, 520) +nodes/fragment/18/node = SubResource("VisualShaderNodeVec2Parameter_2utm6") +nodes/fragment/18/position = Vector2(-1680, 120) +nodes/fragment/19/node = SubResource("VisualShaderNodeInput_nlksu") +nodes/fragment/19/position = Vector2(-1680, 20) +nodes/fragment/20/node = SubResource("VisualShaderNodeVectorOp_d48wo") +nodes/fragment/20/position = Vector2(-1320, 100) +nodes/fragment/connections = PackedInt32Array(2, 0, 3, 2, 4, 3, 0, 1, 5, 0, 6, 0, 6, 0, 0, 0, 6, 0, 4, 0, 7, 0, 8, 2, 3, 0, 9, 0, 8, 0, 9, 1, 3, 0, 11, 0, 9, 0, 11, 1, 11, 0, 6, 1, 12, 0, 11, 2, 13, 0, 8, 0, 15, 0, 16, 0, 17, 0, 16, 1, 16, 0, 13, 2, 19, 0, 20, 0, 18, 0, 20, 1, 20, 0, 13, 0) diff --git a/scenes/Forest/Shader/fireShader2.tres b/scenes/Forest/Shader/fireShader2.tres new file mode 100644 index 0000000..2caff9d --- /dev/null +++ b/scenes/Forest/Shader/fireShader2.tres @@ -0,0 +1,220 @@ +[gd_resource type="VisualShader" load_steps=21 format=3 uid="uid://b6kdppa3vcm41"] + +[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_d4g8j"] + +[sub_resource type="VisualShaderNodeTexture" id="VisualShaderNodeTexture_cg52y"] +texture = SubResource("CompressedTexture2D_d4g8j") + +[sub_resource type="VisualShaderNodeMix" id="VisualShaderNodeMix_ijncn"] +default_input_values = [0, Quaternion(0, 0, 0, 0), 1, Quaternion(1, 1, 1, 1), 2, 0.5] +op_type = 6 + +[sub_resource type="VisualShaderNodeFloatParameter" id="VisualShaderNodeFloatParameter_jkk0k"] +parameter_name = "DissolveAmmount" +hint = 1 +default_value_enabled = true + +[sub_resource type="VisualShaderNodeUVFunc" id="VisualShaderNodeUVFunc_cjtno"] + +[sub_resource type="VisualShaderNodeInput" id="VisualShaderNodeInput_28sn1"] +input_name = "time" + +[sub_resource type="VisualShaderNodeVectorOp" id="VisualShaderNodeVectorOp_gws4n"] +default_input_values = [0, Vector2(0, 0), 1, Vector2(0, 0)] +op_type = 0 +operator = 2 + +[sub_resource type="VisualShaderNodeVec2Parameter" id="VisualShaderNodeVec2Parameter_4c47s"] +parameter_name = "DissolveSpeed" +default_value_enabled = true + +[sub_resource type="VisualShaderNodeVec2Parameter" id="VisualShaderNodeVec2Parameter_2utm6"] +parameter_name = "Dissolvetilling" +default_value_enabled = true +default_value = Vector2(1, 1) + +[sub_resource type="VisualShaderNodeInput" id="VisualShaderNodeInput_nlksu"] +input_name = "uv" + +[sub_resource type="VisualShaderNodeTexture2DParameter" id="VisualShaderNodeTexture2DParameter_d6ywd"] +parameter_name = "Texture2DParameter" + +[sub_resource type="VisualShaderNodeVectorOp" id="VisualShaderNodeVectorOp_d48wo"] +default_input_values = [0, Vector2(0, 0), 1, Vector2(0, 0)] +op_type = 0 +operator = 2 + +[sub_resource type="VisualShaderNodeTexture" id="VisualShaderNodeTexture_kkeqo"] +source = 5 + +[sub_resource type="VisualShaderNodeVectorDecompose" id="VisualShaderNodeVectorDecompose_sxtfl"] +default_input_values = [0, Quaternion(0, 0, 0, 0)] +op_type = 2 + +[sub_resource type="VisualShaderNodeInput" id="VisualShaderNodeInput_mqedt"] +input_name = "color" + +[sub_resource type="VisualShaderNodeVectorOp" id="VisualShaderNodeVectorOp_m53hx"] +default_input_values = [0, Quaternion(0, 0, 0, 0), 1, Quaternion(0, 0, 0, 0)] +op_type = 2 +operator = 2 + +[sub_resource type="VisualShaderNodeTexture2DParameter" id="VisualShaderNodeTexture2DParameter_eyv8d"] +parameter_name = "DissolveTexture" + +[sub_resource type="VisualShaderNodeTexture" id="VisualShaderNodeTexture_1lm4e"] +source = 5 + +[sub_resource type="VisualShaderNodeVectorOp" id="VisualShaderNodeVectorOp_656e5"] +default_input_values = [0, Quaternion(0, 0, 0, 0), 1, Quaternion(0, 0, 0, 0)] +op_type = 2 +operator = 2 + +[sub_resource type="VisualShaderNodeBillboard" id="VisualShaderNodeBillboard_m02i8"] +billboard_type = 3 +keep_scale = true + +[resource] +code = "shader_type spatial; +render_mode blend_mix, depth_draw_opaque, cull_back, diffuse_lambert, specular_schlick_ggx; + +uniform sampler2D Texture2DParameter; +uniform vec2 Dissolvetilling = vec2(1.000000, 1.000000); +uniform vec2 DissolveSpeed = vec2(0.000000, 0.000000); +uniform sampler2D DissolveTexture; +uniform float DissolveAmmount : hint_range(0, 1) = 0; + + + +void vertex() { + mat4 n_out2p0; +// GetBillboardMatrix:2 + { + mat4 __wm = mat4(normalize(INV_VIEW_MATRIX[0]), normalize(INV_VIEW_MATRIX[1]), normalize(INV_VIEW_MATRIX[2]), MODEL_MATRIX[3]); + __wm = __wm * mat4(vec4(cos(INSTANCE_CUSTOM.x), -sin(INSTANCE_CUSTOM.x), 0.0, 0.0), vec4(sin(INSTANCE_CUSTOM.x), cos(INSTANCE_CUSTOM.x), 0.0, 0.0), vec4(0.0, 0.0, 1.0, 0.0), vec4(0.0, 0.0, 0.0, 1.0)); + __wm = __wm * mat4(vec4(length(MODEL_MATRIX[0].xyz), 0.0, 0.0, 0.0), vec4(0.0, length(MODEL_MATRIX[1].xyz), 0.0, 0.0), vec4(0.0, 0.0, length(MODEL_MATRIX[2].xyz), 0.0), vec4(0.0, 0.0, 0.0, 1.0)); + n_out2p0 = VIEW_MATRIX * __wm; + } + + +// Output:0 + MODELVIEW_MATRIX = n_out2p0; + + +} + +void fragment() { +// Input:5 + vec4 n_out5p0 = COLOR; + + + vec4 n_out3p0; +// Texture2D:3 + n_out3p0 = texture(Texture2DParameter, UV); + + +// Input:19 + vec2 n_out19p0 = UV; + + +// Vector2Parameter:18 + vec2 n_out18p0 = Dissolvetilling; + + +// VectorOp:20 + vec2 n_out20p0 = n_out19p0 * n_out18p0; + + +// Input:15 + float n_out15p0 = TIME; + + +// Vector2Parameter:17 + vec2 n_out17p0 = DissolveSpeed; + + +// VectorOp:16 + vec2 n_out16p0 = vec2(n_out15p0) * n_out17p0; + + +// UVFunc:13 + vec2 n_in13p1 = vec2(1.00000, 1.00000); + vec2 n_out13p0 = n_out16p0 * n_in13p1 + n_out20p0; + + + vec4 n_out8p0; +// Texture2D:8 + n_out8p0 = texture(DissolveTexture, n_out13p0); + + +// VectorOp:9 + vec4 n_out9p0 = n_out3p0 * n_out8p0; + + +// FloatParameter:12 + float n_out12p0 = DissolveAmmount; + + +// Mix:11 + vec4 n_out11p0 = mix(n_out3p0, n_out9p0, n_out12p0); + + +// VectorOp:6 + vec4 n_out6p0 = n_out5p0 * n_out11p0; + + +// VectorDecompose:4 + float n_out4p0 = n_out6p0.x; + float n_out4p1 = n_out6p0.y; + float n_out4p2 = n_out6p0.z; + float n_out4p3 = n_out6p0.w; + + +// Output:0 + ALBEDO = vec3(n_out6p0.xyz); + ALPHA = n_out4p3; + + +} +" +nodes/vertex/2/node = SubResource("VisualShaderNodeBillboard_m02i8") +nodes/vertex/2/position = Vector2(120, 260) +nodes/vertex/connections = PackedInt32Array(2, 0, 0, 10) +nodes/fragment/0/position = Vector2(540, 140) +nodes/fragment/2/node = SubResource("VisualShaderNodeTexture2DParameter_d6ywd") +nodes/fragment/2/position = Vector2(-900, -20) +nodes/fragment/3/node = SubResource("VisualShaderNodeTexture_kkeqo") +nodes/fragment/3/position = Vector2(-620, 120) +nodes/fragment/4/node = SubResource("VisualShaderNodeVectorDecompose_sxtfl") +nodes/fragment/4/position = Vector2(320, 360) +nodes/fragment/5/node = SubResource("VisualShaderNodeInput_mqedt") +nodes/fragment/5/position = Vector2(-400, 120) +nodes/fragment/6/node = SubResource("VisualShaderNodeVectorOp_m53hx") +nodes/fragment/6/position = Vector2(180, 200) +nodes/fragment/7/node = SubResource("VisualShaderNodeTexture2DParameter_eyv8d") +nodes/fragment/7/position = Vector2(-1160, 760) +nodes/fragment/8/node = SubResource("VisualShaderNodeTexture_1lm4e") +nodes/fragment/8/position = Vector2(-640, 780) +nodes/fragment/9/node = SubResource("VisualShaderNodeVectorOp_656e5") +nodes/fragment/9/position = Vector2(-340, 480) +nodes/fragment/10/node = SubResource("VisualShaderNodeTexture_cg52y") +nodes/fragment/10/position = Vector2(437.053, 453.887) +nodes/fragment/11/node = SubResource("VisualShaderNodeMix_ijncn") +nodes/fragment/11/position = Vector2(120, 380) +nodes/fragment/12/node = SubResource("VisualShaderNodeFloatParameter_jkk0k") +nodes/fragment/12/position = Vector2(-100, 640) +nodes/fragment/13/node = SubResource("VisualShaderNodeUVFunc_cjtno") +nodes/fragment/13/position = Vector2(-960, 320) +nodes/fragment/15/node = SubResource("VisualShaderNodeInput_28sn1") +nodes/fragment/15/position = Vector2(-1460, 420) +nodes/fragment/16/node = SubResource("VisualShaderNodeVectorOp_gws4n") +nodes/fragment/16/position = Vector2(-1192.5, 402.097) +nodes/fragment/17/node = SubResource("VisualShaderNodeVec2Parameter_4c47s") +nodes/fragment/17/position = Vector2(-1540, 520) +nodes/fragment/18/node = SubResource("VisualShaderNodeVec2Parameter_2utm6") +nodes/fragment/18/position = Vector2(-1680, 120) +nodes/fragment/19/node = SubResource("VisualShaderNodeInput_nlksu") +nodes/fragment/19/position = Vector2(-1680, 20) +nodes/fragment/20/node = SubResource("VisualShaderNodeVectorOp_d48wo") +nodes/fragment/20/position = Vector2(-1320, 100) +nodes/fragment/connections = PackedInt32Array(2, 0, 3, 2, 4, 3, 0, 1, 5, 0, 6, 0, 6, 0, 0, 0, 6, 0, 4, 0, 7, 0, 8, 2, 3, 0, 9, 0, 8, 0, 9, 1, 3, 0, 11, 0, 9, 0, 11, 1, 11, 0, 6, 1, 12, 0, 11, 2, 13, 0, 8, 0, 15, 0, 16, 0, 17, 0, 16, 1, 16, 0, 13, 2, 19, 0, 20, 0, 18, 0, 20, 1, 20, 0, 13, 0) diff --git a/scenes/Forest/cobarandompart.gd b/scenes/Forest/cobarandompart.gd new file mode 100644 index 0000000..e8f3ae3 --- /dev/null +++ b/scenes/Forest/cobarandompart.gd @@ -0,0 +1,21 @@ +extends MeshInstance3D + +# Called when the node enters the scene tree for the first time. +func _ready(): + pass # Replace with function body. + +# +## Called every frame. 'delta' is the elapsed time since the previous frame. +#func _process(delta): + #pass +func spawn(): + var spawned_scene = load("res://scenes/Forest/Flametscn.tscn") + var spawned_scene_copy = spawned_scene.instance() + spawned_scene_copy.translation.x = randi() % 5 + add_child(spawned_scene_copy) + + +func _process(delta): + pass + if Input.is_action_just_pressed("spawn_flame"): + spawn() diff --git a/scenes/beach/scanes/terrain_bitch.tscn b/scenes/beach/scanes/terrain_bitch.tscn index 49c90a7..6d9bfc8 100644 --- a/scenes/beach/scanes/terrain_bitch.tscn +++ b/scenes/beach/scanes/terrain_bitch.tscn @@ -1,7 +1,7 @@ -[gd_scene load_steps=24 format=3 uid="uid://cujblkrvrif77"] +[gd_scene load_steps=32 format=3 uid="uid://cujblkrvrif77"] [ext_resource type="PackedScene" uid="uid://ck1exncbpw8fg" path="res://scenes/beach/metrial/terrain_bitch.glb" id="1_vlsq8"] -[ext_resource type="PackedScene" uid="uid://6vs0oqfgbvee" path="res://scenes/beach/water_for_beach.tscn" id="2_xk7c1"] +[ext_resource type="PackedScene" uid="uid://cb1iwxp77nqof" path="res://scenes/characters.tscn" id="2_lc7uk"] [ext_resource type="Texture2D" uid="uid://upx1xvrix683" path="res://scenes/Forest/Material/farm_field_puresky_2k.hdr" id="3_ls4r2"] [ext_resource type="Script" path="res://addons/proton_scatter/src/scatter.gd" id="4_dxvd5"] [ext_resource type="Script" path="res://addons/proton_scatter/src/stack/modifier_stack.gd" id="5_ysghk"] @@ -12,6 +12,7 @@ [ext_resource type="Script" path="res://addons/proton_scatter/src/scatter_item.gd" id="10_4d7y7"] [ext_resource type="Script" path="res://addons/proton_scatter/src/scatter_shape.gd" id="11_m2fys"] [ext_resource type="Script" path="res://addons/proton_scatter/src/shapes/box_shape.gd" id="12_u8aqd"] +[ext_resource type="PackedScene" uid="uid://xhsrdb700uow" path="res://scenes/Forest/river.tscn" id="13_4xlhg"] [sub_resource type="PanoramaSkyMaterial" id="PanoramaSkyMaterial_ekkge"] panorama = ExtResource("3_ls4r2") @@ -26,19 +27,19 @@ sky = SubResource("Sky_fkvty") ambient_light_sky_contribution = 0.5 ambient_light_energy = 0.3 -[sub_resource type="Resource" id="Resource_nibsn"] +[sub_resource type="Resource" id="Resource_gf1wj"] script = ExtResource("6_jp76b") -amount = 5000 +amount = 1000 enabled = true override_global_seed = false custom_seed = 0 restrict_height = true reference_frame = 1 -[sub_resource type="Resource" id="Resource_jtllp"] +[sub_resource type="Resource" id="Resource_mxo8a"] script = ExtResource("7_eq4cw") position = Vector3(0.15, 0.15, 0.15) -rotation = Vector3(5, 50, 5) +rotation = Vector3(20, 360, 20) scale = Vector3(0.1, 0.1, 0.1) enabled = true override_global_seed = false @@ -46,7 +47,7 @@ custom_seed = 0 restrict_height = false reference_frame = 2 -[sub_resource type="Resource" id="Resource_e3430"] +[sub_resource type="Resource" id="Resource_wlatv"] script = ExtResource("8_heh5i") iterations = 3 offset_step = 0.2 @@ -58,7 +59,7 @@ custom_seed = 0 restrict_height = true reference_frame = 0 -[sub_resource type="Resource" id="Resource_p3r77"] +[sub_resource type="Resource" id="Resource_wlxf3"] script = ExtResource("9_5gydk") ray_direction = Vector3(0, -1, 0) ray_length = 5.0 @@ -74,19 +75,79 @@ custom_seed = 0 restrict_height = false reference_frame = 0 -[sub_resource type="Resource" id="Resource_1w26o"] +[sub_resource type="Resource" id="Resource_dbtop"] script = ExtResource("5_ysghk") -stack = Array[Resource("res://addons/proton_scatter/src/modifiers/base_modifier.gd")]([SubResource("Resource_nibsn"), SubResource("Resource_jtllp"), SubResource("Resource_e3430"), SubResource("Resource_p3r77")]) +stack = Array[Resource("res://addons/proton_scatter/src/modifiers/base_modifier.gd")]([SubResource("Resource_gf1wj"), SubResource("Resource_mxo8a"), SubResource("Resource_wlatv"), SubResource("Resource_wlxf3")]) -[sub_resource type="Resource" id="Resource_jbo47"] +[sub_resource type="Resource" id="Resource_dbwml"] script = ExtResource("12_u8aqd") size = Vector3(1, 1, 1) -[sub_resource type="Resource" id="Resource_6tsti"] +[sub_resource type="Resource" id="Resource_aohis"] script = ExtResource("12_u8aqd") size = Vector3(1, 1, 1) -[sub_resource type="Resource" id="Resource_fht4t"] +[sub_resource type="Resource" id="Resource_708id"] +script = ExtResource("12_u8aqd") +size = Vector3(1, 1, 1) + +[sub_resource type="Resource" id="Resource_djqd6"] +script = ExtResource("6_jp76b") +amount = 75 +enabled = true +override_global_seed = false +custom_seed = 0 +restrict_height = true +reference_frame = 1 + +[sub_resource type="Resource" id="Resource_oxyfw"] +script = ExtResource("7_eq4cw") +position = Vector3(0.15, 0.15, 0.15) +rotation = Vector3(20, 360, 20) +scale = Vector3(0.1, 0.1, 0.1) +enabled = true +override_global_seed = false +custom_seed = 0 +restrict_height = false +reference_frame = 2 + +[sub_resource type="Resource" id="Resource_6bu4o"] +script = ExtResource("8_heh5i") +iterations = 3 +offset_step = 0.2 +consecutive_step_multiplier = 0.75 +use_computeshader = true +enabled = true +override_global_seed = false +custom_seed = 0 +restrict_height = true +reference_frame = 0 + +[sub_resource type="Resource" id="Resource_cj8k3"] +script = ExtResource("9_5gydk") +ray_direction = Vector3(0, -1, 0) +ray_length = 5.0 +ray_offset = 5.0 +remove_points_on_miss = false +align_with_collision_normal = false +max_slope = 90.0 +collision_mask = 1 +exclude_mask = 0 +enabled = true +override_global_seed = false +custom_seed = 0 +restrict_height = false +reference_frame = 0 + +[sub_resource type="Resource" id="Resource_1da0m"] +script = ExtResource("5_ysghk") +stack = Array[Resource("res://addons/proton_scatter/src/modifiers/base_modifier.gd")]([SubResource("Resource_djqd6"), SubResource("Resource_oxyfw"), SubResource("Resource_6bu4o"), SubResource("Resource_cj8k3")]) + +[sub_resource type="Resource" id="Resource_fk050"] +script = ExtResource("12_u8aqd") +size = Vector3(1, 1, 1) + +[sub_resource type="Resource" id="Resource_pki8b"] script = ExtResource("12_u8aqd") size = Vector3(1, 1, 1) @@ -101,58 +162,86 @@ visible = false [node name="CollisionShape3D" parent="Pantai/Pantai" index="0"] visible = false -[node name="water_for_beach" parent="." index="1" instance=ExtResource("2_xk7c1")] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 30.8314, -1.17403, 49.8212) - -[node name="WorldEnvironment2" type="WorldEnvironment" parent="." index="2"] +[node name="WorldEnvironment2" type="WorldEnvironment" parent="." index="1"] environment = SubResource("Environment_rkls2") -[node name="ProtonScatter" type="Node3D" parent="WorldEnvironment2" index="0"] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 29.8472, 3.83034, -31.9664) +[node name="ProtonScatter" type="Node3D" parent="." index="2"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 24.8035, -1.79541, 0) script = ExtResource("4_dxvd5") -modifier_stack = SubResource("Resource_1w26o") +modifier_stack = SubResource("Resource_dbtop") Performance/use_chunks = true Performance/chunk_dimensions = Vector3(15, 15, 15) -[node name="coal" type="Node3D" parent="WorldEnvironment2/ProtonScatter" index="0"] +[node name="ScatterItem" type="Node3D" parent="ProtonScatter" index="0"] script = ExtResource("10_4d7y7") -source_scale_multiplier = 2.0 -path = "res://addons/proton_scatter/demos/assets/small_rock.tscn" +proportion = 300 +path = "res://addons/proton_scatter/demos/assets/pine_tree.tscn" -[node name="tree" type="Node3D" parent="WorldEnvironment2/ProtonScatter" index="1"] -transform = Transform3D(0.986957, -0.160984, 0, 0.160984, 0.986957, 0, 0, 0, 1, 0, 0, 0) +[node name="ScatterItem2" type="Node3D" parent="ProtonScatter" index="1"] script = ExtResource("10_4d7y7") -proportion = 60 -source_scale_multiplier = 1.5 -path = "res://addons/proton_scatter/demos/assets/pine_tree.tscn" +path = "res://addons/proton_scatter/demos/assets/bush.tscn" + +[node name="ScatterItem3" type="Node3D" parent="ProtonScatter" index="2"] +script = ExtResource("10_4d7y7") +path = "res://addons/proton_scatter/demos/assets/dead_branch.tscn" -[node name="Grass" type="Node3D" parent="WorldEnvironment2/ProtonScatter" index="2"] +[node name="ScatterItem4" type="Node3D" parent="ProtonScatter" index="3"] script = ExtResource("10_4d7y7") -proportion = 500 -source_scale_multiplier = 1.5 +proportion = 200 path = "res://addons/proton_scatter/demos/assets/grass_2.tscn" -[node name="Grass2" type="Node3D" parent="WorldEnvironment2/ProtonScatter" index="3"] +[node name="ScatterItem5" type="Node3D" parent="ProtonScatter" index="4"] script = ExtResource("10_4d7y7") -proportion = 300 -path = "res://addons/proton_scatter/demos/assets/bush.tscn" +path = "res://addons/proton_scatter/demos/assets/large_rock.tscn" + +[node name="ScatterItem6" type="Node3D" parent="ProtonScatter" index="5"] +script = ExtResource("10_4d7y7") +path = "res://addons/proton_scatter/demos/assets/small_rock.tscn" -[node name="ScatterShape" type="Node3D" parent="WorldEnvironment2/ProtonScatter" index="4"] -transform = Transform3D(50, 0, -1.49011e-06, 0, 1, 0, 1.49011e-06, 0, 50, 0, 0, 0) +[node name="ScatterShape" type="Node3D" parent="ProtonScatter" index="6"] +transform = Transform3D(150, 0, -4.76837e-06, 0, 1, 0, 4.47034e-06, 0, 160, -28.2718, -0.217781, -8.42565e-07) visible = false script = ExtResource("11_m2fys") -shape = SubResource("Resource_jbo47") +shape = SubResource("Resource_dbwml") -[node name="ScatterShape2" type="Node3D" parent="WorldEnvironment2/ProtonScatter" index="5"] -transform = Transform3D(23, 0, 0, 0, 1, 0, 0, 0, 10, 13.1633, -0.231185, 4.30711) +[node name="ScatterShape2" type="Node3D" parent="ProtonScatter" index="7"] +transform = Transform3D(50, 0, -2.38418e-06, 0, 30, 0, 1.49011e-06, 0, 80, 40.1464, 0.785881, 46.4065) visible = false script = ExtResource("11_m2fys") negative = true -shape = SubResource("Resource_6tsti") +shape = SubResource("Resource_aohis") -[node name="ScatterShape3" type="Node3D" parent="WorldEnvironment2/ProtonScatter" index="6"] -transform = Transform3D(-1.00536e-06, 0, 10, 0, 1, 0, -23, 0, -4.37114e-07, 4.89083, -0.231185, 17.3521) +[node name="ScatterShape3" type="Node3D" parent="ProtonScatter" index="8"] +transform = Transform3D(30, 0, -8.94069e-07, 0, 30, 0, 8.94069e-07, 0, 30, 4.90308, 0.785881, 77.6579) visible = false script = ExtResource("11_m2fys") negative = true -shape = SubResource("Resource_fht4t") +shape = SubResource("Resource_708id") + +[node name="ProtonScatter2" type="Node3D" parent="." index="3"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 6.63083, 0) +script = ExtResource("4_dxvd5") +modifier_stack = SubResource("Resource_1da0m") +Performance/use_chunks = true +Performance/chunk_dimensions = Vector3(15, 15, 15) + +[node name="ScatterItem" type="Node3D" parent="ProtonScatter2" index="0"] +script = ExtResource("10_4d7y7") +path = "res://addons/proton_scatter/demos/assets/pine_tree.tscn" + +[node name="ScatterShape" type="Node3D" parent="ProtonScatter2" index="1"] +transform = Transform3D(50, 0, -1.49011e-06, 0, 10, 0, 1.49011e-06, 0, 50, 4.20079e-07, 1.432, -14.0955) +script = ExtResource("11_m2fys") +shape = SubResource("Resource_fk050") + +[node name="ScatterShape2" type="Node3D" parent="ProtonScatter2" index="2"] +transform = Transform3D(19.0054, 0, -2.98023e-07, 0, 10, 0, 5.66403e-07, 0, 10, 15.086, 1.432, 5.7473) +script = ExtResource("11_m2fys") +negative = true +shape = SubResource("Resource_pki8b") + +[node name="Characters" parent="." index="4" instance=ExtResource("2_lc7uk")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.618598, 8.52664, -6.99799) + +[node name="river" parent="." index="5" instance=ExtResource("13_4xlhg")] +transform = Transform3D(150, 0, 0, 0, 1, 0, 0, 0, 150, -5.72327, -5.69258, 26.6085) diff --git a/scenes/beach/water.gdshader b/scenes/beach/water.gdshader deleted file mode 100644 index 753dbac..0000000 --- a/scenes/beach/water.gdshader +++ /dev/null @@ -1,29 +0,0 @@ -shader_type spatial; - -uniform vec3 albedo : source_color; -uniform float metallic : hint_range(0.0, 1.0) = 0; -uniform float roughness : hint_range(0.0, 1.0) = 0.02; -uniform sampler2D texture_normal; -uniform sampler2D texture_normal2; -uniform vec2 wave_direction = vec2(2.0,0.0); -uniform vec2 wave_direction2 = vec2(0.0,1.0); -uniform float time_scale : hint_range(0.0, 0.2, 0.005) = 0.025; - - -varying float height; - - - - -void fragment() { - // time calculations for wave (normal map) movement - vec2 time = (TIME * wave_direction) * time_scale; - vec2 time2 = (TIME * wave_direction2) * time_scale; - - - vec3 normal_blend = mix(texture(texture_normal,UV + time).rgb, texture(texture_normal2, UV + time2).rgb, 0.5); - ALBEDO = albedo; - METALLIC = metallic; - NORMAL_MAP = normal_blend; -} - diff --git a/scenes/beach/water_for_beach.tscn b/scenes/beach/water_for_beach.tscn deleted file mode 100644 index da1f945..0000000 --- a/scenes/beach/water_for_beach.tscn +++ /dev/null @@ -1,39 +0,0 @@ -[gd_scene load_steps=6 format=3 uid="uid://6vs0oqfgbvee"] - -[ext_resource type="Shader" path="res://scenes/beach/water.gdshader" id="1_er7pn"] - -[sub_resource type="QuadMesh" id="QuadMesh_yio15"] -size = Vector2(1000, 1000) -subdivide_width = 200 -subdivide_depth = 200 -orientation = 1 - -[sub_resource type="FastNoiseLite" id="FastNoiseLite_icjqs"] -noise_type = 3 -offset = Vector3(20.15, 0, 0) -fractal_type = 2 - -[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_pgyc2"] -generate_mipmaps = false -seamless = true -seamless_blend_skirt = 0.0 -as_normal_map = true -bump_strength = 10.2 -noise = SubResource("FastNoiseLite_icjqs") - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_6i084"] -render_priority = 0 -shader = ExtResource("1_er7pn") -shader_parameter/albedo = Color(7.70092e-07, 0.265612, 0.613824, 1) -shader_parameter/metallic = 0.615 -shader_parameter/roughness = 0.0 -shader_parameter/wave_direction = Vector2(2, 0) -shader_parameter/wave_direction2 = Vector2(0, 0.1) -shader_parameter/time_scale = 0.025 -shader_parameter/texture_normal = SubResource("NoiseTexture2D_pgyc2") -shader_parameter/texture_normal2 = SubResource("NoiseTexture2D_pgyc2") - -[node name="water_for_beach" type="MeshInstance3D"] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.076755, 0.137617, -0.0658917) -mesh = SubResource("QuadMesh_yio15") -surface_material_override/0 = SubResource("ShaderMaterial_6i084") diff --git a/scenes/kota.tscn b/scenes/kota.tscn index 864be00..5d0b2a8 100644 --- a/scenes/kota.tscn +++ b/scenes/kota.tscn @@ -1,5 +1,9 @@ -[gd_scene load_steps=2 format=3 uid="uid://xguaywfqlvfe"] +[gd_scene load_steps=3 format=3 uid="uid://xguaywfqlvfe"] [ext_resource type="PackedScene" uid="uid://d38sax7wmr5tg" path="res://asset/models/maps/Kota.glb" id="1_3tq3r"] +[ext_resource type="PackedScene" uid="uid://cb1iwxp77nqof" path="res://scenes/characters.tscn" id="2_6wjqs"] [node name="Kota" instance=ExtResource("1_3tq3r")] + +[node name="Characters" parent="." index="2" instance=ExtResource("2_6wjqs")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 48.4026, 78.0722, 58.4799) diff --git a/scripts/Flametscn.gd b/scripts/Flametscn.gd new file mode 100644 index 0000000..2ebfbd8 --- /dev/null +++ b/scripts/Flametscn.gd @@ -0,0 +1,27 @@ +extends Node3D + +# Called when the node enters the scene tree for the first time. +func _ready(): + pass + +# Fungsi untuk mem-spawn objek +func spawn(): + var spawned_scene = load("res://nyobaspawn.tscn") + if spawned_scene: + var spawned_scene_copy = spawned_scene.instantiate() + + # Mengatur posisi acak dengan Vector3 + spawned_scene_copy.translation = Vector3( + randi() % 5, # Random X + 0, # Y posisi tetap + randi() % 5 # Random Z + ) + + add_child(spawned_scene_copy) + else: + print("Error: Scene not found at path: res://nyobaspawn.tscn") + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta): + if Input.is_action_just_pressed("spawn_flame"): + spawn() diff --git a/scripts/Forest.gd b/scripts/Forest.gd new file mode 100644 index 0000000..67e954f --- /dev/null +++ b/scripts/Forest.gd @@ -0,0 +1 @@ +extends Node3D diff --git a/scripts/coba.gd b/scripts/coba.gd new file mode 100644 index 0000000..9363309 --- /dev/null +++ b/scripts/coba.gd @@ -0,0 +1,22 @@ +extends Node3D + +# Called when the node enters the scene tree for the first time. +func _ready(): + pass # Replace with function body. + +# +## Called every frame. 'delta' is the elapsed time since the previous frame. +#func _process(delta): + #pass +func spawn(): + var spawned_scene = load("res://cobaspawn.tscn") + var spawned_scene_copy = spawned_scene.instance() + spawned_scene_copy.translation.x = randi() % 5 + add_child(spawned_scene_copy) + + +func _process(delta): + pass + if Input.is_action_just_pressed("spawn_flame"): + spawn() + diff --git a/scripts/player.gd b/scripts/player.gd index d8a6412..f27ecba 100644 --- a/scripts/player.gd +++ b/scripts/player.gd @@ -1,79 +1,59 @@ -extends CharacterBody3D - -@onready var camera_mount := $camera_mount -@onready var animation_player := $visuals/mixamo_base/AnimationPlayer -@onready var visuals := $visuals -var SPEED := 2.25 -var JUMP_VELOCITY := 4.5 -var walking_speed := 2.25 -var running_speed := 5.0 -var is_locked := false -var status : String +extends CharacterBody3D -@export var sens_horizontal = 0.5 -@export var sens_vertical = 0.25 +var ORIGINAL_SPEED +var SPEED = 3.0 +var sprint_draint_amount = 0.3 +var sprint_refresh_amount = 0.4 +var SPRINT_SPEED = 7.0 +const JUMP_VELOCITY = 4.5 +var sprint_slider +var movable = false # Get the gravity from the project settings to be synced with RigidBody nodes. var gravity = ProjectSettings.get_setting("physics/3d/default_gravity") func _ready(): - Input.mouse_mode = Input.MOUSE_MODE_CAPTURED - -# Get Mouse Movement to an Input Value -func _input(event): - if event is InputEventMouseMotion: - rotate_y(deg_to_rad(-event.relative.x * sens_horizontal)) - visuals.rotate_y(deg_to_rad(event.relative.x * sens_horizontal)) - $camera_mount.rotate_x(deg_to_rad(event.relative.y * sens_vertical)) - + ORIGINAL_SPEED = SPEED + sprint_slider = get_node("/root/" + get_tree().current_scene.name + "/UI/sprint_slider") + +func _process(delta): + if SPEED == SPRINT_SPEED: + sprint_slider.value = sprint_slider.value - sprint_draint_amount * delta + if sprint_slider.value == sprint_slider.min_value: + SPEED = ORIGINAL_SPEED + if SPEED != SPRINT_SPEED: + if sprint_slider.value < sprint_slider.max_value: + sprint_slider.value = sprint_slider.value + sprint_refresh_amount * delta + if sprint_slider.value == sprint_slider.max_value: + sprint_slider.visible = false + func _physics_process(delta): - # Exit - if Input.is_action_just_pressed("exit"): - get_tree().quit() - - if !animation_player.is_playing(): - is_locked = false - - # Kicking - if Input.is_action_just_pressed("kick"): - status = "kick" - is_locked = true - - # running - if !is_locked: - if !Input.is_anything_pressed(): - status = "idle" - else: - if Input.is_action_pressed("run"): - status = "running" - SPEED = running_speed - else: - status = "walking" - SPEED = walking_speed # Add the gravity. if not is_on_floor(): velocity.y -= gravity * delta + + if movable == true : # Handle jump. - if Input.is_action_just_pressed("ui_accept") and is_on_floor(): - velocity.y = JUMP_VELOCITY - # Get the input direction and handle the movement/deceleration. + if Input.is_action_just_pressed("jump") and is_on_floor(): + velocity.y = JUMP_VELOCITY + + # As good practice, you should replace UI actions with custom gameplay actions. - var input_dir = Input.get_vector("left", "right", "forward", "backward") - var direction = (transform.basis * Vector3(input_dir.x, 0, input_dir.y)).normalized() - - if animation_player.current_animation != status: - animation_player.play(status) + var input_dir = Input.get_vector("left", "right", "forward", "backward") + var direction = (transform.basis * Vector3(input_dir.x, 0, input_dir.y)).normalized() + if direction: + velocity.x = direction.x * SPEED + velocity.z = direction.z * SPEED - if direction: - if !is_locked: - visuals.look_at(position + direction) - - velocity.x = direction.x * SPEED - velocity.z = direction.z * SPEED - else: - velocity.x = move_toward(velocity.x, 0, SPEED) - velocity.z = move_toward(velocity.z, 0, SPEED) - if !is_locked: - move_and_slide() - + if Input.is_action_just_pressed("Sprint"): + sprint_slider.visible = true + SPEED = SPRINT_SPEED + if Input.is_action_just_released("Sprint") : + SPEED = ORIGINAL_SPEED + + else: + velocity.x = move_toward(velocity.x, 0, SPEED) + velocity.z = move_toward(velocity.z, 0, SPEED) + + move_and_slide() diff --git a/scripts/test.gd b/scripts/test.gd deleted file mode 100644 index e171de1..0000000 --- a/scripts/test.gd +++ /dev/null @@ -1,9 +0,0 @@ -extends Node - -# Called when the node enters the scene tree for the first time. -func _ready(): - print("Hello World") - -# Called every frame. 'delta' is the elapsed time since the previous frame. -func _process(delta): - pass