From 1e7866b5f5adae47ffaa6435960b69c31b9d5605 Mon Sep 17 00:00:00 2001 From: betalars Date: Sat, 8 Jul 2023 22:06:34 +0200 Subject: [PATCH] room lighting updates --- .../materials/starlight_shader.material | Bin 502 -> 505 bytes .../youth_room/youth_room.tscn | 42 +++++++++--------- 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/src/base-environments/youth_room/import/materials/starlight_shader.material b/src/base-environments/youth_room/import/materials/starlight_shader.material index 4385b7973dcd57a6a39a3aa04e4338221a075992..aea0cb69f427f995ea8cacd8bde827ee8f542c7d 100644 GIT binary patch literal 505 zcmVPz$oLOUA)!R;U7uL}zt+qn9ZZ-ku|Bo}f z+4`gLKjff(0RtR-I8|9#f>Lg?8j~Q2J1UHFpC@WX*>xm|04w;T=i5ma>yLK3)-?yX z)m7AOZpu$ajyj>7S_cR=oDD|g0t3;Y$wrsVBBRMh6&Fo5%53<53Ih@xlSu>~O1*Nz z*Wf<{B?E^E7(yWml>^uX4_5&Tq6)9#v?#B7Uc@j@5JIR?F(gz{lPLuy#Rg!4Ayr0p z62L<_N}>vjChi26nYhf-0c&ou4j7>Dd2>&-v3Moo-edmc@kmVB&*#nG+~s`R!7r(X z$#tL30KZUy?0JI8n6V}NVY5J}(|8}fT}Pbfi`4ct_Tx;33@nS!@Tsdy$He``=h|^- vKyGxmNFDce9DP`=&PT#LsVTvWD)T$9sFJE6ewQC%!g>aCU8pPpQd2`i90la7 literal 502 zcmVtSo7+3FGBft4-bsO${5Nie_7O?}Hvl#O zIsk9w+u2sBXy6K6)Tk3T+3j+ZyqZpnN!I-z`A^^qM0`fPha~yG_~qVey9uk5vo`+= z{I59U53Mb{r6zC5d6QC|+@gH#S}ua?8ogOwt&wwnDdVHp%&ac;b;_#5kLY7PbCXu*vX6rlNeW>2y)`Z4A&s44} zbcXt$3J}jTOoomv;SZq&Vx5Su{l+?C3139pnX$xR9#Xu%`Tj}WUAhwP0MEz7X&9}f s-=pT-jKkq`xAM9Z=3z}CUR1=luA&mEYWZD1a)|rcO<^dY1X5E&L#y!c3;+NC diff --git a/src/base-environments/youth_room/youth_room.tscn b/src/base-environments/youth_room/youth_room.tscn index 9c9bd75..e94c8d7 100644 --- a/src/base-environments/youth_room/youth_room.tscn +++ b/src/base-environments/youth_room/youth_room.tscn @@ -1,10 +1,9 @@ -[gd_scene load_steps=55 format=3 uid="uid://b3b0gyvklqn50"] +[gd_scene load_steps=54 format=3 uid="uid://b3b0gyvklqn50"] [ext_resource type="Script" path="res://base-environments/youth_room/room_handle.gd" id="1_aitp0"] [ext_resource type="PackedScene" uid="uid://c0i4ydmxtxfho" path="res://base-environments/youth_room/import/youth_room.glb" id="1_jf3oi"] [ext_resource type="AudioStream" uid="uid://1h6k2d8q1kw3" path="res://base-environments/youth_room/import/sounds/rain_on_window.mp3" id="2_3haaq"] [ext_resource type="Texture2D" uid="uid://d0ucjqi8tx6vt" path="res://import/interface-elements/frame.png" id="2_21x33"] -[ext_resource type="Texture2D" uid="uid://cs6gtn285a4al" path="res://dev-util/logo_background.png" id="3_1mw2j"] [ext_resource type="PackedScene" uid="uid://mkccbig41bqb" path="res://logic-scenes/player_controller/player_controller.tscn" id="3_foj4y"] [ext_resource type="AudioStream" uid="uid://bbpo1hu35yer8" path="res://base-environments/youth_room/import/sounds/thunder.mp3" id="3_wcypa"] [ext_resource type="Texture2D" uid="uid://bwicl5q0lw06q" path="res://import/interface-elements/bottom.png" id="3_xqd4w"] @@ -20,7 +19,7 @@ [ext_resource type="Texture2D" uid="uid://d005qvnbnishb" path="res://import/interface-elements/cursor_grab.png" id="13_lqj71"] [ext_resource type="PackedScene" uid="uid://brk4hjdf2x81a" path="res://logic-scenes/card_picker/card_picker.tscn" id="19_a4n1o"] [ext_resource type="ArrayMesh" uid="uid://bfc3d4g40n0wy" path="res://logic-scenes/collectable/import/old-mask.res" id="19_jr2bb"] -[ext_resource type="PackedScene" uid="uid://bigr0lnen1xdh" path="res://base-environments/youth_room/lava-lamp.tscn" id="21_0k2gr"] +[ext_resource type="PackedScene" uid="uid://dwtxjvprjyx8p" path="res://base-environments/youth_room/lava-lamp.tscn" id="21_0k2gr"] [sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_kcdrx"] sky_top_color = Color(0, 0, 1, 1) @@ -123,13 +122,6 @@ func switch_off(): tween.tween_property(self, \"litnes\", 0, 1) " -[sub_resource type="GDScript" id="GDScript_xqa3d"] -script/source = "extends SpotLight3D - -func _process(delta): - rotate(transform.basis.z, delta/10 ) -" - [sub_resource type="Animation" id="Animation_hqls1"] length = 0.001 tracks/0/type = "value" @@ -835,6 +827,20 @@ func reset(_discard): [sub_resource type="BoxShape3D" id="BoxShape3D_gim5a"] size = Vector3(1, 0.305693, 0.775269) +[sub_resource type="GDScript" id="GDScript_yn0pl"] +script/source = "extends SpotLight3D + +@export var flicker_strength:float = 0.7 +@export var speed:float = 4 +var noise = FastNoiseLite.new() +var light_spot:float = randf() +var base_energy = light_energy + +func _process(delta): + light_spot += speed*delta + light_energy = base_energy * (1 + noise.get_noise_1d(light_spot) * flicker_strength) +" + [node name="youth room" type="Node3D"] script = ExtResource("1_aitp0") @@ -938,15 +944,6 @@ spot_attenuation = 0.732044 spot_angle = 27.6108 spot_angle_attenuation = 1.18921 -[node name="SpotLight3D2" type="SpotLight3D" parent="."] -transform = Transform3D(0.48804, 0.744707, 0.455224, -0.0721277, 0.554181, -0.829266, -0.869836, 0.371881, 0.324176, 1.66111, 0.0754915, 0.437063) -visible = false -light_energy = 15.0 -light_projector = ExtResource("3_1mw2j") -shadow_enabled = true -spot_angle = 42.8718 -script = SubResource("GDScript_xqa3d") - [node name="Blockout" type="CSGCombiner3D" parent="."] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.811571, 0, 0) visible = false @@ -1276,17 +1273,17 @@ light_specular = 0.0 omni_range = 0.457129 omni_attenuation = 0.659754 -[node name="Lava-metal" parent="." instance=ExtResource("21_0k2gr")] +[node name="lava-lamp2" parent="." instance=ExtResource("21_0k2gr")] transform = Transform3D(0.488743, 0, -0.872428, 0, 1, 0, 0.872428, 0, 0.488743, 3.1041, 0.962981, 2.21157) skeleton = NodePath("") -[node name="ReflectionProbe" type="ReflectionProbe" parent="Lava-metal"] +[node name="ReflectionProbe" type="ReflectionProbe" parent="lava-lamp2"] transform = Transform3D(0.866853, 0, -0.498563, 0, 1, 0, 0.498563, 0, 0.866853, -0.0356357, 0.0416123, 0.020328) max_distance = 7.0 size = Vector3(2, 2, 2) interior = true -[node name="OmniLight3D" type="SpotLight3D" parent="Lava-metal"] +[node name="OmniLight3D" type="SpotLight3D" parent="lava-lamp2"] transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0.0113046, 0.199004, -0.00212491) light_color = Color(0.282353, 0.45098, 0.258824, 1) light_energy = 1.5 @@ -1296,6 +1293,7 @@ spot_range = 1.5 spot_attenuation = 1.1487 spot_angle = 126.18 spot_angle_attenuation = 0.68302 +script = SubResource("GDScript_yn0pl") [connection signal="ui_entered" from="PlayerController" to="SceneUI" method="show"] [connection signal="ui_exited" from="PlayerController" to="SceneUI" method="hide"]