164 Commits

Author SHA1 Message Date
Nathan
713c57388a Changing the approch once again due to misunderstanding Zylann 2020-05-06 19:47:00 -07:00
Nathan
6db4246e9a Missed something to clean up 2020-05-06 16:20:24 -07:00
Nathan
c69afee67f Clean up some stuff that should not have happened 2020-05-06 16:14:11 -07:00
Nathan
89691f6ece Added function in mesher to create collision mesh 2020-05-06 14:42:46 -07:00
Nathan
e045c0f350 Generate a collision mesh for each surface 2020-04-28 21:50:37 -07:00
Cory Petkovsek
d407d6201a Fix build warnings on other platforms 2020-04-03 20:46:29 +08:00
Marc Gilleron
9f7a081dd4 Non-cube voxels don't contribute to AO for now 2020-02-23 01:29:32 +00:00
Marc Gilleron
f5001fdc07 Merge branch 'master' into custom_blocky_mesh
# Conflicts:
#	util/array_slice.h
2020-02-22 22:55:50 +00: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
db98d5865d
Merge branch 'master' into fix_gcc_warnings 2020-02-15 16:40:32 +00:00
Marc Gilleron
17e3651d0e Fix release compilation 2020-02-15 16:37:23 +00:00
Cory Petkovsek
40e3fdc878 Adjust PR 2020-02-15 04:09:31 +08:00
Cory Petkovsek
24841e9a18 fix gcc warnings 2020-02-13 21:49:11 +08:00
Marc Gilleron
197c6c71bc Use a pattern matrix to determine side culling, so it can be baked more precisely 2020-02-11 21:20:05 +00:00
Tin Švagelj
e67ec6f207
Added missing semicolons on line endings 2020-02-07 04:52:06 +01:00
Marc Gilleron
bb97d7a614 Add debug method to VoxelLodTerrain to print a 2D top-down image of the SDF 2020-02-05 21:09:14 +01:00
Marc Gilleron
618257b570 Code style 2020-02-05 21:08:23 +01:00
Marc Gilleron
e9d431360b Fix case where a block gets saved but is requested for loading very shortly after
When a block gets saved, a thread event comes back to confirm it,
but that event can be mistaken for a loading event because nothing was
explicitely checking for it. It worked so far because the "loading blocks"
check was luckily taking "care" of it, except in that edge case.
2020-02-04 15:37:52 +01:00
Marc Gilleron
6c6bd52a68 Can add custom collision AABBs to blocky voxels, for use with VoxelBoxMover 2020-02-03 10:29:25 +01:00
Marc Gilleron
aec06b214b Merge branch 'master' into depth 2020-01-26 23:34:08 +00:00
Marc Gilleron
8879d9b2e7 Moved all generators under their own base class and folder 2020-01-26 22:34:26 +00:00
Marc Gilleron
87a9766442 voxel_raycast is now template 2020-01-26 20:43:40 +00:00
Marc Gilleron
0ac1b7e6dc Moved edition-related classes to a sub-folder 2020-01-26 20:29:44 +00:00
Marc Gilleron
7723988b15 Merge branch 'master' into depth
# Conflicts:
#	meshers/transvoxel/voxel_mesher_transvoxel.cpp
2020-01-25 19:46:53 +00:00
Marc Gilleron
a751b0ca63 Fix edited block producing a hole when going away from it 2020-01-23 23:20:23 +00:00
Marc Gilleron
73491cd1ff Fix LOD getting stuck if you teleport far away
Now the octree is always allowed to merge nodes even if the parent block isn't available.
Also removed unused userdata from LodOctree::Node,
merged callbacks into one struct,
removed some old debug code
2020-01-23 00:37:13 +00:00
Marc Gilleron
e76e4d2b49 Fix bad discarding code when block management threads are told to exit
In short, std::remove_if does NOT remove anything
2020-01-19 18:13:00 +00:00
Marc Gilleron
09acd82c72 Merge branch 'master' into depth 2020-01-18 19:29:57 +00:00
Marc Gilleron
c493aec343 Use StringNames when applicable 2020-01-17 20:43:28 +00:00
Marc Gilleron
0b4860b40d Use MAX_LOD global constant 2020-01-15 21:40:35 +00:00
Marc Gilleron
87afb8f96c Fix split scale not being clamped properly. Also reorganized debug functions a bit 2020-01-15 21:04:23 +00:00
Cory Petkovsek
9129016567 Fix invisible VoxelTerrain 2020-01-10 19:57:49 +08:00
Marc Gilleron
2d1a53048c Merge branch 'master' into depth
# Conflicts:
#	streams/voxel_block_serializer.cpp
2020-01-10 01:43:38 +00:00
Marc Gilleron
9e87a522d7 Merge branch 'visibility_as_being_in_world' 2020-01-09 23:46:59 +00:00
Marc Gilleron
9dc09618be ZProfiler is now usable from anywhere including threads 2020-01-07 20:32:36 +00:00
Marc Gilleron
badf3876c3 When a block is not visible, remove it from world instead 2020-01-07 02:04:24 +00:00
Marc Gilleron
051034fc51 Improve transition mask calculation on world borders.
It fixes a case where a block at world border would remain with
a transition mask of 0 when a neighbor block of lower LOD becomes visible.
Now a block side bordered by an empty area will assume transition.
2020-01-07 00:22:58 +00:00
Marc Gilleron
04d15fe843 Merge branch 'master' into depth
# Conflicts:
#	meshers/blocky/voxel_mesher_blocky.cpp
#	meshers/transvoxel/voxel_mesher_transvoxel.cpp
2020-01-05 23:40:44 +00:00
Marc Gilleron
dacd18b772 Added function to debug pointed blocks 2020-01-05 23:27:43 +00:00
Marc Gilleron
462e453cf4 Fix thin cracks caused by pooled material params not being reset when reused 2020-01-05 04:57:40 +00:00
Marc Gilleron
8056f7e679 Fix transition meshes not being scaled with LOD, provide LOD in mesher API 2020-01-04 23:24:33 +00:00
Marc Gilleron
a8f8a03439 Added customizable bit depth to VoxelBuffer. UNTESTED 2020-01-04 19:20:49 +00:00
Marc Gilleron
a11a95bcce Renamed CHANNEL_ISOLEVEL => CHANNEL_SDF 2020-01-02 21:03:44 +00:00
Marc Gilleron
3c3fe017d8 Remove channel enum from Voxel, it was redundant with VoxelBuffer 2020-01-02 20:46:27 +00:00
Marc Gilleron
d8677cd663 Fix heavy stuttering caused by ShaderMaterial 2020-01-02 20:29:40 +00:00
Marc Gilleron
31f588c1a1 Add profiling scopes to VoxelLodTerrain, also fix usage in VoxelStream 2020-01-02 20:29:02 +00:00
Marc Gilleron
ebc6be35d1 Implement LOD transitions in VoxelLodTerrain
- VoxelBlock contains 6 optional transition meshes
- VoxelLodTerrain calculates transition masks when block visibility changes
- VoxelMesher can now specify different min and max paddings
- Fix Cube::SIDE_POSITIVE/NEGATIVE_X/Y/Z enum not matching Cube::g_side_normals
- Convert transition masks to make up for the Cube:: inconsistency for now
2019-12-31 16:48:46 +00:00
Marc Gilleron
a9952179a7 Transition meshes WIP and bug fixes
- Allow meshers to specify compression flags
- Use uncompressed COLOR to fit extra vertex data for transition meshes
- Simplify a few interpolations
- Fix a few buffer overruns which were not detected by the debugger
- Use array wrappers to better detect overrun mistakes
2019-12-26 20:29:55 +00:00
Marc Gilleron
9dcf8c83cb Did not need to be included in header 2019-12-23 21:36:34 +00:00