test.tscn 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454
  1. [gd_scene load_steps=8 format=3 uid="uid://c2wwh47i8o462"]
  2. [ext_resource type="PackedScene" uid="uid://doh0vqn8wpfky" path="res://living_room.glb" id="1_oncn7"]
  3. [ext_resource type="Script" path="res://options.gd" id="2_hjhvo"]
  4. [sub_resource type="PhysicalSkyMaterial" id="PhysicalSkyMaterial_6cd1w"]
  5. use_debanding = false
  6. [sub_resource type="Sky" id="Sky_i7d6m"]
  7. sky_material = SubResource("PhysicalSkyMaterial_6cd1w")
  8. [sub_resource type="Environment" id="Environment_3p42x"]
  9. background_mode = 2
  10. sky = SubResource("Sky_i7d6m")
  11. tonemap_mode = 3
  12. tonemap_white = 6.0
  13. sdfgi_use_occlusion = true
  14. sdfgi_cascades = 2
  15. sdfgi_min_cell_size = 0.15
  16. sdfgi_cascade0_distance = 9.6
  17. sdfgi_max_distance = 38.4
  18. sdfgi_y_scale = 0
  19. glow_enabled = true
  20. [sub_resource type="CameraAttributesPhysical" id="CameraAttributesPhysical_n2bnf"]
  21. auto_exposure_enabled = true
  22. auto_exposure_speed = 1.0
  23. [sub_resource type="CameraAttributesPhysical" id="CameraAttributesPhysical_drxnu"]
  24. auto_exposure_enabled = true
  25. auto_exposure_speed = 1.0
  26. frustum_focal_length = 25.0
  27. [node name="Node3D" type="Node3D"]
  28. [node name="WorldEnvironment" type="WorldEnvironment" parent="."]
  29. environment = SubResource("Environment_3p42x")
  30. camera_attributes = SubResource("CameraAttributesPhysical_n2bnf")
  31. [node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
  32. transform = Transform3D(-0.887673, -0.456539, 0.0600684, 0.273782, -0.418382, 0.866025, -0.370243, 0.785193, 0.496379, 0, 0, 0)
  33. light_angular_distance = 0.5
  34. light_bake_mode = 1
  35. shadow_enabled = true
  36. shadow_blur = 1.8
  37. directional_shadow_mode = 0
  38. directional_shadow_blend_splits = true
  39. directional_shadow_fade_start = 1.0
  40. directional_shadow_max_distance = 15.0
  41. [node name="Camera3D" type="Camera3D" parent="."]
  42. transform = Transform3D(-0.824458, 0.0252143, -0.565361, 0, 0.999007, 0.0445544, 0.565923, 0.0367332, -0.82364, -2.93199, 2.20651, -1.8947)
  43. attributes = SubResource("CameraAttributesPhysical_drxnu")
  44. current = true
  45. [node name="LivingRoom" parent="." instance=ExtResource("1_oncn7")]
  46. [node name="Lightbulb1" type="OmniLight3D" parent="."]
  47. transform = Transform3D(0.707107, 0, 0.707107, 0, 1, 0, -0.707107, 0, 0.707107, 2, 3.19673, 0)
  48. light_intensity_lumens = 800.0
  49. light_temperature = 5000.0
  50. light_size = 0.1
  51. shadow_enabled = true
  52. [node name="Lightbulb2" type="OmniLight3D" parent="."]
  53. transform = Transform3D(0.707107, 0, 0.707107, 0, 1, 0, -0.707107, 0, 0.707107, -2, 3.197, 0)
  54. light_intensity_lumens = 800.0
  55. light_temperature = 5000.0
  56. light_size = 0.1
  57. shadow_enabled = true
  58. [node name="Options" type="Control" parent="." node_paths=PackedStringArray("sun", "lightbulb_1", "lightbulb_2", "world_environment")]
  59. layout_mode = 3
  60. anchors_preset = 15
  61. anchor_right = 1.0
  62. anchor_bottom = 1.0
  63. grow_horizontal = 2
  64. grow_vertical = 2
  65. script = ExtResource("2_hjhvo")
  66. sun = NodePath("../DirectionalLight3D")
  67. lightbulb_1 = NodePath("../Lightbulb1")
  68. lightbulb_2 = NodePath("../Lightbulb2")
  69. world_environment = NodePath("../WorldEnvironment")
  70. [node name="Light" type="VBoxContainer" parent="Options"]
  71. layout_mode = 0
  72. offset_left = 16.0
  73. offset_top = 16.0
  74. offset_right = 516.0
  75. offset_bottom = 69.0
  76. [node name="TimeOfDay" type="HBoxContainer" parent="Options/Light"]
  77. layout_mode = 2
  78. theme_override_constants/separation = 15
  79. [node name="Label" type="Label" parent="Options/Light/TimeOfDay"]
  80. layout_mode = 2
  81. size_flags_horizontal = 3
  82. theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
  83. theme_override_constants/outline_size = 4
  84. text = "Time of Day"
  85. vertical_alignment = 1
  86. [node name="HSlider" type="HSlider" parent="Options/Light/TimeOfDay"]
  87. layout_mode = 2
  88. size_flags_horizontal = 3
  89. size_flags_vertical = 4
  90. max_value = 1410.0
  91. value = 840.0
  92. [node name="Value" type="Label" parent="Options/Light/TimeOfDay"]
  93. layout_mode = 2
  94. size_flags_horizontal = 3
  95. theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
  96. theme_override_constants/outline_size = 4
  97. text = "14:00"
  98. vertical_alignment = 1
  99. [node name="SunIntensity" type="HBoxContainer" parent="Options/Light"]
  100. layout_mode = 2
  101. theme_override_constants/separation = 15
  102. [node name="Label" type="Label" parent="Options/Light/SunIntensity"]
  103. layout_mode = 2
  104. size_flags_horizontal = 3
  105. theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
  106. theme_override_constants/outline_size = 4
  107. text = "Sun Intensity"
  108. vertical_alignment = 1
  109. [node name="HSlider" type="HSlider" parent="Options/Light/SunIntensity"]
  110. layout_mode = 2
  111. size_flags_horizontal = 3
  112. size_flags_vertical = 4
  113. max_value = 200000.0
  114. step = 2000.0
  115. value = 100000.0
  116. [node name="Value" type="Label" parent="Options/Light/SunIntensity"]
  117. layout_mode = 2
  118. size_flags_horizontal = 3
  119. theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
  120. theme_override_constants/outline_size = 4
  121. text = "100000 lux"
  122. vertical_alignment = 1
  123. [node name="Lightbulb1Intensity" type="HBoxContainer" parent="Options/Light"]
  124. layout_mode = 2
  125. theme_override_constants/separation = 15
  126. [node name="Label" type="Label" parent="Options/Light/Lightbulb1Intensity"]
  127. layout_mode = 2
  128. size_flags_horizontal = 3
  129. theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
  130. theme_override_constants/outline_size = 4
  131. text = "Lightbulb 1 Intensity"
  132. vertical_alignment = 1
  133. [node name="HSlider" type="HSlider" parent="Options/Light/Lightbulb1Intensity"]
  134. layout_mode = 2
  135. size_flags_horizontal = 3
  136. size_flags_vertical = 4
  137. max_value = 3000.0
  138. step = 50.0
  139. value = 800.0
  140. [node name="Value" type="Label" parent="Options/Light/Lightbulb1Intensity"]
  141. layout_mode = 2
  142. size_flags_horizontal = 3
  143. theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
  144. theme_override_constants/outline_size = 4
  145. text = "800 lm"
  146. vertical_alignment = 1
  147. [node name="Lightbulb1Temperature" type="HBoxContainer" parent="Options/Light"]
  148. layout_mode = 2
  149. theme_override_constants/separation = 15
  150. [node name="Label" type="Label" parent="Options/Light/Lightbulb1Temperature"]
  151. layout_mode = 2
  152. size_flags_horizontal = 3
  153. theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
  154. theme_override_constants/outline_size = 4
  155. theme_override_font_sizes/font_size = 14
  156. text = "Lightbulb 1 Temperature"
  157. horizontal_alignment = 1
  158. vertical_alignment = 1
  159. [node name="HSlider" type="HSlider" parent="Options/Light/Lightbulb1Temperature"]
  160. layout_mode = 2
  161. size_flags_horizontal = 3
  162. size_flags_vertical = 4
  163. min_value = 1000.0
  164. max_value = 15000.0
  165. step = 100.0
  166. value = 5000.0
  167. [node name="Value" type="Label" parent="Options/Light/Lightbulb1Temperature"]
  168. layout_mode = 2
  169. size_flags_horizontal = 3
  170. theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
  171. theme_override_constants/outline_size = 4
  172. text = "5000 K"
  173. vertical_alignment = 1
  174. [node name="Lightbulb2Intensity" type="HBoxContainer" parent="Options/Light"]
  175. layout_mode = 2
  176. theme_override_constants/separation = 15
  177. [node name="Label" type="Label" parent="Options/Light/Lightbulb2Intensity"]
  178. layout_mode = 2
  179. size_flags_horizontal = 3
  180. theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
  181. theme_override_constants/outline_size = 4
  182. text = "Lightbulb 2 Intensity"
  183. vertical_alignment = 1
  184. [node name="HSlider" type="HSlider" parent="Options/Light/Lightbulb2Intensity"]
  185. layout_mode = 2
  186. size_flags_horizontal = 3
  187. size_flags_vertical = 4
  188. max_value = 3000.0
  189. step = 50.0
  190. value = 800.0
  191. [node name="Value" type="Label" parent="Options/Light/Lightbulb2Intensity"]
  192. layout_mode = 2
  193. size_flags_horizontal = 3
  194. theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
  195. theme_override_constants/outline_size = 4
  196. text = "800 lm"
  197. vertical_alignment = 1
  198. [node name="Lightbulb2Temperature" type="HBoxContainer" parent="Options/Light"]
  199. layout_mode = 2
  200. theme_override_constants/separation = 15
  201. [node name="Label" type="Label" parent="Options/Light/Lightbulb2Temperature"]
  202. layout_mode = 2
  203. size_flags_horizontal = 3
  204. theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
  205. theme_override_constants/outline_size = 4
  206. theme_override_font_sizes/font_size = 14
  207. text = "Lightbulb 2 Temperature"
  208. vertical_alignment = 1
  209. [node name="HSlider" type="HSlider" parent="Options/Light/Lightbulb2Temperature"]
  210. layout_mode = 2
  211. size_flags_horizontal = 3
  212. size_flags_vertical = 4
  213. min_value = 1000.0
  214. max_value = 15000.0
  215. step = 100.0
  216. value = 5000.0
  217. [node name="Value" type="Label" parent="Options/Light/Lightbulb2Temperature"]
  218. layout_mode = 2
  219. size_flags_horizontal = 3
  220. theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
  221. theme_override_constants/outline_size = 4
  222. text = "5000 K"
  223. vertical_alignment = 1
  224. [node name="SDFGI" type="CheckButton" parent="Options/Light"]
  225. layout_mode = 2
  226. size_flags_horizontal = 0
  227. theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
  228. theme_override_constants/outline_size = 4
  229. text = "SDF Global Illumination"
  230. [node name="Camera" type="VBoxContainer" parent="Options"]
  231. layout_mode = 1
  232. anchors_preset = 2
  233. anchor_top = 1.0
  234. anchor_bottom = 1.0
  235. offset_left = 16.0
  236. offset_top = -42.0
  237. offset_right = 516.0
  238. offset_bottom = -16.0
  239. grow_vertical = 0
  240. [node name="FocusDistance" type="HBoxContainer" parent="Options/Camera"]
  241. layout_mode = 2
  242. theme_override_constants/separation = 15
  243. [node name="Label" type="Label" parent="Options/Camera/FocusDistance"]
  244. layout_mode = 2
  245. size_flags_horizontal = 3
  246. theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
  247. theme_override_constants/outline_size = 4
  248. text = "Focus Distance"
  249. [node name="HSlider" type="HSlider" parent="Options/Camera/FocusDistance"]
  250. layout_mode = 2
  251. size_flags_horizontal = 3
  252. size_flags_vertical = 4
  253. min_value = 0.5
  254. max_value = 20.0
  255. step = 0.1
  256. value = 10.0
  257. [node name="Value" type="Label" parent="Options/Camera/FocusDistance"]
  258. layout_mode = 2
  259. size_flags_horizontal = 3
  260. theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
  261. theme_override_constants/outline_size = 4
  262. text = "10 m"
  263. [node name="FocalLength" type="HBoxContainer" parent="Options/Camera"]
  264. layout_mode = 2
  265. theme_override_constants/separation = 15
  266. [node name="Label" type="Label" parent="Options/Camera/FocalLength"]
  267. layout_mode = 2
  268. size_flags_horizontal = 3
  269. theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
  270. theme_override_constants/outline_size = 4
  271. text = "Focal Length"
  272. [node name="HSlider" type="HSlider" parent="Options/Camera/FocalLength"]
  273. layout_mode = 2
  274. size_flags_horizontal = 3
  275. size_flags_vertical = 4
  276. min_value = 10.0
  277. value = 25.0
  278. [node name="Value" type="Label" parent="Options/Camera/FocalLength"]
  279. layout_mode = 2
  280. size_flags_horizontal = 3
  281. theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
  282. theme_override_constants/outline_size = 4
  283. text = "25 mm"
  284. [node name="Aperture" type="HBoxContainer" parent="Options/Camera"]
  285. layout_mode = 2
  286. theme_override_constants/separation = 15
  287. [node name="Label" type="Label" parent="Options/Camera/Aperture"]
  288. layout_mode = 2
  289. size_flags_horizontal = 3
  290. theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
  291. theme_override_constants/outline_size = 4
  292. text = "Aperture"
  293. [node name="HSlider" type="HSlider" parent="Options/Camera/Aperture"]
  294. layout_mode = 2
  295. size_flags_horizontal = 3
  296. size_flags_vertical = 4
  297. min_value = 0.5
  298. max_value = 64.0
  299. step = 0.5
  300. value = 16.0
  301. [node name="Value" type="Label" parent="Options/Camera/Aperture"]
  302. layout_mode = 2
  303. size_flags_horizontal = 3
  304. theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
  305. theme_override_constants/outline_size = 4
  306. text = "16.0 f-stop"
  307. [node name="ShutterSpeed" type="HBoxContainer" parent="Options/Camera"]
  308. layout_mode = 2
  309. theme_override_constants/separation = 15
  310. [node name="Label" type="Label" parent="Options/Camera/ShutterSpeed"]
  311. layout_mode = 2
  312. size_flags_horizontal = 3
  313. theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
  314. theme_override_constants/outline_size = 4
  315. text = "Shutter Speed"
  316. [node name="HSlider" type="HSlider" parent="Options/Camera/ShutterSpeed"]
  317. layout_mode = 2
  318. size_flags_horizontal = 3
  319. size_flags_vertical = 4
  320. min_value = 10.0
  321. max_value = 2000.0
  322. step = 10.0
  323. value = 100.0
  324. [node name="Value" type="Label" parent="Options/Camera/ShutterSpeed"]
  325. layout_mode = 2
  326. size_flags_horizontal = 3
  327. theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
  328. theme_override_constants/outline_size = 4
  329. text = "1/100"
  330. [node name="Sensitivity" type="HBoxContainer" parent="Options/Camera"]
  331. layout_mode = 2
  332. theme_override_constants/separation = 15
  333. [node name="Label" type="Label" parent="Options/Camera/Sensitivity"]
  334. layout_mode = 2
  335. size_flags_horizontal = 3
  336. theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
  337. theme_override_constants/outline_size = 4
  338. text = "Sensitivity"
  339. [node name="HSlider" type="HSlider" parent="Options/Camera/Sensitivity"]
  340. layout_mode = 2
  341. size_flags_horizontal = 3
  342. size_flags_vertical = 4
  343. min_value = 50.0
  344. max_value = 6400.0
  345. step = 50.0
  346. value = 100.0
  347. [node name="Value" type="Label" parent="Options/Camera/Sensitivity"]
  348. layout_mode = 2
  349. size_flags_horizontal = 3
  350. theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
  351. theme_override_constants/outline_size = 4
  352. text = "100 ISO"
  353. [node name="AutoexposureSpeed" type="HBoxContainer" parent="Options/Camera"]
  354. layout_mode = 2
  355. theme_override_constants/separation = 15
  356. [node name="Label" type="Label" parent="Options/Camera/AutoexposureSpeed"]
  357. layout_mode = 2
  358. size_flags_horizontal = 3
  359. theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
  360. theme_override_constants/outline_size = 4
  361. text = "Auto Exposure Speed"
  362. [node name="HSlider" type="HSlider" parent="Options/Camera/AutoexposureSpeed"]
  363. layout_mode = 2
  364. size_flags_horizontal = 3
  365. size_flags_vertical = 4
  366. max_value = 10.0
  367. step = 0.1
  368. value = 1.0
  369. [node name="Value" type="Label" parent="Options/Camera/AutoexposureSpeed"]
  370. layout_mode = 2
  371. size_flags_horizontal = 3
  372. theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
  373. theme_override_constants/outline_size = 4
  374. text = "1.0"
  375. [connection signal="value_changed" from="Options/Light/TimeOfDay/HSlider" to="Options" method="_on_time_of_day_value_changed"]
  376. [connection signal="value_changed" from="Options/Light/SunIntensity/HSlider" to="Options" method="_on_sun_intensity_value_changed"]
  377. [connection signal="value_changed" from="Options/Light/Lightbulb1Intensity/HSlider" to="Options" method="_on_lightbulb1_intensity_value_changed"]
  378. [connection signal="value_changed" from="Options/Light/Lightbulb1Temperature/HSlider" to="Options" method="_on_lightbulb1_temperature_value_changed"]
  379. [connection signal="value_changed" from="Options/Light/Lightbulb2Intensity/HSlider" to="Options" method="_on_lightbulb2_intensity_value_changed"]
  380. [connection signal="value_changed" from="Options/Light/Lightbulb2Temperature/HSlider" to="Options" method="_on_lightbulb2_temperature_value_changed"]
  381. [connection signal="toggled" from="Options/Light/SDFGI" to="Options" method="_on_sdfgi_button_toggled"]
  382. [connection signal="value_changed" from="Options/Camera/FocusDistance/HSlider" to="Options" method="_on_focus_distance_value_changed"]
  383. [connection signal="value_changed" from="Options/Camera/FocalLength/HSlider" to="Options" method="_on_focal_length_value_changed"]
  384. [connection signal="value_changed" from="Options/Camera/Aperture/HSlider" to="Options" method="_on_aperture_value_changed"]
  385. [connection signal="value_changed" from="Options/Camera/ShutterSpeed/HSlider" to="Options" method="_on_shutter_speed_value_changed"]
  386. [connection signal="value_changed" from="Options/Camera/Sensitivity/HSlider" to="Options" method="_on_sensitivity_value_changed"]
  387. [connection signal="value_changed" from="Options/Camera/AutoexposureSpeed/HSlider" to="Options" method="_on_autoexposure_speed_value_changed"]