Commit Graph

203 Commits (15ae1b99baa4fa297f155973daa45b11fee18c2c)

Author SHA1 Message Date
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 d01b00a29b Renamed VoxelMesherDMC::OctreeMode => SimplifyMode 2019-05-25 15:00:22 +01:00
Marc Gilleron d15d54eb95 Renamed HermiteValue.value => sdf 2019-05-25 14:53:43 +01:00
Marc Gilleron cae44985a8 Comments 2019-05-25 14:34:09 +01:00
Marc Gilleron 34653341cf Turn block loading duplicate rejection back on 2019-05-25 14:31:01 +01:00
Marc Gilleron 5a7d0b6f1b Added optional code to debug-draw unexpected block drops 2019-05-20 20:49:46 +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
Marc Gilleron ceb7f47fa1 Don't bother calling `remove_positions_outside_box`, it's not doing anything currently 2019-05-20 20:34:41 +01:00
Marc Gilleron 2b3b3e9488 Take lod factor into account for view direction in the block sorting heuristic 2019-05-20 20:30:08 +01:00
Marc Gilleron e242950cb2 Increased a bit marching squares skirts threshold 2019-05-20 20:25:52 +01:00
Marc Gilleron e47afabe49 Sort blocks using a heuristic, take look direction into account 2019-05-19 21:04:26 +01:00
Marc Gilleron b9add5d671 Allow more than one thread for mesh updates, also made it generic 2019-05-19 18:27:49 +01:00
Marc Gilleron 38062b32fe Code style 2019-05-19 18:24:03 +01:00
Marc Gilleron d5236239bf Added sort time to provider stats 2019-05-16 23:05:06 +01:00
Marc Gilleron efe58f1af6 Added exclusive area parameter to block processors so they can remove blocks from their queue 2019-05-12 16:33:25 +01:00
Marc Gilleron 561f95a506 Added stats for dropped block loads and meshs 2019-05-12 16:30:45 +01:00
Marc Gilleron 8126d732b6 Fix block processors' sorting function 2019-05-12 16:19:08 +01:00
Marc Gilleron 1065aa40ef Useless comment 2019-05-12 16:17:57 +01:00
Marc Gilleron 960236b155 Remove commented function I never used 2019-05-12 16:17:43 +01:00
Marc Gilleron 017f64ddb9 Optimized VoxelProviderNoise with a noise buffer so it does less OpenSimplex calculations 2019-05-11 17:42:56 +01:00
Marc Gilleron a521501add Move both meshing and loading sheduling to LodOctree polling 2019-05-10 18:56:48 +01:00
Marc Gilleron 29298958e7 Fix mistake in previous commit about missing binding argument 2019-05-10 00:57:09 +01:00
Marc Gilleron 255acbb739 Remove wrong CRASH_COND, also use get/setters for VoxelBlock properties 2019-05-09 22:00:54 +01:00
Marc Gilleron 96183e0c51 Fix missing argument in voxel/block conversion functions 2019-05-09 21:59:03 +01:00
Marc Gilleron 81eeb48ac6 Reduce amount of marching squares generated as skirts 2019-05-09 19:11:40 +01:00
Marc Gilleron cf7ece7a58 Remove BlockState and replace it with loading_blocks set and enum inside VoxelBlock 2019-05-09 19:11:17 +01:00
Marc Gilleron 73d5d9993c Load blocks on demand instead of speculatively, it's faster 2019-05-08 20:53:51 +01:00
Marc Gilleron 035e45d0a3 Fix missing destructor in VoxelBlock... woopsie 2019-05-08 20:36:27 +01:00
Marc Gilleron d21974e122 Changed debug methods, also fixed blocked lods due to small block region extent 2019-05-08 00:57:34 +01:00
Marc Gilleron 61e7c82d74 Indicate LOD works with smooth terrain 2019-05-06 01:39:45 +01:00
Marc Gilleron 9b2104e93e Add smooth voxels screenshot to the README 2019-05-05 20:49:56 +01:00
Marc Gilleron dc0b5a3bb5 Add smooth terrain screenshot 2019-05-05 19:55:05 +01:00
Marc Gilleron 40ccdd8fea Expose material and LOD settings 2019-05-05 19:54:47 +01:00
Marc Gilleron 310e2172ff Added stat to monitor LODs blocked by non-ready meshes 2019-05-05 19:15:50 +01:00
Marc Gilleron fc4dee54d7 Added VoxelProviderNoise for testing 2019-05-05 18:27:33 +01:00
Marc Gilleron 1baa13ff3b Added VoxelBuffer::clear_channel_f() 2019-05-05 18:27:09 +01:00
Marc Gilleron 4e9880fb8c Fix bad value fetch 2019-05-05 17:01:40 +01:00
Marc Gilleron 46784e4700 Make marching cubes skirts an option in VoxelMesherDMC, also use more C++11 initializers 2019-05-05 17:00:42 +01:00
Marc Gilleron 1f219e68eb Added marching square skirts to hide most LOD cracks 2019-05-05 03:56:18 +01:00
Marc Gilleron d93f23337a Added stats to VoxelLodTerrain 2019-05-05 01:09:12 +01:00
Marc Gilleron 8850019dc4 Put LodOctree child position calculation in a function 2019-05-04 17:58:33 +01:00
Marc Gilleron f0089dce8b Use C++11 member initializers 2019-05-04 16:30:39 +01:00
Marc Gilleron 295374b99f Don't subdivide or unsubdivide if meshes aren't ready 2019-05-04 16:29:52 +01:00
Marc Gilleron 9bab6c04d1 Added VoxelLodTerrain, focused on LOD. No seam management, no editing yet. 2019-05-04 00:02:10 +01:00
Marc Gilleron 9363f54e8d Comments 2019-05-04 00:00:50 +01:00
Marc Gilleron b24a0d4140 Make blocky voxels optional in VoxelMeshUpdater 2019-05-03 23:59:21 +01:00
Marc Gilleron 7b32426246 Handle LOD in VoxelProviderImage (roughly) 2019-05-03 23:55:52 +01:00
Marc Gilleron 2b20d90804 Added bit-shifting and comparison operators to Vector3i 2019-05-03 23:54:35 +01:00
Marc Gilleron 5851e4849f Added `lod` parameter to VoxelProvider 2019-04-29 21:57:39 +01:00
Marc Gilleron c80a24ef0b Moved is_mesh_empty() to utility.h 2019-04-29 21:32:28 +01:00