material-maker/addons/material_maker/preview.tscn

193 lines
14 KiB
Plaintext
Raw Normal View History

[gd_scene load_steps=13 format=2]
2018-08-05 18:46:23 +02:00
[ext_resource path="res://addons/material_maker/preview.gd" type="Script" id=1]
[ext_resource path="res://addons/material_maker/panoramas/park.hdr" type="Texture" id=2]
2018-08-05 18:46:23 +02:00
[sub_resource type="Animation" id=1]
loop = true
tracks/0/type = "value"
tracks/0/path = NodePath("MaterialPreview/Objects:rotation_degrees")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 1 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Vector3( 0, 0, 0 ), Vector3( 0, 360, 0 ) ]
}
[sub_resource type="ArrayMesh" id=2]
surfaces/0 = {
"aabb": AABB( -1, -1, -1, 2.00001, 2, 2 ),
"array_data": PoolByteArray( 0, 60, 0, 188, 255, 187, 0, 60, 0, 129, 0, 0, 126, 0, 0, 129, 252, 59, 251, 59, 0, 188, 0, 188, 255, 59, 0, 60, 0, 129, 0, 0, 127, 0, 0, 129, 4, 18, 60, 25, 0, 60, 0, 188, 0, 60, 0, 60, 0, 129, 0, 0, 127, 0, 0, 129, 252, 59, 60, 25, 255, 187, 0, 188, 0, 188, 0, 60, 0, 129, 0, 0, 127, 0, 0, 129, 4, 18, 251, 59, 0, 60, 0, 60, 255, 187, 0, 60, 0, 127, 0, 0, 0, 0, 129, 129, 252, 59, 251, 59, 0, 188, 0, 60, 255, 59, 0, 60, 0, 127, 0, 0, 0, 0, 129, 129, 4, 18, 60, 25, 255, 187, 0, 60, 0, 188, 0, 60, 0, 127, 0, 0, 0, 0, 129, 129, 252, 59, 60, 25, 255, 59, 0, 60, 0, 60, 0, 60, 0, 127, 0, 0, 0, 0, 129, 129, 4, 18, 251, 59, 0, 60, 0, 188, 255, 187, 0, 60, 127, 0, 0, 0, 0, 0, 129, 129, 252, 59, 251, 59, 255, 59, 0, 60, 0, 60, 0, 60, 127, 0, 0, 0, 0, 0, 129, 129, 4, 18, 60, 25, 0, 60, 0, 60, 255, 187, 0, 60, 127, 0, 0, 0, 0, 0, 129, 129, 252, 59, 60, 25, 0, 60, 0, 188, 0, 60, 0, 60, 127, 0, 0, 0, 0, 0, 129, 129, 4, 18, 251, 59, 0, 60, 0, 188, 0, 60, 0, 60, 0, 0, 127, 0, 127, 0, 0, 129, 252, 59, 251, 59, 0, 188, 0, 60, 255, 59, 0, 60, 0, 0, 127, 0, 127, 0, 0, 129, 4, 18, 60, 25, 255, 59, 0, 60, 0, 60, 0, 60, 0, 0, 127, 0, 127, 0, 0, 129, 252, 59, 60, 25, 0, 188, 0, 188, 255, 59, 0, 60, 0, 0, 127, 0, 126, 0, 0, 129, 4, 18, 251, 59, 0, 188, 0, 188, 255, 59, 0, 60, 129, 0, 0, 0, 0, 0, 127, 129, 252, 59, 251, 59, 255, 187, 0, 60, 0, 188, 0, 60, 129, 0, 0, 0, 0, 0, 126, 129, 4, 18, 60, 25, 0, 188, 0, 60, 255, 59, 0, 60, 129, 0, 0, 0, 0, 0, 127, 129, 252, 59, 60, 25, 255, 187, 0, 188, 0, 188, 0, 60, 129, 0, 0, 0, 0, 0, 127, 129, 4, 18, 251, 59, 0, 60, 0, 60, 255, 187, 0, 60, 0, 0, 129, 0, 129, 0, 0, 129, 4, 18, 60, 25, 255, 187, 0, 188, 0, 188, 0, 60, 0, 0, 129, 0, 130, 0, 0, 129, 252, 59, 251, 59, 0, 60, 0, 188, 255, 187, 0, 60, 0, 0, 129, 0, 129, 0, 0, 129, 4, 18, 251, 59, 255, 187, 0, 60, 0, 188, 0, 60, 0, 0, 129, 0, 129, 0, 0, 129, 252, 59, 60, 25 ),
"array_index_data": PoolByteArray( 0, 0, 1, 0, 2, 0, 0, 0, 3, 0, 1, 0, 4, 0, 5, 0, 6, 0, 4, 0, 7, 0, 5, 0, 8, 0, 9, 0, 10, 0, 8, 0, 11, 0, 9, 0, 12, 0, 13, 0, 14, 0, 12, 0, 15, 0, 13, 0, 16, 0, 17, 0, 18, 0, 16, 0, 19, 0, 17, 0, 20, 0, 21, 0, 22, 0, 20, 0, 23, 0, 21, 0 ),
"blend_shape_data": [ ],
"format": 98071,
"index_count": 36,
"name": "Material",
"primitive": 4,
"skeleton_aabb": [ ],
"vertex_count": 24
}
[sub_resource type="SpatialMaterial" id=3]
metallic = 1.0
metallic_specular = 1.0
ao_enabled = true
ao_light_affect = 0.0
ao_on_uv2 = false
ao_texture_channel = 0
2018-08-05 18:46:23 +02:00
depth_enabled = true
depth_scale = 0.5
depth_deep_parallax = true
depth_min_layers = 8
depth_max_layers = 32
depth_flip_tangent = false
depth_flip_binormal = false
2018-08-05 18:46:23 +02:00
[sub_resource type="ArrayMesh" id=4]
surfaces/0 = {
"aabb": AABB( -1, -1, -1, 2, 2, 2 ),
"array_data": PoolByteArray( 0, 0, 0, 188, 0, 188, 0, 60, 0, 172, 162, 0, 129, 0, 0, 129, 201, 58, 209, 59, 31, 54, 0, 60, 100, 187, 0, 60, 36, 84, 169, 0, 139, 0, 208, 129, 73, 57, 198, 37, 0, 0, 0, 60, 0, 188, 0, 60, 0, 84, 162, 0, 129, 0, 0, 129, 201, 58, 198, 37, 31, 54, 0, 188, 100, 187, 0, 60, 36, 172, 169, 0, 139, 0, 208, 129, 73, 57, 209, 59, 168, 57, 0, 60, 168, 185, 0, 60, 67, 84, 189, 0, 167, 0, 167, 129, 147, 55, 198, 37, 168, 57, 0, 188, 168, 185, 0, 60, 67, 172, 189, 0, 167, 0, 167, 129, 147, 55, 209, 59, 100, 59, 0, 60, 31, 182, 0, 60, 87, 84, 220, 0, 208, 0, 139, 129, 147, 52, 198, 37, 100, 59, 0, 188, 31, 182, 0, 60, 87, 172, 220, 0, 208, 0, 139, 129, 147, 52, 209, 59, 0, 60, 0, 60, 0, 0, 0, 60, 94, 84, 0, 0, 0, 0, 130, 129, 77, 46, 198, 37, 0, 60, 0, 188, 0, 0, 0, 60, 94, 172, 0, 0, 0, 0, 129, 129, 77, 46, 209, 59, 100, 59, 0, 60, 31, 54, 0, 60, 87, 84, 36, 0, 48, 0, 139, 129, 178, 173, 198, 37, 100, 59, 0, 188, 31, 54, 0, 60, 87, 172, 36, 0, 48, 0, 139, 129, 178, 173, 209, 59, 168, 57, 0, 60, 168, 57, 0, 60, 67, 84, 67, 0, 89, 0, 167, 129, 108, 180, 198, 37, 168, 57, 0, 188, 168, 57, 0, 60, 67, 172, 67, 0, 89, 0, 167, 129, 108, 180, 209, 59, 31, 54, 0, 60, 100, 59, 0, 60, 36, 84, 87, 0, 117, 0, 208, 129, 108, 183, 198, 37, 31, 54, 0, 188, 100, 59, 0, 60, 36, 172, 87, 0, 117, 0, 208, 129, 108, 183, 209, 59, 0, 0, 0, 60, 0, 60, 0, 60, 0, 84, 94, 0, 127, 0, 0, 129, 54, 185, 198, 37, 0, 0, 0, 188, 0, 60, 0, 60, 0, 172, 94, 0, 127, 0, 0, 129, 54, 185, 209, 59, 31, 182, 0, 60, 100, 59, 0, 60, 220, 84, 87, 0, 117, 0, 48, 129, 182, 186, 198, 37, 31, 182, 0, 188, 100, 59, 0, 60, 220, 172, 87, 0, 117, 0, 48, 129, 182, 186, 209, 59, 168, 185, 0, 60, 168, 57, 0, 60, 189, 84, 67, 0, 89, 0, 89, 129, 27, 188, 198, 37, 168, 185, 0, 188, 168, 57, 0, 60, 189, 172, 67, 0, 89, 0, 89, 129, 27, 188, 209, 59, 100, 187, 0, 60, 31, 54, 0, 60, 169, 84, 36, 0, 48, 0, 117, 129, 219, 188, 198, 37, 100, 187, 0, 188, 31, 54, 0, 60, 169, 172, 36, 0, 48, 0, 117, 129, 219, 188, 209, 59, 0, 188, 0, 60, 0, 0, 0, 60, 162, 84, 0, 0, 11, 12, 125, 129, 155, 189, 198, 37, 0, 188, 0, 188, 0, 0, 0, 60, 162, 172, 0, 0, 11, 244, 125, 129, 155, 189, 209, 59, 0, 188, 0, 188, 0, 0, 0, 60, 162, 172, 0, 0, 245, 12, 125, 129, 100, 62, 209, 59, 100, 187, 0, 60, 31, 182, 0, 60, 169, 84, 220, 0, 208, 0, 117, 129, 164, 61, 198, 37, 0, 188, 0, 60, 0, 0, 0, 60, 162, 84, 0, 0, 245, 244, 125, 129, 100, 62, 198, 37, 100, 187, 0, 188, 31, 182, 0, 60, 169, 172, 220, 0, 208, 0, 117, 129, 164, 61, 209, 59, 168, 185, 0, 60, 168, 185, 0, 60, 189, 84, 189, 0, 167, 0, 89, 129, 228, 60, 198, 37, 168, 185, 0, 188, 168, 185, 0, 60, 189, 172, 189, 0, 167, 0, 89, 129, 228, 60, 209, 59, 31, 54, 0, 60, 100, 187, 0, 60, 0, 127, 0, 0, 127, 0, 0, 129, 81, 57, 138, 43, 31, 182, 0, 60, 100, 187, 0, 60, 0, 127, 0, 0, 127, 0, 0, 129, 201, 52, 138, 43, 0, 0, 0, 60, 0, 188, 0, 60, 0, 127, 0, 0, 127, 0, 0, 129, 181, 55, 198, 37, 168, 185, 0, 60, 168, 185, 0, 60, 0, 127, 0, 0, 127, 0, 0, 129, 157, 48, 50, 49, 100, 187, 0, 60, 31, 182, 0, 60, 0, 127, 0, 0, 127, 0, 0, 129, 56, 41, 19, 53, 0, 188, 0, 60, 0, 0, 0, 60, 0, 127, 0, 0, 127, 0, 0, 129, 140, 28, 0, 56, 100, 187, 0, 60, 31, 54, 0, 60, 0, 127, 0, 0, 127, 0, 0, 129, 56, 41, 118, 57, 168, 185, 0, 60, 168, 57, 0, 60, 0, 127, 0, 0, 127, 0, 0, 129, 157, 48, 179, 58, 31, 182, 0, 60, 100, 59, 0, 60, 0, 127, 0, 0, 127, 0, 0, 129, 201, 52, 135, 59, 0, 0, 0, 60, 0, 60, 0, 60, 0, 127, 0, 0, 127, 0, 0, 129, 181, 55, 209, 59, 31, 54, 0, 60, 100, 59, 0, 60, 0, 127, 0, 0, 127, 0, 0, 129, 81, 57, 135, 59, 168, 57, 0, 60, 168, 57, 0, 60, 0, 127, 0, 0, 127, 0, 0, 129, 142, 58, 179, 58, 100, 59, 0, 60, 31, 54, 0, 60, 0, 127, 0, 0, 127, 0, 0, 129, 98, 59, 118, 57, 0, 60, 0, 60, 0, 0, 0, 60, 0, 127, 0, 0, 127, 0, 0, 129, 172, 59, 0, 56, 100, 59, 0, 60, 31, 182, 0, 60, 0, 127, 0, 0, 127, 0, 0, 129, 98, 59, 19, 53, 168, 57, 0, 60, 168, 185, 0, 60, 0, 127, 0, 0, 127, 0, 0, 129, 142, 58, 50, 49, 31, 182, 0, 60, 100, 187, 0, 60, 220, 84, 169, 0, 139, 0, 48, 129, 36, 60, 198, 37, 31, 182, 0, 188, 100, 187, 0, 60, 220, 172, 169, 0, 139, 0, 48, 129, 36, 60, 2
"array_index_data": PoolByteArray( 0, 0, 1, 0, 2, 0, 0, 0, 3, 0, 1, 0, 3, 0, 4, 0, 1, 0, 3, 0, 5, 0, 4, 0, 5, 0, 6, 0, 4, 0, 5, 0, 7, 0, 6, 0, 7, 0, 8, 0, 6, 0, 7, 0, 9, 0, 8, 0, 9, 0, 10, 0, 8, 0, 9, 0, 11, 0, 10, 0, 11, 0, 12, 0, 10, 0, 11, 0, 13, 0, 12, 0, 13, 0, 14, 0, 12, 0, 13, 0, 15, 0, 14, 0, 15, 0, 16, 0, 14, 0, 15, 0, 17, 0, 16, 0, 17, 0, 18, 0, 16, 0, 17, 0, 19, 0, 18, 0, 19, 0, 20, 0, 18, 0, 19, 0, 21, 0, 20, 0, 21, 0, 22, 0, 20, 0, 21, 0, 23, 0, 22, 0, 23, 0, 24, 0, 22, 0, 23, 0, 25, 0, 24, 0, 26, 0, 27, 0, 28, 0, 26, 0, 29, 0, 27, 0, 29, 0, 30, 0, 27, 0, 29, 0, 31, 0, 30, 0, 32, 0, 33, 0, 34, 0, 32, 0, 35, 0, 33, 0, 32, 0, 36, 0, 35, 0, 32, 0, 37, 0, 36, 0, 32, 0, 38, 0, 37, 0, 32, 0, 39, 0, 38, 0, 32, 0, 40, 0, 39, 0, 32, 0, 41, 0, 40, 0, 32, 0, 42, 0, 41, 0, 32, 0, 43, 0, 42, 0, 32, 0, 44, 0, 43, 0, 32, 0, 45, 0, 44, 0, 32, 0, 46, 0, 45, 0, 32, 0, 47, 0, 46, 0, 31, 0, 48, 0, 30, 0, 31, 0, 49, 0, 48, 0, 49, 0, 2, 0, 48, 0, 49, 0, 0, 0, 2, 0, 50, 0, 51, 0, 52, 0, 50, 0, 53, 0, 51, 0, 50, 0, 54, 0, 53, 0, 50, 0, 55, 0, 54, 0, 50, 0, 56, 0, 55, 0, 50, 0, 57, 0, 56, 0, 50, 0, 58, 0, 57, 0, 50, 0, 59, 0, 58, 0, 50, 0, 60, 0, 59, 0, 50, 0, 61, 0, 60, 0, 50, 0, 62, 0, 61, 0, 50, 0, 63, 0, 62, 0, 50, 0, 64, 0, 63, 0, 50, 0, 65, 0, 64, 0 ),
"blend_shape_data": [ ],
"format": 98071,
"index_count": 180,
"primitive": 4,
"skeleton_aabb": [ ],
"vertex_count": 66
}
[sub_resource type="SphereMesh" id=5]
radius = 1.5
height = 3.0
[sub_resource type="SpatialMaterial" id=6]
metallic = 1.0
metallic_specular = 1.0
ao_enabled = true
ao_light_affect = 0.0
ao_on_uv2 = false
ao_texture_channel = 0
depth_enabled = true
depth_scale = 0.5
depth_deep_parallax = true
depth_min_layers = 8
depth_max_layers = 32
depth_flip_tangent = false
depth_flip_binormal = false
uv1_scale = Vector3( -5, -5, 5 )
[sub_resource type="PanoramaSky" id=7]
2018-08-05 18:46:23 +02:00
radiance_size = 2
panorama = ExtResource( 2 )
[sub_resource type="Environment" id=8]
2018-08-05 18:46:23 +02:00
background_mode = 2
background_sky = SubResource( 7 )
2018-08-05 18:46:23 +02:00
[sub_resource type="Shader" id=9]
code = "shader_type canvas_item;
uniform sampler2D tex;
void fragment() {
COLOR = texture(tex, UV);
}"
[sub_resource type="ShaderMaterial" id=10]
shader = SubResource( 9 )
2018-08-05 18:46:23 +02:00
[node name="Preview" type="ViewportContainer"]
anchor_left = 1.0
anchor_right = 1.0
margin_left = -398.0
2018-08-05 18:46:23 +02:00
margin_top = 3.0
margin_right = -3.0
margin_bottom = 373.0
rect_min_size = Vector2( 200, 200 )
2018-08-05 18:46:23 +02:00
mouse_filter = 2
size_flags_horizontal = 3
size_flags_vertical = 3
stretch = true
script = ExtResource( 1 )
[node name="ObjectRotate" type="AnimationPlayer" parent="."]
2018-08-05 18:46:23 +02:00
autoplay = "rotate"
playback_speed = 0.1
anims/rotate = SubResource( 1 )
[node name="MaterialPreview" type="Viewport" parent="."]
size = Vector2( 395, 370 )
2018-08-05 18:46:23 +02:00
own_world = true
handle_input_locally = false
2018-08-05 18:46:23 +02:00
render_target_clear_mode = 1
render_target_update_mode = 3
[node name="Objects" type="Spatial" parent="MaterialPreview"]
transform = Transform( -0.482492, 0, 0.875895, 0, 1, 0, -0.875895, 0, -0.482492, 0, 0, 0 )
2018-08-05 18:46:23 +02:00
[node name="Cube" type="MeshInstance" parent="MaterialPreview/Objects"]
2018-08-05 18:46:23 +02:00
mesh = SubResource( 2 )
material/0 = SubResource( 3 )
[node name="Cylinder" type="MeshInstance" parent="MaterialPreview/Objects"]
2018-08-05 18:46:23 +02:00
visible = false
mesh = SubResource( 4 )
material/0 = SubResource( 3 )
[node name="Sphere" type="MeshInstance" parent="MaterialPreview/Objects"]
visible = false
mesh = SubResource( 5 )
material/0 = SubResource( 6 )
2018-08-05 18:46:23 +02:00
[node name="OmniLight" type="OmniLight" parent="MaterialPreview"]
2018-08-05 18:46:23 +02:00
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 1.04729, 1.80471, -2.51024 )
omni_range = 6.46518
[node name="Camera" type="Camera" parent="MaterialPreview"]
2018-08-05 18:46:23 +02:00
transform = Transform( 1, 0, 0, 0, 0.766044, 0.642787, 0, -0.642787, 0.766044, 0, 1.83022, 2.2549 )
environment = SubResource( 8 )
2018-08-05 18:46:23 +02:00
current = true
[node name="WorldEnvironment" type="WorldEnvironment" parent="MaterialPreview"]
environment = SubResource( 8 )
2018-08-05 18:46:23 +02:00
[node name="Config" type="HBoxContainer" parent="."]
anchor_right = 1.0
margin_bottom = 20.0
2018-08-05 18:46:23 +02:00
[node name="Model" type="OptionButton" parent="Config"]
margin_right = 100.0
2018-08-05 18:46:23 +02:00
margin_bottom = 20.0
rect_min_size = Vector2( 100, 0 )
2018-08-05 18:46:23 +02:00
text = "Cube"
items = [ "Cube", null, false, 0, null, "Cylinder", null, false, 1, null, "Sphere", null, false, 2, null ]
2018-08-05 18:46:23 +02:00
selected = 0
[node name="Environment" type="OptionButton" parent="Config"]
margin_left = 104.0
margin_right = 204.0
2018-08-05 18:46:23 +02:00
margin_bottom = 20.0
rect_min_size = Vector2( 100, 0 )
2018-08-05 18:46:23 +02:00
text = "Park"
items = [ "Experiment", null, false, 0, null, "Lobby", null, false, 1, null, "Night", null, false, 2, null, "Park", null, false, 3, null, "Schelde", null, false, 4, null ]
selected = 3
[node name="Preview2D" type="ColorRect" parent="."]
material = SubResource( 10 )
anchor_top = 1.0
anchor_bottom = 1.0
margin_top = -64.0
margin_right = 64.0
rect_min_size = Vector2( 64, 64 )
mouse_filter = 1
size_flags_horizontal = 0
size_flags_vertical = 8
[connection signal="resized" from="." to="." method="_on_Preview_resized"]
[connection signal="item_selected" from="Config/Model" to="." method="_on_Model_item_selected"]
[connection signal="item_selected" from="Config/Environment" to="." method="_on_Environment_item_selected"]
[connection signal="gui_input" from="Preview2D" to="." method="_on_Preview2D_gui_input"]