Commit Graph

130 Commits

Author SHA1 Message Date
Marc Gilleron
101f83234a Don't logspam if terrain library is not set 2019-04-25 00:58:23 +01:00
Marc Gilleron
9f0845759f Fix binding of VoxelIsoSurfaceTool::do_heightmap() 2019-04-25 00:57:18 +01:00
Marc Gilleron
9e13c68da7 Return empty mesh if blocky mesher doesnt find a type channel 2019-04-25 00:56:51 +01:00
Marc Gilleron
fdb40ef3f4 Add quick support for isolevel in VoxelProviderImage 2019-04-25 00:54:14 +01:00
Marc Gilleron
b3dd85bd36 Added VoxelIsoSurfaceTool::do_heightmap(), untested 2019-04-24 02:08:45 +01:00
Marc Gilleron
1a4c6ec33d Fixed compilation 2019-04-24 02:07:06 +01:00
Marc Gilleron
1b9e7257df Clang-format did things 2019-04-24 01:31:42 +01:00
Marc Gilleron
70881ce255 Use Godot Map, std::map doesnt appear to have any advantage 2019-04-23 23:38:15 +01:00
Marc Gilleron
9c3eb0e4b7 Added OCTREE_NODE mode to disable adaptivity, effectively providing classic marching cubes 2019-04-23 23:37:26 +01:00
Marc Gilleron
19329efaa6 Initialize stats before each meshing 2019-04-23 23:35:43 +01:00
Marc Gilleron
b627a5736d Expose octree mode, mesh mode and geometric error as properties; initialize stats 2019-04-23 01:30:15 +01:00
Marc Gilleron
a80ddc450b Make OP_ADD the default in VoxelIsoSurfaceTool 2019-04-23 01:28:51 +01:00
Marc Gilleron
cead529f11 Use object pool to speed up octree construction 2019-04-23 00:47:52 +01:00
Marc Gilleron
bfbe382a7d Snake case 2019-04-23 00:26:41 +01:00
Marc Gilleron
1070acf0be Count re-used vertices 2019-04-23 00:14:20 +01:00
Marc Gilleron
0e569df945 Re-use dualgrid memory 2019-04-22 23:36:42 +01:00
Marc Gilleron
3c366b1f09 Add stats 2019-04-22 23:03:57 +01:00
Marc Gilleron
bed8ac8cb9 Drop gradient channels, fix misconception about what gradient is 2019-04-22 21:17:19 +01:00
Marc Gilleron
572dcbf680 Move this code closer to what uses it 2019-04-22 21:15:45 +01:00
Marc Gilleron
1defe3bdbd Added VoxelIsoSurfaceTool 2019-04-22 20:15:46 +01:00
Marc Gilleron
9108bfe0f6 Fix VoxelBuffer channel initialized with wrong value when allocated 2019-04-22 20:15:19 +01:00
Marc Gilleron
869b921ce8 Add VoxelBuffer::fill_iso() 2019-04-22 20:14:25 +01:00
Marc Gilleron
0808bf2691 Fix border dual cells not generating due to octree offset, implement alternative bottom-up octree 2019-04-22 01:28:53 +01:00
Marc Gilleron
91a5c7ffa8 A bit of reorganization and tweaks:
- Moved HermiteValue in its own file
- VoxelBuffer channels are now predefined
- Create DualGridGenerator for easier passing of data
- Chunk size is no longer hardcoded
- Respect padding when polygonizing voxels
- BUG: due to the above, the way we build the octree is now breaking the result as mentionned in the TODO
2019-04-21 19:31:35 +01:00
Marc Gilleron
35ff5fd546 Rename VoxelMesherSmooth => VoxelMesherTransvoxel 2019-04-21 14:47:50 +01:00
Marc Gilleron
d53e43f115 Added function to compute gradients from isolevels 2019-04-21 02:54:35 +01:00
Marc Gilleron
9bb81f9bb7 Fix dependency in utility.h, move MeshBuilder to its own file, re-use vertex arrays 2019-04-21 01:14:28 +01:00
Marc Gilleron
35e03f7e77 Fix a few mistakes in dual grid derivation 2019-04-20 23:34:22 +01:00
Marc Gilleron
d52fecaa79 Fix offset between contour and source shape 2019-04-20 22:38:09 +01:00
Marc Gilleron
d74201c93f Added marching cubes polygonization, almost works but sometimes holes appear 2019-04-20 21:21:45 +01:00
Marc Gilleron
a12435266f Fix dual grid debug mesh not making cubes properly; check for emptyness 2019-04-20 18:08:00 +01:00
Marc Gilleron
1181cfa59f Dual marching cubes WIP (only octree and dual grid extraction, untested) 2019-04-20 17:32:10 +01:00
Marc Gilleron
6fc70a66c1 Remove reference to dvector.h 2019-04-13 18:47:35 +01:00
Marc Gilleron
ff96ba5528 Make VoxelBlock defined when including VoxelMap 2019-01-01 16:44:19 +00:00
Marc Gilleron
9e2e59c198 Fix misplaced semicolon 2019-01-01 16:43:14 +00:00
Marc Gilleron
b264b3d319 Add an italian pointy hand where there should have been an italian pointy hand 2018-12-14 00:22:03 +00:00
Marc Gilleron
6e06d200bf Stop using ADD_PROPERTYNZ 2018-12-14 00:21:28 +00:00
Marc Gilleron
d0ab02a397 Fix UVs, change tables to use OpenGL convention... 2018-10-05 23:51:55 +01:00
Marc Gilleron
b052f7fc2d Added try_set_voxel and fix fill_area in cases where the box is out of range 2018-10-04 23:13:03 +01:00
Marc Gilleron
20d8cf876b Fix voxel tiles not editable in editor 2018-10-04 23:12:20 +01:00
Marc Gilleron
47a3fe97d3 Added function to make an area dirty 2018-10-01 20:48:47 +01:00
Marc Gilleron
b03df8c079 Added box mover utility for quick move and slide physics 2018-10-01 00:11:33 +01:00
Marc Gilleron
f05762b683 Fix potential issue, the block state being checked was always the same 2018-09-30 23:32:01 +01:00
Marc Gilleron
da0a1a058c Moved side, edge and corner enums to cube tables, and renamed CubeTables to Cube 2018-09-30 19:38:02 +01:00
Marc Gilleron
8ffa7110c8 Optimize mesher: access channel directly and remove some push_backs 2018-09-30 01:55:09 +01:00
Marc Gilleron
ef92e5f144 Darken default baked AO a little 2018-09-30 01:52:40 +01:00
Marc Gilleron
9e6170e705 Use raw copy to speed up the mesher a little 2018-09-29 22:41:52 +01:00
Marc Gilleron
65aed7de5b Merge branch 'master' of https://github.com/Zylann/godot_voxel 2018-09-29 21:48:10 +01:00
Marc Gilleron
a875b85498 Don't send empty blocks to the updater, so we avoid a copy and unnecessary face extraction 2018-09-29 21:47:53 +01:00
Marc Gilleron
606e131c25 More stats 2018-09-29 18:59:19 +01:00