Marc Gilleron
30db0c5193
Split VoxelBuffer in two, script-facing wrapper and internal.
...
The internal is the main use within the voxel engine,
and does not inherit Reference.
2021-09-26 04:14:50 +01:00
Marc Gilleron
3197eaba35
Move main thread tasks into one runner in VoxelServer
...
So the timing budget is better respected even if there are multiple
voxel nodes in the scene
2021-09-25 00:02:41 +01:00
Marc Gilleron
64646d06ed
Split VoxelTerrain process into functions
2021-09-09 18:54:15 +01:00
Marc Gilleron
8c17a1cf20
Added property to configure collision margin
2021-07-10 22:14:17 +01:00
Marc Gilleron
1ee5bcb80d
Renamed Rect3i -> Box3i
2021-05-31 17:12:04 +01:00
Marc Gilleron
2e9d817246
Moved VoxelDataMap to storage/ folder
2021-05-31 16:27:08 +01:00
Marc Gilleron
fa48523073
Added collision layer and mask properties
2021-05-09 20:49:45 +01:00
Marc Gilleron
63d9361a87
Split refcounts
2021-04-15 20:25:03 +01:00
Marc Gilleron
f7d0039811
Added mesh block size setter to VoxelTerrain
2021-04-15 20:00:41 +01:00
Marc Gilleron
1449560f29
Implemented decoupling on VoxelTerrain (no setter yet)
2021-04-13 23:48:35 +01:00
Marc Gilleron
4d033a2bb4
Added collision update delay to accelerate edit spam a little.
...
Not easy to use yet, might need the user to use voxel raycast instead of
physics because the hit points will not update often as they sculpt
2021-02-18 19:50:47 +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
e988cb9124
Show main thread tasks
2020-12-25 17:08:40 +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
791bdafff1
Meshers are now resources assigned on terrain nodes
2020-12-18 21:01:50 +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
4e65c8d937
Added bounds support to VoxelLodTerrain (rounded to octree size)
2020-10-22 22:43:31 +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
81e1872f8b
Implemented viewers for VoxelTerrain
2020-09-06 19:01:12 +01:00
Marc Gilleron
107f29c5d3
Removed old profiler
2020-08-29 23:20:51 +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
7316e415dc
Implemented block events for VoxelTerrain
2020-08-10 20:57:03 +01:00
Marc Gilleron
ec6bc00562
Added methods to trigger saves manually
2020-07-25 16:29:16 +01:00
Cory Petkovsek
63514efd76
Update pr
2020-02-16 23:07:10 +08:00
Cory Petkovsek
1a251a3c63
VT/VLT Detect channel type from generators. Other convenience features.
2020-02-16 22:13:28 +08:00
Marc Gilleron
87a9766442
voxel_raycast is now template
2020-01-26 20:43:40 +00:00
Marc Gilleron
14bfcb172c
Implement voxel tool for classic terrain
2019-09-08 19:42:25 +01:00
Marc Gilleron
b687909806
Save modified blocks, remove some debug code
2019-09-07 21:19:12 +01:00
Marc Gilleron
b284541219
Cleanup includes
2019-09-05 19:43:25 +01:00
Marc Gilleron
4ab688c9be
Barebones edition, untested WIP
2019-09-05 02:24:16 +01:00
Marc Gilleron
8fc1e40230
Line up statistics variable names
2019-08-25 18:47:43 +01:00
Marc Gilleron
c13c0fbf20
Fix `remaining_main_thread_blocks` stat, it wasn't reported
2019-08-25 17:23:25 +01:00
Marc Gilleron
4ec82928b4
Remove redundant VoxelTerrain::BlockDirtyState
2019-08-25 15:14:10 +01:00
Marc Gilleron
4ff5f91e6f
Add optional physics collision through node-less static bodies
2019-08-25 13:04:49 +01:00
Marc Gilleron
f14b374931
Made block size and a few other params modifiable (not so easy, though)
2019-08-24 01:44:27 +01:00
Marc Gilleron
c272a37f1a
Merge branch 'master' into persistence
...
# Conflicts:
# terrain/block_thread_manager.h
# terrain/voxel_terrain.cpp
2019-06-25 20:51:35 +01:00
Cory Petkovsek
f6a9c5761a
Fix gcc sign comparison warnings
2019-06-18 14:24:56 +09:00
Marc Gilleron
5ecd449acc
Fixed VXB saving so that it actually works for lod0-only terrain:
...
- Don't rely on ERR_FILE_NOT_FOUND, Godot never returns that from FileAccess...
- Fix LOD not used in block coordinates conversion
- Fix block size saved as u8 but read as u32 in meta file
- Fix block file path not being prepended directory path
- Fix negative coord block file path containing overflowed uint
- Fix VoxelDataLoader processor not being assigned block size in some cases
- Fix VoxelDataLoader not processing save requests properly
- Fix VoxelTerrain not actually sending save requests on destruction
2019-06-02 01:59:39 +01:00
Marc Gilleron
f831d03cf5
Merge branch 'master' into persistence
...
# Conflicts:
# terrain/voxel_data_loader.cpp
2019-05-28 01:17:28 +01:00
Marc Gilleron
2c81db52f8
Rename remaining occurences of "provider" => stream
2019-05-28 01:10:50 +01:00
Marc Gilleron
82502d3397
Simple file-per-block saving WIP. Compiles but didn't test.
2019-05-28 00:40:09 +01:00
Marc Gilleron
4a90ca10a5
Rename "provider" files to "stream"
2019-05-25 16:16:03 +01:00
Marc Gilleron
2e1b13ffea
Rename VoxelProvider* => VoxelStream*
2019-05-25 16:07:38 +01:00
Marc Gilleron
15ae1b99ba
Rename voxel_provider_thread.h => voxel_data_loader.h to match class name
2019-05-25 15:07:16 +01:00
Marc Gilleron
d8cab2d32b
Use generic block manager for loading and fix bugs:
...
- VoxelProviderThread is now VoxelDataLoader and uses generic block manager
- Fixed threads locking up, input mutex was not always unlocked due to for loop exiting early
- Fixed blocks failing to load, region rejection was using invalid pointer
- Fixed block shifting in region rejection, was replacing wrong index in `block_indexes`
- Fixed block region rejection missing blocks, was not stepping back the loop after shifting blocks
- Added output message to notify of block rejection
2019-05-20 20:48:58 +01:00