diff --git a/Makefile b/Makefile index 1248980..2938864 100644 --- a/Makefile +++ b/Makefile @@ -1,19 +1,23 @@ +ARCH=$(patsubst aarch64,arm64,$(shell uname -m)) BLENDER = ../../blender-3.6.20-linux-x64/blender -SERVER = src/godot/bin/godot_server.x11.opt.tools.64 +SERVER = src/godot/bin/godot_server.x11.opt.tools.$(ARCH) .PHONY: all godot-editor-main export export-models export-clothes \ export-clean export-linux-demo export-windows-demo \ export-binaries patch tests import-vrm export-buildings all: godot-editor-main godot-main -ARCH=$(patsubst aarch64,arm64,$(shell uname -m)) godot-main: patch cd src/godot; \ scons platform=x11 arch=$(ARCH) target=release tools=no custom_modules=../modules -j16; \ scons platform=x11 arch=$(ARCH) target=release_debug tools=no custom_modules=../modules -j16; cd src/godot; \ scons platform=x11 arch=$(ARCH) target=release tools=no custom_modules=../modules -j16; \ - scons platform=server target=release_debug tools=yes custom_modules=../modules -j16 -godot-editor-main: patch + +godot-server-main: $(SERVER) +$(SERVER): patch + cd src/godot; \ + scons platform=server arch=$(ARCH) target=release_debug tools=yes custom_modules=../modules -j16 +godot-editor-main: cd src/godot; \ scons platform=x11 arch=$(ARCH) verbose=yes target=release_debug tools=yes custom_modules=../modules -j24; patch: ./src/godot/scene/animation/skeleton_ik.cpp @@ -83,6 +87,11 @@ export-binaries: $(SERVER) --path godot --export windows_demo ../export/office-demo-windows.x86_64.exe $(SERVER) --path godot --export-debug windows_demo ../export/office-demo-debug-windows.x86_64.exe +pack-terrain: godot-server-main + $(SERVER) --path ./godot --import --quit + $(SERVER) --path ./godot -s make_terrain_pck.gd --quit + + tests: make -C tests all diff --git a/godot/astream/terrain/details/business-bar1.bin b/godot/astream/terrain/details/business-bar1.bin index b96d6c1..8fe3f9d 100644 Binary files a/godot/astream/terrain/details/business-bar1.bin and b/godot/astream/terrain/details/business-bar1.bin differ diff --git a/godot/astream/terrain/details/business-bar1.gltf b/godot/astream/terrain/details/business-bar1.gltf index a4163a7..9b12e77 100644 --- a/godot/astream/terrain/details/business-bar1.gltf +++ b/godot/astream/terrain/details/business-bar1.gltf @@ -104,209 +104,27 @@ ], "materials":[ { - "doubleSided":true, + "alphaCutoff":0.5, + "alphaMode":"MASK", "extensions":{ "KHR_materials_specular":{ - "specularColorFactor":[ - 0.0023713577270748406, - 0.0023713577270748406, - 0.0023713577270748406 - ] + "specularColorTexture":{ + "index":0 + } }, "KHR_materials_ior":{ "ior":1.4500000476837158 } }, - "name":"foundation", + "name":"material_joint_atlas_1", "pbrMetallicRoughness":{ - "baseColorFactor":[ - 0.24619412422180176, - 0.24619412422180176, - 0.24619412422180176, - 1 - ], - "metallicFactor":0 - } - }, - { - "extensions":{ - "KHR_materials_specular":{ - "specularColorFactor":[ - 0.26901954526736, - 0.26901954526736, - 0.26901954526736 - ] + "baseColorTexture":{ + "index":1 }, - "KHR_materials_ior":{ - "ior":1.4500000476837158 - } - }, - "name":"floor", - "pbrMetallicRoughness":{ - "baseColorFactor":[ - 0.10653432458639145, - 0.0016380276065319777, - 0, - 1 - ], "metallicFactor":0, - "roughnessFactor":0.5084034204483032 - } - }, - { - "extensions":{ - "KHR_materials_specular":{ - "specularColorFactor":[ - 0.02371357561437425, - 0.02371357561437425, - 0.02371357561437425 - ] - }, - "KHR_materials_ior":{ - "ior":1.4500000476837158 + "metallicRoughnessTexture":{ + "index":2 } - }, - "name":"external-wall-bar", - "pbrMetallicRoughness":{ - "baseColorFactor":[ - 0.8000000715255737, - 0.6763367652893066, - 0.29701265692710876, - 1 - ], - "metallicFactor":0 - } - }, - { - "doubleSided":true, - "emissiveFactor":[ - 0.42920592427253723, - 0.42920592427253723, - 0.42920592427253723 - ], - "extensions":{ - "KHR_materials_specular":{ - "specularColorFactor":[ - 1.9512351200761842, - 1.9512351200761842, - 1.9512351200761842 - ] - }, - "KHR_materials_ior":{ - "ior":1.4500000476837158 - } - }, - "name":"window", - "pbrMetallicRoughness":{ - "metallicFactor":0.20000000298023224, - "roughnessFactor":0.019999999552965164 - } - }, - { - "doubleSided":true, - "extensions":{ - "KHR_materials_specular":{ - "specularColorFactor":[ - 0.02371357561437425, - 0.02371357561437425, - 0.02371357561437425 - ] - }, - "KHR_materials_ior":{ - "ior":1.4500000476837158 - } - }, - "name":"internal-wall-bar", - "pbrMetallicRoughness":{ - "baseColorFactor":[ - 0.8000000715255737, - 0.6374557614326477, - 0.38944506645202637, - 1 - ], - "metallicFactor":0 - } - }, - { - "name":"floor-stair", - "pbrMetallicRoughness":{ - "baseColorFactor":[ - 0.31457382440567017, - 0.6041865944862366, - 0.8000000715255737, - 1 - ], - "metallicFactor":0, - "roughnessFactor":0.5 - } - }, - { - "extensions":{ - "KHR_materials_specular":{ - "specularColorFactor":[ - 0.237135764977738, - 0.237135764977738, - 0.237135764977738 - ] - }, - "KHR_materials_ior":{ - "ior":1.4500000476837158 - } - }, - "name":"ceiling", - "pbrMetallicRoughness":{ - "metallicFactor":0 - } - }, - { - "doubleSided":true, - "extensions":{ - "KHR_materials_specular":{ - "specularColorFactor":[ - 0.02371357561437425, - 0.02371357561437425, - 0.02371357561437425 - ] - }, - "KHR_materials_ior":{ - "ior":1.4500000476837158 - } - }, - "name":"roof", - "pbrMetallicRoughness":{ - "baseColorFactor":[ - 0.2461913675069809, - 0.2461913675069809, - 0.2461913675069809, - 1 - ], - "metallicFactor":0 - } - }, - { - "doubleSided":true, - "extensions":{ - "KHR_materials_specular":{ - "specularColorFactor":[ - 0.237135764977738, - 0.237135764977738, - 0.237135764977738 - ] - }, - "KHR_materials_ior":{ - "ior":1.4500000476837158 - } - }, - "name":"road", - "pbrMetallicRoughness":{ - "baseColorFactor":[ - 0.04696126654744148, - 0.04696126654744148, - 0.04696126654744148, - 1 - ], - "metallicFactor":0.10000000149011612, - "roughnessFactor":0.8999999761581421 } } ], @@ -322,15 +140,6 @@ }, "indices":3, "material":0 - }, - { - "attributes":{ - "POSITION":4, - "NORMAL":5, - "TEXCOORD_0":6 - }, - "indices":7, - "material":1 } ] }, @@ -339,21 +148,12 @@ "primitives":[ { "attributes":{ - "POSITION":8, - "NORMAL":9, - "TEXCOORD_0":10 + "POSITION":4, + "NORMAL":5, + "TEXCOORD_0":6 }, - "indices":11, - "material":2 - }, - { - "attributes":{ - "POSITION":12, - "NORMAL":13, - "TEXCOORD_0":14 - }, - "indices":15, - "material":3 + "indices":7, + "material":0 } ] }, @@ -362,21 +162,12 @@ "primitives":[ { "attributes":{ - "POSITION":16, - "NORMAL":17, - "TEXCOORD_0":18 + "POSITION":8, + "NORMAL":9, + "TEXCOORD_0":10 }, - "indices":19, - "material":2 - }, - { - "attributes":{ - "POSITION":20, - "NORMAL":21, - "TEXCOORD_0":22 - }, - "indices":23, - "material":3 + "indices":11, + "material":0 } ] }, @@ -385,13 +176,13 @@ "primitives":[ { "attributes":{ - "POSITION":24, - "NORMAL":25, - "TEXCOORD_0":26, - "TANGENT":27 + "POSITION":12, + "NORMAL":13, + "TEXCOORD_0":14, + "TANGENT":15 }, - "indices":28, - "material":4 + "indices":16, + "material":0 } ] }, @@ -400,12 +191,12 @@ "primitives":[ { "attributes":{ - "POSITION":29, - "NORMAL":30, - "TEXCOORD_0":31 + "POSITION":17, + "NORMAL":18, + "TEXCOORD_0":19 }, - "indices":32, - "material":4 + "indices":20, + "material":0 } ] }, @@ -414,30 +205,12 @@ "primitives":[ { "attributes":{ - "POSITION":33, - "NORMAL":34, - "TEXCOORD_0":35 + "POSITION":21, + "NORMAL":22, + "TEXCOORD_0":23 }, - "indices":36, - "material":5 - }, - { - "attributes":{ - "POSITION":37, - "NORMAL":38, - "TEXCOORD_0":39 - }, - "indices":40, - "material":1 - }, - { - "attributes":{ - "POSITION":41, - "NORMAL":42, - "TEXCOORD_0":43 - }, - "indices":44, - "material":6 + "indices":24, + "material":0 } ] }, @@ -446,23 +219,13 @@ "primitives":[ { "attributes":{ - "POSITION":45, - "NORMAL":46, - "TEXCOORD_0":47, - "TANGENT":48 + "POSITION":25, + "NORMAL":26, + "TEXCOORD_0":27, + "TANGENT":28 }, - "indices":49, - "material":6 - }, - { - "attributes":{ - "POSITION":50, - "NORMAL":51, - "TEXCOORD_0":52, - "TANGENT":53 - }, - "indices":54, - "material":7 + "indices":29, + "material":0 } ] }, @@ -471,13 +234,13 @@ "primitives":[ { "attributes":{ - "POSITION":55, - "NORMAL":56, - "TEXCOORD_0":57, - "TANGENT":58 + "POSITION":30, + "NORMAL":31, + "TEXCOORD_0":32, + "TANGENT":33 }, - "indices":59, - "material":8 + "indices":34, + "material":0 } ] }, @@ -486,21 +249,52 @@ "primitives":[ { "attributes":{ - "POSITION":60, - "NORMAL":61, - "TEXCOORD_0":62 + "POSITION":35, + "NORMAL":36, + "TEXCOORD_0":37 }, - "indices":63, - "material":5 + "indices":38, + "material":0 } ] } ], + "textures":[ + { + "sampler":0, + "source":0 + }, + { + "sampler":0, + "source":1 + }, + { + "sampler":0, + "source":2 + } + ], + "images":[ + { + "mimeType":"image/png", + "name":"Image", + "uri":"textures/Image.png" + }, + { + "mimeType":"image/png", + "name":"joint-atlas-1", + "uri":"textures/joint-atlas-1.png" + }, + { + "mimeType":"image/png", + "name":"joint-atlas-1-roughness", + "uri":"textures/joint-atlas-1-roughness.png" + } + ], "accessors":[ { "bufferView":0, "componentType":5126, - "count":747, + "count":734, "max":[ 30, 1, @@ -516,59 +310,25 @@ { "bufferView":1, "componentType":5126, - "count":747, + "count":734, "type":"VEC3" }, { "bufferView":2, "componentType":5126, - "count":747, + "count":734, "type":"VEC2" }, { "bufferView":3, "componentType":5123, - "count":1614, + "count":1665, "type":"SCALAR" }, { "bufferView":4, "componentType":5126, - "count":19, - "max":[ - 28.81838607788086, - 1, - 14.81838607788086 - ], - "min":[ - -14.81838607788086, - 1, - -29.81838607788086 - ], - "type":"VEC3" - }, - { - "bufferView":5, - "componentType":5126, - "count":19, - "type":"VEC3" - }, - { - "bufferView":6, - "componentType":5126, - "count":19, - "type":"VEC2" - }, - { - "bufferView":7, - "componentType":5123, - "count":51, - "type":"SCALAR" - }, - { - "bufferView":8, - "componentType":5126, - "count":905, + "count":968, "max":[ 29.5, 5, @@ -582,61 +342,27 @@ "type":"VEC3" }, { - "bufferView":9, + "bufferView":5, "componentType":5126, - "count":905, + "count":968, "type":"VEC3" }, { - "bufferView":10, + "bufferView":6, "componentType":5126, - "count":905, + "count":968, "type":"VEC2" }, { - "bufferView":11, + "bufferView":7, "componentType":5123, - "count":2205, + "count":2295, "type":"SCALAR" }, { - "bufferView":12, + "bufferView":8, "componentType":5126, - "count":60, - "max":[ - 29, - 3, - 15 - ], - "min":[ - -15, - 1, - -30 - ], - "type":"VEC3" - }, - { - "bufferView":13, - "componentType":5126, - "count":60, - "type":"VEC3" - }, - { - "bufferView":14, - "componentType":5126, - "count":60, - "type":"VEC2" - }, - { - "bufferView":15, - "componentType":5123, - "count":90, - "type":"SCALAR" - }, - { - "bufferView":16, - "componentType":5126, - "count":885, + "count":948, "max":[ 29.5, 4, @@ -650,59 +376,25 @@ "type":"VEC3" }, { - "bufferView":17, + "bufferView":9, "componentType":5126, - "count":885, + "count":948, "type":"VEC3" }, { - "bufferView":18, + "bufferView":10, "componentType":5126, - "count":885, + "count":948, "type":"VEC2" }, { - "bufferView":19, + "bufferView":11, "componentType":5123, - "count":2196, + "count":2286, "type":"SCALAR" }, { - "bufferView":20, - "componentType":5126, - "count":60, - "max":[ - 29, - 3, - 15 - ], - "min":[ - -15, - 1, - -30 - ], - "type":"VEC3" - }, - { - "bufferView":21, - "componentType":5126, - "count":60, - "type":"VEC3" - }, - { - "bufferView":22, - "componentType":5126, - "count":60, - "type":"VEC2" - }, - { - "bufferView":23, - "componentType":5123, - "count":90, - "type":"SCALAR" - }, - { - "bufferView":24, + "bufferView":12, "componentType":5126, "count":306, "max":[ @@ -718,31 +410,31 @@ "type":"VEC3" }, { - "bufferView":25, + "bufferView":13, "componentType":5126, "count":306, "type":"VEC3" }, { - "bufferView":26, + "bufferView":14, "componentType":5126, "count":306, "type":"VEC2" }, { - "bufferView":27, + "bufferView":15, "componentType":5126, "count":306, "type":"VEC4" }, { - "bufferView":28, + "bufferView":16, "componentType":5123, "count":780, "type":"SCALAR" }, { - "bufferView":29, + "bufferView":17, "componentType":5126, "count":238, "max":[ @@ -758,27 +450,27 @@ "type":"VEC3" }, { - "bufferView":30, + "bufferView":18, "componentType":5126, "count":238, "type":"VEC3" }, { - "bufferView":31, + "bufferView":19, "componentType":5126, "count":238, "type":"VEC2" }, { - "bufferView":32, + "bufferView":20, "componentType":5123, "count":657, "type":"SCALAR" }, { - "bufferView":33, + "bufferView":21, "componentType":5126, - "count":332, + "count":348, "max":[ 30.5, 2, @@ -792,135 +484,27 @@ "type":"VEC3" }, { - "bufferView":34, + "bufferView":22, "componentType":5126, - "count":332, + "count":348, "type":"VEC3" }, { - "bufferView":35, + "bufferView":23, "componentType":5126, - "count":332, + "count":348, "type":"VEC2" }, { - "bufferView":36, + "bufferView":24, "componentType":5123, - "count":885, + "count":915, "type":"SCALAR" }, { - "bufferView":37, + "bufferView":25, "componentType":5126, - "count":8, - "max":[ - 15.5, - 2, - 15.5 - ], - "min":[ - -15.5, - 2, - -15.5 - ], - "type":"VEC3" - }, - { - "bufferView":38, - "componentType":5126, - "count":8, - "type":"VEC3" - }, - { - "bufferView":39, - "componentType":5126, - "count":8, - "type":"VEC2" - }, - { - "bufferView":40, - "componentType":5123, - "count":18, - "type":"SCALAR" - }, - { - "bufferView":41, - "componentType":5126, - "count":8, - "max":[ - 15.5, - 1, - 15.5 - ], - "min":[ - -15.482080459594727, - 1, - -15.5 - ], - "type":"VEC3" - }, - { - "bufferView":42, - "componentType":5126, - "count":8, - "type":"VEC3" - }, - { - "bufferView":43, - "componentType":5126, - "count":8, - "type":"VEC2" - }, - { - "bufferView":44, - "componentType":5123, - "count":12, - "type":"SCALAR" - }, - { - "bufferView":45, - "componentType":5126, - "count":25, - "max":[ - 30.13867950439453, - 0, - 16.13867950439453 - ], - "min":[ - -16.13867950439453, - 0, - -31.13867950439453 - ], - "type":"VEC3" - }, - { - "bufferView":46, - "componentType":5126, - "count":25, - "type":"VEC3" - }, - { - "bufferView":47, - "componentType":5126, - "count":25, - "type":"VEC2" - }, - { - "bufferView":48, - "componentType":5126, - "count":25, - "type":"VEC4" - }, - { - "bufferView":49, - "componentType":5123, - "count":54, - "type":"SCALAR" - }, - { - "bufferView":50, - "componentType":5126, - "count":199, + "count":218, "max":[ 31, 1, @@ -934,31 +518,31 @@ "type":"VEC3" }, { - "bufferView":51, + "bufferView":26, "componentType":5126, - "count":199, + "count":218, "type":"VEC3" }, { - "bufferView":52, + "bufferView":27, "componentType":5126, - "count":199, + "count":218, "type":"VEC2" }, { - "bufferView":53, + "bufferView":28, "componentType":5126, - "count":199, + "count":218, "type":"VEC4" }, { - "bufferView":54, + "bufferView":29, "componentType":5123, - "count":420, + "count":474, "type":"SCALAR" }, { - "bufferView":55, + "bufferView":30, "componentType":5126, "count":40, "max":[ @@ -974,33 +558,33 @@ "type":"VEC3" }, { - "bufferView":56, + "bufferView":31, "componentType":5126, "count":40, "type":"VEC3" }, { - "bufferView":57, + "bufferView":32, "componentType":5126, "count":40, "type":"VEC2" }, { - "bufferView":58, + "bufferView":33, "componentType":5126, "count":40, "type":"VEC4" }, { - "bufferView":59, + "bufferView":34, "componentType":5123, "count":60, "type":"SCALAR" }, { - "bufferView":60, + "bufferView":35, "componentType":5126, - "count":1212, + "count":1213, "max":[ 13.699999809265137, 5.800000190734863, @@ -1014,19 +598,19 @@ "type":"VEC3" }, { - "bufferView":61, + "bufferView":36, "componentType":5126, - "count":1212, + "count":1213, "type":"VEC3" }, { - "bufferView":62, + "bufferView":37, "componentType":5126, - "count":1212, + "count":1213, "type":"VEC2" }, { - "bufferView":63, + "bufferView":38, "componentType":5123, "count":1956, "type":"SCALAR" @@ -1035,392 +619,248 @@ "bufferViews":[ { "buffer":0, - "byteLength":8964, + "byteLength":8808, "byteOffset":0, "target":34962 }, { "buffer":0, - "byteLength":8964, - "byteOffset":8964, + "byteLength":8808, + "byteOffset":8808, "target":34962 }, { "buffer":0, - "byteLength":5976, - "byteOffset":17928, + "byteLength":5872, + "byteOffset":17616, "target":34962 }, { "buffer":0, - "byteLength":3228, - "byteOffset":23904, + "byteLength":3330, + "byteOffset":23488, "target":34963 }, { "buffer":0, - "byteLength":228, - "byteOffset":27132, + "byteLength":11616, + "byteOffset":26820, "target":34962 }, { "buffer":0, - "byteLength":228, - "byteOffset":27360, + "byteLength":11616, + "byteOffset":38436, "target":34962 }, { "buffer":0, - "byteLength":152, - "byteOffset":27588, + "byteLength":7744, + "byteOffset":50052, "target":34962 }, { "buffer":0, - "byteLength":102, - "byteOffset":27740, + "byteLength":4590, + "byteOffset":57796, "target":34963 }, { "buffer":0, - "byteLength":10860, - "byteOffset":27844, + "byteLength":11376, + "byteOffset":62388, "target":34962 }, { "buffer":0, - "byteLength":10860, - "byteOffset":38704, + "byteLength":11376, + "byteOffset":73764, "target":34962 }, { "buffer":0, - "byteLength":7240, - "byteOffset":49564, + "byteLength":7584, + "byteOffset":85140, "target":34962 }, { "buffer":0, - "byteLength":4410, - "byteOffset":56804, - "target":34963 - }, - { - "buffer":0, - "byteLength":720, - "byteOffset":61216, - "target":34962 - }, - { - "buffer":0, - "byteLength":720, - "byteOffset":61936, - "target":34962 - }, - { - "buffer":0, - "byteLength":480, - "byteOffset":62656, - "target":34962 - }, - { - "buffer":0, - "byteLength":180, - "byteOffset":63136, - "target":34963 - }, - { - "buffer":0, - "byteLength":10620, - "byteOffset":63316, - "target":34962 - }, - { - "buffer":0, - "byteLength":10620, - "byteOffset":73936, - "target":34962 - }, - { - "buffer":0, - "byteLength":7080, - "byteOffset":84556, - "target":34962 - }, - { - "buffer":0, - "byteLength":4392, - "byteOffset":91636, - "target":34963 - }, - { - "buffer":0, - "byteLength":720, - "byteOffset":96028, - "target":34962 - }, - { - "buffer":0, - "byteLength":720, - "byteOffset":96748, - "target":34962 - }, - { - "buffer":0, - "byteLength":480, - "byteOffset":97468, - "target":34962 - }, - { - "buffer":0, - "byteLength":180, - "byteOffset":97948, + "byteLength":4572, + "byteOffset":92724, "target":34963 }, { "buffer":0, "byteLength":3672, - "byteOffset":98128, + "byteOffset":97296, "target":34962 }, { "buffer":0, "byteLength":3672, - "byteOffset":101800, + "byteOffset":100968, "target":34962 }, { "buffer":0, "byteLength":2448, - "byteOffset":105472, + "byteOffset":104640, "target":34962 }, { "buffer":0, "byteLength":4896, - "byteOffset":107920, + "byteOffset":107088, "target":34962 }, { "buffer":0, "byteLength":1560, - "byteOffset":112816, + "byteOffset":111984, "target":34963 }, { "buffer":0, "byteLength":2856, - "byteOffset":114376, + "byteOffset":113544, "target":34962 }, { "buffer":0, "byteLength":2856, - "byteOffset":117232, + "byteOffset":116400, "target":34962 }, { "buffer":0, "byteLength":1904, - "byteOffset":120088, + "byteOffset":119256, "target":34962 }, { "buffer":0, "byteLength":1314, - "byteOffset":121992, + "byteOffset":121160, "target":34963 }, { "buffer":0, - "byteLength":3984, - "byteOffset":123308, + "byteLength":4176, + "byteOffset":122476, "target":34962 }, { "buffer":0, - "byteLength":3984, - "byteOffset":127292, + "byteLength":4176, + "byteOffset":126652, "target":34962 }, { "buffer":0, - "byteLength":2656, - "byteOffset":131276, + "byteLength":2784, + "byteOffset":130828, "target":34962 }, { "buffer":0, - "byteLength":1770, - "byteOffset":133932, + "byteLength":1830, + "byteOffset":133612, "target":34963 }, { "buffer":0, - "byteLength":96, - "byteOffset":135704, + "byteLength":2616, + "byteOffset":135444, "target":34962 }, { "buffer":0, - "byteLength":96, - "byteOffset":135800, + "byteLength":2616, + "byteOffset":138060, "target":34962 }, { "buffer":0, - "byteLength":64, - "byteOffset":135896, + "byteLength":1744, + "byteOffset":140676, "target":34962 }, { "buffer":0, - "byteLength":36, - "byteOffset":135960, - "target":34963 - }, - { - "buffer":0, - "byteLength":96, - "byteOffset":135996, + "byteLength":3488, + "byteOffset":142420, "target":34962 }, { "buffer":0, - "byteLength":96, - "byteOffset":136092, - "target":34962 - }, - { - "buffer":0, - "byteLength":64, - "byteOffset":136188, - "target":34962 - }, - { - "buffer":0, - "byteLength":24, - "byteOffset":136252, - "target":34963 - }, - { - "buffer":0, - "byteLength":300, - "byteOffset":136276, - "target":34962 - }, - { - "buffer":0, - "byteLength":300, - "byteOffset":136576, - "target":34962 - }, - { - "buffer":0, - "byteLength":200, - "byteOffset":136876, - "target":34962 - }, - { - "buffer":0, - "byteLength":400, - "byteOffset":137076, - "target":34962 - }, - { - "buffer":0, - "byteLength":108, - "byteOffset":137476, - "target":34963 - }, - { - "buffer":0, - "byteLength":2388, - "byteOffset":137584, - "target":34962 - }, - { - "buffer":0, - "byteLength":2388, - "byteOffset":139972, - "target":34962 - }, - { - "buffer":0, - "byteLength":1592, - "byteOffset":142360, - "target":34962 - }, - { - "buffer":0, - "byteLength":3184, - "byteOffset":143952, - "target":34962 - }, - { - "buffer":0, - "byteLength":840, - "byteOffset":147136, + "byteLength":948, + "byteOffset":145908, "target":34963 }, { "buffer":0, "byteLength":480, - "byteOffset":147976, + "byteOffset":146856, "target":34962 }, { "buffer":0, "byteLength":480, - "byteOffset":148456, + "byteOffset":147336, "target":34962 }, { "buffer":0, "byteLength":320, - "byteOffset":148936, + "byteOffset":147816, "target":34962 }, { "buffer":0, "byteLength":640, - "byteOffset":149256, + "byteOffset":148136, "target":34962 }, { "buffer":0, "byteLength":120, - "byteOffset":149896, + "byteOffset":148776, "target":34963 }, { "buffer":0, - "byteLength":14544, - "byteOffset":150016, + "byteLength":14556, + "byteOffset":148896, "target":34962 }, { "buffer":0, - "byteLength":14544, - "byteOffset":164560, + "byteLength":14556, + "byteOffset":163452, "target":34962 }, { "buffer":0, - "byteLength":9696, - "byteOffset":179104, + "byteLength":9704, + "byteOffset":178008, "target":34962 }, { "buffer":0, "byteLength":3912, - "byteOffset":188800, + "byteOffset":187712, "target":34963 } ], + "samplers":[ + { + "magFilter":9729, + "minFilter":9987 + } + ], "buffers":[ { - "byteLength":192712, + "byteLength":191624, "uri":"business-bar1.bin" } ] diff --git a/godot/astream/terrain/details/business-cafe1.bin b/godot/astream/terrain/details/business-cafe1.bin index f9592ce..0f58ce5 100644 Binary files a/godot/astream/terrain/details/business-cafe1.bin and b/godot/astream/terrain/details/business-cafe1.bin differ diff --git a/godot/astream/terrain/details/business-cafe1.gltf b/godot/astream/terrain/details/business-cafe1.gltf index 1bd1921..a896647 100644 --- a/godot/astream/terrain/details/business-cafe1.gltf +++ b/godot/astream/terrain/details/business-cafe1.gltf @@ -12,25 +12,13 @@ { "name":"Scene", "nodes":[ - 1 + 0 ] } ], "nodes":[ { "mesh":0, - "name":"flat3-1-noimp", - "translation":[ - 0, - 1, - 0 - ] - }, - { - "children":[ - 0 - ], - "mesh":1, "name":"cafe1-col" } ], @@ -40,53 +28,29 @@ "alphaMode":"MASK", "extensions":{ "KHR_materials_specular":{ - "specularColorFactor":[ - 0.474271529955476, - 0.474271529955476, - 0.474271529955476 - ] + "specularColorTexture":{ + "index":0 + } }, "KHR_materials_ior":{ "ior":1.4500000476837158 } }, - "name":"material_atlas_73934_1", + "name":"material_joint_atlas_1", "pbrMetallicRoughness":{ "baseColorTexture":{ - "index":0 + "index":1 }, - "metallicFactor":0 - } - }, - { - "doubleSided":true, - "emissiveFactor":[ - 0.42920592427253723, - 0.42920592427253723, - 0.42920592427253723 - ], - "extensions":{ - "KHR_materials_specular":{ - "specularColorFactor":[ - 1.9512351200761842, - 1.9512351200761842, - 1.9512351200761842 - ] - }, - "KHR_materials_ior":{ - "ior":1.4500000476837158 + "metallicFactor":0, + "metallicRoughnessTexture":{ + "index":2 } - }, - "name":"window", - "pbrMetallicRoughness":{ - "metallicFactor":0.20000000298023224, - "roughnessFactor":0.019999999552965164 } } ], "meshes":[ { - "name":"Plane.003", + "name":"Cube.003", "primitives":[ { "attributes":{ @@ -99,91 +63,44 @@ "material":0 } ] - }, - { - "name":"Cube.003", - "primitives":[ - { - "attributes":{ - "POSITION":5, - "NORMAL":6, - "TEXCOORD_0":7, - "TANGENT":8 - }, - "indices":9, - "material":0 - }, - { - "attributes":{ - "POSITION":10, - "NORMAL":11, - "TEXCOORD_0":12, - "TANGENT":13 - }, - "indices":14, - "material":1 - } - ] } ], "textures":[ { "sampler":0, "source":0 + }, + { + "sampler":0, + "source":1 + }, + { + "sampler":0, + "source":2 } ], "images":[ { "mimeType":"image/png", - "name":"Atlas_73934", - "uri":"textures/Atlas_73934.png" + "name":"Image", + "uri":"textures/Image.png" + }, + { + "mimeType":"image/png", + "name":"joint-atlas-1", + "uri":"textures/joint-atlas-1.png" + }, + { + "mimeType":"image/png", + "name":"joint-atlas-1-roughness", + "uri":"textures/joint-atlas-1-roughness.png" } ], "accessors":[ { "bufferView":0, "componentType":5126, - "count":28, - "max":[ - 11, - 4, - 11 - ], - "min":[ - -11, - 0, - -8 - ], - "type":"VEC3" - }, - { - "bufferView":1, - "componentType":5126, - "count":28, - "type":"VEC3" - }, - { - "bufferView":2, - "componentType":5126, - "count":28, - "type":"VEC2" - }, - { - "bufferView":3, - "componentType":5126, - "count":28, - "type":"VEC4" - }, - { - "bufferView":4, - "componentType":5123, - "count":72, - "type":"SCALAR" - }, - { - "bufferView":5, - "componentType":5126, - "count":746, + "count":753, "max":[ 12, 8, @@ -197,159 +114,59 @@ "type":"VEC3" }, { - "bufferView":6, + "bufferView":1, "componentType":5126, - "count":746, + "count":753, "type":"VEC3" }, { - "bufferView":7, + "bufferView":2, "componentType":5126, - "count":746, + "count":753, "type":"VEC2" }, { - "bufferView":8, + "bufferView":3, "componentType":5126, - "count":746, + "count":753, "type":"VEC4" }, { - "bufferView":9, + "bufferView":4, "componentType":5123, - "count":1938, - "type":"SCALAR" - }, - { - "bufferView":10, - "componentType":5126, - "count":16, - "max":[ - 11.449999809265137, - 5, - 2 - ], - "min":[ - -11.449999809265137, - 1.272276520729065, - -8.181105613708496 - ], - "type":"VEC3" - }, - { - "bufferView":11, - "componentType":5126, - "count":16, - "type":"VEC3" - }, - { - "bufferView":12, - "componentType":5126, - "count":16, - "type":"VEC2" - }, - { - "bufferView":13, - "componentType":5126, - "count":16, - "type":"VEC4" - }, - { - "bufferView":14, - "componentType":5123, - "count":24, + "count":1962, "type":"SCALAR" } ], "bufferViews":[ { "buffer":0, - "byteLength":336, + "byteLength":9036, "byteOffset":0, "target":34962 }, { "buffer":0, - "byteLength":336, - "byteOffset":336, + "byteLength":9036, + "byteOffset":9036, "target":34962 }, { "buffer":0, - "byteLength":224, - "byteOffset":672, + "byteLength":6024, + "byteOffset":18072, "target":34962 }, { "buffer":0, - "byteLength":448, - "byteOffset":896, + "byteLength":12048, + "byteOffset":24096, "target":34962 }, { "buffer":0, - "byteLength":144, - "byteOffset":1344, - "target":34963 - }, - { - "buffer":0, - "byteLength":8952, - "byteOffset":1488, - "target":34962 - }, - { - "buffer":0, - "byteLength":8952, - "byteOffset":10440, - "target":34962 - }, - { - "buffer":0, - "byteLength":5968, - "byteOffset":19392, - "target":34962 - }, - { - "buffer":0, - "byteLength":11936, - "byteOffset":25360, - "target":34962 - }, - { - "buffer":0, - "byteLength":3876, - "byteOffset":37296, - "target":34963 - }, - { - "buffer":0, - "byteLength":192, - "byteOffset":41172, - "target":34962 - }, - { - "buffer":0, - "byteLength":192, - "byteOffset":41364, - "target":34962 - }, - { - "buffer":0, - "byteLength":128, - "byteOffset":41556, - "target":34962 - }, - { - "buffer":0, - "byteLength":256, - "byteOffset":41684, - "target":34962 - }, - { - "buffer":0, - "byteLength":48, - "byteOffset":41940, + "byteLength":3924, + "byteOffset":36144, "target":34963 } ], @@ -361,7 +178,7 @@ ], "buffers":[ { - "byteLength":41988, + "byteLength":40068, "uri":"business-cafe1.bin" } ] diff --git a/godot/astream/terrain/details/business-office1.tscn b/godot/astream/terrain/details/business-office1.tscn new file mode 100644 index 0000000..9c594ef --- /dev/null +++ b/godot/astream/terrain/details/business-office1.tscn @@ -0,0 +1,17 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://astream/terrain/details/business-office1.gltf" type="PackedScene" id=1] + +[node name="business-office1" type="Spatial"] + +[node name="LOD" type="LOD" parent="."] + +[node name="0" type="Spatial" parent="LOD"] +lod_range = 150.0 + +[node name="MergeGroup" type="MergeGroup" parent="LOD/0"] + +[node name="business-office1" parent="LOD/0/MergeGroup" instance=ExtResource( 1 )] + +[node name="1" type="Spatial" parent="LOD"] +visible = false diff --git a/godot/astream/terrain/details/business-store1.bin b/godot/astream/terrain/details/business-store1.bin index c99f90a..44de848 100644 Binary files a/godot/astream/terrain/details/business-store1.bin and b/godot/astream/terrain/details/business-store1.bin differ diff --git a/godot/astream/terrain/details/business-store1.gltf b/godot/astream/terrain/details/business-store1.gltf index 5fccc83..f7781be 100644 --- a/godot/astream/terrain/details/business-store1.gltf +++ b/godot/astream/terrain/details/business-store1.gltf @@ -12,25 +12,13 @@ { "name":"Scene", "nodes":[ - 1 + 0 ] } ], "nodes":[ { "mesh":0, - "name":"flat3-1-noimp", - "translation":[ - 0, - 1, - 0 - ] - }, - { - "children":[ - 0 - ], - "mesh":1, "name":"store1-col" } ], @@ -40,76 +28,29 @@ "alphaMode":"MASK", "extensions":{ "KHR_materials_specular":{ - "specularColorFactor":[ - 0.474271529955476, - 0.474271529955476, - 0.474271529955476 - ] + "specularColorTexture":{ + "index":0 + } }, "KHR_materials_ior":{ "ior":1.4500000476837158 } }, - "name":"material_atlas_73934_1", - "pbrMetallicRoughness":{ - "baseColorTexture":{ - "index":0 - }, - "metallicFactor":0 - } - }, - { - "alphaCutoff":0.5, - "alphaMode":"MASK", - "extensions":{ - "KHR_materials_specular":{ - "specularColorFactor":[ - 0.474271529955476, - 0.474271529955476, - 0.474271529955476 - ] - }, - "KHR_materials_ior":{ - "ior":1.4500000476837158 - } - }, - "name":"material_atlas_73934_1.001", + "name":"material_joint_atlas_1", "pbrMetallicRoughness":{ "baseColorTexture":{ "index":1 }, - "metallicFactor":0 - } - }, - { - "doubleSided":true, - "emissiveFactor":[ - 0.42920592427253723, - 0.42920592427253723, - 0.42920592427253723 - ], - "extensions":{ - "KHR_materials_specular":{ - "specularColorFactor":[ - 1.9512351200761842, - 1.9512351200761842, - 1.9512351200761842 - ] - }, - "KHR_materials_ior":{ - "ior":1.4500000476837158 + "metallicFactor":0, + "metallicRoughnessTexture":{ + "index":2 } - }, - "name":"window", - "pbrMetallicRoughness":{ - "metallicFactor":0.20000000298023224, - "roughnessFactor":0.019999999552965164 } } ], "meshes":[ { - "name":"Plane.003", + "name":"Cube.003", "primitives":[ { "attributes":{ @@ -122,31 +63,6 @@ "material":0 } ] - }, - { - "name":"Cube.003", - "primitives":[ - { - "attributes":{ - "POSITION":5, - "NORMAL":6, - "TEXCOORD_0":7, - "TANGENT":8 - }, - "indices":9, - "material":1 - }, - { - "attributes":{ - "POSITION":10, - "NORMAL":11, - "TEXCOORD_0":12, - "TANGENT":13 - }, - "indices":14, - "material":2 - } - ] } ], "textures":[ @@ -156,61 +72,35 @@ }, { "sampler":0, - "source":0 + "source":1 + }, + { + "sampler":0, + "source":2 } ], "images":[ { "mimeType":"image/png", - "name":"Atlas_73934", - "uri":"textures/Atlas_73934.png" + "name":"Image", + "uri":"textures/Image.png" + }, + { + "mimeType":"image/png", + "name":"joint-atlas-1", + "uri":"textures/joint-atlas-1.png" + }, + { + "mimeType":"image/png", + "name":"joint-atlas-1-roughness", + "uri":"textures/joint-atlas-1-roughness.png" } ], "accessors":[ { "bufferView":0, "componentType":5126, - "count":28, - "max":[ - 11, - 4, - 11 - ], - "min":[ - -11, - 0, - -8 - ], - "type":"VEC3" - }, - { - "bufferView":1, - "componentType":5126, - "count":28, - "type":"VEC3" - }, - { - "bufferView":2, - "componentType":5126, - "count":28, - "type":"VEC2" - }, - { - "bufferView":3, - "componentType":5126, - "count":28, - "type":"VEC4" - }, - { - "bufferView":4, - "componentType":5123, - "count":72, - "type":"SCALAR" - }, - { - "bufferView":5, - "componentType":5126, - "count":749, + "count":763, "max":[ 12, 8, @@ -224,159 +114,59 @@ "type":"VEC3" }, { - "bufferView":6, + "bufferView":1, "componentType":5126, - "count":749, + "count":763, "type":"VEC3" }, { - "bufferView":7, + "bufferView":2, "componentType":5126, - "count":749, + "count":763, "type":"VEC2" }, { - "bufferView":8, + "bufferView":3, "componentType":5126, - "count":749, + "count":763, "type":"VEC4" }, { - "bufferView":9, + "bufferView":4, "componentType":5123, - "count":2130, - "type":"SCALAR" - }, - { - "bufferView":10, - "componentType":5126, - "count":16, - "max":[ - 11.449999809265137, - 5, - 2 - ], - "min":[ - -11.449999809265137, - 2, - -8.181105613708496 - ], - "type":"VEC3" - }, - { - "bufferView":11, - "componentType":5126, - "count":16, - "type":"VEC3" - }, - { - "bufferView":12, - "componentType":5126, - "count":16, - "type":"VEC2" - }, - { - "bufferView":13, - "componentType":5126, - "count":16, - "type":"VEC4" - }, - { - "bufferView":14, - "componentType":5123, - "count":24, + "count":2154, "type":"SCALAR" } ], "bufferViews":[ { "buffer":0, - "byteLength":336, + "byteLength":9156, "byteOffset":0, "target":34962 }, { "buffer":0, - "byteLength":336, - "byteOffset":336, + "byteLength":9156, + "byteOffset":9156, "target":34962 }, { "buffer":0, - "byteLength":224, - "byteOffset":672, + "byteLength":6104, + "byteOffset":18312, "target":34962 }, { "buffer":0, - "byteLength":448, - "byteOffset":896, + "byteLength":12208, + "byteOffset":24416, "target":34962 }, { "buffer":0, - "byteLength":144, - "byteOffset":1344, - "target":34963 - }, - { - "buffer":0, - "byteLength":8988, - "byteOffset":1488, - "target":34962 - }, - { - "buffer":0, - "byteLength":8988, - "byteOffset":10476, - "target":34962 - }, - { - "buffer":0, - "byteLength":5992, - "byteOffset":19464, - "target":34962 - }, - { - "buffer":0, - "byteLength":11984, - "byteOffset":25456, - "target":34962 - }, - { - "buffer":0, - "byteLength":4260, - "byteOffset":37440, - "target":34963 - }, - { - "buffer":0, - "byteLength":192, - "byteOffset":41700, - "target":34962 - }, - { - "buffer":0, - "byteLength":192, - "byteOffset":41892, - "target":34962 - }, - { - "buffer":0, - "byteLength":128, - "byteOffset":42084, - "target":34962 - }, - { - "buffer":0, - "byteLength":256, - "byteOffset":42212, - "target":34962 - }, - { - "buffer":0, - "byteLength":48, - "byteOffset":42468, + "byteLength":4308, + "byteOffset":36624, "target":34963 } ], @@ -388,7 +178,7 @@ ], "buffers":[ { - "byteLength":42516, + "byteLength":40932, "uri":"business-store1.bin" } ] diff --git a/godot/astream/terrain/details/power-in-box.tscn b/godot/astream/terrain/details/power-in-box.tscn new file mode 100644 index 0000000..7f5bcf6 --- /dev/null +++ b/godot/astream/terrain/details/power-in-box.tscn @@ -0,0 +1,17 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://astream/terrain/details/power-in-box.gltf" type="PackedScene" id=1] + +[node name="power-in-box" type="Spatial"] + +[node name="LOD" type="LOD" parent="."] + +[node name="0" type="Spatial" parent="LOD"] +lod_range = 50.0 + +[node name="MergeGroup" type="MergeGroup" parent="LOD/0"] + +[node name="power-in-box" parent="LOD/0/MergeGroup" instance=ExtResource( 1 )] + +[node name="1" type="Spatial" parent="LOD"] +visible = false diff --git a/godot/astream/terrain/details/power-pole-wire.tscn b/godot/astream/terrain/details/power-pole-wire.tscn new file mode 100644 index 0000000..832a157 --- /dev/null +++ b/godot/astream/terrain/details/power-pole-wire.tscn @@ -0,0 +1,28 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://astream/terrain/details/power-pole-wire.gltf" type="PackedScene" id=1] +[ext_resource path="res://astream/terrain/details/power-pole.gltf" type="PackedScene" id=2] + +[node name="power-pole-wire" type="Spatial"] + +[node name="LOD" type="LOD" parent="."] + +[node name="0" type="Spatial" parent="LOD"] +lod_range = 60.0 + +[node name="MergeGroup" type="MergeGroup" parent="LOD/0"] + +[node name="power-pole" parent="LOD/0/MergeGroup" instance=ExtResource( 2 )] + +[node name="power-pole-wire" parent="LOD/0/MergeGroup" instance=ExtResource( 1 )] + +[node name="1" type="Spatial" parent="LOD"] +visible = false +lod_range = 150.0 + +[node name="MergeGroup" type="MergeGroup" parent="LOD/1"] + +[node name="power-pole" parent="LOD/1/MergeGroup" instance=ExtResource( 2 )] + +[node name="2" type="Spatial" parent="LOD"] +visible = false diff --git a/godot/astream/terrain/details/power-pole.tscn b/godot/astream/terrain/details/power-pole.tscn new file mode 100644 index 0000000..a4dd0c2 --- /dev/null +++ b/godot/astream/terrain/details/power-pole.tscn @@ -0,0 +1,17 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://astream/terrain/details/power-pole.gltf" type="PackedScene" id=1] + +[node name="power-pole" type="Spatial"] + +[node name="LOD" type="LOD" parent="."] + +[node name="0" type="Spatial" parent="LOD"] +lod_range = 80.0 + +[node name="MergeGroup" type="MergeGroup" parent="LOD/0"] + +[node name="power-pole" parent="LOD/0/MergeGroup" instance=ExtResource( 1 )] + +[node name="1" type="Spatial" parent="LOD"] +visible = false diff --git a/src/modules/stream/base_data.cpp b/src/modules/stream/base_data.cpp index a810c0c..c978225 100644 --- a/src/modules/stream/base_data.cpp +++ b/src/modules/stream/base_data.cpp @@ -47,6 +47,8 @@ protected: } void setup() { + if (!SceneTree::get_singleton()) + return; assert(SceneTree::get_singleton()); SceneTree::get_singleton()->connect("physics_frame", this, "update");