Merge pull request 'feature/table-lod' (#55) from feature/table-lod into dev

Reviewed-on: Athena/game-source#55
This commit is contained in:
stilobique
2021-05-24 15:27:48 +02:00
17 changed files with 2551 additions and 266 deletions
+1 -16
View File
@@ -1,8 +1,6 @@
[gd_scene load_steps=5 format=2]
[gd_scene load_steps=3 format=2]
[ext_resource path="res://assets/props/book/sm_book_lod0.mesh" type="ArrayMesh" id=1]
[ext_resource path="res://assets/props/book/sm_book_lod1.mesh" type="ArrayMesh" id=2]
[ext_resource path="res://assets/props/book/sm_book_lod2.mesh" type="ArrayMesh" id=3]
[sub_resource type="GDScript" id=1]
script/source = "# Copyright © 2020 Hugo Locurcio and contributors - MIT License
@@ -100,20 +98,7 @@ lod_0_max_distance = 1.0
lod_1_max_distance = 5.0
lod_2_max_distance = 10.0
[node name="sm_book-lod0" type="MeshInstance" parent="."]
use_in_baked_light = true
mesh = ExtResource( 1 )
material/0 = null
[node name="sm_book-lod1" type="MeshInstance" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.00205189, 0, -0.0098635 )
visible = false
use_in_baked_light = true
mesh = ExtResource( 2 )
material/0 = null
[node name="sm_book-lod2" type="MeshInstance" parent="."]
visible = false
use_in_baked_light = true
mesh = ExtResource( 3 )
material/0 = null
Binary file not shown.
+10
View File
@@ -0,0 +1,10 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://assets/props/table/sm_table_lod1.mesh" type="ArrayMesh" id=1]
[node name="sm_table" type="Spatial"]
[node name="sm_table_lod1" type="MeshInstance" parent="."]
use_in_baked_light = true
mesh = ExtResource( 1 )
material/0 = null
File diff suppressed because one or more lines are too long
@@ -2,21 +2,21 @@
importer="scene"
type="PackedScene"
path="res://.import/table.gltf-fec65dd732014627633883a821ba693e.scn"
path="res://.import/sm_table_lod0.gltf-fd799a5288da798676ede0a00aea8517.scn"
[deps]
source_file="res://assets/props/table/table.gltf"
dest_files=[ "res://.import/table.gltf-fec65dd732014627633883a821ba693e.scn" ]
source_file="res://assets/props/table/sm_table_lod0.gltf"
dest_files=[ "res://.import/sm_table_lod0.gltf-fd799a5288da798676ede0a00aea8517.scn" ]
[params]
nodes/root_type="Spatial"
nodes/root_type="ArrayMesh"
nodes/root_name="Scene Root"
nodes/root_scale=1.0
nodes/custom_script=""
nodes/storage=0
nodes/use_legacy_names=true
nodes/use_legacy_names=false
materials/location=1
materials/storage=0
materials/keep_on_reimport=false
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
+1 -1
View File
@@ -21,4 +21,4 @@ flags/filter=true
flags/mipmaps=false
flags/srgb=false
slices/horizontal=1
slices/vertical=2
slices/vertical=1
Binary file not shown.
+34 -45
View File
@@ -1,4 +1,4 @@
[gd_scene load_steps=64 format=2]
[gd_scene load_steps=63 format=2]
[ext_resource path="res://assets/props/candle/sm_candle_top.mesh" type="ArrayMesh" id=1]
[ext_resource path="res://scenes/levels/warcraft/WarCraft.gd" type="Script" id=2]
@@ -11,14 +11,13 @@
[ext_resource path="res://assets/props/candle/sm_candle_b.mesh" type="ArrayMesh" id=9]
[ext_resource path="res://assets/props/growler/sm_growler.mesh" type="ArrayMesh" id=10]
[ext_resource path="res://assets/hdri/tx_night_place.hdr" type="Texture" id=11]
[ext_resource path="res://assets/props/table/sm_table.mesh" type="ArrayMesh" id=12]
[ext_resource path="res://assets/props/parchment/sm_wood_parchment.mesh" type="ArrayMesh" id=13]
[ext_resource path="res://assets/props/dagger/dagger.mesh" type="ArrayMesh" id=14]
[ext_resource path="res://assets/props/rock floor/ground_library.tres" type="MeshLibrary" id=15]
[ext_resource path="res://scenes/levels/warcraft/WarCraft.lmbake" type="BakedLightmapData" id=16]
[ext_resource path="res://assets/props/candle/sm_candle_d.mesh" type="ArrayMesh" id=17]
[ext_resource path="res://assets/props/table/sm_table.tscn" type="PackedScene" id=18]
[ext_resource path="res://assets/props/dagger/materials/MA_dagger.material" type="Material" id=19]
[ext_resource path="res://assets/props/misc/sm_gabarit_male.mesh" type="ArrayMesh" id=20]
[ext_resource path="res://assets/props/weapon gun/sm_weapon_gun.mesh" type="ArrayMesh" id=21]
[ext_resource path="res://assets/props/apple/sm_apple.mesh" type="ArrayMesh" id=22]
[ext_resource path="res://assets/props/pinte beer/sm_pinte_beer.mesh" type="ArrayMesh" id=23]
@@ -165,11 +164,6 @@ bounces = 5
environment_mode = 1
light_data = ExtResource( 16 )
[node name="ReflectionProbe" type="ReflectionProbe" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -1.71675, 2.18642, 0 )
extents = Vector3( 2.92656, 2.46071, 3.08519 )
origin_offset = Vector3( -1.59863, 0, 0 )
[node name="Main Camera" type="Camera" parent="."]
transform = Transform( 0.160708, -0.25632, 0.953138, 0, 0.96569, 0.259696, -0.987002, -0.0417352, 0.155194, 1.84336, 1.66169, 0.663199 )
environment = SubResource( 2 )
@@ -182,6 +176,7 @@ __meta__ = {
[node name="Red Color Left" type="SpotLight" parent="Lighting"]
transform = Transform( 0.949107, 0.151161, -0.276307, 0, 0.877297, 0.479948, 0.314953, -0.455522, 0.832649, -4.0515, 2.45338, 4.26157 )
visible = false
light_color = Color( 0.643137, 0.109804, 0.152941, 1 )
light_energy = 11.3
light_specular = 1.0
@@ -196,6 +191,7 @@ spot_angle = 31.2
[node name="Red Color Left2" type="SpotLight" parent="Lighting"]
transform = Transform( 0.80562, 0.042778, 0.590886, -0.18969, 0.963507, 0.18887, -0.561244, -0.264243, 0.784335, 0.631187, 2.3448, 4.15934 )
visible = false
light_color = Color( 0.643137, 0.109804, 0.152941, 1 )
light_energy = 0.4
light_bake_mode = 2
@@ -211,6 +207,7 @@ environment = SubResource( 3 )
[node name="Blue Color Right" type="SpotLight" parent="Lighting"]
transform = Transform( -0.994228, 0.0863279, -0.0637094, 0.0626716, 0.949248, 0.308222, 0.0870842, 0.302451, -0.949179, -4.00108, 2.13555, -5.73587 )
visible = false
light_color = Color( 0.501961, 0.529412, 1, 1 )
light_energy = 4.0
light_bake_mode = 2
@@ -223,6 +220,7 @@ spot_angle = 29.7
[node name="Blue Color Right2" type="SpotLight" parent="Lighting"]
transform = Transform( -0.596615, 0.0976924, 0.79656, 0.0626716, 0.995204, -0.0751143, -0.800077, 0.00510741, -0.599875, -0.159195, 1.47445, -4.78163 )
visible = false
light_color = Color( 0.501961, 0.529412, 1, 1 )
light_energy = 32.0
light_bake_mode = 2
@@ -311,6 +309,7 @@ material/0 = null
[node name="FireplaceLight" type="OmniLight" parent="Building/sm_fireplace"]
transform = Transform( 0.173304, -0.0109248, -0.984808, 0.0629123, 0.998019, -1.78701e-07, 0.982857, -0.0619565, 0.173648, 0.00967455, 0.654315, 0.510273 )
visible = false
light_color = Color( 0.960784, 0.611765, 0.00784314, 1 )
light_energy = 1.4
light_indirect_energy = 1.4
@@ -320,56 +319,50 @@ editor_only = true
omni_range = 1.8
omni_attenuation = 1.23114
[node name="table right" type="MeshInstance" parent="."]
transform = Transform( 0.707107, 0, -0.707107, 0, 1, 0, 0.707107, 0, 0.707107, -2.04193, 0.815994, -1.9022 )
use_in_baked_light = true
mesh = ExtResource( 12 )
material/0 = null
[node name="sm_table_right" parent="." instance=ExtResource( 18 )]
transform = Transform( 0.707107, 0, -0.707107, 0, 1, 0, 0.707107, 0, 0.707107, -2.1664, 0.0295653, -2.02667 )
[node name="sm_growler2" type="MeshInstance" parent="table right"]
transform = Transform( 0.428226, 0, -0.903672, 0, 1, 0, 0.903672, 0, 0.428226, 0.0848827, 0.0842252, 0.24329 )
[node name="sm_growler2" type="MeshInstance" parent="sm_table_right"]
transform = Transform( 0.428226, 0, -0.903672, 0, 1, 0, 0.903672, 0, 0.428226, 0.260903, 0.870654, 0.24329 )
use_in_baked_light = true
mesh = ExtResource( 10 )
material/0 = null
[node name="sm_godet3" type="MeshInstance" parent="table right"]
transform = Transform( 0.869771, 0, 0.493456, 0, 1, 0, -0.493456, 0, 0.869771, -0.0515881, 0.0691012, -0.0287701 )
[node name="sm_godet3" type="MeshInstance" parent="sm_table_right"]
transform = Transform( 0.869771, 0, 0.493456, 0, 1, 0, -0.493456, 0, 0.869771, 0.124432, 0.85553, -0.0287701 )
use_in_baked_light = true
mesh = ExtResource( 3 )
material/0 = null
[node name="sm_godet4" type="MeshInstance" parent="table right"]
transform = Transform( 0.979508, 0.200153, 0.0224678, -0.0198889, -0.0148863, 0.999692, 0.200426, -0.979652, -0.0106004, 0.335115, 0.132765, 0.249402 )
[node name="sm_godet4" type="MeshInstance" parent="sm_table_right"]
transform = Transform( 0.979508, 0.200153, 0.0224678, -0.0198889, -0.0148863, 0.999692, 0.200426, -0.979652, -0.0106004, 0.511135, 0.919194, 0.249402 )
use_in_baked_light = true
mesh = ExtResource( 3 )
material/0 = null
[node name="sm_godet2" type="MeshInstance" parent="table right"]
transform = Transform( -0.236782, -0.0445638, 0.970541, -0.0267146, 0.998868, 0.039347, -0.971196, -0.0166109, -0.237705, 0.115576, 0.0776632, -0.00375021 )
[node name="sm_godet2" type="MeshInstance" parent="sm_table_right"]
transform = Transform( -0.236782, -0.0445638, 0.970541, -0.0267146, 0.998868, 0.039347, -0.971196, -0.0166109, -0.237705, 0.291596, 0.864092, -0.00375021 )
use_in_baked_light = true
mesh = ExtResource( 3 )
material/0 = null
[node name="table left" type="MeshInstance" parent="."]
transform = Transform( -0.958482, 0, -0.285153, 0, 1, 0, 0.285153, 0, -0.958482, -2.7741, 0.826797, 2.21009 )
use_in_baked_light = true
mesh = ExtResource( 12 )
material/0 = null
[node name="sm_table_left" parent="." instance=ExtResource( 18 )]
transform = Transform( -0.958482, 0, -0.285153, 0, 1, 0, 0.285153, 0, -0.958482, -2.60247, 0.0491341, 2.15903 )
[node name="sm_growler2" type="MeshInstance" parent="table left"]
transform = Transform( -0.958482, 0, 0.285153, 0, 1, 0, -0.285153, 0, -0.958482, 0, 0.0658306, 0 )
[node name="sm_growler2" type="MeshInstance" parent="sm_table_left"]
transform = Transform( -0.958482, 0, 0.285153, 0, 1, 0, -0.285153, 0, -0.958482, 0.179069, 0.843493, 2.38419e-07 )
use_in_baked_light = true
mesh = ExtResource( 10 )
material/0 = null
[node name="sm_godet2" type="MeshInstance" parent="table left"]
transform = Transform( -0.958482, 0.0116327, 0.284916, 0, 0.999168, -0.0407945, -0.285153, -0.0391008, -0.957684, -0.17328, 0.0729555, 0.189056 )
[node name="sm_godet2" type="MeshInstance" parent="sm_table_left"]
transform = Transform( -0.958482, 0.0116327, 0.284916, 0, 0.999168, -0.0407945, -0.285153, -0.0391008, -0.957684, 0.0057888, 0.850618, 0.189056 )
use_in_baked_light = true
mesh = ExtResource( 3 )
material/0 = null
[node name="sm_godet3" type="MeshInstance" parent="table left"]
transform = Transform( -0.958482, -0.0136413, 0.284827, 0, 0.998855, 0.0478387, -0.285153, 0.0458525, -0.957385, -0.0769451, 0.0599785, -0.25378 )
[node name="sm_godet3" type="MeshInstance" parent="sm_table_left"]
transform = Transform( -0.958482, -0.0136413, 0.284827, 0, 0.998855, 0.0478387, -0.285153, 0.0458525, -0.957385, 0.102124, 0.837641, -0.25378 )
use_in_baked_light = true
mesh = ExtResource( 3 )
material/0 = null
@@ -399,6 +392,7 @@ material/0 = null
[node name="OmniLight" type="OmniLight" parent="Main Scene Props/sm_book/sm_book2/sm_book3/sm_candlestick2/sm_candle_top2"]
transform = Transform( 0.578774, -3.72536e-09, -3.47774e-07, -3.72529e-09, 0.413993, -3.75217e-08, -1.15463e-13, 7.10543e-15, 0.578773, -0.00229338, 0.0614615, 2.98023e-08 )
visible = false
light_color = Color( 0.960784, 0.611765, 0.00784314, 1 )
light_energy = 12.0
light_indirect_energy = 1.4
@@ -407,11 +401,8 @@ editor_only = true
omni_range = 1.6
omni_attenuation = 2.73208
[node name="sm_table2" type="MeshInstance" parent="Main Scene Props"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.26978, 0.829484, 0.290515 )
use_in_baked_light = true
mesh = ExtResource( 12 )
material/0 = null
[node name="sm_table" parent="Main Scene Props" instance=ExtResource( 18 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0926853, 0.0400838, 0.290515 )
[node name="sm_stool_b2" type="MeshInstance" parent="Main Scene Props"]
transform = Transform( -0.232037, 0, -0.972707, 0, 1, 0, 0.972707, 0, -0.232037, -2.91873, 0.0130518, 0.702275 )
@@ -456,7 +447,7 @@ transform = Transform( 0.122577, 0.0288089, -0.992041, -0.0361233, 0.999045, 0.0
transform = Transform( 0.5, 0, 0.866025, 0, 1, 0, -0.866025, 0, 0.5, 0.0106606, 0.96499, 0.981535 )
[node name="sm_book" parent="Main Scene Props/sm_book3" instance=ExtResource( 46 )]
transform = Transform( 0.992026, 0, 0.592682, 0, 1.15559, 0, -0.592682, 0, 0.992026, -0.000832498, 0.0791223, -0.012241 )
transform = Transform( 0.992026, 0, 0.592682, 0, 1.15559, 0, -0.592682, 0, 0.992026, -0.000832617, 0.0791223, -0.012241 )
[node name="sm_godet2" type="MeshInstance" parent="Main Scene Props"]
transform = Transform( 0.875311, 0.480987, 0.0498184, 0.0206958, 0.0656668, -0.997627, -0.483117, 0.874265, 0.0475244, -0.191043, 0.95253, 0.11484 )
@@ -531,11 +522,6 @@ use_in_baked_light = true
mesh = ExtResource( 9 )
material/0 = null
[node name="sm_gabarit_male" type="MeshInstance" parent="."]
transform = Transform( 0.534795, 0, 0.844982, 0, 1, 0, -0.844982, 0, 0.534795, -4.02751, 0.0561329, -0.889434 )
mesh = ExtResource( 20 )
material/0 = ExtResource( 8 )
[node name="Hidden Objects Items" type="RayCast" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.233905, 1.0296, -0.405055 )
collision_mask = 2
@@ -700,12 +686,13 @@ shape = SubResource( 15 )
[node name="golds" type="Spatial" parent="Hidden Objects Items"]
[node name="coin1" type="MeshInstance" parent="Hidden Objects Items/golds"]
transform = Transform( -0.958704, -0.0851446, 0.271362, -0.0825332, 0.996367, 0.0210433, -0.272167, -0.00222202, -0.962248, 0.234182, -0.0596957, 0.546686 )
transform = Transform( -0.958704, -0.0851446, 0.271362, -0.0825332, 0.996367, 0.0210433, -0.272167, -0.00222202, -0.962248, 0.215021, 0.00178671, 0.520763 )
use_in_baked_light = true
mesh = ExtResource( 30 )
material/0 = ExtResource( 38 )
[node name="Area" type="Area" parent="Hidden Objects Items/golds/coin1"]
transform = Transform( 1, -4.65661e-09, 0, 2.68919e-08, 1, 4.65661e-10, -1.19209e-07, -1.14087e-08, 1, -0.0781975, -0.0532835, -0.0615574 )
collision_mask = 2
[node name="CollisionShapeGold1" type="CollisionShape" parent="Hidden Objects Items/golds/coin1/Area"]
@@ -713,13 +700,14 @@ transform = Transform( 1, -4.65661e-08, 0, -1.38185e-07, 0.999999, 3.14321e-08,
shape = SubResource( 16 )
[node name="coin2" type="MeshInstance" parent="Hidden Objects Items/golds"]
transform = Transform( 0.250245, 2.79397e-09, -0.968183, 0.0456076, 0.99889, 0.0117882, 0.967108, -0.0471065, 0.249967, 0.752443, -0.0417374, 1.3694 )
transform = Transform( 0.250245, 2.79397e-09, -0.968183, 0.0456076, 0.99889, 0.0117882, 0.967108, -0.0471065, 0.249967, 0.752443, -0.000386238, 1.36745 )
layers = 3
use_in_baked_light = true
mesh = ExtResource( 30 )
material/0 = ExtResource( 37 )
[node name="Area" type="Area" parent="Hidden Objects Items/golds/coin2"]
transform = Transform( 1, -1.49012e-08, 0, 0, 1, 9.31323e-10, 1.49012e-08, -3.72529e-09, 1, -0.0553267, -0.0679173, -0.0739018 )
collision_mask = 2
[node name="CollisionShapeGold2" type="CollisionShape" parent="Hidden Objects Items/golds/coin2/Area"]
@@ -733,6 +721,7 @@ mesh = ExtResource( 30 )
material/0 = ExtResource( 32 )
[node name="Area" type="Area" parent="Hidden Objects Items/golds/coin3"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0744205, -0.0795707, -0.040606 )
collision_mask = 2
[node name="CollisionShapeGold3" type="CollisionShape" parent="Hidden Objects Items/golds/coin3/Area"]