Compare commits
50 Commits
71b709726e
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| ca6f7e9f55 | |||
| dd3867fbf1 | |||
| bc0dcfaead | |||
| dd00a41024 | |||
| fd23aa6287 | |||
| e441cd9c0a | |||
| 64424e3111 | |||
| c727a1912c | |||
| 69993ba696 | |||
| af55e598e3 | |||
| 77def2c519 | |||
| 676ef45897 | |||
| 04e75ebd81 | |||
| cafe9ba094 | |||
| 05755827ce | |||
| 691b8e22bd | |||
| d087ca7c85 | |||
| 5c9dda161b | |||
| 1ac88ba5f8 | |||
| 53bb26c347 | |||
| 7f87876cd5 | |||
| f4e551f053 | |||
| 6819357b67 | |||
| ea792d8ea9 | |||
| 8e140fb878 | |||
| 7eceed3ee5 | |||
| 85900e3ef1 | |||
| c7fe27c36e | |||
| 881c7b3229 | |||
| a9a1bbe740 | |||
| 876eefeea5 | |||
| 5f1fdddc5d | |||
| 0f21cce741 | |||
| 32a8e1fb58 | |||
| e83cecc8b3 | |||
| 2afa4feee8 | |||
| fc1c4b5168 | |||
| d79222c86c | |||
| 66838892d5 | |||
| 2eed8ef509 | |||
| b56103930c | |||
| 2780fd300a | |||
| 7518a6a360 | |||
| d2cc947ae7 | |||
| 6eae0ac557 | |||
| e5f22d47ab | |||
| c8f4ff5a4e | |||
| 2e35ff4ec6 | |||
| dc6c8f881a | |||
| a5bb11f5bf |
3
.gitignore
vendored
@@ -1,5 +1,6 @@
|
||||
.import
|
||||
godot/logs
|
||||
godot/character-data/*
|
||||
assets/blender/**/*.blend1
|
||||
assets/blender/**/*.blend2
|
||||
assets/blender/**/*.blend3
|
||||
@@ -10,3 +11,5 @@ assets/blender/scripts/*.blend*
|
||||
.*.swp
|
||||
*.kra~
|
||||
*.png~
|
||||
godot/astream/road_lines.json.*
|
||||
|
||||
|
||||
7
.gitmodules
vendored
@@ -1,10 +1,10 @@
|
||||
[submodule "src/godot"]
|
||||
path = src/godot
|
||||
url = git@github.com:godotengine/godot
|
||||
url = https://github.com/godotengine/godot
|
||||
branch = 3.x
|
||||
[submodule "src/modules/voxel"]
|
||||
path = src/modules/voxel
|
||||
url = git@github.com:Zylann/godot_voxel
|
||||
url = https://github.com/Zylann/godot_voxel
|
||||
branch = godot3.x
|
||||
[submodule "src/flecs"]
|
||||
path = src/flecs
|
||||
@@ -17,3 +17,6 @@
|
||||
path = tests/flecs-systems-sokol
|
||||
url = https://github.com/flecs-hub/flecs-systems-sokol
|
||||
branch = master
|
||||
[submodule "src/sqlite"]
|
||||
path = src/sqlite
|
||||
url = https://github.com/sqlite/sqlite
|
||||
|
||||
6
.vscode/settings.json
vendored
@@ -71,7 +71,11 @@
|
||||
"future": "cpp",
|
||||
"cassert": "cpp",
|
||||
"bitset": "cpp",
|
||||
"unordered_set": "cpp"
|
||||
"unordered_set": "cpp",
|
||||
"strstream": "cpp",
|
||||
"typeindex": "cpp",
|
||||
"shared_mutex": "cpp",
|
||||
"any": "cpp"
|
||||
},
|
||||
"cmake.ignoreCMakeListsMissing": true
|
||||
}
|
||||
106
Makefile
@@ -1,23 +1,49 @@
|
||||
BLENDER = ../../blender-4.3.2-linux-x64/blender
|
||||
SERVER = src/godot/bin/godot_server.x11.opt.tools.64
|
||||
ARCH=$(patsubst aarch64,arm64,$(shell uname -m))
|
||||
BLENDER = ../../blender-3.6.20-linux-x64/blender
|
||||
SERVER = src/godot/bin/godot_server.x11.opt.tools.$(ARCH)
|
||||
EDITOR_PLATFORM=x11es
|
||||
EDITOR2_PLATFORM=x11
|
||||
DEMO_PLATFORMS=x11 x11es
|
||||
EDITOR = src/godot/bin/godot.$(EDITOR_PLATFORM).opt.tools.$(ARCH)
|
||||
EDITOR_DBG = src/godot/bin/godot.$(EDITOR_PLATFORM).tools.$(ARCH)
|
||||
EDITOR2 = src/godot/bin/godot.$(EDITOR2_PLATFORM).opt.tools.$(ARCH)
|
||||
EDITOR2_DBG = src/godot/bin/godot.$(EDITOR2_PLATFORM).tools.$(ARCH)
|
||||
|
||||
.PHONY: all godot-editor-main export export-models export-clothes \
|
||||
.PHONY: all godot-editor-main godot-editor-debug export export-models export-clothes \
|
||||
export-clean export-linux-demo export-windows-demo \
|
||||
export-binaries patch tests import-vrm
|
||||
all: godot-editor-main godot-main
|
||||
ARCH=$(patsubst aarch64,arm64,$(shell uname -i))
|
||||
godot-main: patch
|
||||
export-binaries patch tests import-vrm export-buildings
|
||||
all: godot-editor-main godot-editor-debug godot-main
|
||||
SCONS_EXTRA=-j16
|
||||
define build_godot
|
||||
$(4): $(5)
|
||||
@echo Building $(4)
|
||||
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
|
||||
cd src/godot; \
|
||||
scons platform=x11 arch=$(ARCH) target=release_debug tools=yes custom_modules=../modules -j16;
|
||||
scons platform=$(1) arch=$(ARCH) target=$(2) tools=$(3) custom_modules=../modules $(SCONS_EXTRA)
|
||||
endef
|
||||
|
||||
define build_godot_platform
|
||||
$(eval $(call build_godot,$(1),release,no,godot-main-release-$(1),patch))
|
||||
$(eval $(call build_godot,$(1),debug,no,godot-main-debug-$(1),patch))
|
||||
$(eval $(call build_godot,$(1),release_debug,no,godot-main-rdebug-$(1),patch))
|
||||
GODOT_MAIN_TARGETS += godot-main-release-$(1) godot-main-debug-$(1) godot-main-rdebug-$(1)
|
||||
endef
|
||||
|
||||
$(foreach pt,$(DEMO_PLATFORMS),$(eval $(call build_godot_platform,$(pt))))
|
||||
|
||||
godot-main: $(GODOT_MAIN_TARGETS) godot-editor-main godot-server-main
|
||||
godot-server-main: $(SERVER)
|
||||
godot-editor-main: $(EDITOR) $(EDITOR2)
|
||||
godot-editor-debug: $(EDITOR_DBG) $(EDITOR2_DBG)
|
||||
#$(SERVER): patch
|
||||
# cd src/godot; \
|
||||
# scons platform=server arch=$(ARCH) target=release_debug tools=yes custom_modules=../modules -j16
|
||||
$(eval $(call build_godot,server,release_debug,yes,$(SERVER),patch))
|
||||
$(eval $(call build_godot,x11es,release_debug,yes,$(EDITOR),patch))
|
||||
$(eval $(call build_godot,x11es,debug,yes,$(EDITOR_DBG),patch))
|
||||
$(eval $(call build_godot,x11,release_debug,yes,$(EDITOR2),patch))
|
||||
$(eval $(call build_godot,x11,debug,yes,$(EDITOR2_DBG),patch))
|
||||
patch: ./src/godot/scene/animation/skeleton_ik.cpp
|
||||
cd ./src/godot && git reset --hard HEAD && for p in ../patches/*.patch; do git apply $$p; done
|
||||
cd ./src/godot && git reset --hard HEAD && rm -Rf platform/x11es && for p in ../patches/*.patch; do git apply $$p; done
|
||||
sed -e 's/ERR_FAIL_COND_V(-1 == p_task->root_bone, false);//g' -i ./src/godot/scene/animation/skeleton_ik.cpp
|
||||
cd ./src/modules/voxel && git reset --hard HEAD && for p in ../../patches/voxel/*.patch; do git apply $$p; done
|
||||
|
||||
@@ -28,9 +54,50 @@ export-clean:
|
||||
rm -Rf godot/character-data/*
|
||||
rm -f assets/blender/scripts/tmp-*.blend
|
||||
|
||||
import-vrm: export-clean
|
||||
install-addons:
|
||||
$(BLENDER) -b -Y -P assets/blender/scripts/install_addons.py
|
||||
|
||||
import-vrm: install-addons export-clean
|
||||
mkdir -p assets/blender/scripts/shapes/male assets/blender/scripts/shapes/female
|
||||
$(BLENDER) -b -Y -P assets/blender/scripts/import_vrm.py
|
||||
|
||||
export2edit: import-vrm
|
||||
$(BLENDER) -b -Y -P assets/blender/scripts/export_for_modelling.py
|
||||
|
||||
BLENDDIR_BUILDINGS=assets/blender/buildings
|
||||
GLTFDIR_BUILDINGS=godot/astream/terrain/details
|
||||
BUILDINGS_BUSINESS=business-bar1 business-cafe1 business-office1 business-store1
|
||||
BUILDINGS_RESIDENTAL=residental-house1 residental-house2 residental-house3 \
|
||||
residental-house4 residental-house5 residental-house6 \
|
||||
residental-house7 residental-house8 residental-house9 \
|
||||
residental-house10 residental-house11 residental-house13 \
|
||||
residental-hut1 residental-hut1-lod \
|
||||
residental-garage-door \
|
||||
residental-garage-enterance residental-garage \
|
||||
residental-parking residental-wall1 \
|
||||
residental-wall-corner residental-garage-roof1
|
||||
BUILDINGS_MAIN=gym-exterior home-exterior \
|
||||
logistics-center-exterior office-exterior townhall-exterior
|
||||
|
||||
BUILDINGS=bus-stop power-in-box power-pole power-pole-wire $(BUILDINGS_BUSINESS) \
|
||||
$(BUILDINGS_RESIDENTAL) $(BUILDINGS_MAIN) \
|
||||
zebra
|
||||
|
||||
define export_building
|
||||
$(GLTFDIR_BUILDINGS)/$(1).gltf: $(BLENDDIR_BUILDINGS)/$(1).blend assets/blender/scripts/export_buildings.py
|
||||
$(BLENDER) -b $(BLENDDIR_BUILDINGS)/$(1).blend -Y -P ./assets/blender/scripts/export_buildings.py -- $(GLTFDIR_BUILDINGS)/$(1).gltf
|
||||
ALL_BUILDINGS += $(GLTFDIR_BUILDINGS)/$(1).gltf
|
||||
CLEAN_BUILDINGS += $(GLTFDIR_BUILDINGS)/$(1).gltf \
|
||||
$(GLTFDIR_BUILDINGS)/$(1).bin
|
||||
endef
|
||||
|
||||
$(foreach prog,$(BUILDINGS),$(eval $(call export_building,$(prog))))
|
||||
|
||||
export-buildings: $(ALL_BUILDINGS)
|
||||
@echo $(ALL_BUILDINGS)
|
||||
clean-buildings:
|
||||
rm -f $(CLEAN_BUILDINGS) $(GLTFDIR_BUILDINGS)/material_atlas*.material
|
||||
|
||||
export-models: export-clean import-vrm
|
||||
$(BLENDER) -b -Y -P assets/blender/scripts/export_models.py
|
||||
|
||||
@@ -44,6 +111,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
|
||||
|
||||
|
||||
2
assets/blender/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
vrm-*.blend*
|
||||
modelling-*.blend*
|
||||
BIN
assets/blender/astream/road/road-lanes.blend
Normal file
BIN
assets/blender/astream/road/road.png
Normal file
|
After Width: | Height: | Size: 78 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 341 B After Width: | Height: | Size: 341 B |
BIN
assets/blender/buildings/Atlas_00003.png
Normal file
|
After Width: | Height: | Size: 341 B |
BIN
assets/blender/buildings/Atlas_00004.png
Normal file
|
After Width: | Height: | Size: 341 B |
BIN
assets/blender/buildings/Atlas_00005.png
Normal file
|
After Width: | Height: | Size: 341 B |
|
Before Width: | Height: | Size: 276 B After Width: | Height: | Size: 276 B |
|
Before Width: | Height: | Size: 346 B After Width: | Height: | Size: 346 B |
|
Before Width: | Height: | Size: 431 B After Width: | Height: | Size: 431 B |
|
Before Width: | Height: | Size: 437 B After Width: | Height: | Size: 437 B |
|
Before Width: | Height: | Size: 517 B After Width: | Height: | Size: 517 B |
BIN
assets/blender/buildings/Atlas_73934.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
assets/blender/buildings/atlas-gym-roughness.png
Normal file
|
After Width: | Height: | Size: 63 KiB |
BIN
assets/blender/buildings/atlas-gym-specular.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
assets/blender/buildings/bus-stop.blend
Normal file
BIN
assets/blender/buildings/business-bar1.blend
Normal file
BIN
assets/blender/buildings/business-cafe1.blend
Normal file
BIN
assets/blender/buildings/business-office1.blend
Normal file
BIN
assets/blender/buildings/business-store1.blend
Normal file
BIN
assets/blender/buildings/dirt-road-corner.blend
Normal file
BIN
assets/blender/buildings/dirt-road-x.blend
Normal file
BIN
assets/blender/buildings/dirt-road.blend
Normal file
BIN
assets/blender/buildings/gym-exterior.blend
Normal file
BIN
assets/blender/buildings/home-exterior.blend
Normal file
BIN
assets/blender/buildings/joint-atlas-1-roughness.kra
Normal file
BIN
assets/blender/buildings/joint-atlas-1-roughness.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
assets/blender/buildings/joint-atlas-1-specular.kra
Normal file
BIN
assets/blender/buildings/joint-atlas-1-specular.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
assets/blender/buildings/joint-atlas-1.kra
Normal file
BIN
assets/blender/buildings/joint-atlas-1.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
assets/blender/buildings/logistics-center-exterior.blend
Normal file
BIN
assets/blender/buildings/lot-large1.blend
Normal file
BIN
assets/blender/buildings/lot-large2.blend
Normal file
BIN
assets/blender/buildings/lot-small-m0.blend
Normal file
BIN
assets/blender/buildings/lot-small0.blend
Normal file
BIN
assets/blender/buildings/lot-small1.blend
Normal file
BIN
assets/blender/buildings/lot-small2.blend
Normal file
BIN
assets/blender/buildings/office-exterior.blend
Normal file
BIN
assets/blender/buildings/power-in-box.blend
Normal file
BIN
assets/blender/buildings/power-pole-wire.blend
Normal file
BIN
assets/blender/buildings/power-pole.blend
Normal file
BIN
assets/blender/buildings/residental-garage-door.blend
Normal file
BIN
assets/blender/buildings/residental-garage-enterance.blend
Normal file
BIN
assets/blender/buildings/residental-garage-roof1.blend
Normal file
BIN
assets/blender/buildings/residental-garage.blend
Normal file
BIN
assets/blender/buildings/residental-house-stair.blend
Normal file
BIN
assets/blender/buildings/residental-house1.blend
Normal file
BIN
assets/blender/buildings/residental-house10.blend
Normal file
BIN
assets/blender/buildings/residental-house11.blend
Normal file
BIN
assets/blender/buildings/residental-house12-bottom-balcony.blend
Normal file
BIN
assets/blender/buildings/residental-house12-bottom-floor.blend
Normal file
BIN
assets/blender/buildings/residental-house12-enterance.blend
Normal file
BIN
assets/blender/buildings/residental-house12-foundation.blend
Normal file
BIN
assets/blender/buildings/residental-house12-garage.blend
Normal file
BIN
assets/blender/buildings/residental-house12-orig.blend
Normal file
BIN
assets/blender/buildings/residental-house12-pipes.blend
Normal file
BIN
assets/blender/buildings/residental-house12-roof.blend
Normal file
BIN
assets/blender/buildings/residental-house12-second-floor.blend
Normal file
BIN
assets/blender/buildings/residental-house12-simple-roof.blend
Normal file
BIN
assets/blender/buildings/residental-house12-simple.blend
Normal file
BIN
assets/blender/buildings/residental-house12-stair-bottom.blend
Normal file
BIN
assets/blender/buildings/residental-house12-top-balcony.blend
Normal file
BIN
assets/blender/buildings/residental-house12.blend
Normal file
BIN
assets/blender/buildings/residental-house12.second-stair.blend
Normal file
BIN
assets/blender/buildings/residental-house13.blend
Normal file
BIN
assets/blender/buildings/residental-house2.blend
Normal file
BIN
assets/blender/buildings/residental-house3.blend
Normal file
BIN
assets/blender/buildings/residental-house4.blend
Normal file
BIN
assets/blender/buildings/residental-house5.blend
Normal file
BIN
assets/blender/buildings/residental-house6.blend
Normal file
BIN
assets/blender/buildings/residental-house6a.blend
Normal file
BIN
assets/blender/buildings/residental-house7.blend
Normal file
BIN
assets/blender/buildings/residental-house8.blend
Normal file
BIN
assets/blender/buildings/residental-house9.blend
Normal file
BIN
assets/blender/buildings/residental-hut1-lod.blend
Normal file
BIN
assets/blender/buildings/residental-hut1.blend
Normal file
BIN
assets/blender/buildings/residental-parking.blend
Normal file
BIN
assets/blender/buildings/residental-wall-corner.blend
Normal file
BIN
assets/blender/buildings/residental-wall1.blend
Normal file
BIN
assets/blender/buildings/sideroad-short1.blend
Normal file
BIN
assets/blender/buildings/t1.blend
Normal file
BIN
assets/blender/buildings/terrain-lot1.bin
Normal file
BIN
assets/blender/buildings/terrain-lot1.blend
Normal file
153
assets/blender/buildings/terrain-lot1.gltf
Normal file
@@ -0,0 +1,153 @@
|
||||
{
|
||||
"asset":{
|
||||
"generator":"Khronos glTF Blender I/O v3.6.28",
|
||||
"version":"2.0"
|
||||
},
|
||||
"extensionsUsed":[
|
||||
"KHR_materials_specular",
|
||||
"KHR_materials_ior"
|
||||
],
|
||||
"scene":0,
|
||||
"scenes":[
|
||||
{
|
||||
"name":"Scene",
|
||||
"nodes":[
|
||||
0
|
||||
]
|
||||
}
|
||||
],
|
||||
"nodes":[
|
||||
{
|
||||
"mesh":0,
|
||||
"name":"terrain-parking-lot-col"
|
||||
}
|
||||
],
|
||||
"materials":[
|
||||
{
|
||||
"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_36953_1",
|
||||
"pbrMetallicRoughness":{
|
||||
"baseColorTexture":{
|
||||
"index":0
|
||||
},
|
||||
"metallicFactor":0
|
||||
}
|
||||
}
|
||||
],
|
||||
"meshes":[
|
||||
{
|
||||
"name":"Plane",
|
||||
"primitives":[
|
||||
{
|
||||
"attributes":{
|
||||
"POSITION":0,
|
||||
"NORMAL":1,
|
||||
"TEXCOORD_0":2
|
||||
},
|
||||
"indices":3,
|
||||
"material":0
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"textures":[
|
||||
{
|
||||
"sampler":0,
|
||||
"source":0
|
||||
}
|
||||
],
|
||||
"images":[
|
||||
{
|
||||
"mimeType":"image/png",
|
||||
"name":"Atlas_36953",
|
||||
"uri":"Atlas_36953.png"
|
||||
}
|
||||
],
|
||||
"accessors":[
|
||||
{
|
||||
"bufferView":0,
|
||||
"componentType":5126,
|
||||
"count":250,
|
||||
"max":[
|
||||
25.032987594604492,
|
||||
0.3288002610206604,
|
||||
49.057586669921875
|
||||
],
|
||||
"min":[
|
||||
-25.032987594604492,
|
||||
-4.005487442016602,
|
||||
-37.008201599121094
|
||||
],
|
||||
"type":"VEC3"
|
||||
},
|
||||
{
|
||||
"bufferView":1,
|
||||
"componentType":5126,
|
||||
"count":250,
|
||||
"type":"VEC3"
|
||||
},
|
||||
{
|
||||
"bufferView":2,
|
||||
"componentType":5126,
|
||||
"count":250,
|
||||
"type":"VEC2"
|
||||
},
|
||||
{
|
||||
"bufferView":3,
|
||||
"componentType":5123,
|
||||
"count":474,
|
||||
"type":"SCALAR"
|
||||
}
|
||||
],
|
||||
"bufferViews":[
|
||||
{
|
||||
"buffer":0,
|
||||
"byteLength":3000,
|
||||
"byteOffset":0,
|
||||
"target":34962
|
||||
},
|
||||
{
|
||||
"buffer":0,
|
||||
"byteLength":3000,
|
||||
"byteOffset":3000,
|
||||
"target":34962
|
||||
},
|
||||
{
|
||||
"buffer":0,
|
||||
"byteLength":2000,
|
||||
"byteOffset":6000,
|
||||
"target":34962
|
||||
},
|
||||
{
|
||||
"buffer":0,
|
||||
"byteLength":948,
|
||||
"byteOffset":8000,
|
||||
"target":34963
|
||||
}
|
||||
],
|
||||
"samplers":[
|
||||
{
|
||||
"magFilter":9729,
|
||||
"minFilter":9987
|
||||
}
|
||||
],
|
||||
"buffers":[
|
||||
{
|
||||
"byteLength":8948,
|
||||
"uri":"terrain-lot1.bin"
|
||||
}
|
||||
]
|
||||
}
|
||||
BIN
assets/blender/buildings/terrain-parking-lot.blend
Normal file
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |