Moved preview stuff to a new directory. Slightly updated environments as described in #29

This commit is contained in:
Rodolphe Suescun 2019-10-20 08:50:32 +02:00
parent c8414f47df
commit b44160b582
10 changed files with 115 additions and 97 deletions

View File

@ -2,19 +2,24 @@
[ext_resource path="res://addons/material_maker/main_window.gd" type="Script" id=1]
[ext_resource path="res://addons/material_maker/library.tscn" type="PackedScene" id=2]
[ext_resource path="res://addons/material_maker/preview.tscn" type="PackedScene" id=3]
[ext_resource path="res://addons/material_maker/panoramas/epping_forest_01.hdr" type="Texture" id=4]
[ext_resource path="res://addons/material_maker/preview/preview.tscn" type="PackedScene" id=3]
[ext_resource path="res://addons/material_maker/preview/panoramas/epping_forest_01.hdr" type="Texture" id=4]
[ext_resource path="res://addons/material_maker/widgets/tabs.gd" type="Script" id=5]
[ext_resource path="res://addons/material_maker/engine/renderer.tscn" type="PackedScene" id=6]
[ext_resource path="res://addons/material_maker/node_factory.gd" type="Script" id=7]
[sub_resource type="PanoramaSky" id=1]
[sub_resource type="PanoramaSky" id=4]
resource_local_to_scene = true
panorama = ExtResource( 4 )
[sub_resource type="Environment" id=2]
[sub_resource type="Environment" id=5]
background_mode = 2
background_sky = SubResource( 1 )
background_sky = SubResource( 4 )
background_energy = 1.5
ambient_light_color = Color( 1, 1, 1, 1 )
ambient_light_energy = 0.32
tonemap_mode = 2
tonemap_white = 16.0
[node name="MainWindow" type="Panel"]
anchor_right = 1.0
@ -119,7 +124,7 @@ render_target_update_mode = 0
[node name="Camera" type="Camera" parent="VBoxContainer/HBoxContainer/ProjectsPane/BackgroundPreview/Viewport"]
transform = Transform( 1, 0, 0, 0, 0.766044, 0.642788, 0, -0.642788, 0.766044, 0, 2.24976, 2.68115 )
environment = SubResource( 2 )
environment = SubResource( 5 )
current = true
[node name="Projects" type="Panel" parent="VBoxContainer/HBoxContainer/ProjectsPane"]

View File

@ -1,7 +1,8 @@
[gd_scene load_steps=6 format=2]
[ext_resource path="res://addons/material_maker/preview.gd" type="Script" id=1]
[ext_resource path="res://addons/material_maker/preview_3d.tscn" type="PackedScene" id=2]
[ext_resource path="res://addons/material_maker/preview/preview.gd" type="Script" id=1]
[ext_resource path="res://addons/material_maker/preview/preview_3d.tscn" type="PackedScene" id=2]
[sub_resource type="World" id=1]

View File

@ -0,0 +1,99 @@
[gd_scene load_steps=12 format=2]
[ext_resource path="res://addons/material_maker/preview/preview_objects.tscn" type="PackedScene" id=1]
[ext_resource path="res://addons/material_maker/preview/panoramas/moonless_golf.hdr" type="Texture" id=2]
[ext_resource path="res://addons/material_maker/environment.gd" type="Script" id=3]
[ext_resource path="res://addons/material_maker/preview/panoramas/epping_forest_01.hdr" type="Texture" id=4]
[sub_resource type="PanoramaSky" id=1]
resource_local_to_scene = true
panorama = ExtResource( 2 )
[sub_resource type="Environment" id=2]
resource_local_to_scene = true
background_mode = 2
background_sky = SubResource( 1 )
[sub_resource type="Animation" id=3]
loop = true
tracks/0/type = "value"
tracks/0/path = NodePath("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="PanoramaSky" id=4]
resource_local_to_scene = true
panorama = ExtResource( 4 )
[sub_resource type="Environment" id=5]
background_mode = 2
background_sky = SubResource( 4 )
background_energy = 1.5
ambient_light_color = Color( 1, 1, 1, 1 )
ambient_light_energy = 0.32
tonemap_mode = 2
tonemap_white = 16.0
[sub_resource type="CylinderMesh" id=6]
top_radius = 5.0
bottom_radius = 5.0
height = 0.5
[sub_resource type="SpatialMaterial" id=7]
[node name="Preview3d" type="Spatial"]
[node name="Objects" parent="." instance=ExtResource( 1 )]
transform = Transform( -0.799512, 0, 0.60065, 0, 1, 0, -0.60065, 0, -0.799512, 0, 0, 0 )
[node name="CameraPivot" type="Spatial" parent="."]
transform = Transform( 1, 0, 0, 0, 0.766044, 0.642788, 0, -0.642788, 0.766044, 0, 0, 0 )
[node name="Camera" type="Camera" parent="CameraPivot"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 3.5 )
environment = SubResource( 2 )
current = true
[node name="RemoteTransform" type="RemoteTransform" parent="CameraPivot/Camera"]
remote_path = NodePath("../../../../../../ProjectsPane/BackgroundPreview/Viewport/Camera")
[node name="ObjectRotate" type="AnimationPlayer" parent="."]
autoplay = "rotate"
playback_speed = 0.1
anims/rotate = SubResource( 3 )
[node name="Environments" type="Spatial" parent="."]
[node name="Epping Forest" type="Spatial" parent="Environments"]
visible = false
script = ExtResource( 3 )
environment = SubResource( 5 )
[node name="DirectionalLight" type="DirectionalLight" parent="Environments/Epping Forest"]
transform = Transform( 0.976272, -0.0494319, -0.21083, 0.216548, 0.222856, 0.950496, -8.69534e-009, -0.973597, 0.228272, -5.08826, 21.6274, 5.3744 )
light_energy = 0.5
shadow_enabled = true
[node name="MeshInstance" type="MeshInstance" parent="Environments/Epping Forest"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -3.3343, 0 )
visible = false
mesh = SubResource( 6 )
material/0 = SubResource( 7 )
[node name="Moonless Golf" type="Spatial" parent="Environments"]
visible = false
script = ExtResource( 3 )
environment = SubResource( 2 )
[node name="DirectionalLight" type="DirectionalLight" parent="Environments/Moonless Golf"]
transform = Transform( 0.569388, 0.170928, 0.804103, 0.171359, -0.981336, 0.087263, 0.804011, 0.088104, -0.588051, 91.9658, 9.62053, -85.1176 )
light_energy = 0.2
shadow_enabled = true

View File

@ -1,6 +1,7 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://addons/material_maker/preview_light.gd" type="Script" id=1]
[ext_resource path="res://addons/material_maker/preview/preview_light.gd" type="Script" id=1]
[sub_resource type="SphereShape" id=3]
radius = 0.332384

View File

@ -1,88 +0,0 @@
[gd_scene load_steps=13 format=2]
[ext_resource path="res://addons/material_maker/preview_objects.tscn" type="PackedScene" id=1]
[ext_resource path="res://addons/material_maker/environment.gd" type="Script" id=2]
[ext_resource path="res://addons/material_maker/panoramas/epping_forest_01.hdr" type="Texture" id=3]
[ext_resource path="res://addons/material_maker/preview_light.tscn" type="PackedScene" id=4]
[ext_resource path="res://addons/material_maker/panoramas/moonless_golf.hdr" type="Texture" id=5]
[sub_resource type="PanoramaSky" id=3]
[sub_resource type="Environment" id=4]
background_mode = 2
background_sky = SubResource( 3 )
ambient_light_color = Color( 0.992157, 1, 0.709804, 1 )
ambient_light_energy = 0.3
[sub_resource type="Animation" id=5]
loop = true
tracks/0/type = "value"
tracks/0/path = NodePath("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="PanoramaSky" id=6]
resource_local_to_scene = true
panorama = ExtResource( 3 )
[sub_resource type="Environment" id=7]
background_mode = 2
background_sky = SubResource( 6 )
[sub_resource type="PanoramaSky" id=8]
resource_local_to_scene = true
panorama = ExtResource( 5 )
[sub_resource type="Environment" id=9]
resource_local_to_scene = true
background_mode = 2
background_sky = SubResource( 8 )
[node name="Preview3d" type="Spatial"]
[node name="Objects" parent="." instance=ExtResource( 1 )]
transform = Transform( -0.799512, 0, 0.60065, 0, 1, 0, -0.60065, 0, -0.799512, 0, 0, 0 )
[node name="CameraPivot" type="Spatial" parent="."]
transform = Transform( 1, 0, 0, 0, 0.766044, 0.642788, 0, -0.642788, 0.766044, 0, 0, 0 )
[node name="Camera" type="Camera" parent="CameraPivot"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 3.5 )
environment = SubResource( 4 )
current = true
[node name="RemoteTransform" type="RemoteTransform" parent="CameraPivot/Camera"]
remote_path = NodePath("../../../../../../ProjectsPane/BackgroundPreview/Viewport/Camera")
[node name="ObjectRotate" type="AnimationPlayer" parent="."]
autoplay = "rotate"
playback_speed = 0.1
anims/rotate = SubResource( 5 )
[node name="Environments" type="Spatial" parent="."]
[node name="Epping Forest" type="Spatial" parent="Environments"]
visible = false
script = ExtResource( 2 )
environment = SubResource( 7 )
[node name="Light" parent="Environments/Epping Forest" instance=ExtResource( 4 )]
transform = Transform( 0.999755, 0.0162074, -0.0150931, 0, 0.681502, 0.731816, 0.0221468, -0.731637, 0.681335, 0.0511079, 4.03913, -2.64581 )
[node name="Moonless Golf" type="Spatial" parent="Environments"]
visible = false
script = ExtResource( 2 )
environment = SubResource( 9 )
[node name="Light1" parent="Environments/Moonless Golf" instance=ExtResource( 4 )]
[node name="Light2" parent="Environments/Moonless Golf" instance=ExtResource( 4 )]
transform = Transform( 0.999755, 0.0162074, -0.0150931, 0, 0.681502, 0.731816, 0.0221468, -0.731637, 0.681335, 2.3608, 3.98251, -2.64581 )