From 4343a845adf52765c38c8f4f818069aae09afc58 Mon Sep 17 00:00:00 2001 From: kayomn Date: Sat, 4 Feb 2023 17:25:34 +0000 Subject: [PATCH 1/6] Clean up map editor folder structure --- icon.png.import | 7 +++---- .../tiles/limestone_dungeon/hole_albedo.png.import | 7 +++---- .../tiles/limestone_dungeon/hole_height.png.import | 7 +++---- .../tiles/limestone_dungeon/hole_normal.png.import | 7 +++---- .../tiles/limestone_dungeon/hole_orm.png.import | 7 +++---- .../limestone_dungeon/piping_albedo.png.import | 7 +++---- .../limestone_dungeon/piping_height.png.import | 7 +++---- .../limestone_dungeon/piping_normal.png.import | 7 +++---- .../tiles/limestone_dungeon/piping_orm.png.import | 7 +++---- .../limestone_dungeon/tiling_albedo.png.import | 7 +++---- .../limestone_dungeon/tiling_height.png.import | 7 +++---- .../limestone_dungeon/tiling_normal.png.import | 7 +++---- .../tiles/limestone_dungeon/tiling_orm.png.import | 7 +++---- map_editor.scn | 4 ++-- map_editor/brush_hard_circle_mask.png.import | 14 -------------- .../hard_circle.png} | 0 map_editor/brush_masks/hard_circle.png.import | 14 ++++++++++++++ .../soft_circle.png} | 0 map_editor/brush_masks/soft_circle.png.import | 14 ++++++++++++++ map_editor/brush_soft_circle_mask.png.import | 14 -------------- map_editor/camera_boundary_mesh.res | 3 --- map_editor/tile_cursor_object_material.res | 3 --- terrain/paints/default_albedo.png.import | 7 +++---- 23 files changed, 72 insertions(+), 92 deletions(-) delete mode 100644 map_editor/brush_hard_circle_mask.png.import rename map_editor/{brush_hard_circle_mask.png => brush_masks/hard_circle.png} (100%) create mode 100644 map_editor/brush_masks/hard_circle.png.import rename map_editor/{brush_soft_circle_mask.png => brush_masks/soft_circle.png} (100%) create mode 100644 map_editor/brush_masks/soft_circle.png.import delete mode 100644 map_editor/brush_soft_circle_mask.png.import delete mode 100644 map_editor/camera_boundary_mesh.res delete mode 100644 map_editor/tile_cursor_object_material.res diff --git a/icon.png.import b/icon.png.import index 136e520..9545728 100644 --- a/icon.png.import +++ b/icon.png.import @@ -4,23 +4,22 @@ importer="texture" type="CompressedTexture2D" uid="uid://bqih4uf556hba" path.s3tc="res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.s3tc.ctex" -path.etc2="res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.etc2.ctex" metadata={ -"imported_formats": ["s3tc", "etc2"], +"imported_formats": ["s3tc_bptc"], "vram_texture": true } [deps] source_file="res://icon.png" -dest_files=["res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.s3tc.ctex", "res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.etc2.ctex"] +dest_files=["res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.s3tc.ctex"] [params] compress/mode=2 +compress/high_quality=false compress/lossy_quality=0.7 compress/hdr_compression=1 -compress/bptc_ldr=0 compress/normal_map=0 compress/channel_pack=0 mipmaps/generate=true diff --git a/interior/tiles/limestone_dungeon/hole_albedo.png.import b/interior/tiles/limestone_dungeon/hole_albedo.png.import index 48d5411..b191c67 100644 --- a/interior/tiles/limestone_dungeon/hole_albedo.png.import +++ b/interior/tiles/limestone_dungeon/hole_albedo.png.import @@ -4,23 +4,22 @@ importer="texture" type="CompressedTexture2D" uid="uid://3m7gvnsmb4g" path.s3tc="res://.godot/imported/hole_albedo.png-ef88dfc602c85c58e849d6654804eb67.s3tc.ctex" -path.etc2="res://.godot/imported/hole_albedo.png-ef88dfc602c85c58e849d6654804eb67.etc2.ctex" metadata={ -"imported_formats": ["s3tc", "etc2"], +"imported_formats": ["s3tc_bptc"], "vram_texture": true } [deps] source_file="res://interior/tiles/limestone_dungeon/hole_albedo.png" -dest_files=["res://.godot/imported/hole_albedo.png-ef88dfc602c85c58e849d6654804eb67.s3tc.ctex", "res://.godot/imported/hole_albedo.png-ef88dfc602c85c58e849d6654804eb67.etc2.ctex"] +dest_files=["res://.godot/imported/hole_albedo.png-ef88dfc602c85c58e849d6654804eb67.s3tc.ctex"] [params] compress/mode=2 +compress/high_quality=false compress/lossy_quality=0.7 compress/hdr_compression=1 -compress/bptc_ldr=0 compress/normal_map=0 compress/channel_pack=0 mipmaps/generate=true diff --git a/interior/tiles/limestone_dungeon/hole_height.png.import b/interior/tiles/limestone_dungeon/hole_height.png.import index 69b8b57..e1c7e65 100644 --- a/interior/tiles/limestone_dungeon/hole_height.png.import +++ b/interior/tiles/limestone_dungeon/hole_height.png.import @@ -4,23 +4,22 @@ importer="texture" type="CompressedTexture2D" uid="uid://c8p7qvcrfsio7" path.s3tc="res://.godot/imported/hole_height.png-875fd265b9470b3f52656ba603fc8eae.s3tc.ctex" -path.etc2="res://.godot/imported/hole_height.png-875fd265b9470b3f52656ba603fc8eae.etc2.ctex" metadata={ -"imported_formats": ["s3tc", "etc2"], +"imported_formats": ["s3tc_bptc"], "vram_texture": true } [deps] source_file="res://interior/tiles/limestone_dungeon/hole_height.png" -dest_files=["res://.godot/imported/hole_height.png-875fd265b9470b3f52656ba603fc8eae.s3tc.ctex", "res://.godot/imported/hole_height.png-875fd265b9470b3f52656ba603fc8eae.etc2.ctex"] +dest_files=["res://.godot/imported/hole_height.png-875fd265b9470b3f52656ba603fc8eae.s3tc.ctex"] [params] compress/mode=2 +compress/high_quality=false compress/lossy_quality=0.7 compress/hdr_compression=1 -compress/bptc_ldr=0 compress/normal_map=0 compress/channel_pack=0 mipmaps/generate=true diff --git a/interior/tiles/limestone_dungeon/hole_normal.png.import b/interior/tiles/limestone_dungeon/hole_normal.png.import index bf6c59b..d1b04e0 100644 --- a/interior/tiles/limestone_dungeon/hole_normal.png.import +++ b/interior/tiles/limestone_dungeon/hole_normal.png.import @@ -4,23 +4,22 @@ importer="texture" type="CompressedTexture2D" uid="uid://c4eby3i7q2wts" path.s3tc="res://.godot/imported/hole_normal.png-9c2f1eac05804bab609d1c67adcf7dba.s3tc.ctex" -path.etc2="res://.godot/imported/hole_normal.png-9c2f1eac05804bab609d1c67adcf7dba.etc2.ctex" metadata={ -"imported_formats": ["s3tc", "etc2"], +"imported_formats": ["s3tc_bptc"], "vram_texture": true } [deps] source_file="res://interior/tiles/limestone_dungeon/hole_normal.png" -dest_files=["res://.godot/imported/hole_normal.png-9c2f1eac05804bab609d1c67adcf7dba.s3tc.ctex", "res://.godot/imported/hole_normal.png-9c2f1eac05804bab609d1c67adcf7dba.etc2.ctex"] +dest_files=["res://.godot/imported/hole_normal.png-9c2f1eac05804bab609d1c67adcf7dba.s3tc.ctex"] [params] compress/mode=2 +compress/high_quality=false compress/lossy_quality=0.7 compress/hdr_compression=1 -compress/bptc_ldr=0 compress/normal_map=1 compress/channel_pack=0 mipmaps/generate=true diff --git a/interior/tiles/limestone_dungeon/hole_orm.png.import b/interior/tiles/limestone_dungeon/hole_orm.png.import index 39cf7c3..69f6f6b 100644 --- a/interior/tiles/limestone_dungeon/hole_orm.png.import +++ b/interior/tiles/limestone_dungeon/hole_orm.png.import @@ -4,23 +4,22 @@ importer="texture" type="CompressedTexture2D" uid="uid://dvqqmbf6r1jfm" path.s3tc="res://.godot/imported/hole_orm.png-00b1427da2cca528c854a97655dfff24.s3tc.ctex" -path.etc2="res://.godot/imported/hole_orm.png-00b1427da2cca528c854a97655dfff24.etc2.ctex" metadata={ -"imported_formats": ["s3tc", "etc2"], +"imported_formats": ["s3tc_bptc"], "vram_texture": true } [deps] source_file="res://interior/tiles/limestone_dungeon/hole_orm.png" -dest_files=["res://.godot/imported/hole_orm.png-00b1427da2cca528c854a97655dfff24.s3tc.ctex", "res://.godot/imported/hole_orm.png-00b1427da2cca528c854a97655dfff24.etc2.ctex"] +dest_files=["res://.godot/imported/hole_orm.png-00b1427da2cca528c854a97655dfff24.s3tc.ctex"] [params] compress/mode=2 +compress/high_quality=false compress/lossy_quality=0.7 compress/hdr_compression=1 -compress/bptc_ldr=0 compress/normal_map=0 compress/channel_pack=0 mipmaps/generate=true diff --git a/interior/tiles/limestone_dungeon/piping_albedo.png.import b/interior/tiles/limestone_dungeon/piping_albedo.png.import index ba5e271..1298692 100644 --- a/interior/tiles/limestone_dungeon/piping_albedo.png.import +++ b/interior/tiles/limestone_dungeon/piping_albedo.png.import @@ -4,23 +4,22 @@ importer="texture" type="CompressedTexture2D" uid="uid://yu0p5ryoh7gr" path.s3tc="res://.godot/imported/piping_albedo.png-e55409f9baf27938796d954b957086ac.s3tc.ctex" -path.etc2="res://.godot/imported/piping_albedo.png-e55409f9baf27938796d954b957086ac.etc2.ctex" metadata={ -"imported_formats": ["s3tc", "etc2"], +"imported_formats": ["s3tc_bptc"], "vram_texture": true } [deps] source_file="res://interior/tiles/limestone_dungeon/piping_albedo.png" -dest_files=["res://.godot/imported/piping_albedo.png-e55409f9baf27938796d954b957086ac.s3tc.ctex", "res://.godot/imported/piping_albedo.png-e55409f9baf27938796d954b957086ac.etc2.ctex"] +dest_files=["res://.godot/imported/piping_albedo.png-e55409f9baf27938796d954b957086ac.s3tc.ctex"] [params] compress/mode=2 +compress/high_quality=false compress/lossy_quality=0.7 compress/hdr_compression=1 -compress/bptc_ldr=0 compress/normal_map=0 compress/channel_pack=0 mipmaps/generate=true diff --git a/interior/tiles/limestone_dungeon/piping_height.png.import b/interior/tiles/limestone_dungeon/piping_height.png.import index 2bf651a..2addbdc 100644 --- a/interior/tiles/limestone_dungeon/piping_height.png.import +++ b/interior/tiles/limestone_dungeon/piping_height.png.import @@ -4,23 +4,22 @@ importer="texture" type="CompressedTexture2D" uid="uid://byw6qkgod61ip" path.s3tc="res://.godot/imported/piping_height.png-d458ffb714345b35977ee0de9b01359f.s3tc.ctex" -path.etc2="res://.godot/imported/piping_height.png-d458ffb714345b35977ee0de9b01359f.etc2.ctex" metadata={ -"imported_formats": ["s3tc", "etc2"], +"imported_formats": ["s3tc_bptc"], "vram_texture": true } [deps] source_file="res://interior/tiles/limestone_dungeon/piping_height.png" -dest_files=["res://.godot/imported/piping_height.png-d458ffb714345b35977ee0de9b01359f.s3tc.ctex", "res://.godot/imported/piping_height.png-d458ffb714345b35977ee0de9b01359f.etc2.ctex"] +dest_files=["res://.godot/imported/piping_height.png-d458ffb714345b35977ee0de9b01359f.s3tc.ctex"] [params] compress/mode=2 +compress/high_quality=false compress/lossy_quality=0.7 compress/hdr_compression=1 -compress/bptc_ldr=0 compress/normal_map=0 compress/channel_pack=0 mipmaps/generate=true diff --git a/interior/tiles/limestone_dungeon/piping_normal.png.import b/interior/tiles/limestone_dungeon/piping_normal.png.import index 1ed7908..4760b40 100644 --- a/interior/tiles/limestone_dungeon/piping_normal.png.import +++ b/interior/tiles/limestone_dungeon/piping_normal.png.import @@ -4,23 +4,22 @@ importer="texture" type="CompressedTexture2D" uid="uid://bypqkn1tm036p" path.s3tc="res://.godot/imported/piping_normal.png-4b6b5fc6d6cbc5e05f054f9e19463644.s3tc.ctex" -path.etc2="res://.godot/imported/piping_normal.png-4b6b5fc6d6cbc5e05f054f9e19463644.etc2.ctex" metadata={ -"imported_formats": ["s3tc", "etc2"], +"imported_formats": ["s3tc_bptc"], "vram_texture": true } [deps] source_file="res://interior/tiles/limestone_dungeon/piping_normal.png" -dest_files=["res://.godot/imported/piping_normal.png-4b6b5fc6d6cbc5e05f054f9e19463644.s3tc.ctex", "res://.godot/imported/piping_normal.png-4b6b5fc6d6cbc5e05f054f9e19463644.etc2.ctex"] +dest_files=["res://.godot/imported/piping_normal.png-4b6b5fc6d6cbc5e05f054f9e19463644.s3tc.ctex"] [params] compress/mode=2 +compress/high_quality=false compress/lossy_quality=0.7 compress/hdr_compression=1 -compress/bptc_ldr=0 compress/normal_map=1 compress/channel_pack=0 mipmaps/generate=true diff --git a/interior/tiles/limestone_dungeon/piping_orm.png.import b/interior/tiles/limestone_dungeon/piping_orm.png.import index 7f8fade..197f747 100644 --- a/interior/tiles/limestone_dungeon/piping_orm.png.import +++ b/interior/tiles/limestone_dungeon/piping_orm.png.import @@ -4,23 +4,22 @@ importer="texture" type="CompressedTexture2D" uid="uid://bkpucv0ydae5v" path.s3tc="res://.godot/imported/piping_orm.png-7131df07403ecb346d6a4793ca7929cb.s3tc.ctex" -path.etc2="res://.godot/imported/piping_orm.png-7131df07403ecb346d6a4793ca7929cb.etc2.ctex" metadata={ -"imported_formats": ["s3tc", "etc2"], +"imported_formats": ["s3tc_bptc"], "vram_texture": true } [deps] source_file="res://interior/tiles/limestone_dungeon/piping_orm.png" -dest_files=["res://.godot/imported/piping_orm.png-7131df07403ecb346d6a4793ca7929cb.s3tc.ctex", "res://.godot/imported/piping_orm.png-7131df07403ecb346d6a4793ca7929cb.etc2.ctex"] +dest_files=["res://.godot/imported/piping_orm.png-7131df07403ecb346d6a4793ca7929cb.s3tc.ctex"] [params] compress/mode=2 +compress/high_quality=false compress/lossy_quality=0.7 compress/hdr_compression=1 -compress/bptc_ldr=0 compress/normal_map=0 compress/channel_pack=0 mipmaps/generate=true diff --git a/interior/tiles/limestone_dungeon/tiling_albedo.png.import b/interior/tiles/limestone_dungeon/tiling_albedo.png.import index 5238382..8724bfe 100644 --- a/interior/tiles/limestone_dungeon/tiling_albedo.png.import +++ b/interior/tiles/limestone_dungeon/tiling_albedo.png.import @@ -4,23 +4,22 @@ importer="texture" type="CompressedTexture2D" uid="uid://bydc62557j2d0" path.s3tc="res://.godot/imported/tiling_albedo.png-1570a8acdedf3400258f8b15e49e5d5b.s3tc.ctex" -path.etc2="res://.godot/imported/tiling_albedo.png-1570a8acdedf3400258f8b15e49e5d5b.etc2.ctex" metadata={ -"imported_formats": ["s3tc", "etc2"], +"imported_formats": ["s3tc_bptc"], "vram_texture": true } [deps] source_file="res://interior/tiles/limestone_dungeon/tiling_albedo.png" -dest_files=["res://.godot/imported/tiling_albedo.png-1570a8acdedf3400258f8b15e49e5d5b.s3tc.ctex", "res://.godot/imported/tiling_albedo.png-1570a8acdedf3400258f8b15e49e5d5b.etc2.ctex"] +dest_files=["res://.godot/imported/tiling_albedo.png-1570a8acdedf3400258f8b15e49e5d5b.s3tc.ctex"] [params] compress/mode=2 +compress/high_quality=false compress/lossy_quality=0.7 compress/hdr_compression=1 -compress/bptc_ldr=0 compress/normal_map=0 compress/channel_pack=0 mipmaps/generate=true diff --git a/interior/tiles/limestone_dungeon/tiling_height.png.import b/interior/tiles/limestone_dungeon/tiling_height.png.import index 7090396..322b167 100644 --- a/interior/tiles/limestone_dungeon/tiling_height.png.import +++ b/interior/tiles/limestone_dungeon/tiling_height.png.import @@ -4,23 +4,22 @@ importer="texture" type="CompressedTexture2D" uid="uid://didp3nfacohwd" path.s3tc="res://.godot/imported/tiling_height.png-2ead72b43d4a6de847e50bcbd8e8c7f7.s3tc.ctex" -path.etc2="res://.godot/imported/tiling_height.png-2ead72b43d4a6de847e50bcbd8e8c7f7.etc2.ctex" metadata={ -"imported_formats": ["s3tc", "etc2"], +"imported_formats": ["s3tc_bptc"], "vram_texture": true } [deps] source_file="res://interior/tiles/limestone_dungeon/tiling_height.png" -dest_files=["res://.godot/imported/tiling_height.png-2ead72b43d4a6de847e50bcbd8e8c7f7.s3tc.ctex", "res://.godot/imported/tiling_height.png-2ead72b43d4a6de847e50bcbd8e8c7f7.etc2.ctex"] +dest_files=["res://.godot/imported/tiling_height.png-2ead72b43d4a6de847e50bcbd8e8c7f7.s3tc.ctex"] [params] compress/mode=2 +compress/high_quality=false compress/lossy_quality=0.7 compress/hdr_compression=1 -compress/bptc_ldr=0 compress/normal_map=0 compress/channel_pack=0 mipmaps/generate=true diff --git a/interior/tiles/limestone_dungeon/tiling_normal.png.import b/interior/tiles/limestone_dungeon/tiling_normal.png.import index bcc28d9..50f635c 100644 --- a/interior/tiles/limestone_dungeon/tiling_normal.png.import +++ b/interior/tiles/limestone_dungeon/tiling_normal.png.import @@ -4,23 +4,22 @@ importer="texture" type="CompressedTexture2D" uid="uid://cv8yiluvc6mol" path.s3tc="res://.godot/imported/tiling_normal.png-877f08b7359b5aba3ea7d5681fd4e5a9.s3tc.ctex" -path.etc2="res://.godot/imported/tiling_normal.png-877f08b7359b5aba3ea7d5681fd4e5a9.etc2.ctex" metadata={ -"imported_formats": ["s3tc", "etc2"], +"imported_formats": ["s3tc_bptc"], "vram_texture": true } [deps] source_file="res://interior/tiles/limestone_dungeon/tiling_normal.png" -dest_files=["res://.godot/imported/tiling_normal.png-877f08b7359b5aba3ea7d5681fd4e5a9.s3tc.ctex", "res://.godot/imported/tiling_normal.png-877f08b7359b5aba3ea7d5681fd4e5a9.etc2.ctex"] +dest_files=["res://.godot/imported/tiling_normal.png-877f08b7359b5aba3ea7d5681fd4e5a9.s3tc.ctex"] [params] compress/mode=2 +compress/high_quality=false compress/lossy_quality=0.7 compress/hdr_compression=1 -compress/bptc_ldr=0 compress/normal_map=1 compress/channel_pack=0 mipmaps/generate=true diff --git a/interior/tiles/limestone_dungeon/tiling_orm.png.import b/interior/tiles/limestone_dungeon/tiling_orm.png.import index cd95373..996188a 100644 --- a/interior/tiles/limestone_dungeon/tiling_orm.png.import +++ b/interior/tiles/limestone_dungeon/tiling_orm.png.import @@ -4,23 +4,22 @@ importer="texture" type="CompressedTexture2D" uid="uid://leoab2fjmxgk" path.s3tc="res://.godot/imported/tiling_orm.png-48bc1a5d8b2eae43d49ed818fa664d0d.s3tc.ctex" -path.etc2="res://.godot/imported/tiling_orm.png-48bc1a5d8b2eae43d49ed818fa664d0d.etc2.ctex" metadata={ -"imported_formats": ["s3tc", "etc2"], +"imported_formats": ["s3tc_bptc"], "vram_texture": true } [deps] source_file="res://interior/tiles/limestone_dungeon/tiling_orm.png" -dest_files=["res://.godot/imported/tiling_orm.png-48bc1a5d8b2eae43d49ed818fa664d0d.s3tc.ctex", "res://.godot/imported/tiling_orm.png-48bc1a5d8b2eae43d49ed818fa664d0d.etc2.ctex"] +dest_files=["res://.godot/imported/tiling_orm.png-48bc1a5d8b2eae43d49ed818fa664d0d.s3tc.ctex"] [params] compress/mode=2 +compress/high_quality=false compress/lossy_quality=0.7 compress/hdr_compression=1 -compress/bptc_ldr=0 compress/normal_map=0 compress/channel_pack=0 mipmaps/generate=true diff --git a/map_editor.scn b/map_editor.scn index 3dca50c..ed11d5f 100644 --- a/map_editor.scn +++ b/map_editor.scn @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:70aea98588b8d976ba54f77d871032f852cc99d293fe970fb027d32da883078b -size 13469 +oid sha256:26bbc02b2f22dc9575716e0f9c80bc51ff76b1100f264c328568f17e0f7d52fb +size 13465 diff --git a/map_editor/brush_hard_circle_mask.png.import b/map_editor/brush_hard_circle_mask.png.import deleted file mode 100644 index e29c1dd..0000000 --- a/map_editor/brush_hard_circle_mask.png.import +++ /dev/null @@ -1,14 +0,0 @@ -[remap] - -importer="image" -type="Image" -uid="uid://drok88h02tdre" -path="res://.godot/imported/brush_hard_circle_mask.png-b5b7b3c7aa50923306e69fd4680a2d65.image" - -[deps] - -source_file="res://map_editor/brush_hard_circle_mask.png" -dest_files=["res://.godot/imported/brush_hard_circle_mask.png-b5b7b3c7aa50923306e69fd4680a2d65.image"] - -[params] - diff --git a/map_editor/brush_hard_circle_mask.png b/map_editor/brush_masks/hard_circle.png similarity index 100% rename from map_editor/brush_hard_circle_mask.png rename to map_editor/brush_masks/hard_circle.png diff --git a/map_editor/brush_masks/hard_circle.png.import b/map_editor/brush_masks/hard_circle.png.import new file mode 100644 index 0000000..f10ef06 --- /dev/null +++ b/map_editor/brush_masks/hard_circle.png.import @@ -0,0 +1,14 @@ +[remap] + +importer="image" +type="Image" +uid="uid://drok88h02tdre" +path="res://.godot/imported/hard_circle.png-2d3b8f0159bd6330a1549c444b8f6be1.image" + +[deps] + +source_file="res://map_editor/brush_masks/hard_circle.png" +dest_files=["res://.godot/imported/hard_circle.png-2d3b8f0159bd6330a1549c444b8f6be1.image"] + +[params] + diff --git a/map_editor/brush_soft_circle_mask.png b/map_editor/brush_masks/soft_circle.png similarity index 100% rename from map_editor/brush_soft_circle_mask.png rename to map_editor/brush_masks/soft_circle.png diff --git a/map_editor/brush_masks/soft_circle.png.import b/map_editor/brush_masks/soft_circle.png.import new file mode 100644 index 0000000..4917fc5 --- /dev/null +++ b/map_editor/brush_masks/soft_circle.png.import @@ -0,0 +1,14 @@ +[remap] + +importer="image" +type="Image" +uid="uid://bbdh4btpg08do" +path="res://.godot/imported/soft_circle.png-39b5c5475559f344ab34a03d8778f285.image" + +[deps] + +source_file="res://map_editor/brush_masks/soft_circle.png" +dest_files=["res://.godot/imported/soft_circle.png-39b5c5475559f344ab34a03d8778f285.image"] + +[params] + diff --git a/map_editor/brush_soft_circle_mask.png.import b/map_editor/brush_soft_circle_mask.png.import deleted file mode 100644 index 65a4ec4..0000000 --- a/map_editor/brush_soft_circle_mask.png.import +++ /dev/null @@ -1,14 +0,0 @@ -[remap] - -importer="image" -type="Image" -uid="uid://bbdh4btpg08do" -path="res://.godot/imported/brush_soft_circle_mask.png-f4362d74cca7ee83b36212049a3b11fb.image" - -[deps] - -source_file="res://map_editor/brush_soft_circle_mask.png" -dest_files=["res://.godot/imported/brush_soft_circle_mask.png-f4362d74cca7ee83b36212049a3b11fb.image"] - -[params] - diff --git a/map_editor/camera_boundary_mesh.res b/map_editor/camera_boundary_mesh.res deleted file mode 100644 index c478941..0000000 --- a/map_editor/camera_boundary_mesh.res +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:28046c63a066c0a2119714133b8aae4216b3dbd694749d3e8467d362c2cf74c5 -size 643 diff --git a/map_editor/tile_cursor_object_material.res b/map_editor/tile_cursor_object_material.res deleted file mode 100644 index b053994..0000000 --- a/map_editor/tile_cursor_object_material.res +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:be95f7bcacaedc1e942b999a970ce648cb7e4efdf04a16b5c9c4f6ff95039f54 -size 708 diff --git a/terrain/paints/default_albedo.png.import b/terrain/paints/default_albedo.png.import index c64f065..6fe0d6e 100644 --- a/terrain/paints/default_albedo.png.import +++ b/terrain/paints/default_albedo.png.import @@ -4,23 +4,22 @@ importer="texture" type="CompressedTexture2D" uid="uid://bgpk15qrqxly8" path.s3tc="res://.godot/imported/default_albedo.png-ec7b9bee606a4c8482c5f21d50eaafb2.s3tc.ctex" -path.etc2="res://.godot/imported/default_albedo.png-ec7b9bee606a4c8482c5f21d50eaafb2.etc2.ctex" metadata={ -"imported_formats": ["s3tc", "etc2"], +"imported_formats": ["s3tc_bptc"], "vram_texture": true } [deps] source_file="res://terrain/paints/default_albedo.png" -dest_files=["res://.godot/imported/default_albedo.png-ec7b9bee606a4c8482c5f21d50eaafb2.s3tc.ctex", "res://.godot/imported/default_albedo.png-ec7b9bee606a4c8482c5f21d50eaafb2.etc2.ctex"] +dest_files=["res://.godot/imported/default_albedo.png-ec7b9bee606a4c8482c5f21d50eaafb2.s3tc.ctex"] [params] compress/mode=2 +compress/high_quality=false compress/lossy_quality=0.7 compress/hdr_compression=1 -compress/bptc_ldr=0 compress/normal_map=0 compress/channel_pack=0 mipmaps/generate=true -- 2.34.1 From e654466805cfb57c30fabc93e3c67390ffc6d195 Mon Sep 17 00:00:00 2001 From: kayomn Date: Sat, 4 Feb 2023 17:39:27 +0000 Subject: [PATCH 2/6] Remove 'rotate' option for tiles --- map_editor.scn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/map_editor.scn b/map_editor.scn index ed11d5f..08b37f3 100644 --- a/map_editor.scn +++ b/map_editor.scn @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:26bbc02b2f22dc9575716e0f9c80bc51ff76b1100f264c328568f17e0f7d52fb -size 13465 +oid sha256:295e8a386f4ecc33196ffafd5435877be918da48112c924773665d9c877ac12a +size 13343 -- 2.34.1 From ee37075778b0a116bb752fd7997e4b6db85fee15 Mon Sep 17 00:00:00 2001 From: kayomn Date: Thu, 9 Feb 2023 00:55:01 +0000 Subject: [PATCH 3/6] Revamp floor tiling system with auto-tile solution --- .gitattributes | 2 + interior/floors/dungeon_01/detail_albedo.png | 3 + .../dungeon_01/detail_albedo.png.import} | 8 +- .../floors/dungeon_01/detail_displacement.png | 3 + .../dungeon_01/detail_displacement.png.import | 35 ++ .../floors/dungeon_01/detail_material.res | 3 + interior/floors/dungeon_01/detail_normal.png | 3 + .../dungeon_01/detail_normal.png.import} | 10 +- .../floors/dungeon_01/detail_roughness.png | 3 + .../dungeon_01/detail_roughness.png.import} | 8 +- interior/floors/dungeon_01/floor_albedo.png | 3 + .../dungeon_01/floor_albedo.png.import} | 8 +- .../dungeon_01/floor_displacement.png} | 0 .../dungeon_01/floor_displacement.png.import} | 8 +- interior/floors/dungeon_01/floor_material.res | 3 + interior/floors/dungeon_01/floor_normal.png | 3 + .../dungeon_01/floor_normal.png.import} | 10 +- interior/floors/dungeon_01/floor_orm.png | 3 + .../dungeon_01/floor_orm.png.import} | 8 +- interior/floors/dungeon_01/pillar_albedo.png | 3 + .../dungeon_01/pillar_albedo.png.import} | 8 +- .../floors/dungeon_01/pillar_displacement.png | 3 + .../pillar_displacement.png.import} | 8 +- .../floors/dungeon_01/pillar_material.res | 3 + interior/floors/dungeon_01/pillar_normal.png | 3 + .../dungeon_01/pillar_normal.png.import} | 10 +- .../floors/dungeon_01/pillar_roughness.png | 3 + .../dungeon_01/pillar_roughness.png.import | 34 ++ interior/floors/dungeon_01/tiles.glb | 3 + interior/floors/dungeon_01/tiles.glb.import | 209 ++++++++++ .../dungeon_01/tiles_corner_north_east.res | 3 + .../dungeon_01/tiles_corner_north_west.res | 3 + .../dungeon_01/tiles_corner_south_east.res | 3 + .../dungeon_01/tiles_corner_south_west.res | 3 + .../floors/dungeon_01/tiles_edge_east.res | 3 + .../floors/dungeon_01/tiles_edge_north.res | 3 + .../floors/dungeon_01/tiles_edge_south.res | 3 + .../floors/dungeon_01/tiles_edge_west.res | 3 + .../floors/dungeon_01/tiles_endcap_east.res | 3 + .../floors/dungeon_01/tiles_endcap_north.res | 3 + .../floors/dungeon_01/tiles_endcap_south.res | 3 + .../floors/dungeon_01/tiles_endcap_west.res | 3 + interior/floors/dungeon_01/tiles_fill.res | 3 + interior/floors/dungeon_01/tiles_island.res | 3 + .../dungeon_01/tiles_path_horizontal.res | 3 + .../floors/dungeon_01/tiles_path_vertical.res | 3 + interior/floors/dungeon_01_interior_floor.res | 3 + .../dungeon_01_tiles_height.png.import} | 6 +- interior/floors/interior_floor.gd | 49 +++ interior/interior_map.gd | 368 ++++++++---------- interior/interior_tile.gd | 29 -- interior/tiles/dungeon_01_pipehole_tile.res | 3 - interior/tiles/dungeon_01_tiling_tile.res | 3 - .../tiles/limestone_dungeon/hole_albedo.png | 3 - .../tiles/limestone_dungeon/hole_height.png | 3 - .../tiles/limestone_dungeon/hole_material.res | 3 - .../tiles/limestone_dungeon/hole_normal.png | 3 - interior/tiles/limestone_dungeon/hole_orm.png | 3 - .../tiles/limestone_dungeon/piping_albedo.png | 3 - .../tiles/limestone_dungeon/piping_height.png | 3 - .../limestone_dungeon/piping_material.res | 3 - .../tiles/limestone_dungeon/piping_normal.png | 3 - .../tiles/limestone_dungeon/piping_orm.png | 3 - .../tiles/limestone_dungeon/tiling_albedo.png | 3 - .../tiling_albedo.png.import | 35 -- .../limestone_dungeon/tiling_material.res | 3 - .../tiles/limestone_dungeon/tiling_normal.png | 3 - .../tiles/limestone_dungeon/tiling_orm.png | 3 - map_editor.scn | 4 +- ...up.res => floor_selector_button_group.res} | 0 map_editor/selection_area_mesh.res | 3 - 71 files changed, 628 insertions(+), 376 deletions(-) create mode 100644 interior/floors/dungeon_01/detail_albedo.png rename interior/{tiles/limestone_dungeon/hole_albedo.png.import => floors/dungeon_01/detail_albedo.png.import} (66%) create mode 100644 interior/floors/dungeon_01/detail_displacement.png create mode 100644 interior/floors/dungeon_01/detail_displacement.png.import create mode 100644 interior/floors/dungeon_01/detail_material.res create mode 100644 interior/floors/dungeon_01/detail_normal.png rename interior/{tiles/limestone_dungeon/hole_normal.png.import => floors/dungeon_01/detail_normal.png.import} (60%) create mode 100644 interior/floors/dungeon_01/detail_roughness.png rename interior/{tiles/limestone_dungeon/piping_orm.png.import => floors/dungeon_01/detail_roughness.png.import} (66%) create mode 100644 interior/floors/dungeon_01/floor_albedo.png rename interior/{tiles/limestone_dungeon/tiling_orm.png.import => floors/dungeon_01/floor_albedo.png.import} (66%) rename interior/{tiles/limestone_dungeon/tiling_height.png => floors/dungeon_01/floor_displacement.png} (100%) mode change 100755 => 100644 rename interior/{tiles/limestone_dungeon/piping_albedo.png.import => floors/dungeon_01/floor_displacement.png.import} (65%) create mode 100644 interior/floors/dungeon_01/floor_material.res create mode 100644 interior/floors/dungeon_01/floor_normal.png rename interior/{tiles/limestone_dungeon/piping_normal.png.import => floors/dungeon_01/floor_normal.png.import} (60%) create mode 100644 interior/floors/dungeon_01/floor_orm.png rename interior/{tiles/limestone_dungeon/hole_orm.png.import => floors/dungeon_01/floor_orm.png.import} (67%) create mode 100644 interior/floors/dungeon_01/pillar_albedo.png rename interior/{tiles/limestone_dungeon/hole_height.png.import => floors/dungeon_01/pillar_albedo.png.import} (66%) create mode 100644 interior/floors/dungeon_01/pillar_displacement.png rename interior/{tiles/limestone_dungeon/piping_height.png.import => floors/dungeon_01/pillar_displacement.png.import} (66%) create mode 100644 interior/floors/dungeon_01/pillar_material.res create mode 100644 interior/floors/dungeon_01/pillar_normal.png rename interior/{tiles/limestone_dungeon/tiling_normal.png.import => floors/dungeon_01/pillar_normal.png.import} (59%) create mode 100644 interior/floors/dungeon_01/pillar_roughness.png create mode 100644 interior/floors/dungeon_01/pillar_roughness.png.import create mode 100644 interior/floors/dungeon_01/tiles.glb create mode 100644 interior/floors/dungeon_01/tiles.glb.import create mode 100644 interior/floors/dungeon_01/tiles_corner_north_east.res create mode 100644 interior/floors/dungeon_01/tiles_corner_north_west.res create mode 100644 interior/floors/dungeon_01/tiles_corner_south_east.res create mode 100644 interior/floors/dungeon_01/tiles_corner_south_west.res create mode 100644 interior/floors/dungeon_01/tiles_edge_east.res create mode 100644 interior/floors/dungeon_01/tiles_edge_north.res create mode 100644 interior/floors/dungeon_01/tiles_edge_south.res create mode 100644 interior/floors/dungeon_01/tiles_edge_west.res create mode 100644 interior/floors/dungeon_01/tiles_endcap_east.res create mode 100644 interior/floors/dungeon_01/tiles_endcap_north.res create mode 100644 interior/floors/dungeon_01/tiles_endcap_south.res create mode 100644 interior/floors/dungeon_01/tiles_endcap_west.res create mode 100644 interior/floors/dungeon_01/tiles_fill.res create mode 100644 interior/floors/dungeon_01/tiles_island.res create mode 100644 interior/floors/dungeon_01/tiles_path_horizontal.res create mode 100644 interior/floors/dungeon_01/tiles_path_vertical.res create mode 100644 interior/floors/dungeon_01_interior_floor.res rename interior/{tiles/limestone_dungeon/tiling_height.png.import => floors/dungeon_01_tiles_height.png.import} (70%) create mode 100644 interior/floors/interior_floor.gd delete mode 100644 interior/interior_tile.gd delete mode 100644 interior/tiles/dungeon_01_pipehole_tile.res delete mode 100644 interior/tiles/dungeon_01_tiling_tile.res delete mode 100755 interior/tiles/limestone_dungeon/hole_albedo.png delete mode 100755 interior/tiles/limestone_dungeon/hole_height.png delete mode 100644 interior/tiles/limestone_dungeon/hole_material.res delete mode 100755 interior/tiles/limestone_dungeon/hole_normal.png delete mode 100644 interior/tiles/limestone_dungeon/hole_orm.png delete mode 100755 interior/tiles/limestone_dungeon/piping_albedo.png delete mode 100755 interior/tiles/limestone_dungeon/piping_height.png delete mode 100644 interior/tiles/limestone_dungeon/piping_material.res delete mode 100755 interior/tiles/limestone_dungeon/piping_normal.png delete mode 100644 interior/tiles/limestone_dungeon/piping_orm.png delete mode 100755 interior/tiles/limestone_dungeon/tiling_albedo.png delete mode 100644 interior/tiles/limestone_dungeon/tiling_albedo.png.import delete mode 100644 interior/tiles/limestone_dungeon/tiling_material.res delete mode 100755 interior/tiles/limestone_dungeon/tiling_normal.png delete mode 100644 interior/tiles/limestone_dungeon/tiling_orm.png rename map_editor/{tile_selector_button_group.res => floor_selector_button_group.res} (100%) delete mode 100644 map_editor/selection_area_mesh.res diff --git a/.gitattributes b/.gitattributes index 5cb4381..5c48371 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5,3 +5,5 @@ *.ttf filter=lfs diff=lfs merge=lfs -text *.scn filter=lfs diff=lfs merge=lfs -text *.res filter=lfs diff=lfs merge=lfs -text +*.glb filter=lfs diff=lfs merge=lfs -text + diff --git a/interior/floors/dungeon_01/detail_albedo.png b/interior/floors/dungeon_01/detail_albedo.png new file mode 100644 index 0000000..510391f --- /dev/null +++ b/interior/floors/dungeon_01/detail_albedo.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4e7e142ac52053b6baf64bd2f889d466cac894083f82b31d47d2b257f1737992 +size 1563514 diff --git a/interior/tiles/limestone_dungeon/hole_albedo.png.import b/interior/floors/dungeon_01/detail_albedo.png.import similarity index 66% rename from interior/tiles/limestone_dungeon/hole_albedo.png.import rename to interior/floors/dungeon_01/detail_albedo.png.import index b191c67..9487b17 100644 --- a/interior/tiles/limestone_dungeon/hole_albedo.png.import +++ b/interior/floors/dungeon_01/detail_albedo.png.import @@ -2,8 +2,8 @@ importer="texture" type="CompressedTexture2D" -uid="uid://3m7gvnsmb4g" -path.s3tc="res://.godot/imported/hole_albedo.png-ef88dfc602c85c58e849d6654804eb67.s3tc.ctex" +uid="uid://chujdd7dvyclj" +path.s3tc="res://.godot/imported/detail_albedo.png-9f445a992dc42ff5e245033c09348a9d.s3tc.ctex" metadata={ "imported_formats": ["s3tc_bptc"], "vram_texture": true @@ -11,8 +11,8 @@ metadata={ [deps] -source_file="res://interior/tiles/limestone_dungeon/hole_albedo.png" -dest_files=["res://.godot/imported/hole_albedo.png-ef88dfc602c85c58e849d6654804eb67.s3tc.ctex"] +source_file="res://interior/floors/dungeon_01/detail_albedo.png" +dest_files=["res://.godot/imported/detail_albedo.png-9f445a992dc42ff5e245033c09348a9d.s3tc.ctex"] [params] diff --git a/interior/floors/dungeon_01/detail_displacement.png b/interior/floors/dungeon_01/detail_displacement.png new file mode 100644 index 0000000..247b98a --- /dev/null +++ b/interior/floors/dungeon_01/detail_displacement.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2c0c0cab56798fdabff29242140c177e1f40b054f7ac92de64408e135f2af093 +size 29096 diff --git a/interior/floors/dungeon_01/detail_displacement.png.import b/interior/floors/dungeon_01/detail_displacement.png.import new file mode 100644 index 0000000..5f00412 --- /dev/null +++ b/interior/floors/dungeon_01/detail_displacement.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b6qji7ybqaga2" +path.s3tc="res://.godot/imported/detail_displacement.png-47cde77fb53fc7ae6babfbbfef6cdb4f.s3tc.ctex" +metadata={ +"imported_formats": ["s3tc_bptc"], +"vram_texture": true +} + +[deps] + +source_file="res://interior/floors/dungeon_01/detail_displacement.png" +dest_files=["res://.godot/imported/detail_displacement.png-47cde77fb53fc7ae6babfbbfef6cdb4f.s3tc.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=true +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/interior/floors/dungeon_01/detail_material.res b/interior/floors/dungeon_01/detail_material.res new file mode 100644 index 0000000..6719e9f --- /dev/null +++ b/interior/floors/dungeon_01/detail_material.res @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:53af696e49ae07596cc1138b071bbc2d4396b43d6619cda00a253dca851a750a +size 1096 diff --git a/interior/floors/dungeon_01/detail_normal.png b/interior/floors/dungeon_01/detail_normal.png new file mode 100644 index 0000000..b1f45bf --- /dev/null +++ b/interior/floors/dungeon_01/detail_normal.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:89311e0bcec7c209f18c8c85ca2cf36428454319dc49b3d561edb6b1d4e88cb4 +size 86157 diff --git a/interior/tiles/limestone_dungeon/hole_normal.png.import b/interior/floors/dungeon_01/detail_normal.png.import similarity index 60% rename from interior/tiles/limestone_dungeon/hole_normal.png.import rename to interior/floors/dungeon_01/detail_normal.png.import index d1b04e0..374fc63 100644 --- a/interior/tiles/limestone_dungeon/hole_normal.png.import +++ b/interior/floors/dungeon_01/detail_normal.png.import @@ -2,8 +2,8 @@ importer="texture" type="CompressedTexture2D" -uid="uid://c4eby3i7q2wts" -path.s3tc="res://.godot/imported/hole_normal.png-9c2f1eac05804bab609d1c67adcf7dba.s3tc.ctex" +uid="uid://waqtv8flqslo" +path.s3tc="res://.godot/imported/detail_normal.png-7595efd28a96c6bf905bfa3c115551eb.s3tc.ctex" metadata={ "imported_formats": ["s3tc_bptc"], "vram_texture": true @@ -11,8 +11,8 @@ metadata={ [deps] -source_file="res://interior/tiles/limestone_dungeon/hole_normal.png" -dest_files=["res://.godot/imported/hole_normal.png-9c2f1eac05804bab609d1c67adcf7dba.s3tc.ctex"] +source_file="res://interior/floors/dungeon_01/detail_normal.png" +dest_files=["res://.godot/imported/detail_normal.png-7595efd28a96c6bf905bfa3c115551eb.s3tc.ctex"] [params] @@ -25,7 +25,7 @@ compress/channel_pack=0 mipmaps/generate=true mipmaps/limit=-1 roughness/mode=1 -roughness/src_normal="res://tiles/tiles/limestone_dungeon/hole_normal.png" +roughness/src_normal="res://interior/base/dungeon_01/detail_normal.png" process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/interior/floors/dungeon_01/detail_roughness.png b/interior/floors/dungeon_01/detail_roughness.png new file mode 100644 index 0000000..4ed2071 --- /dev/null +++ b/interior/floors/dungeon_01/detail_roughness.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0324630e7983df93d6d33473ff60c9788342a39279e7aca74d12390a2c77a4b6 +size 301066 diff --git a/interior/tiles/limestone_dungeon/piping_orm.png.import b/interior/floors/dungeon_01/detail_roughness.png.import similarity index 66% rename from interior/tiles/limestone_dungeon/piping_orm.png.import rename to interior/floors/dungeon_01/detail_roughness.png.import index 197f747..aae1a7e 100644 --- a/interior/tiles/limestone_dungeon/piping_orm.png.import +++ b/interior/floors/dungeon_01/detail_roughness.png.import @@ -2,8 +2,8 @@ importer="texture" type="CompressedTexture2D" -uid="uid://bkpucv0ydae5v" -path.s3tc="res://.godot/imported/piping_orm.png-7131df07403ecb346d6a4793ca7929cb.s3tc.ctex" +uid="uid://drq7jupbmwjil" +path.s3tc="res://.godot/imported/detail_roughness.png-a65497af25f070db34e2dc4c6cdc9e62.s3tc.ctex" metadata={ "imported_formats": ["s3tc_bptc"], "vram_texture": true @@ -11,8 +11,8 @@ metadata={ [deps] -source_file="res://interior/tiles/limestone_dungeon/piping_orm.png" -dest_files=["res://.godot/imported/piping_orm.png-7131df07403ecb346d6a4793ca7929cb.s3tc.ctex"] +source_file="res://interior/floors/dungeon_01/detail_roughness.png" +dest_files=["res://.godot/imported/detail_roughness.png-a65497af25f070db34e2dc4c6cdc9e62.s3tc.ctex"] [params] diff --git a/interior/floors/dungeon_01/floor_albedo.png b/interior/floors/dungeon_01/floor_albedo.png new file mode 100644 index 0000000..1f51c49 --- /dev/null +++ b/interior/floors/dungeon_01/floor_albedo.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:425af085a90c78440442544d83fb120291cde0b0866949507ca4a8fef6faf457 +size 296747 diff --git a/interior/tiles/limestone_dungeon/tiling_orm.png.import b/interior/floors/dungeon_01/floor_albedo.png.import similarity index 66% rename from interior/tiles/limestone_dungeon/tiling_orm.png.import rename to interior/floors/dungeon_01/floor_albedo.png.import index 996188a..f38c043 100644 --- a/interior/tiles/limestone_dungeon/tiling_orm.png.import +++ b/interior/floors/dungeon_01/floor_albedo.png.import @@ -2,8 +2,8 @@ importer="texture" type="CompressedTexture2D" -uid="uid://leoab2fjmxgk" -path.s3tc="res://.godot/imported/tiling_orm.png-48bc1a5d8b2eae43d49ed818fa664d0d.s3tc.ctex" +uid="uid://c18mqalexrvc7" +path.s3tc="res://.godot/imported/floor_albedo.png-599373c4c817157e929da39c9a51e0ca.s3tc.ctex" metadata={ "imported_formats": ["s3tc_bptc"], "vram_texture": true @@ -11,8 +11,8 @@ metadata={ [deps] -source_file="res://interior/tiles/limestone_dungeon/tiling_orm.png" -dest_files=["res://.godot/imported/tiling_orm.png-48bc1a5d8b2eae43d49ed818fa664d0d.s3tc.ctex"] +source_file="res://interior/floors/dungeon_01/floor_albedo.png" +dest_files=["res://.godot/imported/floor_albedo.png-599373c4c817157e929da39c9a51e0ca.s3tc.ctex"] [params] diff --git a/interior/tiles/limestone_dungeon/tiling_height.png b/interior/floors/dungeon_01/floor_displacement.png old mode 100755 new mode 100644 similarity index 100% rename from interior/tiles/limestone_dungeon/tiling_height.png rename to interior/floors/dungeon_01/floor_displacement.png diff --git a/interior/tiles/limestone_dungeon/piping_albedo.png.import b/interior/floors/dungeon_01/floor_displacement.png.import similarity index 65% rename from interior/tiles/limestone_dungeon/piping_albedo.png.import rename to interior/floors/dungeon_01/floor_displacement.png.import index 1298692..4bc9955 100644 --- a/interior/tiles/limestone_dungeon/piping_albedo.png.import +++ b/interior/floors/dungeon_01/floor_displacement.png.import @@ -2,8 +2,8 @@ importer="texture" type="CompressedTexture2D" -uid="uid://yu0p5ryoh7gr" -path.s3tc="res://.godot/imported/piping_albedo.png-e55409f9baf27938796d954b957086ac.s3tc.ctex" +uid="uid://dfqtk4fo4t06c" +path.s3tc="res://.godot/imported/floor_displacement.png-f55e2b97692cdec8c2f27530099f39e7.s3tc.ctex" metadata={ "imported_formats": ["s3tc_bptc"], "vram_texture": true @@ -11,8 +11,8 @@ metadata={ [deps] -source_file="res://interior/tiles/limestone_dungeon/piping_albedo.png" -dest_files=["res://.godot/imported/piping_albedo.png-e55409f9baf27938796d954b957086ac.s3tc.ctex"] +source_file="res://interior/floors/dungeon_01/floor_displacement.png" +dest_files=["res://.godot/imported/floor_displacement.png-f55e2b97692cdec8c2f27530099f39e7.s3tc.ctex"] [params] diff --git a/interior/floors/dungeon_01/floor_material.res b/interior/floors/dungeon_01/floor_material.res new file mode 100644 index 0000000..b759119 --- /dev/null +++ b/interior/floors/dungeon_01/floor_material.res @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e2031f79ea13336634323bb567399d810ec7b5bad49e83b6fb7e7351922b6390 +size 1100 diff --git a/interior/floors/dungeon_01/floor_normal.png b/interior/floors/dungeon_01/floor_normal.png new file mode 100644 index 0000000..d91553f --- /dev/null +++ b/interior/floors/dungeon_01/floor_normal.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a2351fe63cc96ce78eccff698f0691ef8a681bb673048ae3448d5b6f15ba0b7b +size 1264044 diff --git a/interior/tiles/limestone_dungeon/piping_normal.png.import b/interior/floors/dungeon_01/floor_normal.png.import similarity index 60% rename from interior/tiles/limestone_dungeon/piping_normal.png.import rename to interior/floors/dungeon_01/floor_normal.png.import index 4760b40..f07b17e 100644 --- a/interior/tiles/limestone_dungeon/piping_normal.png.import +++ b/interior/floors/dungeon_01/floor_normal.png.import @@ -2,8 +2,8 @@ importer="texture" type="CompressedTexture2D" -uid="uid://bypqkn1tm036p" -path.s3tc="res://.godot/imported/piping_normal.png-4b6b5fc6d6cbc5e05f054f9e19463644.s3tc.ctex" +uid="uid://tjepq8p30cxx" +path.s3tc="res://.godot/imported/floor_normal.png-7eb4d134761af85dcd1aaa7f0004dc65.s3tc.ctex" metadata={ "imported_formats": ["s3tc_bptc"], "vram_texture": true @@ -11,8 +11,8 @@ metadata={ [deps] -source_file="res://interior/tiles/limestone_dungeon/piping_normal.png" -dest_files=["res://.godot/imported/piping_normal.png-4b6b5fc6d6cbc5e05f054f9e19463644.s3tc.ctex"] +source_file="res://interior/floors/dungeon_01/floor_normal.png" +dest_files=["res://.godot/imported/floor_normal.png-7eb4d134761af85dcd1aaa7f0004dc65.s3tc.ctex"] [params] @@ -25,7 +25,7 @@ compress/channel_pack=0 mipmaps/generate=true mipmaps/limit=-1 roughness/mode=1 -roughness/src_normal="res://tiles/tiles/limestone_dungeon/piping_normal.png" +roughness/src_normal="res://interior/base/dungeon_01/floor_normal.png" process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/interior/floors/dungeon_01/floor_orm.png b/interior/floors/dungeon_01/floor_orm.png new file mode 100644 index 0000000..0a20d5e --- /dev/null +++ b/interior/floors/dungeon_01/floor_orm.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:42475cda7cc631a6fb54e14ff99df90c2e308d147a5932cbe7842eb868d6b947 +size 350255 diff --git a/interior/tiles/limestone_dungeon/hole_orm.png.import b/interior/floors/dungeon_01/floor_orm.png.import similarity index 67% rename from interior/tiles/limestone_dungeon/hole_orm.png.import rename to interior/floors/dungeon_01/floor_orm.png.import index 69f6f6b..fa210b5 100644 --- a/interior/tiles/limestone_dungeon/hole_orm.png.import +++ b/interior/floors/dungeon_01/floor_orm.png.import @@ -2,8 +2,8 @@ importer="texture" type="CompressedTexture2D" -uid="uid://dvqqmbf6r1jfm" -path.s3tc="res://.godot/imported/hole_orm.png-00b1427da2cca528c854a97655dfff24.s3tc.ctex" +uid="uid://gry3ow88pjud" +path.s3tc="res://.godot/imported/floor_orm.png-ad734700b85932ea8fe8e780643641b4.s3tc.ctex" metadata={ "imported_formats": ["s3tc_bptc"], "vram_texture": true @@ -11,8 +11,8 @@ metadata={ [deps] -source_file="res://interior/tiles/limestone_dungeon/hole_orm.png" -dest_files=["res://.godot/imported/hole_orm.png-00b1427da2cca528c854a97655dfff24.s3tc.ctex"] +source_file="res://interior/floors/dungeon_01/floor_orm.png" +dest_files=["res://.godot/imported/floor_orm.png-ad734700b85932ea8fe8e780643641b4.s3tc.ctex"] [params] diff --git a/interior/floors/dungeon_01/pillar_albedo.png b/interior/floors/dungeon_01/pillar_albedo.png new file mode 100644 index 0000000..77e08b2 --- /dev/null +++ b/interior/floors/dungeon_01/pillar_albedo.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a79fcc827ff0df5a1af5aa60e16d72f4b5b0f6fc4cccc38e1da3263c3c348105 +size 1820061 diff --git a/interior/tiles/limestone_dungeon/hole_height.png.import b/interior/floors/dungeon_01/pillar_albedo.png.import similarity index 66% rename from interior/tiles/limestone_dungeon/hole_height.png.import rename to interior/floors/dungeon_01/pillar_albedo.png.import index e1c7e65..70f67ed 100644 --- a/interior/tiles/limestone_dungeon/hole_height.png.import +++ b/interior/floors/dungeon_01/pillar_albedo.png.import @@ -2,8 +2,8 @@ importer="texture" type="CompressedTexture2D" -uid="uid://c8p7qvcrfsio7" -path.s3tc="res://.godot/imported/hole_height.png-875fd265b9470b3f52656ba603fc8eae.s3tc.ctex" +uid="uid://bvmabp7btg0wo" +path.s3tc="res://.godot/imported/pillar_albedo.png-5307fa2f26f1bff72deafa48c97429c8.s3tc.ctex" metadata={ "imported_formats": ["s3tc_bptc"], "vram_texture": true @@ -11,8 +11,8 @@ metadata={ [deps] -source_file="res://interior/tiles/limestone_dungeon/hole_height.png" -dest_files=["res://.godot/imported/hole_height.png-875fd265b9470b3f52656ba603fc8eae.s3tc.ctex"] +source_file="res://interior/floors/dungeon_01/pillar_albedo.png" +dest_files=["res://.godot/imported/pillar_albedo.png-5307fa2f26f1bff72deafa48c97429c8.s3tc.ctex"] [params] diff --git a/interior/floors/dungeon_01/pillar_displacement.png b/interior/floors/dungeon_01/pillar_displacement.png new file mode 100644 index 0000000..e993ea2 --- /dev/null +++ b/interior/floors/dungeon_01/pillar_displacement.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b9e20b98699c33b51826767449d2cc34a4aaa568fbadd584a2e417c19b588c28 +size 413319 diff --git a/interior/tiles/limestone_dungeon/piping_height.png.import b/interior/floors/dungeon_01/pillar_displacement.png.import similarity index 66% rename from interior/tiles/limestone_dungeon/piping_height.png.import rename to interior/floors/dungeon_01/pillar_displacement.png.import index 2addbdc..b79c2e2 100644 --- a/interior/tiles/limestone_dungeon/piping_height.png.import +++ b/interior/floors/dungeon_01/pillar_displacement.png.import @@ -2,8 +2,8 @@ importer="texture" type="CompressedTexture2D" -uid="uid://byw6qkgod61ip" -path.s3tc="res://.godot/imported/piping_height.png-d458ffb714345b35977ee0de9b01359f.s3tc.ctex" +uid="uid://y3fjjegrdm5t" +path.s3tc="res://.godot/imported/pillar_displacement.png-86e9892e28aca9f87c864a28e6dfa2b7.s3tc.ctex" metadata={ "imported_formats": ["s3tc_bptc"], "vram_texture": true @@ -11,8 +11,8 @@ metadata={ [deps] -source_file="res://interior/tiles/limestone_dungeon/piping_height.png" -dest_files=["res://.godot/imported/piping_height.png-d458ffb714345b35977ee0de9b01359f.s3tc.ctex"] +source_file="res://interior/floors/dungeon_01/pillar_displacement.png" +dest_files=["res://.godot/imported/pillar_displacement.png-86e9892e28aca9f87c864a28e6dfa2b7.s3tc.ctex"] [params] diff --git a/interior/floors/dungeon_01/pillar_material.res b/interior/floors/dungeon_01/pillar_material.res new file mode 100644 index 0000000..d7b7f84 --- /dev/null +++ b/interior/floors/dungeon_01/pillar_material.res @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e882f42167f5e8e3a985ba21f2363b0a6b6664e38ec95e23f2f33096df3f3f93 +size 1072 diff --git a/interior/floors/dungeon_01/pillar_normal.png b/interior/floors/dungeon_01/pillar_normal.png new file mode 100644 index 0000000..bbfb783 --- /dev/null +++ b/interior/floors/dungeon_01/pillar_normal.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f26936d0609b79d2348a61a22cdc97e9163ab52d20beff1a97665343dc37f6cc +size 1179325 diff --git a/interior/tiles/limestone_dungeon/tiling_normal.png.import b/interior/floors/dungeon_01/pillar_normal.png.import similarity index 59% rename from interior/tiles/limestone_dungeon/tiling_normal.png.import rename to interior/floors/dungeon_01/pillar_normal.png.import index 50f635c..e01182a 100644 --- a/interior/tiles/limestone_dungeon/tiling_normal.png.import +++ b/interior/floors/dungeon_01/pillar_normal.png.import @@ -2,8 +2,8 @@ importer="texture" type="CompressedTexture2D" -uid="uid://cv8yiluvc6mol" -path.s3tc="res://.godot/imported/tiling_normal.png-877f08b7359b5aba3ea7d5681fd4e5a9.s3tc.ctex" +uid="uid://dgteu01p0yvb1" +path.s3tc="res://.godot/imported/pillar_normal.png-3acce01d6d5a45e72d80bc85d1cccfeb.s3tc.ctex" metadata={ "imported_formats": ["s3tc_bptc"], "vram_texture": true @@ -11,8 +11,8 @@ metadata={ [deps] -source_file="res://interior/tiles/limestone_dungeon/tiling_normal.png" -dest_files=["res://.godot/imported/tiling_normal.png-877f08b7359b5aba3ea7d5681fd4e5a9.s3tc.ctex"] +source_file="res://interior/floors/dungeon_01/pillar_normal.png" +dest_files=["res://.godot/imported/pillar_normal.png-3acce01d6d5a45e72d80bc85d1cccfeb.s3tc.ctex"] [params] @@ -25,7 +25,7 @@ compress/channel_pack=0 mipmaps/generate=true mipmaps/limit=-1 roughness/mode=1 -roughness/src_normal="res://tiles/tiles/limestone_dungeon/tiling_normal.png" +roughness/src_normal="res://interior/base/dungeon_01/pillar_normal.png" process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/interior/floors/dungeon_01/pillar_roughness.png b/interior/floors/dungeon_01/pillar_roughness.png new file mode 100644 index 0000000..0ee89c0 --- /dev/null +++ b/interior/floors/dungeon_01/pillar_roughness.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9218f0b7454eae997dab0b53814f0b2914876a7022ef4b13bfd8c84101c34344 +size 543920 diff --git a/interior/floors/dungeon_01/pillar_roughness.png.import b/interior/floors/dungeon_01/pillar_roughness.png.import new file mode 100644 index 0000000..8960d8a --- /dev/null +++ b/interior/floors/dungeon_01/pillar_roughness.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bm2n01vq8gfr6" +path="res://.godot/imported/pillar_roughness.png-0687f96b048e5362061de3455df15e28.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://interior/floors/dungeon_01/pillar_roughness.png" +dest_files=["res://.godot/imported/pillar_roughness.png-0687f96b048e5362061de3455df15e28.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/interior/floors/dungeon_01/tiles.glb b/interior/floors/dungeon_01/tiles.glb new file mode 100644 index 0000000..93370aa --- /dev/null +++ b/interior/floors/dungeon_01/tiles.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f9243fb371c2bd6ba8c62ceed908c32d2e1c5e8650e6dc8335ecf679fdf8507a +size 8049212 diff --git a/interior/floors/dungeon_01/tiles.glb.import b/interior/floors/dungeon_01/tiles.glb.import new file mode 100644 index 0000000..5b3f005 --- /dev/null +++ b/interior/floors/dungeon_01/tiles.glb.import @@ -0,0 +1,209 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://4bd55k678gi7" +path="res://.godot/imported/tiles.glb-14a9c594afd12965ca2410ae30c0dee5.scn" + +[deps] + +source_file="res://interior/floors/dungeon_01/tiles.glb" +dest_files=["res://.godot/imported/tiles.glb-14a9c594afd12965ca2410ae30c0dee5.scn"] + +[params] + +nodes/root_type="Node3D" +nodes/root_name="Scene Root" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +skins/use_named_skins=true +animation/import=false +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +import_script/path="" +_subresources={ +"materials": { +"Detail": { +"use_external/enabled": true, +"use_external/path": "res://interior/base/dungeon_01/detail_material.res" +}, +"Floor": { +"use_external/enabled": true, +"use_external/path": "res://interior/base/dungeon_01/floor_material.res" +}, +"Pillar": { +"use_external/enabled": true, +"use_external/path": "res://interior/base/dungeon_01/pillar_material.res" +} +}, +"meshes": { +"tiles_corner_north_east": { +"generate/lightmap_uv": 0, +"generate/lods": 0, +"generate/shadow_meshes": 0, +"lods/normal_merge_angle": 60.0, +"lods/normal_split_angle": 25.0, +"save_to_file/enabled": true, +"save_to_file/make_streamable": "", +"save_to_file/path": "res://interior/base/dungeon_01/tiles_corner_north_east.res" +}, +"tiles_corner_north_west": { +"generate/lightmap_uv": 0, +"generate/lods": 0, +"generate/shadow_meshes": 0, +"lods/normal_merge_angle": 60.0, +"lods/normal_split_angle": 25.0, +"save_to_file/enabled": true, +"save_to_file/make_streamable": "", +"save_to_file/path": "res://interior/base/dungeon_01/tiles_corner_north_west.res" +}, +"tiles_corner_south_east": { +"generate/lightmap_uv": 0, +"generate/lods": 0, +"generate/shadow_meshes": 0, +"lods/normal_merge_angle": 60.0, +"lods/normal_split_angle": 25.0, +"save_to_file/enabled": true, +"save_to_file/make_streamable": "", +"save_to_file/path": "res://interior/base/dungeon_01/tiles_corner_south_east.res" +}, +"tiles_corner_south_west": { +"generate/lightmap_uv": 0, +"generate/lods": 0, +"generate/shadow_meshes": 0, +"lods/normal_merge_angle": 60.0, +"lods/normal_split_angle": 25.0, +"save_to_file/enabled": true, +"save_to_file/make_streamable": "", +"save_to_file/path": "res://interior/base/dungeon_01/tiles_corner_south_west.res" +}, +"tiles_edge_east": { +"generate/lightmap_uv": 0, +"generate/lods": 0, +"generate/shadow_meshes": 0, +"lods/normal_merge_angle": 60.0, +"lods/normal_split_angle": 25.0, +"save_to_file/enabled": true, +"save_to_file/make_streamable": "", +"save_to_file/path": "res://interior/base/dungeon_01/tiles_edge_east.res" +}, +"tiles_edge_north": { +"generate/lightmap_uv": 0, +"generate/lods": 0, +"generate/shadow_meshes": 0, +"lods/normal_merge_angle": 60.0, +"lods/normal_split_angle": 25.0, +"save_to_file/enabled": true, +"save_to_file/make_streamable": "", +"save_to_file/path": "res://interior/base/dungeon_01/tiles_edge_north.res" +}, +"tiles_edge_south": { +"generate/lightmap_uv": 0, +"generate/lods": 0, +"generate/shadow_meshes": 0, +"lods/normal_merge_angle": 60.0, +"lods/normal_split_angle": 25.0, +"save_to_file/enabled": true, +"save_to_file/make_streamable": "", +"save_to_file/path": "res://interior/base/dungeon_01/tiles_edge_south.res" +}, +"tiles_edge_west": { +"generate/lightmap_uv": 0, +"generate/lods": 0, +"generate/shadow_meshes": 0, +"lods/normal_merge_angle": 60.0, +"lods/normal_split_angle": 25.0, +"save_to_file/enabled": true, +"save_to_file/make_streamable": "", +"save_to_file/path": "res://interior/base/dungeon_01/tiles_edge_west.res" +}, +"tiles_endcap_east": { +"generate/lightmap_uv": 0, +"generate/lods": 0, +"generate/shadow_meshes": 0, +"lods/normal_merge_angle": 60.0, +"lods/normal_split_angle": 25.0, +"save_to_file/enabled": true, +"save_to_file/make_streamable": "", +"save_to_file/path": "res://interior/base/dungeon_01/tiles_endcap_east.res" +}, +"tiles_endcap_north": { +"generate/lightmap_uv": 0, +"generate/lods": 0, +"generate/shadow_meshes": 0, +"lods/normal_merge_angle": 60.0, +"lods/normal_split_angle": 25.0, +"save_to_file/enabled": true, +"save_to_file/make_streamable": "", +"save_to_file/path": "res://interior/base/dungeon_01/tiles_endcap_north.res" +}, +"tiles_endcap_south": { +"generate/lightmap_uv": 0, +"generate/lods": 0, +"generate/shadow_meshes": 0, +"lods/normal_merge_angle": 60.0, +"lods/normal_split_angle": 25.0, +"save_to_file/enabled": true, +"save_to_file/make_streamable": "", +"save_to_file/path": "res://interior/base/dungeon_01/tiles_endcap_south.res" +}, +"tiles_endcap_west": { +"generate/lightmap_uv": 0, +"generate/lods": 0, +"generate/shadow_meshes": 0, +"lods/normal_merge_angle": 60.0, +"lods/normal_split_angle": 25.0, +"save_to_file/enabled": true, +"save_to_file/make_streamable": "", +"save_to_file/path": "res://interior/base/dungeon_01/tiles_endcap_west.res" +}, +"tiles_fill": { +"generate/lightmap_uv": 0, +"generate/lods": 0, +"generate/shadow_meshes": 0, +"lods/normal_merge_angle": 60.0, +"lods/normal_split_angle": 25.0, +"save_to_file/enabled": true, +"save_to_file/make_streamable": "", +"save_to_file/path": "res://interior/base/dungeon_01/tiles_fill.res" +}, +"tiles_island": { +"generate/lightmap_uv": 0, +"generate/lods": 0, +"generate/shadow_meshes": 0, +"lods/normal_merge_angle": 60.0, +"lods/normal_split_angle": 25.0, +"save_to_file/enabled": true, +"save_to_file/make_streamable": "", +"save_to_file/path": "res://interior/base/dungeon_01/tiles_island.res" +}, +"tiles_path_horizontal": { +"generate/lightmap_uv": 0, +"generate/lods": 0, +"generate/shadow_meshes": 0, +"lods/normal_merge_angle": 60.0, +"lods/normal_split_angle": 25.0, +"save_to_file/enabled": true, +"save_to_file/make_streamable": "", +"save_to_file/path": "res://interior/base/dungeon_01/tiles_path_horizontal.res" +}, +"tiles_path_vertical": { +"generate/lightmap_uv": 0, +"generate/lods": 0, +"generate/shadow_meshes": 0, +"lods/normal_merge_angle": 60.0, +"lods/normal_split_angle": 25.0, +"save_to_file/enabled": true, +"save_to_file/make_streamable": "", +"save_to_file/path": "res://interior/base/dungeon_01/tiles_path_vertical.res" +} +} +} +gltf/embedded_image_handling=0 diff --git a/interior/floors/dungeon_01/tiles_corner_north_east.res b/interior/floors/dungeon_01/tiles_corner_north_east.res new file mode 100644 index 0000000..99381be --- /dev/null +++ b/interior/floors/dungeon_01/tiles_corner_north_east.res @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:229a2504707a0b4fbd4dcf9cb1f529c498aa6a1ca8d0984b25e7bab0f90a62a8 +size 26700 diff --git a/interior/floors/dungeon_01/tiles_corner_north_west.res b/interior/floors/dungeon_01/tiles_corner_north_west.res new file mode 100644 index 0000000..5b7a7b9 --- /dev/null +++ b/interior/floors/dungeon_01/tiles_corner_north_west.res @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:480688dc9dc1bdbdd7899baf0b793ebcfcf60e7f6224f1fb9dd3dc61369b2928 +size 26924 diff --git a/interior/floors/dungeon_01/tiles_corner_south_east.res b/interior/floors/dungeon_01/tiles_corner_south_east.res new file mode 100644 index 0000000..93ee185 --- /dev/null +++ b/interior/floors/dungeon_01/tiles_corner_south_east.res @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a3dc68d9edfb626b45fdf026ddd4bfa2b5b7a0f6c1fdc5d27e8e22ae092d810d +size 27336 diff --git a/interior/floors/dungeon_01/tiles_corner_south_west.res b/interior/floors/dungeon_01/tiles_corner_south_west.res new file mode 100644 index 0000000..26d4f77 --- /dev/null +++ b/interior/floors/dungeon_01/tiles_corner_south_west.res @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:91ae32a7d094d51b8194f97c4e7383fcb3cb3d447ba41d1b4d147cb69a75bd9b +size 25516 diff --git a/interior/floors/dungeon_01/tiles_edge_east.res b/interior/floors/dungeon_01/tiles_edge_east.res new file mode 100644 index 0000000..639551b --- /dev/null +++ b/interior/floors/dungeon_01/tiles_edge_east.res @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf3aff1b1fbe056171ce74b761bfa0beef49284682ff61fcfbf7d531400e86bb +size 15816 diff --git a/interior/floors/dungeon_01/tiles_edge_north.res b/interior/floors/dungeon_01/tiles_edge_north.res new file mode 100644 index 0000000..08eb358 --- /dev/null +++ b/interior/floors/dungeon_01/tiles_edge_north.res @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:06df16d52b38714bb34cb5bdfe2be27fd381ff56450a9a3f6f70669417e6ab41 +size 15766 diff --git a/interior/floors/dungeon_01/tiles_edge_south.res b/interior/floors/dungeon_01/tiles_edge_south.res new file mode 100644 index 0000000..ed93b89 --- /dev/null +++ b/interior/floors/dungeon_01/tiles_edge_south.res @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4b4b867a890d134a7fc5e7d4f1c2dffc29efed83c39fdb66ce1ea7754bc6fae9 +size 15990 diff --git a/interior/floors/dungeon_01/tiles_edge_west.res b/interior/floors/dungeon_01/tiles_edge_west.res new file mode 100644 index 0000000..33be13a --- /dev/null +++ b/interior/floors/dungeon_01/tiles_edge_west.res @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:934836023e3c7e9bfd3e2c1ec4d9a60ac8d60248c11fa64b81478739e66872bb +size 15816 diff --git a/interior/floors/dungeon_01/tiles_endcap_east.res b/interior/floors/dungeon_01/tiles_endcap_east.res new file mode 100644 index 0000000..8513c9a --- /dev/null +++ b/interior/floors/dungeon_01/tiles_endcap_east.res @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bc470f0fea6cc56bf2fe62ee6c81a1d4b1ef8d11fca527dd457e457a28e70dd0 +size 37880 diff --git a/interior/floors/dungeon_01/tiles_endcap_north.res b/interior/floors/dungeon_01/tiles_endcap_north.res new file mode 100644 index 0000000..227b443 --- /dev/null +++ b/interior/floors/dungeon_01/tiles_endcap_north.res @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:757253aca66c4c12fc6ec9dab8293a3d288a529468dec753de4597f7d2b9bd1b +size 37434 diff --git a/interior/floors/dungeon_01/tiles_endcap_south.res b/interior/floors/dungeon_01/tiles_endcap_south.res new file mode 100644 index 0000000..8c5bdde --- /dev/null +++ b/interior/floors/dungeon_01/tiles_endcap_south.res @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:34b2ab299bb8bdd036dcd8cf4494c418ef03fe38d840943a85b8c5c82b78dcfa +size 38378 diff --git a/interior/floors/dungeon_01/tiles_endcap_west.res b/interior/floors/dungeon_01/tiles_endcap_west.res new file mode 100644 index 0000000..fd7f41b --- /dev/null +++ b/interior/floors/dungeon_01/tiles_endcap_west.res @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:219f269e234edd6775432134db1202a79b476f1d58b0a1f041038dd87bfc7dd9 +size 37412 diff --git a/interior/floors/dungeon_01/tiles_fill.res b/interior/floors/dungeon_01/tiles_fill.res new file mode 100644 index 0000000..2c5b310 --- /dev/null +++ b/interior/floors/dungeon_01/tiles_fill.res @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f19f83bc7e64dc17150114662e64e868ff755c86dda0ea6aa4ad5305b0028046 +size 6602 diff --git a/interior/floors/dungeon_01/tiles_island.res b/interior/floors/dungeon_01/tiles_island.res new file mode 100644 index 0000000..91a702b --- /dev/null +++ b/interior/floors/dungeon_01/tiles_island.res @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dcd2c4898652adfe033b9f83f8a30c019bb6e9a00e122cb42dc9e521b793cd5c +size 46694 diff --git a/interior/floors/dungeon_01/tiles_path_horizontal.res b/interior/floors/dungeon_01/tiles_path_horizontal.res new file mode 100644 index 0000000..046b749 --- /dev/null +++ b/interior/floors/dungeon_01/tiles_path_horizontal.res @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6a709c0682702b5bd4f3c27b5e650d01a4cf30e02df2c4fc2589505cf8c3b72c +size 29532 diff --git a/interior/floors/dungeon_01/tiles_path_vertical.res b/interior/floors/dungeon_01/tiles_path_vertical.res new file mode 100644 index 0000000..fbca7e1 --- /dev/null +++ b/interior/floors/dungeon_01/tiles_path_vertical.res @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b99f231c2aade5ff3f0dd367ef2114be814ca0b42a6e8f6269c525cbbcccb4dc +size 29488 diff --git a/interior/floors/dungeon_01_interior_floor.res b/interior/floors/dungeon_01_interior_floor.res new file mode 100644 index 0000000..8c9c100 --- /dev/null +++ b/interior/floors/dungeon_01_interior_floor.res @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8d5a0f5ed6c6c95b7d5041d9c4e3e079501fb10a1563c3fb6d384a34eaf52da5 +size 720 diff --git a/interior/tiles/limestone_dungeon/tiling_height.png.import b/interior/floors/dungeon_01_tiles_height.png.import similarity index 70% rename from interior/tiles/limestone_dungeon/tiling_height.png.import rename to interior/floors/dungeon_01_tiles_height.png.import index 322b167..06a4169 100644 --- a/interior/tiles/limestone_dungeon/tiling_height.png.import +++ b/interior/floors/dungeon_01_tiles_height.png.import @@ -3,7 +3,7 @@ importer="texture" type="CompressedTexture2D" uid="uid://didp3nfacohwd" -path.s3tc="res://.godot/imported/tiling_height.png-2ead72b43d4a6de847e50bcbd8e8c7f7.s3tc.ctex" +path.s3tc="res://.godot/imported/dungeon_01_tiles_height.png-7733c18dddd7d5bf80deae891d3de52e.s3tc.ctex" metadata={ "imported_formats": ["s3tc_bptc"], "vram_texture": true @@ -11,8 +11,8 @@ metadata={ [deps] -source_file="res://interior/tiles/limestone_dungeon/tiling_height.png" -dest_files=["res://.godot/imported/tiling_height.png-2ead72b43d4a6de847e50bcbd8e8c7f7.s3tc.ctex"] +source_file="res://interior/base/dungeon_01_tiles_height.png" +dest_files=["res://.godot/imported/dungeon_01_tiles_height.png-7733c18dddd7d5bf80deae891d3de52e.s3tc.ctex"] [params] diff --git a/interior/floors/interior_floor.gd b/interior/floors/interior_floor.gd new file mode 100644 index 0000000..e642f47 --- /dev/null +++ b/interior/floors/interior_floor.gd @@ -0,0 +1,49 @@ +class_name InteriorFloor extends Resource + +@export +var corner_north_east_mesh: Mesh = null + +@export +var corner_north_west_mesh: Mesh = null + +@export +var corner_south_east_mesh: Mesh = null + +@export +var corner_south_west_mesh: Mesh = null + +@export +var edge_east_mesh: Mesh = null + +@export +var edge_north_mesh: Mesh = null + +@export +var edge_south_mesh: Mesh = null + +@export +var edge_west_mesh: Mesh = null + +@export +var endcap_east_mesh: Mesh = null + +@export +var endcap_north_mesh: Mesh = null + +@export +var endcap_south_mesh: Mesh = null + +@export +var endcap_west_mesh: Mesh = null + +@export +var fill_mesh: Mesh = null + +@export +var island_mesh: Mesh = null + +@export +var path_horizontal_mesh: Mesh = null + +@export +var path_vertical_mesh: Mesh = null diff --git a/interior/interior_map.gd b/interior/interior_map.gd index 09c9b3a..42d3bb3 100644 --- a/interior/interior_map.gd +++ b/interior/interior_map.gd @@ -2,173 +2,212 @@ class_name InteriorMap extends Node3D const _CHUNK_SIZE := 32 +const _HALF_PI := PI / 2 + const _GRID_ORIGIN := Vector2(0.5, 0.5) ## -## Cardinal orientation referencing the direction of a tile. ## +## +enum FloorTile { + ISLAND, + ENDCAP_WEST, + ENDCAP_NORTH, + CORNER_NORTH_WEST, + ENDCAP_EAST, + PATH_HORIZONTAL, + CORNER_NORTH_EAST, + EDGE_NORTH, + ENDCAP_SOUTH, + CORNER_SOUTH_WEST, + PATH_VERTICAL, + EDGE_WEST, + CORNER_SOUTH_EAST, + EDGE_SOUTH, + EDGE_EAST, + FILL, +} + enum Orientation { - NORTH, - EAST, - SOUTH, - WEST, + EAST = 2 ** 0, + SOUTH = 2 ** 1, + WEST = 2 ** 2, + NORTH = 2 ** 3, } ## ## Baked block of meshes making up a segment of the grid. ## class Chunk: - var _floor_meshes: Array[Mesh] = [] + var _coordinates := Vector2i.ZERO - var _floor_orientation := PackedInt32Array() + var _interior_map: InteriorMap = null - var _multi_mesh_instances: Array[MultiMeshInstance] = [] + var _meshes_by_floor_tile: Array[Mesh] = [] - var _wall_meshes: Array[Mesh] = [] + var _renderable_by_floor_tile: Array[Renderable] = [] - var _wall_orientation := PackedInt32Array() + func _init(interior_map: InteriorMap, coordinates: Vector2i) -> void: + _interior_map = interior_map + _coordinates = coordinates - func _init() -> void: - var buffer_size := _CHUNK_SIZE * _CHUNK_SIZE + var floor_tile_count := FloorTile.size() - _floor_meshes.resize(buffer_size) - _floor_orientation.resize(buffer_size) - _wall_meshes.resize(buffer_size) - _wall_orientation.resize(buffer_size) + _renderable_by_floor_tile.resize(floor_tile_count) + _meshes_by_floor_tile.resize(floor_tile_count) ## ## Invalidates the mesh block, re-baking its contents from the current mesh data set. ## - func invalidate(interior_map: InteriorMap, coordinate: Vector2i) -> void: - # TODO: Once this is all lowered into native code, look for ways to parallelize the loops. - for multi_mesh_instance in _multi_mesh_instances: - RenderingServer.free_rid(multi_mesh_instance._instance_rid) - RenderingServer.free_rid(multi_mesh_instance._multimesh_rid) + func invalidate() -> void: + _renderable_by_floor_tile.fill(null) - _multi_mesh_instances.clear() + var interior_floor := _interior_map.interior_floor - # Normalize mesh instance data for the chunk. - var transforms_by_mesh := {} - var grid_size := interior_map.size - var half_pi := PI / 2 + if interior_floor == null: + _meshes_by_floor_tile.fill(null) - for i in _floor_meshes.size(): - var mesh := _floor_meshes[i] + else: + _meshes_by_floor_tile[FloorTile.CORNER_NORTH_EAST] = interior_floor.corner_north_east_mesh + _meshes_by_floor_tile[FloorTile.CORNER_NORTH_WEST] = interior_floor.corner_north_west_mesh + _meshes_by_floor_tile[FloorTile.CORNER_SOUTH_EAST] = interior_floor.corner_south_east_mesh + _meshes_by_floor_tile[FloorTile.CORNER_SOUTH_WEST] = interior_floor.corner_south_west_mesh + _meshes_by_floor_tile[FloorTile.EDGE_EAST] = interior_floor.edge_east_mesh + _meshes_by_floor_tile[FloorTile.EDGE_NORTH] = interior_floor.edge_north_mesh + _meshes_by_floor_tile[FloorTile.EDGE_SOUTH] = interior_floor.edge_south_mesh + _meshes_by_floor_tile[FloorTile.EDGE_WEST] = interior_floor.edge_west_mesh + _meshes_by_floor_tile[FloorTile.ENDCAP_EAST] = interior_floor.endcap_east_mesh + _meshes_by_floor_tile[FloorTile.ENDCAP_NORTH] = interior_floor.endcap_north_mesh + _meshes_by_floor_tile[FloorTile.ENDCAP_SOUTH] = interior_floor.endcap_south_mesh + _meshes_by_floor_tile[FloorTile.ENDCAP_WEST] = interior_floor.endcap_west_mesh + _meshes_by_floor_tile[FloorTile.FILL] = interior_floor.fill_mesh + _meshes_by_floor_tile[FloorTile.ISLAND] = interior_floor.island_mesh + _meshes_by_floor_tile[FloorTile.PATH_HORIZONTAL] = interior_floor.path_horizontal_mesh + _meshes_by_floor_tile[FloorTile.PATH_VERTICAL] = interior_floor.path_vertical_mesh - if mesh != null: - if not(mesh in transforms_by_mesh): - transforms_by_mesh[mesh] = [] + var floor_map := _interior_map._floor_map + var map_size := _interior_map.size + var offset := _coordinates * _CHUNK_SIZE + var positions_by_floor_tile: Array[PackedVector2Array] = [] - transforms_by_mesh[mesh].append(Transform3D( - Basis.IDENTITY.rotated(Vector3.UP, half_pi * _floor_orientation[i]), Vector3( - (float(coordinate.x * _CHUNK_SIZE) + (i % _CHUNK_SIZE)) - - (float(grid_size.x) * _GRID_ORIGIN.x) + 0.5, 0.0, - (float(coordinate.y * _CHUNK_SIZE) + (i / _CHUNK_SIZE)) - - (float(grid_size.y) * _GRID_ORIGIN.y) + 0.5))) + positions_by_floor_tile.resize(FloorTile.size()) - for i in _wall_meshes.size(): - var mesh := _wall_meshes[i] + # Find floor tile types. + for y in _CHUNK_SIZE: + for x in _CHUNK_SIZE: + if floor_map.get_bitv(offset + Vector2i(x, y)): + var tile := 0 - if mesh != null: - if not(mesh in transforms_by_mesh): - transforms_by_mesh[mesh] = [] + for i in Orientation.values().size(): + var delta_x := roundi(cos(i * PI / 2.0)) + var delta_y := roundi(sin(i * PI / 2.0)) - transforms_by_mesh[mesh].append(Transform3D( - Basis.IDENTITY.rotated(Vector3.UP, half_pi * _wall_orientation[i]), Vector3( - (float(coordinate.x * _CHUNK_SIZE) + (i % _CHUNK_SIZE)) - - (float(grid_size.x) * _GRID_ORIGIN.x) + 0.5, 0.0, - (float(coordinate.y * _CHUNK_SIZE) + (i / _CHUNK_SIZE)) - - (float(grid_size.y) * _GRID_ORIGIN.y) + 0.5))) + if (0 <= (y + int(delta_y < map_size.y))) and (0 <= (x + int(delta_x < map_size.x))): + tile += int(floor_map.get_bit(x + delta_x, y + delta_y)) * 2 ** i - # (Re)-bake into multimesh instances for the chunk. - var scenario_rid := interior_map.get_world_3d().scenario - var global_transform := interior_map.global_transform + positions_by_floor_tile[tile].append(Vector2(x, y)) - for chunk_mesh in transforms_by_mesh: - var multi_mesh_instance := MultiMeshInstance.new( - scenario_rid, chunk_mesh.get_rid(), transforms_by_mesh[chunk_mesh]) + # (Re)-bake tiles into multimesh instances for the chunk. + var scenario_rid := _interior_map.get_world_3d().scenario - multi_mesh_instance.set_offset(global_transform) - _multi_mesh_instances.append(multi_mesh_instance) + for i in FloorTile.size(): + var floor_positions := positions_by_floor_tile[i] - ## - ## Sets the floor mesh in the chunk at the location relative [code]coordinatess[/code] to - ## [code]mesh[/code]. - ## - ## *Note* that [method Chunk.invalidate] must be called at some point after to visually update - ## the chunk. - ## - func set_floor_mesh(coordinates: Vector2i, orientation: Orientation, mesh: Mesh) -> void: - var index := (_CHUNK_SIZE * coordinates.y) + coordinates.x + if not(floor_positions.is_empty()): + var mesh := _meshes_by_floor_tile[i] - _floor_orientation[index] = orientation - _floor_meshes[index] = mesh + if mesh != null: + var floor_position_count := floor_positions.size() + var renderable := Renderable.new(scenario_rid, _meshes_by_floor_tile[i].get_rid(), floor_position_count) - ## - ## Sets the wall mesh in the chunk at the location relative [code]coordinatess[/code] to - ## [code]mesh[/code]. - ## - ## *Note* that [method Chunk.invalidate] must be called at some point after to visually update - ## the chunk. - ## - func set_wall_mesh(coordinates: Vector2i, orientation: Orientation, mesh: Mesh) -> void: - var index := (_CHUNK_SIZE * coordinates.y) + coordinates.x + for j in floor_position_count: + var tile_position := floor_positions[j] - _wall_orientation[index] = orientation - _wall_meshes[index] = mesh + renderable.set_instance_transform(j, Transform3D(Basis.IDENTITY, Vector3( + ((float(offset.x) + tile_position.x) - (float(map_size.x) * _GRID_ORIGIN.x)) + 0.5, + 0.0, + ((float(offset.y) + tile_position.y) - (float(map_size.y) * _GRID_ORIGIN.y)) + 0.5))) + + _renderable_by_floor_tile[i] = renderable + + func set_transform(transform: Transform3D) -> void: + for renderable in _renderable_by_floor_tile: + if renderable != null: + renderable.set_transform(transform) + + func set_visible(visible: bool) -> void: + for renderable in _renderable_by_floor_tile: + if renderable != null: + renderable.set_visible(visible) ## -## Specialized multi-mesh instance convenience for use within the tile grid and its chunks. ## -class MultiMeshInstance: +## +class Renderable: var _instance_rid := RID() var _multimesh_rid := RID() - func _init(scenario_rid: RID, mesh_rid: RID, transforms: Array) -> void: + func _init(scenario_rid: RID, mesh_rid: RID, transform_count: int) -> void: _multimesh_rid = RenderingServer.multimesh_create() _instance_rid = RenderingServer.instance_create2(_multimesh_rid, scenario_rid) RenderingServer.multimesh_set_mesh(_multimesh_rid, mesh_rid) - var transform_count := transforms.size() - RenderingServer.multimesh_allocate_data(_multimesh_rid, transform_count, RenderingServer.MULTIMESH_TRANSFORM_3D, true) - for i in transform_count: - RenderingServer.multimesh_instance_set_transform(_multimesh_rid, i, transforms[i]) + func _notification(what: int) -> void: + match what: + NOTIFICATION_PREDELETE: + RenderingServer.free_rid(_instance_rid) + RenderingServer.free_rid(_multimesh_rid) ## - ## Sets the transform of the instance to [code]offset[/code]. ## - func set_offset(offset: Transform3D) -> void: - RenderingServer.instance_set_transform(_instance_rid, offset) + ## + func set_instance_transform(instance_index: int, transform: Transform3D) -> void: + RenderingServer.multimesh_instance_set_transform(_multimesh_rid, instance_index, transform) ## - ## Sets the visibility of the instance to [code]is_visible[/code]. ## - func set_visible(is_visible: bool) -> void: - RenderingServer.instance_set_visible(_instance_rid, is_visible) + ## + func set_visible(visible: bool) -> void: + RenderingServer.instance_set_visible(_instance_rid, visible) + + ## + ## + ## + func set_transform(transform: Transform3D) -> void: + RenderingServer.instance_set_transform(_instance_rid, transform) var _chunks: Array[Chunk] = [] var _chunks_size := Vector2i.ZERO +var _floor_map := BitMap.new() + +## +## +## +@export +var interior_floor: InteriorFloor = null + ## ## Size of the tile grid (in engine units). ## @export var size: Vector2i: set(value): - var chunk_size_factor := float(_CHUNK_SIZE) - - _chunks.resize(int(ceilf(value.x / chunk_size_factor) * ceilf(value.y / chunk_size_factor))) - - for i in _chunks.size(): - _chunks[i] = Chunk.new() - _chunks_size = Vector2i((value / float(_CHUNK_SIZE)).ceil()) + + _floor_map.resize(value) + _chunks.resize(_chunks_size.x * _chunks_size.y) + + for y in _chunks_size.y: + for x in _chunks_size.x: + _chunks[(y * _CHUNK_SIZE) + x] = Chunk.new(self, Vector2i(x, y)) + size = value func _get_chunk(chunk_coordinate: Vector2i) -> Chunk: @@ -178,13 +217,11 @@ func _notification(what: int) -> void: match what: NOTIFICATION_TRANSFORM_CHANGED: for chunk in _chunks: - for multi_mesh_instance in chunk._multi_mesh_instances: - multi_mesh_instance.set_offset_transform(global_transform) + chunk.set_transform(global_transform) NOTIFICATION_VISIBILITY_CHANGED: for chunk in _chunks: - for multi_mesh_instance in chunk._multi_mesh_instances: - multi_mesh_instance.set_visible(visible) + chunk.set_visible(visible) ## ## Clears the entirety of the tile grid to only contain tiles of instance [code]tile[/code] pointing @@ -192,42 +229,14 @@ func _notification(what: int) -> void: ## ## For clearing a specific region of the mesh grid, see [method fill_mesh]. ## -func clear_tiles(orientation: Orientation, tile: InteriorTile) -> void: - if tile == null: - for y in size.y: - for x in size.x: - var coordinates := Vector2i(x, y) - var chunk := _get_chunk(coordinates / _CHUNK_SIZE) - var chunk_coordinates := coordinates % _CHUNK_SIZE - - chunk.set_floor_mesh(chunk_coordinates, orientation, null) - chunk.set_wall_mesh(chunk_coordinates, orientation, null) - - else: - var mesh := tile.mesh - - match tile.kind: - InteriorTile.Kind.FLOOR: - for y in size.y: - for x in size.x: - var coordinate := Vector2i(x, y) - - _get_chunk(coordinate / _CHUNK_SIZE).\ - set_floor_mesh(coordinate % _CHUNK_SIZE, orientation, mesh) - - InteriorTile.Kind.WALL: - for y in size.y: - for x in size.x: - var coordinate := Vector2i(x, y) - - _get_chunk(coordinate / _CHUNK_SIZE).\ - set_floor_mesh(coordinate % _CHUNK_SIZE, orientation, mesh) +func clear() -> void: + for y in size.y: + for x in size.x: + _floor_map.set_bit(x, y, false) for y in _chunks_size.y: for x in _chunks_size.x: - var chunk_coordinate := Vector2i(x, y) - - _get_chunk(chunk_coordinate).invalidate(self, chunk_coordinate) + _get_chunk(Vector2i(x, y)).invalidate() ## ## Clears the region of the tile grid at [code]area[/code] to only contain instances of @@ -239,66 +248,22 @@ func clear_tiles(orientation: Orientation, tile: InteriorTile) -> void: ## ## For clearing the whole of the mesh grid, see [method clear_mesh]. ## -func fill_tiles(area: Rect2i, orientation: Orientation, tile: InteriorTile) -> void: - assert(get_area().encloses(area), "area must be within grid") +func fill_floor(area: Rect2i, exists: bool) -> void: + assert(Rect2i(Vector2i.ZERO, size).encloses(area), "area must be within grid") var filled_chunks := BitMap.new() filled_chunks.resize(_chunks_size) - if tile == null: - for y in range(area.position.y, area.end.y): - for x in range(area.position.x, area.end.x): - var coordinates := Vector2i(x, y) - var chunk_coordinates := coordinates / _CHUNK_SIZE - var chunk := _get_chunk(coordinates / _CHUNK_SIZE) - var local_coordinates := coordinates % _CHUNK_SIZE - - chunk.set_floor_mesh(local_coordinates, orientation, null) - chunk.set_wall_mesh(local_coordinates, orientation, null) - filled_chunks.set_bitv(chunk_coordinates, true) - - else: - var mesh := tile.mesh - - if tile.fixed_orientation: - orientation = Orientation.NORTH - - match tile.kind: - InteriorTile.Kind.FLOOR: - for y in range(area.position.y, area.end.y): - for x in range(area.position.x, area.end.x): - var coordinate := Vector2i(x, y) - var chunk_coordinate := coordinate / _CHUNK_SIZE - - _get_chunk(chunk_coordinate).set_floor_mesh( - coordinate % _CHUNK_SIZE, orientation, mesh) - - filled_chunks.set_bitv(chunk_coordinate, true) - - InteriorTile.Kind.WALL: - for y in range(area.position.y, area.end.y): - for x in range(area.position.x, area.end.x): - var coordinate := Vector2i(x, y) - var chunk_coordinate := coordinate / _CHUNK_SIZE - - _get_chunk(chunk_coordinate).set_wall_mesh( - coordinate % _CHUNK_SIZE, orientation, mesh) - - filled_chunks.set_bitv(chunk_coordinate, true) + for y in range(area.position.y, area.end.y): + for x in range(area.position.x, area.end.x): + _floor_map.set_bit(x, y, exists) + filled_chunks.set_bitv(Vector2i(x, y) / _CHUNK_SIZE, true) for y in _chunks_size.y: for x in _chunks_size.x: if filled_chunks.get_bit(x, y): - var chunk_coordinate := Vector2i(x, y) - - _get_chunk(chunk_coordinate).invalidate(self, chunk_coordinate) - -## -## Returns the area of the interior map based on its current size. -## -func get_area() -> Rect2i: - return Rect2i(Vector2i.ZERO, size) + _get_chunk(Vector2i(x, y)).invalidate() ## ## Plots a single tile at [code]coordinates[/code] to be an instance of [code]tile[/code] pointing @@ -310,30 +275,7 @@ func get_area() -> Rect2i: ## ## For bulk-setting many meshes at once, see [method fill_mesh] and [method clear_mesh]. ## -func plot_tile(coordinates: Vector2i, orientation: Orientation, tile: InteriorTile) -> void: - assert(get_area().has_point(coordinates), "coordinate must be within grid") - - var chunk_coordinates := coordinates / _CHUNK_SIZE - var chunk := _get_chunk(chunk_coordinates) - - if tile == null: - var local_coordinates := coordinates % _CHUNK_SIZE - - chunk.set_floor_mesh(local_coordinates, orientation, null) - chunk.set_wall_mesh(local_coordinates, orientation, null) - chunk.invalidate(self, chunk_coordinates) - - else: - var mesh := tile.mesh - - if tile.fixed_orientation: - orientation = Orientation.NORTH - - match tile.kind: - InteriorTile.Kind.FLOOR: - chunk.set_floor_mesh(coordinates % _CHUNK_SIZE, orientation, mesh) - chunk.invalidate(self, chunk_coordinates) - - InteriorTile.Kind.WALL: - chunk.set_wall_mesh(coordinates % _CHUNK_SIZE, orientation, mesh) - chunk.invalidate(self, chunk_coordinates) +func plot_floor(coordinates: Vector2i, exists: bool) -> void: + assert(Rect2i(Vector2i.ZERO, size).has_point(coordinates), "coordinate must be within grid") + _floor_map.set_bitv(coordinates, exists) + _get_chunk(coordinates / _CHUNK_SIZE).invalidate() diff --git a/interior/interior_tile.gd b/interior/interior_tile.gd deleted file mode 100644 index 7668d34..0000000 --- a/interior/interior_tile.gd +++ /dev/null @@ -1,29 +0,0 @@ -class_name InteriorTile extends Resource - -## -## Identifier for the kind of interior tile. -## -enum Kind { - FLOOR, - WALL, -} - -## -## Flag for determining if the tile is affected by orientations specified in an [InteriorMap]. -## -@export -var fixed_orientation := false - -## -## See [enum Kind]. -## -## Interior tiles of different kinds will not conflict when placing them. -## -@export -var kind := Kind.FLOOR - -## -## Used to visualize the interior tile. -## -@export -var mesh: Mesh = null diff --git a/interior/tiles/dungeon_01_pipehole_tile.res b/interior/tiles/dungeon_01_pipehole_tile.res deleted file mode 100644 index d1614cc..0000000 --- a/interior/tiles/dungeon_01_pipehole_tile.res +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4fb7fb7cdf138b9a7842d505894dbc1ece8f08a287fae299e98ebf261a25ed98 -size 131992 diff --git a/interior/tiles/dungeon_01_tiling_tile.res b/interior/tiles/dungeon_01_tiling_tile.res deleted file mode 100644 index 6452a4e..0000000 --- a/interior/tiles/dungeon_01_tiling_tile.res +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:30078a1a1dd8083722061342076196eb1c7fa1f0c4a41bb1d62de5dde04d9911 -size 479 diff --git a/interior/tiles/limestone_dungeon/hole_albedo.png b/interior/tiles/limestone_dungeon/hole_albedo.png deleted file mode 100755 index 9522f38..0000000 --- a/interior/tiles/limestone_dungeon/hole_albedo.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:65be5005d966729b3249802ba1ee1b075c7f03b14376e2e6a81a3b015d85e884 -size 144301 diff --git a/interior/tiles/limestone_dungeon/hole_height.png b/interior/tiles/limestone_dungeon/hole_height.png deleted file mode 100755 index 22ac595..0000000 --- a/interior/tiles/limestone_dungeon/hole_height.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f37d7351c25c1d701726f311957dccd380f74dd918f12f328674467a3a552044 -size 113592 diff --git a/interior/tiles/limestone_dungeon/hole_material.res b/interior/tiles/limestone_dungeon/hole_material.res deleted file mode 100644 index 0463553..0000000 --- a/interior/tiles/limestone_dungeon/hole_material.res +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d5d7e372525851ba0b666b73ad301c6a14f0bc29d10c00d32cfd1c72cd2bc341 -size 1090 diff --git a/interior/tiles/limestone_dungeon/hole_normal.png b/interior/tiles/limestone_dungeon/hole_normal.png deleted file mode 100755 index fac6c12..0000000 --- a/interior/tiles/limestone_dungeon/hole_normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4db5e7fa31cc065fa3fbac525c04ddf74824d5e4f7a891c5aa84689fb530ffb9 -size 343721 diff --git a/interior/tiles/limestone_dungeon/hole_orm.png b/interior/tiles/limestone_dungeon/hole_orm.png deleted file mode 100644 index b7800a2..0000000 --- a/interior/tiles/limestone_dungeon/hole_orm.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9bd0e2cf8d124f047a835fc143563107b41b0a45a427d1f767d8be5d7470db24 -size 56105 diff --git a/interior/tiles/limestone_dungeon/piping_albedo.png b/interior/tiles/limestone_dungeon/piping_albedo.png deleted file mode 100755 index ff4666c..0000000 --- a/interior/tiles/limestone_dungeon/piping_albedo.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d289f998cf9317afa37ed8519a2a7ab06638aa92a8ce57dc242cf20b60066b36 -size 623939 diff --git a/interior/tiles/limestone_dungeon/piping_height.png b/interior/tiles/limestone_dungeon/piping_height.png deleted file mode 100755 index 5469c2e..0000000 --- a/interior/tiles/limestone_dungeon/piping_height.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:da8a57606972d7c93e21f14d20b08a35f3af7618fd76cc27db650f789db013f2 -size 241457 diff --git a/interior/tiles/limestone_dungeon/piping_material.res b/interior/tiles/limestone_dungeon/piping_material.res deleted file mode 100644 index 658cab4..0000000 --- a/interior/tiles/limestone_dungeon/piping_material.res +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:12cbd5f995e4a52d7ba01c0803f04a280d92a0176d8a7d3c56b1187d55127ebe -size 1088 diff --git a/interior/tiles/limestone_dungeon/piping_normal.png b/interior/tiles/limestone_dungeon/piping_normal.png deleted file mode 100755 index fca4ab2..0000000 --- a/interior/tiles/limestone_dungeon/piping_normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:028cb62c715456b29a27a5b306e7c66b61525f5fd90799df79587f8381499030 -size 755707 diff --git a/interior/tiles/limestone_dungeon/piping_orm.png b/interior/tiles/limestone_dungeon/piping_orm.png deleted file mode 100644 index 50c5416..0000000 --- a/interior/tiles/limestone_dungeon/piping_orm.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d453be063b9e2f82aca00deb9ac54df40ffe4fe55fd59b8078be7417f354e7d6 -size 109618 diff --git a/interior/tiles/limestone_dungeon/tiling_albedo.png b/interior/tiles/limestone_dungeon/tiling_albedo.png deleted file mode 100755 index 8ff1619..0000000 --- a/interior/tiles/limestone_dungeon/tiling_albedo.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:770bae54ae4a1152791a26dfd1f38e0a0201cf3ec36ed85fe6f8122de4e76ed0 -size 1488729 diff --git a/interior/tiles/limestone_dungeon/tiling_albedo.png.import b/interior/tiles/limestone_dungeon/tiling_albedo.png.import deleted file mode 100644 index 8724bfe..0000000 --- a/interior/tiles/limestone_dungeon/tiling_albedo.png.import +++ /dev/null @@ -1,35 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://bydc62557j2d0" -path.s3tc="res://.godot/imported/tiling_albedo.png-1570a8acdedf3400258f8b15e49e5d5b.s3tc.ctex" -metadata={ -"imported_formats": ["s3tc_bptc"], -"vram_texture": true -} - -[deps] - -source_file="res://interior/tiles/limestone_dungeon/tiling_albedo.png" -dest_files=["res://.godot/imported/tiling_albedo.png-1570a8acdedf3400258f8b15e49e5d5b.s3tc.ctex"] - -[params] - -compress/mode=2 -compress/high_quality=false -compress/lossy_quality=0.7 -compress/hdr_compression=1 -compress/normal_map=0 -compress/channel_pack=0 -mipmaps/generate=true -mipmaps/limit=-1 -roughness/mode=0 -roughness/src_normal="" -process/fix_alpha_border=true -process/premult_alpha=false -process/normal_map_invert_y=false -process/hdr_as_srgb=false -process/hdr_clamp_exposure=false -process/size_limit=0 -detect_3d/compress_to=0 diff --git a/interior/tiles/limestone_dungeon/tiling_material.res b/interior/tiles/limestone_dungeon/tiling_material.res deleted file mode 100644 index 70261a9..0000000 --- a/interior/tiles/limestone_dungeon/tiling_material.res +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:814338830ebfb3d2216711b698cf8881083dd47e57afa18243161f7ca636cdbe -size 1090 diff --git a/interior/tiles/limestone_dungeon/tiling_normal.png b/interior/tiles/limestone_dungeon/tiling_normal.png deleted file mode 100755 index 329738b..0000000 --- a/interior/tiles/limestone_dungeon/tiling_normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fa6c031538c5459b5394d5e8ef7bfe5a58d8e5da62013ea4b3c9c5c54cdbeebd -size 1264636 diff --git a/interior/tiles/limestone_dungeon/tiling_orm.png b/interior/tiles/limestone_dungeon/tiling_orm.png deleted file mode 100644 index 5a4878f..0000000 --- a/interior/tiles/limestone_dungeon/tiling_orm.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:94cc0c47f71b977eaa12a70147cf85b48b51cbf0106e984d6e62a056a9e1c0d4 -size 431771 diff --git a/map_editor.scn b/map_editor.scn index 08b37f3..02becdc 100644 --- a/map_editor.scn +++ b/map_editor.scn @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:295e8a386f4ecc33196ffafd5435877be918da48112c924773665d9c877ac12a -size 13343 +oid sha256:d12a2d80760eab79b3b1a376f5b8ed1a8f35a4551dee8ee8dd220fce013b18f9 +size 13514 diff --git a/map_editor/tile_selector_button_group.res b/map_editor/floor_selector_button_group.res similarity index 100% rename from map_editor/tile_selector_button_group.res rename to map_editor/floor_selector_button_group.res diff --git a/map_editor/selection_area_mesh.res b/map_editor/selection_area_mesh.res deleted file mode 100644 index d0f15ee..0000000 --- a/map_editor/selection_area_mesh.res +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d30d1595da7c7bab44c9e72b88f8e0bfe946dff33e1a4903ab772104cd43657d -size 894 -- 2.34.1 From 200f0939c3048de694a2a7cf3c9c3ee1a7e39b8a Mon Sep 17 00:00:00 2001 From: kayomn Date: Thu, 9 Feb 2023 11:11:48 +0000 Subject: [PATCH 4/6] Add missing boundary checks to interior map generation --- interior/floors/dungeon_01_interior_floor.res | 4 ++-- interior/interior_map.gd | 13 ++++++++----- map_editor.scn | 4 ++-- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/interior/floors/dungeon_01_interior_floor.res b/interior/floors/dungeon_01_interior_floor.res index 8c9c100..79040f1 100644 --- a/interior/floors/dungeon_01_interior_floor.res +++ b/interior/floors/dungeon_01_interior_floor.res @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8d5a0f5ed6c6c95b7d5041d9c4e3e079501fb10a1563c3fb6d384a34eaf52da5 -size 720 +oid sha256:ac5633d27be71198eed3e605daca451838f94a37503772ff56e5ee2177daf2e0 +size 712 diff --git a/interior/interior_map.gd b/interior/interior_map.gd index 42d3bb3..1d9f20a 100644 --- a/interior/interior_map.gd +++ b/interior/interior_map.gd @@ -95,15 +95,18 @@ class Chunk: # Find floor tile types. for y in _CHUNK_SIZE: for x in _CHUNK_SIZE: - if floor_map.get_bitv(offset + Vector2i(x, y)): + var map_area := Rect2i(Vector2.ZERO, map_size) + var map_coordinates := offset + Vector2i(x, y) + + if map_area.has_point(map_coordinates) and floor_map.get_bitv(map_coordinates): var tile := 0 for i in Orientation.values().size(): - var delta_x := roundi(cos(i * PI / 2.0)) - var delta_y := roundi(sin(i * PI / 2.0)) + var map_neighbor := map_coordinates + Vector2i( + roundi(cos(i * PI / 2.0)), roundi(sin(i * PI / 2.0))) - if (0 <= (y + int(delta_y < map_size.y))) and (0 <= (x + int(delta_x < map_size.x))): - tile += int(floor_map.get_bit(x + delta_x, y + delta_y)) * 2 ** i + if map_area.has_point(map_neighbor): + tile += int(floor_map.get_bitv(map_neighbor)) * 2 ** i positions_by_floor_tile[tile].append(Vector2(x, y)) diff --git a/map_editor.scn b/map_editor.scn index 02becdc..cb425e2 100644 --- a/map_editor.scn +++ b/map_editor.scn @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d12a2d80760eab79b3b1a376f5b8ed1a8f35a4551dee8ee8dd220fce013b18f9 -size 13514 +oid sha256:fade16a9713f46ed71eec62081880231b6f5be125c6401cf0944abc443f1b2c7 +size 13516 -- 2.34.1 From 167f83d5f1f2b152e8286200bc451de0d2ba9156 Mon Sep 17 00:00:00 2001 From: kayomn Date: Fri, 10 Feb 2023 14:30:27 +0000 Subject: [PATCH 5/6] Add support for multiple floor tiles sets in one map --- interior/interior_map.gd | 155 ++++++++++++++++++--------------------- map_editor.scn | 2 +- 2 files changed, 71 insertions(+), 86 deletions(-) diff --git a/interior/interior_map.gd b/interior/interior_map.gd index 1d9f20a..1197733 100644 --- a/interior/interior_map.gd +++ b/interior/interior_map.gd @@ -43,62 +43,34 @@ class Chunk: var _interior_map: InteriorMap = null - var _meshes_by_floor_tile: Array[Mesh] = [] - - var _renderable_by_floor_tile: Array[Renderable] = [] + var _renderables_by_mesh := {} func _init(interior_map: InteriorMap, coordinates: Vector2i) -> void: _interior_map = interior_map _coordinates = coordinates - var floor_tile_count := FloorTile.size() - - _renderable_by_floor_tile.resize(floor_tile_count) - _meshes_by_floor_tile.resize(floor_tile_count) - ## ## Invalidates the mesh block, re-baking its contents from the current mesh data set. ## func invalidate() -> void: - _renderable_by_floor_tile.fill(null) + _renderables_by_mesh.clear() - var interior_floor := _interior_map.interior_floor + var floor_map := _interior_map._floor_map + var map_size := _interior_map.size + var offset := _coordinates * _CHUNK_SIZE + var positions_by_mesh := {} + var map_area := Rect2i(Vector2.ZERO, map_size) - if interior_floor == null: - _meshes_by_floor_tile.fill(null) + for y in _CHUNK_SIZE: + var map_row_offset := (map_size.y * y) - else: - _meshes_by_floor_tile[FloorTile.CORNER_NORTH_EAST] = interior_floor.corner_north_east_mesh - _meshes_by_floor_tile[FloorTile.CORNER_NORTH_WEST] = interior_floor.corner_north_west_mesh - _meshes_by_floor_tile[FloorTile.CORNER_SOUTH_EAST] = interior_floor.corner_south_east_mesh - _meshes_by_floor_tile[FloorTile.CORNER_SOUTH_WEST] = interior_floor.corner_south_west_mesh - _meshes_by_floor_tile[FloorTile.EDGE_EAST] = interior_floor.edge_east_mesh - _meshes_by_floor_tile[FloorTile.EDGE_NORTH] = interior_floor.edge_north_mesh - _meshes_by_floor_tile[FloorTile.EDGE_SOUTH] = interior_floor.edge_south_mesh - _meshes_by_floor_tile[FloorTile.EDGE_WEST] = interior_floor.edge_west_mesh - _meshes_by_floor_tile[FloorTile.ENDCAP_EAST] = interior_floor.endcap_east_mesh - _meshes_by_floor_tile[FloorTile.ENDCAP_NORTH] = interior_floor.endcap_north_mesh - _meshes_by_floor_tile[FloorTile.ENDCAP_SOUTH] = interior_floor.endcap_south_mesh - _meshes_by_floor_tile[FloorTile.ENDCAP_WEST] = interior_floor.endcap_west_mesh - _meshes_by_floor_tile[FloorTile.FILL] = interior_floor.fill_mesh - _meshes_by_floor_tile[FloorTile.ISLAND] = interior_floor.island_mesh - _meshes_by_floor_tile[FloorTile.PATH_HORIZONTAL] = interior_floor.path_horizontal_mesh - _meshes_by_floor_tile[FloorTile.PATH_VERTICAL] = interior_floor.path_vertical_mesh + for x in _CHUNK_SIZE: + var map_coordinates := offset + Vector2i(x, y) - var floor_map := _interior_map._floor_map - var map_size := _interior_map.size - var offset := _coordinates * _CHUNK_SIZE - var positions_by_floor_tile: Array[PackedVector2Array] = [] + if map_area.has_point(map_coordinates): + var interior_floor := floor_map[map_row_offset + map_coordinates.x] - positions_by_floor_tile.resize(FloorTile.size()) - - # Find floor tile types. - for y in _CHUNK_SIZE: - for x in _CHUNK_SIZE: - var map_area := Rect2i(Vector2.ZERO, map_size) - var map_coordinates := offset + Vector2i(x, y) - - if map_area.has_point(map_coordinates) and floor_map.get_bitv(map_coordinates): + if interior_floor != null: var tile := 0 for i in Orientation.values().size(): @@ -106,42 +78,61 @@ class Chunk: roundi(cos(i * PI / 2.0)), roundi(sin(i * PI / 2.0))) if map_area.has_point(map_neighbor): - tile += int(floor_map.get_bitv(map_neighbor)) * 2 ** i + tile += int(floor_map[(map_size.y * map_neighbor.y) + map_neighbor.x] == interior_floor) * 2 ** i - positions_by_floor_tile[tile].append(Vector2(x, y)) + var mesh: Mesh = null - # (Re)-bake tiles into multimesh instances for the chunk. - var scenario_rid := _interior_map.get_world_3d().scenario + match tile: + FloorTile.ISLAND: mesh = interior_floor.island_mesh + FloorTile.ENDCAP_WEST: mesh = interior_floor.endcap_west_mesh + FloorTile.ENDCAP_NORTH: mesh = interior_floor.endcap_north_mesh + FloorTile.CORNER_NORTH_WEST: mesh = interior_floor.corner_north_west_mesh + FloorTile.ENDCAP_EAST: mesh = interior_floor.endcap_east_mesh + FloorTile.PATH_HORIZONTAL: mesh = interior_floor.path_horizontal_mesh + FloorTile.CORNER_NORTH_EAST: mesh = interior_floor.corner_north_east_mesh + FloorTile.EDGE_NORTH: mesh = interior_floor.edge_north_mesh + FloorTile.ENDCAP_SOUTH: mesh = interior_floor.endcap_south_mesh + FloorTile.CORNER_SOUTH_WEST: mesh = interior_floor.corner_south_west_mesh + FloorTile.PATH_VERTICAL: mesh = interior_floor.path_vertical_mesh + FloorTile.EDGE_WEST: mesh = interior_floor.edge_west_mesh + FloorTile.CORNER_SOUTH_EAST: mesh = interior_floor.corner_south_east_mesh + FloorTile.EDGE_SOUTH: mesh = interior_floor.edge_south_mesh + FloorTile.EDGE_EAST: mesh = interior_floor.edge_east_mesh + FloorTile.FILL: mesh = interior_floor.fill_mesh - for i in FloorTile.size(): - var floor_positions := positions_by_floor_tile[i] + if mesh != null: + if not(mesh in positions_by_mesh): + positions_by_mesh[mesh] = PackedVector2Array() - if not(floor_positions.is_empty()): - var mesh := _meshes_by_floor_tile[i] + positions_by_mesh[mesh].append(Vector2(x, y)) - if mesh != null: - var floor_position_count := floor_positions.size() - var renderable := Renderable.new(scenario_rid, _meshes_by_floor_tile[i].get_rid(), floor_position_count) + # (Re)-bake tiles into multimesh instances for the chunk. + var scenario_rid := _interior_map.get_world_3d().scenario - for j in floor_position_count: - var tile_position := floor_positions[j] + for mesh in positions_by_mesh: + var positions: PackedVector2Array = positions_by_mesh[mesh] - renderable.set_instance_transform(j, Transform3D(Basis.IDENTITY, Vector3( - ((float(offset.x) + tile_position.x) - (float(map_size.x) * _GRID_ORIGIN.x)) + 0.5, - 0.0, - ((float(offset.y) + tile_position.y) - (float(map_size.y) * _GRID_ORIGIN.y)) + 0.5))) + if not(positions.is_empty()): + var position_count := positions.size() + var renderable := Renderable.new(scenario_rid, mesh.get_rid(), position_count) - _renderable_by_floor_tile[i] = renderable + for i in position_count: + var position := positions[i] + + renderable.set_instance_transform(i, Transform3D(Basis.IDENTITY, Vector3( + ((float(offset.x) + position.x) - (float(map_size.x) * _GRID_ORIGIN.x)) + 0.5, + 0.0, + ((float(offset.y) + position.y) - (float(map_size.y) * _GRID_ORIGIN.y)) + 0.5))) + + _renderables_by_mesh[mesh] = renderable func set_transform(transform: Transform3D) -> void: - for renderable in _renderable_by_floor_tile: - if renderable != null: - renderable.set_transform(transform) + for mesh in _renderables_by_mesh: + _renderables_by_mesh[mesh].set_transform(transform) func set_visible(visible: bool) -> void: - for renderable in _renderable_by_floor_tile: - if renderable != null: - renderable.set_visible(visible) + for mesh in _renderables_by_mesh: + _renderables_by_mesh[mesh].set_visible(visible) ## ## @@ -188,13 +179,7 @@ var _chunks: Array[Chunk] = [] var _chunks_size := Vector2i.ZERO -var _floor_map := BitMap.new() - -## -## -## -@export -var interior_floor: InteriorFloor = null +var _floor_map: Array[InteriorFloor] = [] ## ## Size of the tile grid (in engine units). @@ -204,7 +189,7 @@ var size: Vector2i: set(value): _chunks_size = Vector2i((value / float(_CHUNK_SIZE)).ceil()) - _floor_map.resize(value) + _floor_map.resize(value.x * value.y) _chunks.resize(_chunks_size.x * _chunks_size.y) for y in _chunks_size.y: @@ -233,9 +218,8 @@ func _notification(what: int) -> void: ## For clearing a specific region of the mesh grid, see [method fill_mesh]. ## func clear() -> void: - for y in size.y: - for x in size.x: - _floor_map.set_bit(x, y, false) + for i in _floor_map.size(): + _floor_map[i] = null for y in _chunks_size.y: for x in _chunks_size.x: @@ -243,7 +227,7 @@ func clear() -> void: ## ## Clears the region of the tile grid at [code]area[/code] to only contain instances of -## [code]tile[/code] pointing in the orientation of [code]orientation[/code]. +## [code]interior_floor[/code]. ## ## *Note* that [code]area[/code] *must* be within the area of the of the mesh grid, where ## [code]Vector2i.ZERO[/code] is the top-left and [member size] [code]- 1[/code] is the bottom- @@ -251,7 +235,7 @@ func clear() -> void: ## ## For clearing the whole of the mesh grid, see [method clear_mesh]. ## -func fill_floor(area: Rect2i, exists: bool) -> void: +func fill_floor(area: Rect2i, interior_floor: InteriorFloor) -> void: assert(Rect2i(Vector2i.ZERO, size).encloses(area), "area must be within grid") var filled_chunks := BitMap.new() @@ -260,8 +244,7 @@ func fill_floor(area: Rect2i, exists: bool) -> void: for y in range(area.position.y, area.end.y): for x in range(area.position.x, area.end.x): - _floor_map.set_bit(x, y, exists) - filled_chunks.set_bitv(Vector2i(x, y) / _CHUNK_SIZE, true) + _floor_map[(size.y * (y / _CHUNK_SIZE)) + (x / _CHUNK_SIZE)] = interior_floor for y in _chunks_size.y: for x in _chunks_size.x: @@ -269,8 +252,8 @@ func fill_floor(area: Rect2i, exists: bool) -> void: _get_chunk(Vector2i(x, y)).invalidate() ## -## Plots a single tile at [code]coordinates[/code] to be an instance of [code]tile[/code] pointing -## in the orientation of [code]orientation[/code], overwriting whatever it previously contained. +## Plots a single tile at [code]coordinates[/code] to be an instance of [code]interior_floor[/code], +## overwriting whatever it previously contained. ## ## *Note* that [code]coordinates[/code] *must* be within the area of the of the mesh grid, where ## [code]Vector2i.ZERO[/code] is the top-left and [member size] [code]- 1[/code] is the bottom- @@ -278,7 +261,9 @@ func fill_floor(area: Rect2i, exists: bool) -> void: ## ## For bulk-setting many meshes at once, see [method fill_mesh] and [method clear_mesh]. ## -func plot_floor(coordinates: Vector2i, exists: bool) -> void: +func plot_floor(coordinates: Vector2i, interior_floor: InteriorFloor) -> void: assert(Rect2i(Vector2i.ZERO, size).has_point(coordinates), "coordinate must be within grid") - _floor_map.set_bitv(coordinates, exists) + + _floor_map[(size.y * coordinates.y) + coordinates.x] = interior_floor + _get_chunk(coordinates / _CHUNK_SIZE).invalidate() diff --git a/map_editor.scn b/map_editor.scn index cb425e2..9e92548 100644 --- a/map_editor.scn +++ b/map_editor.scn @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fade16a9713f46ed71eec62081880231b6f5be125c6401cf0944abc443f1b2c7 +oid sha256:694680bfd25ec5fe6cf430e75f44baedc03518579877989d97f33f605ef92fa3 size 13516 -- 2.34.1 From f28c0988976ee17e8385d6ff357366646cbbe455 Mon Sep 17 00:00:00 2001 From: kayomn Date: Sun, 12 Feb 2023 22:35:57 +0000 Subject: [PATCH 6/6] Add 'wood platform' tiles --- interior/floors/wood_platforms/tiles.glb | 3 + .../floors/wood_platforms/tiles.glb.import | 145 ++++++++++++++++++ .../tiles_corner_north_east.res | 3 + .../tiles_corner_north_west.res | 3 + .../tiles_corner_south_east.res | 3 + .../tiles_corner_south_west.res | 3 + .../tiles_endcap_east&edge_east.res | 3 + .../tiles_endcap_north&edge_north.res | 3 + .../tiles_endcap_south&edge_south.res | 3 + .../tiles_endcap_west&edge_west.res | 3 + .../tiles_fill&path_horizontal.res | 3 + .../floors/wood_platforms/tiles_island.res | 3 + .../wood_platforms/tiles_path_vertical.res | 3 + .../floors/wood_platforms_interior_floor.res | 3 + map_editor.scn | 4 +- 15 files changed, 186 insertions(+), 2 deletions(-) create mode 100644 interior/floors/wood_platforms/tiles.glb create mode 100644 interior/floors/wood_platforms/tiles.glb.import create mode 100644 interior/floors/wood_platforms/tiles_corner_north_east.res create mode 100644 interior/floors/wood_platforms/tiles_corner_north_west.res create mode 100644 interior/floors/wood_platforms/tiles_corner_south_east.res create mode 100644 interior/floors/wood_platforms/tiles_corner_south_west.res create mode 100644 interior/floors/wood_platforms/tiles_endcap_east&edge_east.res create mode 100644 interior/floors/wood_platforms/tiles_endcap_north&edge_north.res create mode 100644 interior/floors/wood_platforms/tiles_endcap_south&edge_south.res create mode 100644 interior/floors/wood_platforms/tiles_endcap_west&edge_west.res create mode 100644 interior/floors/wood_platforms/tiles_fill&path_horizontal.res create mode 100644 interior/floors/wood_platforms/tiles_island.res create mode 100644 interior/floors/wood_platforms/tiles_path_vertical.res create mode 100644 interior/floors/wood_platforms_interior_floor.res diff --git a/interior/floors/wood_platforms/tiles.glb b/interior/floors/wood_platforms/tiles.glb new file mode 100644 index 0000000..8eb747c --- /dev/null +++ b/interior/floors/wood_platforms/tiles.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9872a2ee419c7fe2e9936fd0ca979d0745813a168ba26ff0c5b64c88e2917f2c +size 992392 diff --git a/interior/floors/wood_platforms/tiles.glb.import b/interior/floors/wood_platforms/tiles.glb.import new file mode 100644 index 0000000..7268ee9 --- /dev/null +++ b/interior/floors/wood_platforms/tiles.glb.import @@ -0,0 +1,145 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://diwceah8n7mya" +path="res://.godot/imported/tiles.glb-06c35114c4978742b880d24bfe15f3d9.scn" + +[deps] + +source_file="res://interior/floors/wood_platforms/tiles.glb" +dest_files=["res://.godot/imported/tiles.glb-06c35114c4978742b880d24bfe15f3d9.scn"] + +[params] + +nodes/root_type="Node3D" +nodes/root_name="Scene Root" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +import_script/path="" +_subresources={ +"meshes": { +"tiles_corner_north_east": { +"generate/lightmap_uv": 0, +"generate/lods": 0, +"generate/shadow_meshes": 0, +"lods/normal_merge_angle": 60.0, +"lods/normal_split_angle": 25.0, +"save_to_file/enabled": true, +"save_to_file/make_streamable": "", +"save_to_file/path": "res://interior/floors/wood_platforms/tiles_corner_north_east.res" +}, +"tiles_corner_north_west": { +"generate/lightmap_uv": 0, +"generate/lods": 0, +"generate/shadow_meshes": 0, +"lods/normal_merge_angle": 60.0, +"lods/normal_split_angle": 25.0, +"save_to_file/enabled": true, +"save_to_file/make_streamable": "", +"save_to_file/path": "res://interior/floors/wood_platforms/tiles_corner_north_west.res" +}, +"tiles_corner_south_east": { +"generate/lightmap_uv": 0, +"generate/lods": 0, +"generate/shadow_meshes": 0, +"lods/normal_merge_angle": 60.0, +"lods/normal_split_angle": 25.0, +"save_to_file/enabled": true, +"save_to_file/make_streamable": "", +"save_to_file/path": "res://interior/floors/wood_platforms/tiles_corner_south_east.res" +}, +"tiles_corner_south_west": { +"generate/lightmap_uv": 0, +"generate/lods": 0, +"generate/shadow_meshes": 0, +"lods/normal_merge_angle": 60.0, +"lods/normal_split_angle": 25.0, +"save_to_file/enabled": true, +"save_to_file/make_streamable": "", +"save_to_file/path": "res://interior/floors/wood_platforms/tiles_corner_south_west.res" +}, +"tiles_endcap_east&edge_east": { +"generate/lightmap_uv": 0, +"generate/lods": 0, +"generate/shadow_meshes": 0, +"lods/normal_merge_angle": 60.0, +"lods/normal_split_angle": 25.0, +"save_to_file/enabled": true, +"save_to_file/make_streamable": "", +"save_to_file/path": "res://interior/floors/wood_platforms/tiles_endcap_east&edge_east.res" +}, +"tiles_endcap_north&edge_north": { +"generate/lightmap_uv": 0, +"generate/lods": 0, +"generate/shadow_meshes": 0, +"lods/normal_merge_angle": 60.0, +"lods/normal_split_angle": 25.0, +"save_to_file/enabled": true, +"save_to_file/make_streamable": "", +"save_to_file/path": "res://interior/floors/wood_platforms/tiles_endcap_north&edge_north.res" +}, +"tiles_endcap_south&edge_south": { +"generate/lightmap_uv": 0, +"generate/lods": 0, +"generate/shadow_meshes": 0, +"lods/normal_merge_angle": 60.0, +"lods/normal_split_angle": 25.0, +"save_to_file/enabled": true, +"save_to_file/make_streamable": "", +"save_to_file/path": "res://interior/floors/wood_platforms/tiles_endcap_south&edge_south.res" +}, +"tiles_endcap_west&edge_west": { +"generate/lightmap_uv": 0, +"generate/lods": 0, +"generate/shadow_meshes": 0, +"lods/normal_merge_angle": 60.0, +"lods/normal_split_angle": 25.0, +"save_to_file/enabled": true, +"save_to_file/make_streamable": "", +"save_to_file/path": "res://interior/floors/wood_platforms/tiles_endcap_west&edge_west.res" +}, +"tiles_fill&path_horizontal": { +"generate/lightmap_uv": 0, +"generate/lods": 0, +"generate/shadow_meshes": 0, +"lods/normal_merge_angle": 60.0, +"lods/normal_split_angle": 25.0, +"save_to_file/enabled": true, +"save_to_file/make_streamable": "", +"save_to_file/path": "res://interior/floors/wood_platforms/tiles_fill&path_horizontal.res" +}, +"tiles_island": { +"generate/lightmap_uv": 0, +"generate/lods": 0, +"generate/shadow_meshes": 0, +"lods/normal_merge_angle": 60.0, +"lods/normal_split_angle": 25.0, +"save_to_file/enabled": true, +"save_to_file/make_streamable": "", +"save_to_file/path": "res://interior/floors/wood_platforms/tiles_island.res" +}, +"tiles_path_vertical": { +"generate/lightmap_uv": 0, +"generate/lods": 0, +"generate/shadow_meshes": 0, +"lods/normal_merge_angle": 60.0, +"lods/normal_split_angle": 25.0, +"save_to_file/enabled": true, +"save_to_file/make_streamable": "", +"save_to_file/path": "res://interior/floors/wood_platforms/tiles_path_vertical.res" +} +} +} +gltf/embedded_image_handling=1 diff --git a/interior/floors/wood_platforms/tiles_corner_north_east.res b/interior/floors/wood_platforms/tiles_corner_north_east.res new file mode 100644 index 0000000..894731b --- /dev/null +++ b/interior/floors/wood_platforms/tiles_corner_north_east.res @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c74ba913320212c108bb38a2fecbfe55ec1cabc36b012cc01517c3430a3481ec +size 160796 diff --git a/interior/floors/wood_platforms/tiles_corner_north_west.res b/interior/floors/wood_platforms/tiles_corner_north_west.res new file mode 100644 index 0000000..62e79de --- /dev/null +++ b/interior/floors/wood_platforms/tiles_corner_north_west.res @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8355918303727263a869434bd6849df9f2427d9442453d79209fa33ba8a5b7e3 +size 160416 diff --git a/interior/floors/wood_platforms/tiles_corner_south_east.res b/interior/floors/wood_platforms/tiles_corner_south_east.res new file mode 100644 index 0000000..7b2e93c --- /dev/null +++ b/interior/floors/wood_platforms/tiles_corner_south_east.res @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6323ae63a7662d06c668a7d66005a8e7a5f508b2ef3eced1b96c848a9b9f26fc +size 160600 diff --git a/interior/floors/wood_platforms/tiles_corner_south_west.res b/interior/floors/wood_platforms/tiles_corner_south_west.res new file mode 100644 index 0000000..5961d09 --- /dev/null +++ b/interior/floors/wood_platforms/tiles_corner_south_west.res @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:11e30fb7d99b7cc4dbeec2c14f2b257867811f152a37fb56db63abfd24f373bc +size 160544 diff --git a/interior/floors/wood_platforms/tiles_endcap_east&edge_east.res b/interior/floors/wood_platforms/tiles_endcap_east&edge_east.res new file mode 100644 index 0000000..9e74d00 --- /dev/null +++ b/interior/floors/wood_platforms/tiles_endcap_east&edge_east.res @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:20ac4262b1fbb7b5c03b73db2ada4ccc4708896fa6f0922d9800bc318c9eb401 +size 197764 diff --git a/interior/floors/wood_platforms/tiles_endcap_north&edge_north.res b/interior/floors/wood_platforms/tiles_endcap_north&edge_north.res new file mode 100644 index 0000000..192c50d --- /dev/null +++ b/interior/floors/wood_platforms/tiles_endcap_north&edge_north.res @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:49637d393277ce84c30eead4dba000609360a83a0105a14621f7c646cfe88514 +size 197612 diff --git a/interior/floors/wood_platforms/tiles_endcap_south&edge_south.res b/interior/floors/wood_platforms/tiles_endcap_south&edge_south.res new file mode 100644 index 0000000..6838275 --- /dev/null +++ b/interior/floors/wood_platforms/tiles_endcap_south&edge_south.res @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b6532f0dea47b689f9f2ab4d63af27afd92345dd816f8b18f88597d5141b2259 +size 197472 diff --git a/interior/floors/wood_platforms/tiles_endcap_west&edge_west.res b/interior/floors/wood_platforms/tiles_endcap_west&edge_west.res new file mode 100644 index 0000000..20bfbe5 --- /dev/null +++ b/interior/floors/wood_platforms/tiles_endcap_west&edge_west.res @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:db5dfb38e67dd2cad6dcbf0560e255818382db53929e8001e68a79d50b93441f +size 197932 diff --git a/interior/floors/wood_platforms/tiles_fill&path_horizontal.res b/interior/floors/wood_platforms/tiles_fill&path_horizontal.res new file mode 100644 index 0000000..2a9859d --- /dev/null +++ b/interior/floors/wood_platforms/tiles_fill&path_horizontal.res @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f0eedf71260c09d3b79a77aa860ab2cb6bf09df5ec69f23b1b08e713974bcc65 +size 155630 diff --git a/interior/floors/wood_platforms/tiles_island.res b/interior/floors/wood_platforms/tiles_island.res new file mode 100644 index 0000000..4a5d53c --- /dev/null +++ b/interior/floors/wood_platforms/tiles_island.res @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fcdf8081d7db8cf5e0afa4c57d4555c6be874b9804c98b390fb99522837b506c +size 239722 diff --git a/interior/floors/wood_platforms/tiles_path_vertical.res b/interior/floors/wood_platforms/tiles_path_vertical.res new file mode 100644 index 0000000..866b3f4 --- /dev/null +++ b/interior/floors/wood_platforms/tiles_path_vertical.res @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ac02e478b058a575ea04145cc36b439fc0b5da0d68ba625e59fd37f76a044818 +size 155872 diff --git a/interior/floors/wood_platforms_interior_floor.res b/interior/floors/wood_platforms_interior_floor.res new file mode 100644 index 0000000..1f5411c --- /dev/null +++ b/interior/floors/wood_platforms_interior_floor.res @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5cf906f8be3c64752b37a1c05ff408e3df251f1ad2350c7d13b59fee3c15f521 +size 652 diff --git a/map_editor.scn b/map_editor.scn index 9e92548..8ce7206 100644 --- a/map_editor.scn +++ b/map_editor.scn @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:694680bfd25ec5fe6cf430e75f44baedc03518579877989d97f33f605ef92fa3 -size 13516 +oid sha256:a5896f0b4d410af07f92d89bd87c71dba83bf5963db07809d5f06d75c2e69eb8 +size 13773 -- 2.34.1