Marc Gilleron
22471aafd0
Merge branch 'master' into instancing
2021-02-02 00:00:01 +00:00
Marc Gilleron
b66b9a01a9
Removed VoxelStreamFile
2021-02-01 22:25:25 +00:00
Marc Gilleron
99723cc006
Merge branch 'master' into instancing
2021-01-25 22:17:46 +00:00
Marc Gilleron
5ec5136f5e
Don't try to save if the terrain has no stream assigned
2021-01-23 23:01:02 +00:00
Marc Gilleron
0816d1fc09
Merge branch 'master' into instancing
2021-01-23 01:33:11 +00:00
Marc Gilleron
25c033ce85
Fix huge stutters caused by materials not being pooled properly
2021-01-22 18:31:46 +00:00
Marc Gilleron
23765f7c20
Merge branch 'master' into multithreaded_generators
2021-01-18 18:55:18 +00:00
Marc Gilleron
4ec60074bb
Refactor generators and streams
...
- VoxelGenerator no longer inherit VoxelStream
- VoxelStream is now more focused on files
- Nodes have separate stream and generator properties
- Generators use 2 dedicated threads instead of sharing a single one with streams
- TODO Image.lock() is problematic for multithreading
- TODO Voxel graph can cause RWLock contention if edited while it runs
- TODO Saving generator output no longer works, need to put it back
2021-01-17 17:18:05 +00:00
Marc Gilleron
94810f4d04
Rename statistic property back to its old name, I think it didnt need to change
2021-01-16 13:05:50 +00:00
Marc Gilleron
2b292818c0
Instances now get removed when the user digs under them
2020-12-30 20:11:46 +00:00
Marc Gilleron
0449eb53e3
Missing function
2020-12-29 22:33:30 +00:00
Marc Gilleron
e46c02d475
Merge branch 'master' into instancing
2020-12-29 22:26:57 +00:00
Marc Gilleron
a34710f74c
Added VoxelInstancer. First working API, script only.
2020-12-29 22:25:22 +00:00
Marc Gilleron
e6c44f9768
Don't recycle materials when we only save blocks
...
This should only happen if the block is actually about to get unloaded
2020-12-29 22:10:31 +00:00
Marc Gilleron
edfc96e4a5
Fixed crash when hiding terrain while selected in editor
2020-12-27 15:51:03 +00:00
Marc Gilleron
e988cb9124
Show main thread tasks
2020-12-25 17:08:40 +00:00
Marc Gilleron
418cf0e630
Streaming/LOD can be set to follow the editor camera instead of being centered on world origin
2020-12-19 23:16:10 +00:00
Marc Gilleron
6d9fd2f8a0
Voxel terrain nodes now have a common abstract base class. Also explicitely made a few other classes abstract
2020-12-18 22:58:41 +00:00
Marc Gilleron
4ca7a708d5
Fix warning about precedence clarity
2020-12-18 21:24:41 +00:00
Marc Gilleron
791bdafff1
Meshers are now resources assigned on terrain nodes
2020-12-18 21:01:50 +00:00
Marc Gilleron
25445f3f6c
Added debug function to dump a VoxelLodTerrain as nodes in a PackedScene
2020-11-21 18:31:28 +00:00
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
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
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
4b6ae21ce9
Fix GCC warnings
2020-09-09 18:58:58 +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
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
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
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
f9e2d9cc12
Stop using NULL
2020-07-25 23:19:08 +01:00
Marc Gilleron
ec6bc00562
Added methods to trigger saves manually
2020-07-25 16:29:16 +01:00