WIP: Streamline Interiors System #16

Draft
kayomn wants to merge 6 commits from interiors-overhaul into main
105 changed files with 1147 additions and 743 deletions

2
.gitattributes vendored
View File

@ -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

View File

@ -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

BIN
interior/floors/dungeon_01/detail_albedo.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://chujdd7dvyclj"
path.s3tc="res://.godot/imported/detail_albedo.png-9f445a992dc42ff5e245033c09348a9d.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://interior/floors/dungeon_01/detail_albedo.png"
dest_files=["res://.godot/imported/detail_albedo.png-9f445a992dc42ff5e245033c09348a9d.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

BIN
interior/floors/dungeon_01/detail_displacement.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -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

BIN
interior/floors/dungeon_01/detail_material.res (Stored with Git LFS) Normal file

Binary file not shown.

BIN
interior/floors/dungeon_01/detail_normal.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://waqtv8flqslo"
path.s3tc="res://.godot/imported/detail_normal.png-7595efd28a96c6bf905bfa3c115551eb.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://interior/floors/dungeon_01/detail_normal.png"
dest_files=["res://.godot/imported/detail_normal.png-7595efd28a96c6bf905bfa3c115551eb.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=1
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=1
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
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=0

BIN
interior/floors/dungeon_01/detail_roughness.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://drq7jupbmwjil"
path.s3tc="res://.godot/imported/detail_roughness.png-a65497af25f070db34e2dc4c6cdc9e62.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://interior/floors/dungeon_01/detail_roughness.png"
dest_files=["res://.godot/imported/detail_roughness.png-a65497af25f070db34e2dc4c6cdc9e62.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

BIN
interior/floors/dungeon_01/floor_albedo.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c18mqalexrvc7"
path.s3tc="res://.godot/imported/floor_albedo.png-599373c4c817157e929da39c9a51e0ca.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://interior/floors/dungeon_01/floor_albedo.png"
dest_files=["res://.godot/imported/floor_albedo.png-599373c4c817157e929da39c9a51e0ca.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

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dfqtk4fo4t06c"
path.s3tc="res://.godot/imported/floor_displacement.png-f55e2b97692cdec8c2f27530099f39e7.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://interior/floors/dungeon_01/floor_displacement.png"
dest_files=["res://.godot/imported/floor_displacement.png-f55e2b97692cdec8c2f27530099f39e7.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

BIN
interior/floors/dungeon_01/floor_material.res (Stored with Git LFS) Normal file

Binary file not shown.

BIN
interior/floors/dungeon_01/floor_normal.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://tjepq8p30cxx"
path.s3tc="res://.godot/imported/floor_normal.png-7eb4d134761af85dcd1aaa7f0004dc65.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://interior/floors/dungeon_01/floor_normal.png"
dest_files=["res://.godot/imported/floor_normal.png-7eb4d134761af85dcd1aaa7f0004dc65.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=1
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=1
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
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=0

BIN
interior/floors/dungeon_01/floor_orm.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://gry3ow88pjud"
path.s3tc="res://.godot/imported/floor_orm.png-ad734700b85932ea8fe8e780643641b4.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://interior/floors/dungeon_01/floor_orm.png"
dest_files=["res://.godot/imported/floor_orm.png-ad734700b85932ea8fe8e780643641b4.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

BIN
interior/floors/dungeon_01/pillar_albedo.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bvmabp7btg0wo"
path.s3tc="res://.godot/imported/pillar_albedo.png-5307fa2f26f1bff72deafa48c97429c8.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://interior/floors/dungeon_01/pillar_albedo.png"
dest_files=["res://.godot/imported/pillar_albedo.png-5307fa2f26f1bff72deafa48c97429c8.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

BIN
interior/floors/dungeon_01/pillar_displacement.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://y3fjjegrdm5t"
path.s3tc="res://.godot/imported/pillar_displacement.png-86e9892e28aca9f87c864a28e6dfa2b7.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://interior/floors/dungeon_01/pillar_displacement.png"
dest_files=["res://.godot/imported/pillar_displacement.png-86e9892e28aca9f87c864a28e6dfa2b7.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

BIN
interior/floors/dungeon_01/pillar_material.res (Stored with Git LFS) Normal file

Binary file not shown.

BIN
interior/floors/dungeon_01/pillar_normal.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dgteu01p0yvb1"
path.s3tc="res://.godot/imported/pillar_normal.png-3acce01d6d5a45e72d80bc85d1cccfeb.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://interior/floors/dungeon_01/pillar_normal.png"
dest_files=["res://.godot/imported/pillar_normal.png-3acce01d6d5a45e72d80bc85d1cccfeb.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=1
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=1
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
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=0

BIN
interior/floors/dungeon_01/pillar_roughness.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -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

BIN
interior/floors/dungeon_01/tiles.glb (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -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

BIN
interior/floors/dungeon_01/tiles_corner_north_east.res (Stored with Git LFS) Normal file

Binary file not shown.

BIN
interior/floors/dungeon_01/tiles_corner_north_west.res (Stored with Git LFS) Normal file

Binary file not shown.

BIN
interior/floors/dungeon_01/tiles_corner_south_east.res (Stored with Git LFS) Normal file

Binary file not shown.

BIN
interior/floors/dungeon_01/tiles_corner_south_west.res (Stored with Git LFS) Normal file

Binary file not shown.

BIN
interior/floors/dungeon_01/tiles_edge_east.res (Stored with Git LFS) Normal file

Binary file not shown.

BIN
interior/floors/dungeon_01/tiles_edge_north.res (Stored with Git LFS) Normal file

Binary file not shown.

BIN
interior/floors/dungeon_01/tiles_edge_south.res (Stored with Git LFS) Normal file

Binary file not shown.

BIN
interior/floors/dungeon_01/tiles_edge_west.res (Stored with Git LFS) Normal file

Binary file not shown.

BIN
interior/floors/dungeon_01/tiles_endcap_east.res (Stored with Git LFS) Normal file

Binary file not shown.

BIN
interior/floors/dungeon_01/tiles_endcap_north.res (Stored with Git LFS) Normal file

Binary file not shown.

BIN
interior/floors/dungeon_01/tiles_endcap_south.res (Stored with Git LFS) Normal file

Binary file not shown.

BIN
interior/floors/dungeon_01/tiles_endcap_west.res (Stored with Git LFS) Normal file

Binary file not shown.

BIN
interior/floors/dungeon_01/tiles_fill.res (Stored with Git LFS) Normal file

Binary file not shown.

BIN
interior/floors/dungeon_01/tiles_island.res (Stored with Git LFS) Normal file

Binary file not shown.

BIN
interior/floors/dungeon_01/tiles_path_horizontal.res (Stored with Git LFS) Normal file

Binary file not shown.

BIN
interior/floors/dungeon_01/tiles_path_vertical.res (Stored with Git LFS) Normal file

Binary file not shown.

BIN
interior/floors/dungeon_01_interior_floor.res (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -3,24 +3,23 @@
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"
path.s3tc="res://.godot/imported/dungeon_01_tiles_height.png-7733c18dddd7d5bf80deae891d3de52e.s3tc.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"]
source_file="res://interior/base/dungeon_01_tiles_height.png"
dest_files=["res://.godot/imported/dungeon_01_tiles_height.png-7733c18dddd7d5bf80deae891d3de52e.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

View File

@ -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

BIN
interior/floors/wood_platforms/tiles.glb (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -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

BIN
interior/floors/wood_platforms/tiles_corner_north_east.res (Stored with Git LFS) Normal file

Binary file not shown.

BIN
interior/floors/wood_platforms/tiles_corner_north_west.res (Stored with Git LFS) Normal file

Binary file not shown.

BIN
interior/floors/wood_platforms/tiles_corner_south_east.res (Stored with Git LFS) Normal file

Binary file not shown.

BIN
interior/floors/wood_platforms/tiles_corner_south_west.res (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
interior/floors/wood_platforms/tiles_island.res (Stored with Git LFS) Normal file

Binary file not shown.

BIN
interior/floors/wood_platforms/tiles_path_vertical.res (Stored with Git LFS) Normal file

Binary file not shown.

BIN
interior/floors/wood_platforms_interior_floor.res (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -2,173 +2,200 @@ 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 _renderables_by_mesh := {}
var _wall_meshes: Array[Mesh] = []
var _wall_orientation := PackedInt32Array()
func _init() -> void:
var buffer_size := _CHUNK_SIZE * _CHUNK_SIZE
_floor_meshes.resize(buffer_size)
_floor_orientation.resize(buffer_size)
_wall_meshes.resize(buffer_size)
_wall_orientation.resize(buffer_size)
func _init(interior_map: InteriorMap, coordinates: Vector2i) -> void:
_interior_map = interior_map
_coordinates = coordinates
##
## 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:
_renderables_by_mesh.clear()
_multi_mesh_instances.clear()
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)
# Normalize mesh instance data for the chunk.
var transforms_by_mesh := {}
var grid_size := interior_map.size
var half_pi := PI / 2
for y in _CHUNK_SIZE:
var map_row_offset := (map_size.y * y)
for i in _floor_meshes.size():
var mesh := _floor_meshes[i]
for x in _CHUNK_SIZE:
var map_coordinates := offset + Vector2i(x, y)
if map_area.has_point(map_coordinates):
var interior_floor := floor_map[map_row_offset + map_coordinates.x]
if interior_floor != null:
var tile := 0
for i in Orientation.values().size():
var map_neighbor := map_coordinates + Vector2i(
roundi(cos(i * PI / 2.0)), roundi(sin(i * PI / 2.0)))
if map_area.has_point(map_neighbor):
tile += int(floor_map[(map_size.y * map_neighbor.y) + map_neighbor.x] == interior_floor) * 2 ** i
var mesh: Mesh = null
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
if mesh != null:
if not(mesh in transforms_by_mesh):
transforms_by_mesh[mesh] = []
if not(mesh in positions_by_mesh):
positions_by_mesh[mesh] = 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_mesh[mesh].append(Vector2(x, y))
for i in _wall_meshes.size():
var mesh := _wall_meshes[i]
# (Re)-bake tiles into multimesh instances for the chunk.
var scenario_rid := _interior_map.get_world_3d().scenario
if mesh != null:
if not(mesh in transforms_by_mesh):
transforms_by_mesh[mesh] = []
for mesh in positions_by_mesh:
var positions: PackedVector2Array = positions_by_mesh[mesh]
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 not(positions.is_empty()):
var position_count := positions.size()
var renderable := Renderable.new(scenario_rid, mesh.get_rid(), position_count)
# (Re)-bake into multimesh instances for the chunk.
var scenario_rid := interior_map.get_world_3d().scenario
var global_transform := interior_map.global_transform
for i in position_count:
var position := positions[i]
for chunk_mesh in transforms_by_mesh:
var multi_mesh_instance := MultiMeshInstance.new(
scenario_rid, chunk_mesh.get_rid(), transforms_by_mesh[chunk_mesh])
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)))
multi_mesh_instance.set_offset(global_transform)
_multi_mesh_instances.append(multi_mesh_instance)
_renderables_by_mesh[mesh] = renderable
func set_transform(transform: Transform3D) -> void:
for mesh in _renderables_by_mesh:
_renderables_by_mesh[mesh].set_transform(transform)
func set_visible(visible: bool) -> void:
for mesh in _renderables_by_mesh:
_renderables_by_mesh[mesh].set_visible(visible)
##
## 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
_floor_orientation[index] = orientation
_floor_meshes[index] = mesh
##
## 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
_wall_orientation[index] = orientation
_wall_meshes[index] = mesh
##
## 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: Array[InteriorFloor] = []
##
## 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.x * value.y)
_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 +205,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,46 +217,17 @@ 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 i in _floor_map.size():
_floor_map[i] = null
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
## [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-
@ -239,70 +235,25 @@ 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, interior_floor: InteriorFloor) -> 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)
_floor_map[(size.y * (y / _CHUNK_SIZE)) + (x / _CHUNK_SIZE)] = interior_floor
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)
_get_chunk(Vector2i(x, y)).invalidate()
##
## Returns the area of the interior map based on its current size.
##
func get_area() -> Rect2i:
return Rect2i(Vector2i.ZERO, size)
##
## 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-
@ -310,30 +261,9 @@ 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")
func plot_floor(coordinates: Vector2i, interior_floor: InteriorFloor) -> void:
assert(Rect2i(Vector2i.ZERO, size).has_point(coordinates), "coordinate must be within grid")
var chunk_coordinates := coordinates / _CHUNK_SIZE
var chunk := _get_chunk(chunk_coordinates)
_floor_map[(size.y * coordinates.y) + coordinates.x] = interior_floor
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)
_get_chunk(coordinates / _CHUNK_SIZE).invalidate()

View File

@ -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

Binary file not shown.

BIN
interior/tiles/dungeon_01_tiling_tile.res (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

View File

@ -1,36 +0,0 @@
[remap]
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"],
"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"]
[params]
compress/mode=2
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/bptc_ldr=0
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

Binary file not shown.

View File

@ -1,36 +0,0 @@
[remap]
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"],
"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"]
[params]
compress/mode=2
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/bptc_ldr=0
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

Binary file not shown.

Binary file not shown.

View File

@ -1,36 +0,0 @@
[remap]
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"],
"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"]
[params]
compress/mode=2
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/bptc_ldr=0
compress/normal_map=1
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=1
roughness/src_normal="res://tiles/tiles/limestone_dungeon/hole_normal.png"
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

Binary file not shown.

View File

@ -1,36 +0,0 @@
[remap]
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"],
"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"]
[params]
compress/mode=2
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/bptc_ldr=0
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

Binary file not shown.

View File

@ -1,36 +0,0 @@
[remap]
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"],
"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"]
[params]
compress/mode=2
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/bptc_ldr=0
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

Binary file not shown.

View File

@ -1,36 +0,0 @@
[remap]
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"],
"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"]
[params]
compress/mode=2
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/bptc_ldr=0
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

Binary file not shown.

Binary file not shown.

View File

@ -1,36 +0,0 @@
[remap]
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"],
"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"]
[params]
compress/mode=2
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/bptc_ldr=0
compress/normal_map=1
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=1
roughness/src_normal="res://tiles/tiles/limestone_dungeon/piping_normal.png"
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

Binary file not shown.

View File

@ -1,36 +0,0 @@
[remap]
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"],
"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"]
[params]
compress/mode=2
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/bptc_ldr=0
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

Binary file not shown.

View File

@ -1,36 +0,0 @@
[remap]
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"],
"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"]
[params]
compress/mode=2
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/bptc_ldr=0
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

Binary file not shown.

Binary file not shown.

View File

@ -1,36 +0,0 @@
[remap]
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"],
"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"]
[params]
compress/mode=2
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/bptc_ldr=0
compress/normal_map=1
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=1
roughness/src_normal="res://tiles/tiles/limestone_dungeon/tiling_normal.png"
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

Binary file not shown.

View File

@ -1,36 +0,0 @@
[remap]
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"],
"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"]
[params]
compress/mode=2
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/bptc_ldr=0
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

BIN
map_editor.scn (Stored with Git LFS)

Binary file not shown.

View File

@ -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]

View File

@ -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]

View File

@ -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]

View File

@ -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]

Some files were not shown because too many files have changed in this diff Show More