material_tester.tscn 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408
  1. [gd_scene load_steps=24 format=3 uid="uid://c57duuo5p7mc0"]
  2. [ext_resource type="Script" path="res://tester.gd" id="1"]
  3. [ext_resource type="Texture2D" uid="uid://ddo4ecus0bal4" path="res://backgrounds/schelde.hdr" id="2_6cpkq"]
  4. [ext_resource type="PackedScene" uid="uid://cgqfdwd4g5e14" path="res://models/test_bed/test_bed.tscn" id="3"]
  5. [ext_resource type="ArrayMesh" uid="uid://btydvpp0agbfj" path="res://models/godot_ball.res" id="4_7al4s"]
  6. [ext_resource type="Material" uid="uid://bbfkhkmct7wu3" path="res://test_materials/blue.tres" id="5"]
  7. [ext_resource type="Material" uid="uid://b0qkg55h84i3f" path="res://test_materials/white.tres" id="6"]
  8. [ext_resource type="Material" uid="uid://d3u3snuqdn404" path="res://test_materials/gray.tres" id="7"]
  9. [ext_resource type="Material" path="res://test_materials/white_plastic.tres" id="8"]
  10. [ext_resource type="Material" uid="uid://qpdv7evfgbyw" path="res://test_materials/mirror.tres" id="9"]
  11. [ext_resource type="Material" uid="uid://djut62ilojfmq" path="res://test_materials/dark_wood.tres" id="10"]
  12. [ext_resource type="Material" uid="uid://ca5id5w12cprn" path="res://test_materials/stones.tres" id="11"]
  13. [ext_resource type="Material" uid="uid://dfsu6vtygh0tc" path="res://test_materials/brick.tres" id="12"]
  14. [ext_resource type="Material" uid="uid://dtui5o3potpen" path="res://test_materials/wool.tres" id="13"]
  15. [ext_resource type="Material" uid="uid://cg7l6w2h0aq22" path="res://test_materials/aluminium.tres" id="14"]
  16. [ext_resource type="Material" uid="uid://c5oxndmf0jbu3" path="res://test_materials/marble.tres" id="15"]
  17. [ext_resource type="Material" uid="uid://dv76cxap5uj7y" path="res://test_materials/cheese.tres" id="16"]
  18. [ext_resource type="Material" uid="uid://bx0jnmhhr8qwh" path="res://test_materials/wet_sand.tres" id="17"]
  19. [ext_resource type="Material" uid="uid://dct7oit1go38a" path="res://test_materials/rock.tres" id="18"]
  20. [ext_resource type="Material" uid="uid://bv6dr534vwcr1" path="res://test_materials/ice.tres" id="19"]
  21. [ext_resource type="Material" uid="uid://y4yhjq6ftc3l" path="res://test_materials/toon.tres" id="20"]
  22. [sub_resource type="PanoramaSkyMaterial" id="1"]
  23. panorama = ExtResource("2_6cpkq")
  24. [sub_resource type="Sky" id="2"]
  25. sky_material = SubResource("1")
  26. radiance_size = 4
  27. [sub_resource type="Environment" id="Environment_5crof"]
  28. background_mode = 2
  29. sky = SubResource("2")
  30. tonemap_mode = 3
  31. tonemap_white = 6.0
  32. fog_enabled = true
  33. fog_density = 0.002
  34. fog_sky_affect = 0.0
  35. [node name="MaterialTester" type="Node3D"]
  36. script = ExtResource("1")
  37. [node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
  38. transform = Transform3D(-0.866023, -0.433016, 0.250001, 0, 0.499998, 0.866027, -0.500003, 0.749999, -0.43301, 0, 0, 0)
  39. visible = false
  40. shadow_enabled = true
  41. [node name="WorldEnvironment" type="WorldEnvironment" parent="."]
  42. environment = SubResource("Environment_5crof")
  43. [node name="Testers" type="Node3D" parent="."]
  44. [node name="White Plastic" parent="Testers" instance=ExtResource("3")]
  45. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -36, 0, 0)
  46. [node name="GodotBall" type="MeshInstance3D" parent="Testers/White Plastic"]
  47. transform = Transform3D(0.8, 0, 0, 0, 0.8, 0, 0, 0, 0.8, 0, 0.5, -4)
  48. layers = 2
  49. mesh = ExtResource("4_7al4s")
  50. surface_material_override/0 = ExtResource("8")
  51. surface_material_override/1 = ExtResource("6")
  52. surface_material_override/2 = ExtResource("5")
  53. surface_material_override/3 = ExtResource("7")
  54. [node name="ReflectionProbe" type="ReflectionProbe" parent="Testers/White Plastic/GodotBall" groups=["reflection_probe"]]
  55. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3, 0)
  56. size = Vector3(256, 256, 256)
  57. enable_shadows = true
  58. cull_mask = 2147483645
  59. reflection_mask = 2
  60. [node name="Mirror" parent="Testers" instance=ExtResource("3")]
  61. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -30, 0, 0)
  62. [node name="GodotBall" type="MeshInstance3D" parent="Testers/Mirror"]
  63. transform = Transform3D(0.8, 0, 0, 0, 0.8, 0, 0, 0, 0.8, 0, 0.5, -4)
  64. layers = 4
  65. mesh = ExtResource("4_7al4s")
  66. surface_material_override/0 = ExtResource("9")
  67. surface_material_override/1 = ExtResource("6")
  68. surface_material_override/2 = ExtResource("5")
  69. surface_material_override/3 = ExtResource("7")
  70. [node name="ReflectionProbe" type="ReflectionProbe" parent="Testers/Mirror/GodotBall" groups=["reflection_probe"]]
  71. transform = Transform3D(1.25, 0, 0, 0, 1.25, 0, 0, 0, 1.25, 0, 3, 0)
  72. size = Vector3(256, 256, 256)
  73. enable_shadows = true
  74. cull_mask = 2147483643
  75. reflection_mask = 4
  76. [node name="Dark Wood" parent="Testers" instance=ExtResource("3")]
  77. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -24, 0, 0)
  78. [node name="GodotBall" type="MeshInstance3D" parent="Testers/Dark Wood"]
  79. transform = Transform3D(0.8, 0, 0, 0, 0.8, 0, 0, 0, 0.8, 0, 0.5, -4)
  80. layers = 8
  81. mesh = ExtResource("4_7al4s")
  82. surface_material_override/0 = ExtResource("10")
  83. surface_material_override/1 = ExtResource("6")
  84. surface_material_override/2 = ExtResource("5")
  85. surface_material_override/3 = ExtResource("7")
  86. [node name="ReflectionProbe" type="ReflectionProbe" parent="Testers/Dark Wood/GodotBall" groups=["reflection_probe"]]
  87. transform = Transform3D(1.25, 0, 0, 0, 1.25, 0, 0, 0, 1.25, 0, 3, 0)
  88. size = Vector3(256, 256, 256)
  89. enable_shadows = true
  90. cull_mask = 2147483639
  91. reflection_mask = 8
  92. [node name="Cheese" parent="Testers" instance=ExtResource("3")]
  93. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -18, 0, 0)
  94. [node name="GodotBall" type="MeshInstance3D" parent="Testers/Cheese"]
  95. transform = Transform3D(0.8, 0, 0, 0, 0.8, 0, 0, 0, 0.8, 0, 0.5, -4)
  96. layers = 16
  97. mesh = ExtResource("4_7al4s")
  98. surface_material_override/0 = ExtResource("16")
  99. surface_material_override/1 = ExtResource("6")
  100. surface_material_override/2 = ExtResource("5")
  101. surface_material_override/3 = ExtResource("7")
  102. [node name="ReflectionProbe" type="ReflectionProbe" parent="Testers/Cheese/GodotBall" groups=["reflection_probe"]]
  103. transform = Transform3D(1.25, 0, 0, 0, 1.25, 0, 0, 0, 1.25, 0, 3, 0)
  104. size = Vector3(256, 256, 256)
  105. enable_shadows = true
  106. cull_mask = 2147483631
  107. reflection_mask = 16
  108. [node name="Stones" parent="Testers" instance=ExtResource("3")]
  109. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -12, 0, 0)
  110. [node name="GodotBall" type="MeshInstance3D" parent="Testers/Stones"]
  111. transform = Transform3D(0.8, 0, 0, 0, 0.8, 0, 0, 0, 0.8, 0, 0.5, -4)
  112. layers = 32
  113. mesh = ExtResource("4_7al4s")
  114. surface_material_override/0 = ExtResource("11")
  115. surface_material_override/1 = ExtResource("6")
  116. surface_material_override/2 = ExtResource("5")
  117. surface_material_override/3 = ExtResource("7")
  118. [node name="ReflectionProbe" type="ReflectionProbe" parent="Testers/Stones/GodotBall" groups=["reflection_probe"]]
  119. transform = Transform3D(1.25, 0, 0, 0, 1.25, 0, 0, 0, 1.25, 0, 3, 0)
  120. size = Vector3(256, 256, 256)
  121. enable_shadows = true
  122. cull_mask = 2147483615
  123. reflection_mask = 32
  124. [node name="Brick" parent="Testers" instance=ExtResource("3")]
  125. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6, 0, 0)
  126. [node name="GodotBall" type="MeshInstance3D" parent="Testers/Brick"]
  127. transform = Transform3D(0.8, 0, 0, 0, 0.8, 0, 0, 0, 0.8, 0, 0.5, -4)
  128. layers = 64
  129. mesh = ExtResource("4_7al4s")
  130. surface_material_override/0 = ExtResource("12")
  131. surface_material_override/1 = ExtResource("6")
  132. surface_material_override/2 = ExtResource("5")
  133. surface_material_override/3 = ExtResource("7")
  134. [node name="ReflectionProbe" type="ReflectionProbe" parent="Testers/Brick/GodotBall" groups=["reflection_probe"]]
  135. transform = Transform3D(1.25, 0, 0, 0, 1.25, 0, 0, 0, 1.25, 0, 3, 0)
  136. size = Vector3(256, 256, 256)
  137. enable_shadows = true
  138. cull_mask = 2147483583
  139. reflection_mask = 64
  140. [node name="Wool" parent="Testers" instance=ExtResource("3")]
  141. [node name="GodotBall" type="MeshInstance3D" parent="Testers/Wool"]
  142. transform = Transform3D(0.8, 0, 0, 0, 0.8, 0, 0, 0, 0.8, 0, 0.5, -4)
  143. layers = 128
  144. mesh = ExtResource("4_7al4s")
  145. surface_material_override/0 = ExtResource("13")
  146. surface_material_override/1 = ExtResource("6")
  147. surface_material_override/2 = ExtResource("5")
  148. surface_material_override/3 = ExtResource("7")
  149. [node name="ReflectionProbe" type="ReflectionProbe" parent="Testers/Wool/GodotBall" groups=["reflection_probe"]]
  150. transform = Transform3D(1.25, 0, 0, 0, 1.25, 0, 0, 0, 1.25, 0, 3, 0)
  151. size = Vector3(256, 256, 256)
  152. enable_shadows = true
  153. cull_mask = 2147483519
  154. reflection_mask = 128
  155. [node name="Aluminium" parent="Testers" instance=ExtResource("3")]
  156. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6, 0, 0)
  157. [node name="GodotBall" type="MeshInstance3D" parent="Testers/Aluminium"]
  158. transform = Transform3D(0.8, 0, 0, 0, 0.8, 0, 0, 0, 0.8, 0, 0.5, -4)
  159. layers = 256
  160. mesh = ExtResource("4_7al4s")
  161. surface_material_override/0 = ExtResource("14")
  162. surface_material_override/1 = ExtResource("6")
  163. surface_material_override/2 = ExtResource("5")
  164. surface_material_override/3 = ExtResource("7")
  165. [node name="ReflectionProbe" type="ReflectionProbe" parent="Testers/Aluminium/GodotBall" groups=["reflection_probe"]]
  166. transform = Transform3D(1.25, 0, 0, 0, 1.25, 0, 0, 0, 1.25, 0, 3, 0)
  167. size = Vector3(256, 256, 256)
  168. enable_shadows = true
  169. cull_mask = 2147483391
  170. reflection_mask = 256
  171. [node name="Marble" parent="Testers" instance=ExtResource("3")]
  172. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 12, 0, 0)
  173. [node name="GodotBall" type="MeshInstance3D" parent="Testers/Marble"]
  174. transform = Transform3D(0.8, 0, 0, 0, 0.8, 0, 0, 0, 0.8, 0, 0.5, -4)
  175. layers = 512
  176. mesh = ExtResource("4_7al4s")
  177. surface_material_override/0 = ExtResource("15")
  178. surface_material_override/1 = ExtResource("6")
  179. surface_material_override/2 = ExtResource("5")
  180. surface_material_override/3 = ExtResource("7")
  181. [node name="ReflectionProbe" type="ReflectionProbe" parent="Testers/Marble/GodotBall" groups=["reflection_probe"]]
  182. transform = Transform3D(1.25, 0, 0, 0, 1.25, 0, 0, 0, 1.25, 0, 3, 0)
  183. size = Vector3(256, 256, 256)
  184. enable_shadows = true
  185. cull_mask = 2147483135
  186. reflection_mask = 512
  187. [node name="Wet Sand" parent="Testers" instance=ExtResource("3")]
  188. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 18, 0, 0)
  189. [node name="GodotBall" type="MeshInstance3D" parent="Testers/Wet Sand"]
  190. transform = Transform3D(0.8, 0, 0, 0, 0.8, 0, 0, 0, 0.8, 0, 0.5, -4)
  191. layers = 1024
  192. mesh = ExtResource("4_7al4s")
  193. surface_material_override/0 = ExtResource("17")
  194. surface_material_override/1 = ExtResource("6")
  195. surface_material_override/2 = ExtResource("5")
  196. surface_material_override/3 = ExtResource("7")
  197. [node name="ReflectionProbe" type="ReflectionProbe" parent="Testers/Wet Sand/GodotBall" groups=["reflection_probe"]]
  198. transform = Transform3D(1.25, 0, 0, 0, 1.25, 0, 0, 0, 1.25, 0, 3, 0)
  199. size = Vector3(256, 256, 256)
  200. enable_shadows = true
  201. cull_mask = 2147482623
  202. reflection_mask = 1024
  203. [node name="Rock" parent="Testers" instance=ExtResource("3")]
  204. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 24, 0, 0)
  205. [node name="GodotBall" type="MeshInstance3D" parent="Testers/Rock"]
  206. transform = Transform3D(0.8, 0, 0, 0, 0.8, 0, 0, 0, 0.8, 0, 0.5, -4)
  207. layers = 2048
  208. mesh = ExtResource("4_7al4s")
  209. surface_material_override/0 = ExtResource("18")
  210. surface_material_override/1 = ExtResource("6")
  211. surface_material_override/2 = ExtResource("5")
  212. surface_material_override/3 = ExtResource("7")
  213. [node name="ReflectionProbe" type="ReflectionProbe" parent="Testers/Rock/GodotBall" groups=["reflection_probe"]]
  214. transform = Transform3D(1.25, 0, 0, 0, 1.25, 0, 0, 0, 1.25, 0, 3, 0)
  215. size = Vector3(256, 256, 256)
  216. enable_shadows = true
  217. cull_mask = 2147481599
  218. reflection_mask = 2048
  219. [node name="Ice" parent="Testers" instance=ExtResource("3")]
  220. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 30, 0, 0)
  221. [node name="GodotBall" type="MeshInstance3D" parent="Testers/Ice"]
  222. transform = Transform3D(0.8, 0, 0, 0, 0.8, 0, 0, 0, 0.8, 0, 0.5, -4)
  223. layers = 4096
  224. mesh = ExtResource("4_7al4s")
  225. surface_material_override/0 = ExtResource("19")
  226. surface_material_override/1 = ExtResource("6")
  227. surface_material_override/2 = ExtResource("5")
  228. surface_material_override/3 = ExtResource("7")
  229. [node name="ReflectionProbe" type="ReflectionProbe" parent="Testers/Ice/GodotBall" groups=["reflection_probe"]]
  230. transform = Transform3D(1.25, 0, 0, 0, 1.25, 0, 0, 0, 1.25, 0, 3, 0)
  231. size = Vector3(256, 256, 256)
  232. enable_shadows = true
  233. cull_mask = 2147479551
  234. reflection_mask = 4096
  235. [node name="Toon" parent="Testers" instance=ExtResource("3")]
  236. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 36, 0, 0)
  237. [node name="GodotBall" type="MeshInstance3D" parent="Testers/Toon"]
  238. transform = Transform3D(0.8, 0, 0, 0, 0.8, 0, 0, 0, 0.8, 0, 0.5, -4)
  239. layers = 8192
  240. mesh = ExtResource("4_7al4s")
  241. surface_material_override/0 = ExtResource("20")
  242. surface_material_override/1 = ExtResource("6")
  243. surface_material_override/2 = ExtResource("5")
  244. surface_material_override/3 = ExtResource("7")
  245. [node name="ReflectionProbe" type="ReflectionProbe" parent="Testers/Toon/GodotBall" groups=["reflection_probe"]]
  246. transform = Transform3D(1.25, 0, 0, 0, 1.25, 0, 0, 0, 1.25, 0, 3, 0)
  247. size = Vector3(256, 256, 256)
  248. enable_shadows = true
  249. cull_mask = 2147475455
  250. reflection_mask = 8192
  251. [node name="CameraHolder" type="Node3D" parent="."]
  252. transform = Transform3D(0.877582, 0, -0.479427, 0, 1, 0, 0.479427, 0, 0.877582, -36, 2.8, -4)
  253. [node name="RotationX" type="Node3D" parent="CameraHolder"]
  254. transform = Transform3D(1, 0, 0, 0, 0.877582, 0.479427, 0, -0.479427, 0.877582, 0, 0, 0)
  255. [node name="Camera" type="Camera3D" parent="CameraHolder/RotationX"]
  256. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 5)
  257. fov = 65.0
  258. near = 0.1
  259. [node name="UI" type="Control" parent="."]
  260. layout_mode = 3
  261. anchors_preset = 15
  262. anchor_right = 1.0
  263. anchor_bottom = 1.0
  264. grow_horizontal = 2
  265. grow_vertical = 2
  266. mouse_filter = 2
  267. [node name="Background" type="OptionButton" parent="UI"]
  268. layout_mode = 0
  269. offset_left = 16.0
  270. offset_top = 16.0
  271. offset_right = 30.0
  272. offset_bottom = 36.0
  273. focus_mode = 0
  274. [node name="ReflectionProbes" type="OptionButton" parent="UI"]
  275. layout_mode = 0
  276. offset_left = 16.0
  277. offset_top = 56.0
  278. offset_right = 233.0
  279. offset_bottom = 87.0
  280. focus_mode = 0
  281. selected = 2
  282. item_count = 3
  283. popup/item_0/text = "No Reflection Probes"
  284. popup/item_1/text = "Reflection Probes (Reflection only)"
  285. popup/item_1/id = 1
  286. popup/item_2/text = "Reflection Probes (Reflection + Ambient)"
  287. popup/item_2/id = 2
  288. [node name="Previous" type="Button" parent="UI"]
  289. layout_mode = 1
  290. anchors_preset = 2
  291. anchor_top = 1.0
  292. anchor_bottom = 1.0
  293. offset_left = 16.0
  294. offset_top = -64.0
  295. offset_right = 152.0
  296. offset_bottom = -16.0
  297. grow_vertical = 0
  298. focus_mode = 0
  299. text = "« Previous"
  300. [node name="Next" type="Button" parent="UI"]
  301. layout_mode = 1
  302. anchors_preset = 3
  303. anchor_left = 1.0
  304. anchor_top = 1.0
  305. anchor_right = 1.0
  306. anchor_bottom = 1.0
  307. offset_left = -98.0
  308. offset_top = -64.0
  309. offset_right = -16.0
  310. offset_bottom = -16.0
  311. grow_horizontal = 0
  312. grow_vertical = 0
  313. focus_mode = 0
  314. text = "Next »"
  315. [node name="MaterialName" type="Label" parent="UI"]
  316. layout_mode = 1
  317. anchors_preset = 7
  318. anchor_left = 0.5
  319. anchor_top = 1.0
  320. anchor_right = 0.5
  321. anchor_bottom = 1.0
  322. offset_left = -0.5
  323. offset_top = -58.0
  324. offset_right = 0.5
  325. offset_bottom = -24.0
  326. grow_horizontal = 2
  327. grow_vertical = 0
  328. size_flags_vertical = 0
  329. theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
  330. theme_override_constants/outline_size = 5
  331. theme_override_font_sizes/font_size = 24
  332. [node name="Quit" type="Button" parent="UI"]
  333. layout_mode = 1
  334. anchors_preset = 1
  335. anchor_left = 1.0
  336. anchor_right = 1.0
  337. offset_left = -89.0
  338. offset_top = 16.0
  339. offset_right = -16.0
  340. offset_bottom = 52.0
  341. grow_horizontal = 0
  342. focus_mode = 0
  343. text = "Quit"
  344. [connection signal="item_selected" from="UI/Background" to="." method="_on_bg_item_selected"]
  345. [connection signal="item_selected" from="UI/ReflectionProbes" to="." method="_on_reflection_probes_item_selected"]
  346. [connection signal="toggled" from="UI/ReflectionProbes" to="." method="_on_use_reflection_probes_toggled"]
  347. [connection signal="pressed" from="UI/Previous" to="." method="_on_previous_pressed"]
  348. [connection signal="pressed" from="UI/Next" to="." method="_on_next_pressed"]
  349. [connection signal="pressed" from="UI/Quit" to="." method="_on_quit_pressed"]