From aafa980c267dab397fb931207d596e22b3ca2d7a Mon Sep 17 00:00:00 2001 From: Malcolm Nixon Date: Sun, 22 Sep 2024 18:30:34 -0400 Subject: [PATCH] Switch swimming-pool from CSG to GLB mesh. --- .../brown_grid_triplanar.tres | 8 +- .../white_grid_triplanar.tres | 10 +++ scenes/main_menu/main_menu_level.tscn | 82 ++++++++++-------- scenes/swim_demo/objects/pool.glb | Bin 0 -> 11608 bytes scenes/swim_demo/objects/pool.glb.import | 34 ++++++++ scenes/swim_demo/objects/swim_map.tscn | 63 +++----------- .../swim_demo/objects/water_shader.gdshader | 9 ++ scenes/swim_demo/swim_demo.tscn | 33 ++++--- 8 files changed, 137 insertions(+), 102 deletions(-) create mode 100644 assets/wahooney.itch.io/white_grid_triplanar.tres create mode 100644 scenes/swim_demo/objects/pool.glb create mode 100644 scenes/swim_demo/objects/pool.glb.import diff --git a/assets/wahooney.itch.io/brown_grid_triplanar.tres b/assets/wahooney.itch.io/brown_grid_triplanar.tres index e6825e55..03f70129 100644 --- a/assets/wahooney.itch.io/brown_grid_triplanar.tres +++ b/assets/wahooney.itch.io/brown_grid_triplanar.tres @@ -1,8 +1,8 @@ -[gd_resource type="StandardMaterial3D" load_steps=2 format=2] +[gd_resource type="StandardMaterial3D" load_steps=2 format=3 uid="uid://bv2a25s3juvpq"] -[ext_resource path="res://assets/wahooney.itch.io/brown_grid.png" type="Texture2D" id=1] +[ext_resource type="Texture2D" uid="uid://bskwc0drdadnd" path="res://assets/wahooney.itch.io/brown_grid.png" id="1"] [resource] -albedo_texture = ExtResource( 1 ) -uv1_scale = Vector3( 0.5, 0.5, 0.5 ) +albedo_texture = ExtResource("1") +uv1_scale = Vector3(0.25, 0.25, 0.25) uv1_triplanar = true diff --git a/assets/wahooney.itch.io/white_grid_triplanar.tres b/assets/wahooney.itch.io/white_grid_triplanar.tres new file mode 100644 index 00000000..66a52b94 --- /dev/null +++ b/assets/wahooney.itch.io/white_grid_triplanar.tres @@ -0,0 +1,10 @@ +[gd_resource type="StandardMaterial3D" load_steps=2 format=3 uid="uid://df8n6yyq0iq8r"] + +[ext_resource type="Texture2D" uid="uid://cqgdloakbawp" path="res://assets/wahooney.itch.io/white_grid.png" id="1_hsc4y"] + +[resource] +diffuse_mode = 1 +albedo_texture = ExtResource("1_hsc4y") +roughness = 0.8 +uv1_scale = Vector3(0.25, 0.25, 0.25) +uv1_triplanar = true diff --git a/scenes/main_menu/main_menu_level.tscn b/scenes/main_menu/main_menu_level.tscn index a4dfa4da..6c2a6c0c 100644 --- a/scenes/main_menu/main_menu_level.tscn +++ b/scenes/main_menu/main_menu_level.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=53 format=3 uid="uid://037lluf8eoy6"] +[gd_scene load_steps=54 format=3 uid="uid://037lluf8eoy6"] [ext_resource type="PackedScene" uid="uid://qbmx03iibuuu" path="res://addons/godot-xr-tools/staging/scene_base.tscn" id="1"] [ext_resource type="Script" path="res://scenes/main_menu/main_menu_level.gd" id="2_taoax"] @@ -40,66 +40,67 @@ [ext_resource type="Texture2D" uid="uid://v4807nasx1dc" path="res://scenes/sprinting_demo/sprinting_demo.png" id="29_h1jn0"] [ext_resource type="Texture2D" uid="uid://cr1l4g7btdyht" path="res://scenes/origin_gravity_demo/origin_gravity_demo.png" id="32_c4n1q"] [ext_resource type="Texture2D" uid="uid://dhd30j0xpcxoi" path="res://scenes/sphere_world_demo/sphere_world_demo.png" id="34_xw8ig"] +[ext_resource type="Texture2D" uid="uid://dd2u7l7q2de65" path="res://scenes/swim_demo/swim demo.png" id="40_i3riy"] -[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_sj2ko"] +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_rnrm6"] animation = &"Grip" -[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_6aaih"] +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_ntjp1"] animation = &"Grip" -[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_brcrv"] +[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_50hdn"] filter_enabled = true filters = ["Armature/Skeleton3D:Little_Distal_L", "Armature/Skeleton3D:Little_Intermediate_L", "Armature/Skeleton3D:Little_Metacarpal_L", "Armature/Skeleton3D:Little_Proximal_L", "Armature/Skeleton3D:Middle_Distal_L", "Armature/Skeleton3D:Middle_Intermediate_L", "Armature/Skeleton3D:Middle_Metacarpal_L", "Armature/Skeleton3D:Middle_Proximal_L", "Armature/Skeleton3D:Ring_Distal_L", "Armature/Skeleton3D:Ring_Intermediate_L", "Armature/Skeleton3D:Ring_Metacarpal_L", "Armature/Skeleton3D:Ring_Proximal_L", "Armature/Skeleton3D:Thumb_Distal_L", "Armature/Skeleton3D:Thumb_Metacarpal_L", "Armature/Skeleton3D:Thumb_Proximal_L", "Armature/Skeleton:Little_Distal_L", "Armature/Skeleton:Little_Intermediate_L", "Armature/Skeleton:Little_Proximal_L", "Armature/Skeleton:Middle_Distal_L", "Armature/Skeleton:Middle_Intermediate_L", "Armature/Skeleton:Middle_Proximal_L", "Armature/Skeleton:Ring_Distal_L", "Armature/Skeleton:Ring_Intermediate_L", "Armature/Skeleton:Ring_Proximal_L", "Armature/Skeleton:Thumb_Distal_L", "Armature/Skeleton:Thumb_Proximal_L"] -[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_248ms"] +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_3biqj"] animation = &"Grip 5" -[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_2gkw7"] +[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_8rubf"] filter_enabled = true filters = ["Armature/Skeleton3D:Index_Distal_L", "Armature/Skeleton3D:Index_Intermediate_L", "Armature/Skeleton3D:Index_Metacarpal_L", "Armature/Skeleton3D:Index_Proximal_L", "Armature/Skeleton:Index_Distal_L", "Armature/Skeleton:Index_Intermediate_L", "Armature/Skeleton:Index_Proximal_L"] -[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_mh5hs"] +[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_yarx7"] graph_offset = Vector2(-536, 11) -nodes/ClosedHand1/node = SubResource("AnimationNodeAnimation_sj2ko") +nodes/ClosedHand1/node = SubResource("AnimationNodeAnimation_rnrm6") nodes/ClosedHand1/position = Vector2(-600, 300) -nodes/ClosedHand2/node = SubResource("AnimationNodeAnimation_6aaih") +nodes/ClosedHand2/node = SubResource("AnimationNodeAnimation_ntjp1") nodes/ClosedHand2/position = Vector2(-360, 300) -nodes/Grip/node = SubResource("AnimationNodeBlend2_brcrv") +nodes/Grip/node = SubResource("AnimationNodeBlend2_50hdn") nodes/Grip/position = Vector2(0, 20) -nodes/OpenHand/node = SubResource("AnimationNodeAnimation_248ms") +nodes/OpenHand/node = SubResource("AnimationNodeAnimation_3biqj") nodes/OpenHand/position = Vector2(-600, 100) -nodes/Trigger/node = SubResource("AnimationNodeBlend2_2gkw7") +nodes/Trigger/node = SubResource("AnimationNodeBlend2_8rubf") nodes/Trigger/position = Vector2(-360, 20) node_connections = [&"Grip", 0, &"Trigger", &"Grip", 1, &"ClosedHand2", &"Trigger", 0, &"OpenHand", &"Trigger", 1, &"ClosedHand1", &"output", 0, &"Grip"] -[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_s4vic"] +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_43aej"] animation = &"Grip" -[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_70e5h"] +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_an6p5"] animation = &"Grip" -[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_6pk6s"] +[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_gs88d"] filter_enabled = true filters = ["Armature/Skeleton3D:Little_Distal_R", "Armature/Skeleton3D:Little_Intermediate_R", "Armature/Skeleton3D:Little_Metacarpal_R", "Armature/Skeleton3D:Little_Proximal_R", "Armature/Skeleton3D:Middle_Distal_R", "Armature/Skeleton3D:Middle_Intermediate_R", "Armature/Skeleton3D:Middle_Metacarpal_R", "Armature/Skeleton3D:Middle_Proximal_R", "Armature/Skeleton3D:Ring_Distal_R", "Armature/Skeleton3D:Ring_Intermediate_R", "Armature/Skeleton3D:Ring_Metacarpal_R", "Armature/Skeleton3D:Ring_Proximal_R", "Armature/Skeleton3D:Thumb_Distal_R", "Armature/Skeleton3D:Thumb_Metacarpal_R", "Armature/Skeleton3D:Thumb_Proximal_R", "Armature/Skeleton:Little_Distal_R", "Armature/Skeleton:Little_Intermediate_R", "Armature/Skeleton:Little_Proximal_R", "Armature/Skeleton:Middle_Distal_R", "Armature/Skeleton:Middle_Intermediate_R", "Armature/Skeleton:Middle_Proximal_R", "Armature/Skeleton:Ring_Distal_R", "Armature/Skeleton:Ring_Intermediate_R", "Armature/Skeleton:Ring_Proximal_R", "Armature/Skeleton:Thumb_Distal_R", "Armature/Skeleton:Thumb_Proximal_R"] -[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_85bwh"] +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_nbjvw"] animation = &"Grip 5" -[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_uijff"] +[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_x4asf"] filter_enabled = true filters = ["Armature/Skeleton3D:Index_Distal_R", "Armature/Skeleton3D:Index_Intermediate_R", "Armature/Skeleton3D:Index_Metacarpal_R", "Armature/Skeleton3D:Index_Proximal_R", "Armature/Skeleton:Index_Distal_R", "Armature/Skeleton:Index_Intermediate_R", "Armature/Skeleton:Index_Proximal_R"] -[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_nh6hc"] +[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_dpxq4"] graph_offset = Vector2(-552.664, 107.301) -nodes/ClosedHand1/node = SubResource("AnimationNodeAnimation_s4vic") +nodes/ClosedHand1/node = SubResource("AnimationNodeAnimation_43aej") nodes/ClosedHand1/position = Vector2(-600, 300) -nodes/ClosedHand2/node = SubResource("AnimationNodeAnimation_70e5h") +nodes/ClosedHand2/node = SubResource("AnimationNodeAnimation_an6p5") nodes/ClosedHand2/position = Vector2(-360, 300) -nodes/Grip/node = SubResource("AnimationNodeBlend2_6pk6s") +nodes/Grip/node = SubResource("AnimationNodeBlend2_gs88d") nodes/Grip/position = Vector2(0, 40) -nodes/OpenHand/node = SubResource("AnimationNodeAnimation_85bwh") +nodes/OpenHand/node = SubResource("AnimationNodeAnimation_nbjvw") nodes/OpenHand/position = Vector2(-600, 100) -nodes/Trigger/node = SubResource("AnimationNodeBlend2_uijff") +nodes/Trigger/node = SubResource("AnimationNodeBlend2_x4asf") nodes/Trigger/position = Vector2(-360, 40) node_connections = [&"Grip", 0, &"Trigger", &"Grip", 1, &"ClosedHand2", &"Trigger", 0, &"OpenHand", &"Trigger", 1, &"ClosedHand1", &"output", 0, &"Grip"] @@ -146,7 +147,7 @@ transform = Transform3D(0.999999, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0) [node name="AnimationTree" parent="XROrigin3D/LeftHand/LeftHand" index="1"] root_node = NodePath("../Hand_low_L") -tree_root = SubResource("AnimationNodeBlendTree_mh5hs") +tree_root = SubResource("AnimationNodeBlendTree_yarx7") [node name="FunctionPoseDetector" parent="XROrigin3D/LeftHand" index="1" instance=ExtResource("5_xgcrx")] @@ -193,7 +194,7 @@ transform = Transform3D(0.999999, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0) [node name="AnimationTree" parent="XROrigin3D/RightHand/RightHand" index="1"] root_node = NodePath("../Hand_low_R") -tree_root = SubResource("AnimationNodeBlendTree_nh6hc") +tree_root = SubResource("AnimationNodeBlendTree_dpxq4") [node name="FunctionPoseDetector" parent="XROrigin3D/RightHand" index="1" instance=ExtResource("5_xgcrx")] @@ -232,70 +233,75 @@ scene = "res://scenes/basic_movement_demo/basic_movement_demo.tscn" title = ExtResource("10") [node name="ToAudioDemo" parent="Demos" index="1" instance=ExtResource("9")] -transform = Transform3D(0.900969, 0, 0.433884, 0, 1, 0, -0.433884, 0, 0.900969, -4.33884, 0, -9.00969) +transform = Transform3D(0.913545, 0, 0.406737, 0, 1, 0, -0.406737, 0, 0.913545, -4.06737, 0, -9.13545) scene = "res://scenes/audio_demo/audio_demo.tscn" title = ExtResource("14_gocl4") [node name="ToTeleportDemo" parent="Demos" index="2" instance=ExtResource("9")] -transform = Transform3D(0.62349, 0, 0.781832, 0, 1, 0, -0.781832, 0, 0.62349, -7.81832, 0, -6.2349) +transform = Transform3D(0.669131, 0, 0.743145, 0, 1, 0, -0.743145, 0, 0.669131, -7.43145, 0, -6.69131) scene = "res://scenes/teleport_demo/teleport_demo.tscn" title = ExtResource("12") [node name="ToWorldGrabDemo" parent="Demos" index="3" instance=ExtResource("9")] -transform = Transform3D(0.222521, 0, 0.974928, 0, 1, 0, -0.974928, 0, 0.222521, -9.74928, 0, -2.22521) +transform = Transform3D(0.309017, 0, 0.951057, 0, 1, 0, -0.951057, 0, 0.309017, -9.51057, 0, -3.09017) scene = "res://scenes/world_grab_demo/world_grab_demo.tscn" title = ExtResource("19_atnye") [node name="ToClimbingGlidingDemo" parent="Demos" index="4" instance=ExtResource("9")] -transform = Transform3D(-0.222521, 0, 0.974928, 0, 1, 0, -0.974928, 0, -0.222521, -9.74928, 0, 2.22521) +transform = Transform3D(-0.104529, 0, 0.994522, 0, 1, 0, -0.994522, 0, -0.104529, -9.94522, 0, 1.04529) scene = "res://scenes/climbing_gliding_demo/climbing_gliding_demo.tscn" title = ExtResource("13") [node name="ToGrapplingDemo" parent="Demos" index="5" instance=ExtResource("9")] -transform = Transform3D(-0.62349, 0, 0.781832, 0, 1, 0, -0.781832, 0, -0.62349, -7.81832, 0, 6.2349) +transform = Transform3D(-0.5, 0, 0.866025, 0, 1, 0, -0.866025, 0, -0.5, -8.66025, 0, 5) scene = "res://scenes/grappling_demo/grappling_demo.tscn" title = ExtResource("16") [node name="ToInteractablesDemo" parent="Demos" index="6" instance=ExtResource("9")] -transform = Transform3D(-0.900969, 0, 0.433884, 0, 1, 0, -0.433884, 0, -0.900969, -4.33884, 0, 9.00969) +transform = Transform3D(-0.809017, 0, 0.587785, 0, 1, 0, -0.587785, 0, -0.809017, -5.87785, 0, 8.09017) scene = "res://scenes/interactables_demo/interactables_demo.tscn" title = ExtResource("17") [node name="ToPointerDemo" parent="Demos" index="7" instance=ExtResource("9")] -transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 8.74228e-07, 0, 10) +transform = Transform3D(-0.978148, 0, 0.207912, 0, 1, 0, -0.207912, 0, -0.978148, -2.07912, 0, 9.78148) scene = "res://scenes/pointer_demo/pointer_demo.tscn" title = ExtResource("20") [node name="ToPickableDemo" parent="Demos" index="8" instance=ExtResource("9")] -transform = Transform3D(-0.900969, 0, -0.433884, 0, 1, 0, 0.433884, 0, -0.900969, 4.33884, 0, 9.00969) +transform = Transform3D(-0.978148, 0, -0.207912, 0, 1, 0, 0.207912, 0, -0.978148, 2.07912, 0, 9.78148) scene = "res://scenes/pickable_demo/pickable_demo.tscn" title = ExtResource("22") [node name="ToPokeDemo" parent="Demos" index="9" instance=ExtResource("9")] -transform = Transform3D(-0.62349, 0, -0.781832, 0, 1, 0, 0.781832, 0, -0.62349, 7.81832, 0, 6.2349) +transform = Transform3D(-0.809017, 0, -0.587785, 0, 1, 0, 0.587785, 0, -0.809017, 5.87785, 0, 8.09017) scene = "res://scenes/poke_demo/poke_demo.tscn" title = ExtResource("25_rg3rn") [node name="ToRumbleDemo" parent="Demos" index="10" instance=ExtResource("9")] -transform = Transform3D(-0.222521, 0, -0.974928, 0, 1, 0, 0.974928, 0, -0.222521, 9.74928, 0, 2.22521) +transform = Transform3D(-0.5, 0, -0.866025, 0, 1, 0, 0.866025, 0, -0.5, 8.66025, 0, 5) scene = "res://scenes/rumble_demo/rumble_demo.tscn" title = ExtResource("26_sg1pa") [node name="ToSprintDemo" parent="Demos" index="11" instance=ExtResource("9")] -transform = Transform3D(0.222521, 0, -0.974928, 0, 1, 0, 0.974928, 0, 0.222521, 9.74928, 0, -2.22521) +transform = Transform3D(-0.104528, 0, -0.994522, 0, 1, 0, 0.994522, 0, -0.104528, 9.94522, 0, 1.04528) scene = "res://scenes/sprinting_demo/sprinting_demo.tscn" title = ExtResource("29_h1jn0") [node name="ToOriginGravityDemo" parent="Demos" index="12" instance=ExtResource("9")] -transform = Transform3D(0.62349, 0, -0.781832, 0, 1, 0, 0.781832, 0, 0.62349, 7.81832, 0, -6.2349) +transform = Transform3D(0.309017, 0, -0.951056, 0, 1, 0, 0.951056, 0, 0.309017, 9.51056, 0, -3.09017) scene = "res://scenes/origin_gravity_demo/origin_gravity_demo.tscn" title = ExtResource("32_c4n1q") [node name="ToSphereWorldDemo" parent="Demos" index="13" instance=ExtResource("9")] -transform = Transform3D(0.900969, 0, -0.433884, 0, 1, 0, 0.433884, 0, 0.900969, 4.33884, 0, -9.00969) +transform = Transform3D(0.669131, 0, -0.743145, 0, 1, 0, 0.743145, 0, 0.669131, 7.43145, 0, -6.69131) scene = "res://scenes/sphere_world_demo/sphere_world_demo.tscn" title = ExtResource("34_xw8ig") +[node name="ToSwimmingDemo" parent="Demos" index="14" instance=ExtResource("9")] +transform = Transform3D(0.913546, 0, -0.406736, 0, 1, 0, 0.406736, 0, 0.913546, 4.06736, 0, -9.13546) +scene = "res://scenes/swim_demo/swim_demo.tscn" +title = ExtResource("40_i3riy") + [node name="SettingsUI" parent="." index="3" instance=ExtResource("26_0uyxa")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -1.5) diff --git a/scenes/swim_demo/objects/pool.glb b/scenes/swim_demo/objects/pool.glb new file mode 100644 index 0000000000000000000000000000000000000000..badb8480e478c8cd2fe93f13514fdf315cd7b7c1 GIT binary patch literal 11608 zcmdT}O>7)V6)tDDqZ16TG#Mn&t{IxCOSvw@z>?Uy(+fh&y(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a#TB%b!mAT;7O|F z*LB6vcyHu>TL^kD&q#;~7D|Q$^_Gr;OvM028Pf zr;-13ljuj=&(9fj?x2%LFIu{l$UR;3{`~@bvIg@y;L*gv;PLO^aWHs&nm8D|e$7!~ z(EE55<}|PkINxRy=JXy-9Q@R?&Exg&K`I_|K0X2V&o-bDu&ANF{gCO?_^^8BQR}K& z8;MW+%zTq$IZwUBsrjMKYcyK^=~TWPNmDlFy|JW|vx#~okL(X6SJ0dMavV@leu6lg~L4$1;g{2vrP`Pa9~KOg*<(>?v< zm|+KT9FzrK=p*{C{Nn_t`$+qaaZsl53eFo+p42}OtO0z1eu2-vC+P$Ia&6SB`e~ef zPv}1=7oltIVr8EAzXRRU9>UAD{s8kd{wf}tr`jpzgYO~q&14u=Y83VD1cxR$^cwpN zs@`jOK8qSh-$sV;44^Vn1v`d%c#=(FL@+_0L+u+vJH#x0jv7NdhFVD9VkXc|Ku$lu zdG(`m_Ic+Uk(+7`c6)YGb5@1b{8eG{&F=Ge=6~`R@y!kUAbo#3Bzyqt@f^^n!$-+^ zgm>}BpFQViQR@GI@yMgT^35MEmZ|^UFD~-_m%rWNc-oVQj`;rM^^%{)bbIZAA793< zLuXI=w#D$C)S8#VuTRuFQyTaJ>~Zm2d!sV{PuTo1o;j?6dKb3SUAhPM^uWG<18C8= A1ONa4 literal 0 HcmV?d00001 diff --git a/scenes/swim_demo/objects/pool.glb.import b/scenes/swim_demo/objects/pool.glb.import new file mode 100644 index 00000000..200a83d1 --- /dev/null +++ b/scenes/swim_demo/objects/pool.glb.import @@ -0,0 +1,34 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://dlqc6gt45lgbe" +path="res://.godot/imported/pool.glb-ecae400b9491d3660f646a7fb6541e7f.scn" + +[deps] + +source_file="res://scenes/swim_demo/objects/pool.glb" +dest_files=["res://.godot/imported/pool.glb-ecae400b9491d3660f646a7fb6541e7f.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +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=false +animation/remove_immutable_tracks=true +import_script/path="" +_subresources={} +gltf/naming_version=1 +gltf/embedded_image_handling=0 diff --git a/scenes/swim_demo/objects/swim_map.tscn b/scenes/swim_demo/objects/swim_map.tscn index a9e52222..8d7c2fa2 100644 --- a/scenes/swim_demo/objects/swim_map.tscn +++ b/scenes/swim_demo/objects/swim_map.tscn @@ -1,10 +1,9 @@ -[gd_scene load_steps=6 format=3 uid="uid://bjuel0yobnb7l"] +[gd_scene load_steps=7 format=3 uid="uid://bjuel0yobnb7l"] -[ext_resource type="Material" path="res://assets/wahooney.itch.io/green_grid_triplanar.tres" id="1_isyto"] -[ext_resource type="Material" path="res://assets/wahooney.itch.io/brown_grid_triplanar.tres" id="2_bp8ee"] - -[sub_resource type="QuadMesh" id="7"] -size = Vector2(96, 96) +[ext_resource type="Material" uid="uid://cewxwlcx1csqy" path="res://assets/wahooney.itch.io/green_grid_triplanar.tres" id="1_isyto"] +[ext_resource type="Material" uid="uid://bv2a25s3juvpq" path="res://assets/wahooney.itch.io/brown_grid_triplanar.tres" id="2_bp8ee"] +[ext_resource type="PackedScene" uid="uid://dlqc6gt45lgbe" path="res://scenes/swim_demo/objects/pool.glb" id="3_pw4d0"] +[ext_resource type="Material" uid="uid://df8n6yyq0iq8r" path="res://assets/wahooney.itch.io/white_grid_triplanar.tres" id="4_k7u7d"] [sub_resource type="QuadMesh" id="8"] size = Vector2(96, 16) @@ -18,49 +17,6 @@ size = Vector3(100, 16, 2) transform = Transform3D(0.866025, -0.321394, 0.383022, 0, 0.766044, 0.642788, -0.5, -0.55667, 0.663414, 0, 5, 0) light_energy = 0.8 -[node name="CSGCombiner3D" type="CSGCombiner3D" parent="."] -use_collision = true - -[node name="CSGMesh3D" type="CSGMesh3D" parent="CSGCombiner3D"] -transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 0, 0) -mesh = SubResource("7") -material = ExtResource("1_isyto") - -[node name="CSGBox3D" type="CSGBox3D" parent="CSGCombiner3D"] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -2, -12) -size = Vector3(8, 4, 16) -material = ExtResource("2_bp8ee") - -[node name="CSGBox3D2" type="CSGBox3D" parent="CSGCombiner3D"] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1.7, -12) -operation = 2 -size = Vector3(6, 3.6, 14) -material = ExtResource("2_bp8ee") - -[node name="CSGBox3D3" type="CSGBox3D" parent="CSGCombiner3D"] -transform = Transform3D(0.642788, 0.766045, 0, -0.766045, 0.642788, 0, 0, 0, 1, 3.1, 0, -12) -operation = 2 -size = Vector3(1, 1.4, 14) -material = ExtResource("2_bp8ee") - -[node name="CSGBox3D4" type="CSGBox3D" parent="CSGCombiner3D"] -transform = Transform3D(0.766045, 0.642788, 0, -0.642788, 0.766045, 0, 0, 0, 1, -3.1, 0, -12) -operation = 2 -size = Vector3(1.4, 1, 14) -material = ExtResource("2_bp8ee") - -[node name="CSGBox3D5" type="CSGBox3D" parent="CSGCombiner3D"] -transform = Transform3D(-3.09086e-08, -3.09086e-08, -1, -0.766045, 0.642788, 3.8097e-09, 0.642788, 0.766045, -4.35451e-08, -1.31134e-07, 0, -4.9) -operation = 2 -size = Vector3(1, 1.4, 6) -material = ExtResource("2_bp8ee") - -[node name="CSGBox3D6" type="CSGBox3D" parent="CSGCombiner3D"] -transform = Transform3D(-3.09086e-08, -3.09086e-08, -1, -0.642788, 0.766045, -3.8097e-09, 0.766045, 0.642788, -4.35451e-08, 1.31134e-07, 0, -19.1) -operation = 2 -size = Vector3(1.4, 1, 6) -material = ExtResource("2_bp8ee") - [node name="Wall1" type="StaticBody3D" parent="."] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -48) @@ -112,3 +68,12 @@ surface_material_override/0 = ExtResource("1_isyto") [node name="CollisionShape3D" type="CollisionShape3D" parent="Wall4"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 8, -1) shape = SubResource("4") + +[node name="pool" parent="." instance=ExtResource("3_pw4d0")] + +[node name="Pool" parent="pool" index="4"] +surface_material_override/0 = ExtResource("1_isyto") +surface_material_override/1 = ExtResource("4_k7u7d") +surface_material_override/2 = ExtResource("2_bp8ee") + +[editable path="pool"] diff --git a/scenes/swim_demo/objects/water_shader.gdshader b/scenes/swim_demo/objects/water_shader.gdshader index c7e9a7bc..1e92fc9f 100644 --- a/scenes/swim_demo/objects/water_shader.gdshader +++ b/scenes/swim_demo/objects/water_shader.gdshader @@ -10,6 +10,15 @@ uniform float alpha = 0.7; // Noise scale and texture uniform float scale = 0.05; uniform sampler2D normal_texture; +uniform sampler2D wave_texture; + +void vertex() { + // Get the world X/Z coordinates + vec2 world = (MODEL_MATRIX * vec4(VERTEX, 1.0)).xz; + float noise = texture(wave_texture, world + TIME / 5.0).r; + + VERTEX.y += noise * 0.2; +} void fragment() { // Get the world X/Z coordinates diff --git a/scenes/swim_demo/swim_demo.tscn b/scenes/swim_demo/swim_demo.tscn index adc66eb5..705096f3 100644 --- a/scenes/swim_demo/swim_demo.tscn +++ b/scenes/swim_demo/swim_demo.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=23 format=3 uid="uid://cup0itbt0cr3a"] +[gd_scene load_steps=25 format=3 uid="uid://cup0itbt0cr3a"] [ext_resource type="PackedScene" uid="uid://qbmx03iibuuu" path="res://addons/godot-xr-tools/staging/scene_base.tscn" id="1_hh5kg"] [ext_resource type="Script" path="res://scenes/demo_scene_base.gd" id="2_oyddf"] @@ -16,16 +16,19 @@ [ext_resource type="PackedScene" uid="uid://cap4i60th5v7v" path="res://scenes/swim_demo/objects/instructions.tscn" id="14_eqdep"] [ext_resource type="Script" path="res://scenes/swim_demo/objects/swim_area.gd" id="15_pjwfr"] [ext_resource type="Shader" path="res://scenes/swim_demo/objects/water_shader.gdshader" id="16_k8nhe"] -[ext_resource type="Environment" uid="uid://c75hc5t2ml5re" path="res://default_env.tres" id="17_sr5p1"] +[ext_resource type="Environment" uid="uid://c75hc5t2ml5re" path="res://demo_env.tres" id="17_sr5p1"] [sub_resource type="BoxShape3D" id="BoxShape3D_nkslp"] -size = Vector3(8, 3, 16) +size = Vector3(58, 6, 58) [sub_resource type="PlaneMesh" id="PlaneMesh_26y0g"] -size = Vector2(6, 14) +size = Vector2(58, 58) +subdivide_width = 10 +subdivide_depth = 10 [sub_resource type="FastNoiseLite" id="FastNoiseLite_kifw3"] noise_type = 3 +frequency = 0.005 fractal_type = 2 [sub_resource type="NoiseTexture2D" id="NoiseTexture2D_jc332"] @@ -35,6 +38,13 @@ as_normal_map = true bump_strength = 1.5 noise = SubResource("FastNoiseLite_kifw3") +[sub_resource type="FastNoiseLite" id="FastNoiseLite_a1mja"] +frequency = 0.001 + +[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_g0i0a"] +seamless = true +noise = SubResource("FastNoiseLite_a1mja") + [sub_resource type="ShaderMaterial" id="ShaderMaterial_u86hi"] render_priority = 0 shader = ExtResource("16_k8nhe") @@ -44,14 +54,17 @@ shader_parameter/roughness = 0.02 shader_parameter/alpha = 0.7 shader_parameter/scale = 0.2 shader_parameter/normal_texture = SubResource("NoiseTexture2D_jc332") +shader_parameter/wave_texture = SubResource("NoiseTexture2D_g0i0a") [node name="SwimDemo" instance=ExtResource("1_hh5kg")] script = ExtResource("2_oyddf") +[node name="XROrigin3D" parent="." index="0"] +transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -32, 0, 0) + [node name="LeftHand" parent="XROrigin3D/LeftHand" index="0" instance=ExtResource("3_pllxu")] [node name="MovementDirect" parent="XROrigin3D/LeftHand" index="1" instance=ExtResource("4_nrdle")] -max_speed = 3.0 strafe = true [node name="MovementJump" parent="XROrigin3D/LeftHand" index="2" instance=ExtResource("5_fq8ff")] @@ -64,7 +77,6 @@ crouch_button_action = "by_button" [node name="RightHand" parent="XROrigin3D/RightHand" index="0" instance=ExtResource("7_4gmht")] [node name="MovementDirect" parent="XROrigin3D/RightHand" index="1" instance=ExtResource("4_nrdle")] -max_speed = 3.0 [node name="MovementTurn" parent="XROrigin3D/RightHand" index="2" instance=ExtResource("8_0mkhw")] @@ -85,25 +97,24 @@ speed_scale = 3.0 [node name="SwimMap" parent="." index="1" instance=ExtResource("10_1enq8")] [node name="MainMenuTeleport" parent="." index="2" instance=ExtResource("11_2rbjy")] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 7) -scene_base = NodePath("..") +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -36, 0, 0) title = ExtResource("12_qpg8h") [node name="Instructions" parent="." index="3" instance=ExtResource("14_eqdep")] +transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -26, 4, 0) [node name="SwimArea" type="Area3D" parent="." index="4"] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -2, -12) collision_layer = 0 collision_mask = 524288 monitorable = false script = ExtResource("15_pjwfr") [node name="CollisionShape3D" type="CollisionShape3D" parent="SwimArea" index="0"] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.2, 0) +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -3.2, 0) shape = SubResource("BoxShape3D_nkslp") [node name="WaterPlane" type="MeshInstance3D" parent="." index="5"] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.7, -12) +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.3, 0) mesh = SubResource("PlaneMesh_26y0g") surface_material_override/0 = SubResource("ShaderMaterial_u86hi")