130 Commits

Author SHA1 Message Date
Marc Gilleron
64646d06ed Split VoxelTerrain process into functions 2021-09-09 18:54:15 +01:00
Marc Gilleron
7cb1e4008e Use accessor 2021-08-15 17:27:55 +01:00
Marc Gilleron
bab5436de7 Fix materials shown under wrong category 2021-08-01 15:40:41 +01:00
Marc Gilleron
8c17a1cf20 Added property to configure collision margin 2021-07-10 22:14:17 +01:00
Marc Gilleron
966c2c9fef Change default channel attribution when using get_voxel_tool()
- It now depends first on the mesher
- If no mesher is assigned, it depends on the generator
- If no generator is assigned, it depends on the stream
- If no stream is assigned, it defaults to 0
- If multiple channels are found, pick the first one instead of last
- The reason is, some streams can support all channels so they dont
  represent well what the user intends to use.
2021-07-10 20:27:55 +01:00
Marc Gilleron
233e2c7267 Exposed data block size 2021-06-16 23:30:09 +01:00
Marc Gilleron
0c13bd4b2d Fix mismatch in signal arguments 2021-06-16 23:29:59 +01:00
Marc Gilleron
d436ed430f Fix world edge issue, mesh block area was not clipped 2021-06-13 19:00:47 +01:00
Marc Gilleron
9e76eec951 Another one 2021-06-13 18:13:11 +01:00
Marc Gilleron
1ee5bcb80d Renamed Rect3i -> Box3i 2021-05-31 17:12:04 +01:00
Marc Gilleron
fa48523073 Added collision layer and mask properties 2021-05-09 20:49:45 +01:00
Marc Gilleron
650089de8f Don't try to save if there is no stream attached 2021-05-08 17:56:43 +01:00
Marc Gilleron
b846194bea Fix some GCC warnings 2021-04-18 01:29:26 +01:00
Marc Gilleron
2467471de2 Remove old code 2021-04-15 20:30:00 +01:00
Marc Gilleron
96bcc44d00 Removed VoxelMap and VoxelBlock, superseded by their specialized versions 2021-04-15 20:25:55 +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
758e3bd227 Allow to use block size 32 for mesh blocks while using 16 for data blocks
Still hardcoded but a config should be added
2021-04-03 20:39:37 +01:00
Marc Gilleron
05c35caa92 Added categories to terrain properties 2021-03-27 16:38:52 +00:00
Marc Gilleron
31c02ad6ee Fix VoxelTerrain being left invisible due to new defaults 2021-03-12 23:35:59 +00:00
Marc Gilleron
76ec90fe34 Moved constants and tables under a folder 2021-02-21 23:58:00 +00:00
Marc Gilleron
d1207bdd96 Reorganized some utility files 2021-02-17 20:34:35 +00:00
Marc Gilleron
b65b0b8045 Implemented saving and loading of modified instances in SQLite 2021-02-07 17:22:50 +00:00
Marc Gilleron
dce6ddc3f5 No longer save terrain automatically when it gets destroyed.
If the user wants to save, save_modified_blocks() must be called explicitely.
2021-02-07 17:12:30 +00:00
Marc Gilleron
b66b9a01a9 Removed VoxelStreamFile 2021-02-01 22:25:25 +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
85bb3d7b28 VoxelTerrain can be transformed 2020-10-25 00:55:57 +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
5dd8475091 Fix GCC warning (4) 2020-09-20 20:28:45 +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
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
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
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