220 Commits

Author SHA1 Message Date
Marc Gilleron
d52f882ae1 VoxelMap is no longer bound, it had no use in the API 2020-11-21 18:31:11 +00:00
Marc Gilleron
4c1e149aef Optimized iteration over all blocks of a map (but likely, ECS approach may be better in the future) 2020-11-01 03:25:48 +00:00
Marc Gilleron
18e7792bd5 Added access to block local transform in custom shaders for VoxelLodTerrain 2020-10-31 01:15:50 +00:00
Marc Gilleron
09b32c9dd8 Allow to change process mode from script on VoxelLodTerrain 2020-10-30 19:02:00 +00:00
Marc Gilleron
23123fc920 GCC warning 2020-10-29 22:59:09 +00:00
Marc Gilleron
a31dcdd3bd Don't clamp view distance for now, but should be done dynamically 2020-10-29 22:58:49 +00:00
Marc Gilleron
01776d2ee1 Don't load neighboring blocks across fixed boundaries 2020-10-29 22:58:19 +00:00
Marc Gilleron
90cc96d241 Update viewer position on transform changes instead of process 2020-10-29 00:55:04 +00:00
Marc Gilleron
40d299413f Don't compute matrices if they aren't used when transforming blocks 2020-10-29 00:54:27 +00:00
Marc Gilleron
b5470fab2b Fix big CPU due to blocks never getting unloaded
The unloading logic is supposed to run for all LOD levels except the biggest one,
but instead was running for all LODs except the smallest.
2020-10-29 00:53:04 +00:00
Marc Gilleron
bf8a4229a1 Added debug function to get how many blocks are currently in memory 2020-10-29 00:49:12 +00:00
Marc Gilleron
f3108de4f9 Removed old viewer API from VoxelLodTerrain, support 1 VoxelViewer at a time for now 2020-10-25 21:21:37 +00:00
Marc Gilleron
85bb3d7b28 VoxelTerrain can be transformed 2020-10-25 00:55:57 +01:00
Marc Gilleron
361f7d73ed VoxelLodTerrain handles transform changes (VoxelTool still has to account for that) 2020-10-24 03:22:02 +01:00
Marc Gilleron
d158a92f57 Show bounds and octrees of VoxelLodTerrain with debug drawing 2020-10-24 00:08:14 +01:00
Marc Gilleron
e70f87e4a7 Fixed bounds being snapped too large 2020-10-24 00:06:09 +01:00
Marc Gilleron
4e65c8d937 Added bounds support to VoxelLodTerrain (rounded to octree size) 2020-10-22 22:43:31 +01:00
Marc Gilleron
2dfcc76600 Better fix for VoxelLodTerrain task drop 2020-10-20 23:58:55 +01:00
Marc Gilleron
54eb228444 Fix crash when increasing LOD count in editor while blocks are still loading 2020-10-19 23:22:23 +01:00
Marc Gilleron
30c6d7e436 Disabled task cancellation to make VoxelLodTerrain work, will need better option later.
VoxelLodTerrain's block requests were being cancelled constantly.

This commit also contains precision improvement for cancelling
block requests based on distance, which originally was an attempt to
"properly" fix the problem with VoxelLodTerrain, but it didnt fully
worked for that node.
I left it anyways, maybe it will change in the future once a
proper fix is figured out.
2020-10-19 23:21:14 +01:00
Marc Gilleron
5dd8475091 Fix GCC warning (4) 2020-09-20 20:28:45 +01:00
Marc Gilleron
6c80da0425 Moved VoxelBuffer and VoxelMemoryPool under storage/ directory 2020-09-14 19:33:02 +01:00
Marc Gilleron
64ee592a0e Allow to specify bounds in VoxelTerrain 2020-09-13 22:36:28 +01:00
Marc Gilleron
4b6ae21ce9 Fix GCC warnings 2020-09-09 18:58:58 +01:00
Marc Gilleron
b12500ed34 Don't request or even calculate blocks to load when streaming is not possible 2020-09-08 21:34:35 +01:00
Marc Gilleron
7a235be108 Cancel block tasks if they are too far away 2020-09-06 23:57:41 +01:00
Marc Gilleron
fb8a1210e3 Comment and formatting 2020-09-06 19:59:08 +01:00
Marc Gilleron
0e16193f92 Removed old threading code 2020-09-06 19:35:35 +01:00
Marc Gilleron
a4611031e1 Fix viewer not being unpaired when destroyed 2020-09-06 19:29:56 +01:00
Marc Gilleron
81e1872f8b Implemented viewers for VoxelTerrain 2020-09-06 19:01:12 +01:00
Marc Gilleron
b8c97ebc55 Switch VoxelLodTerrain to VoxelServer 2020-08-31 21:51:30 +01:00
Marc Gilleron
7a37770e84 Merge branch 'master' into threading_refactor
# Conflicts:
#	edition/voxel_tool_terrain.cpp
#	terrain/voxel_lod_terrain.cpp
2020-08-30 21:56:44 +01:00
Marc Gilleron
758da9ca2f Fix VoxelLodTerrain not loading blocks properly in editor
It assumed they were loading but the list of loading blocks is cleared
when the stream is set... which didn't reset the MAP of loading blocks.
2020-08-30 21:38:38 +01:00
Marc Gilleron
08e5770bd0 Fix crash when using VoxelLodTerrain without a stream 2020-08-30 21:36:43 +01:00
Marc Gilleron
17ff16aa48 Neighbors are optional when sending meshing requests 2020-08-30 04:00:45 +01:00
Marc Gilleron
d81ffb95f4 Detect usage of Tracy, add some profiler scopes 2020-08-30 04:00:01 +01:00
Marc Gilleron
107f29c5d3 Removed old profiler 2020-08-29 23:20:51 +01:00
Marc Gilleron
d4d2b6fd9e No longer copy voxels before scheduling threaded tasks. VoxelBuffers now have a lock. 2020-08-29 22:09:54 +01:00
Marc Gilleron
d8a8936f34 Remove usage of VoxelDataLoader from VoxelTerrain 2020-08-26 19:49:30 +01:00
Marc Gilleron
56c2a0856a Initial integration on VoxelTerrain with static camera, fixed a bunch of things 2020-08-25 23:00:38 +01:00
Marc Gilleron
23ce65d789 Show terrain in editor, with option to turn it off. A scripted stream will turn it off by default. 2020-08-14 20:33:09 +01:00
Marc Gilleron
6ed4ef32b7 Separated baked data from config data in VoxelLibrary and introduced thread-safety with blocky mesher 2020-08-11 23:52:42 +01:00
Marc Gilleron
7316e415dc Implemented block events for VoxelTerrain 2020-08-10 20:57:03 +01:00
Marc Gilleron
404de21c9b Don't error when a custom stream can't be used in editor, show warning instead 2020-08-02 18:58:04 +01:00
Marc Gilleron
ac3e303818 Report script errors a bit better, I hope 2020-08-02 18:57:08 +01:00
Marc Gilleron
61c82078f7 Added collision masks to voxel models so they can be filtered fast 2020-08-01 22:58:16 +01:00
Marc Gilleron
f9e2d9cc12 Stop using NULL 2020-07-25 23:19:08 +01:00
Marc Gilleron
b7fe71ff45 Fix block not copied when the save of a single one is triggered 2020-07-25 21:57:36 +01:00
Marc Gilleron
ec6bc00562 Added methods to trigger saves manually 2020-07-25 16:29:16 +01:00
Marc Gilleron
eef3818d29 Fixed mandatory requests not always being processed after telling the thread to exit 2020-07-24 20:07:34 +01:00