Open Piratux opened 1 week ago
I believe this is happening purely because of the generator. The flat generator fills space with gradients up to a certain distance to ground. Beyond that, it sets it to uniform far SDF as an optimization. But that means if you use large smoothness factors in modifiers, chunks that lie in the area that's been "optimized out" by the generator will not "blobify" the same way as in areas that have accurate SDF, because gradients dont extend that far. If you wanted this to work at any distance, that optimization just can't happen.
Note that the same issue could happen with different generators doing the same trick. You'd have to calculate full SDF everywhere if you want smoothness to cause shapes to "connect" through arbitrary distances.
I see, that makes sense.
I think it could be a good idea to mention this issue under VoxelModifier
's smoothness
description.
Added in 30d6b73707fa893ed66eff5166809c3d030b4205
Describe the bug VoxelModifier (this includes VoxelModifierMesh and VoxelModifierSphere) preview mesh starts to have gaps with high enough smoothness.
Image that shows gaps in mesh:![image](https://github.com/Zylann/godot_voxel/assets/58703216/4e184355-287b-457b-b475-56b773ac1422)
To Reproduce Steps to reproduce the behavior:
VoxelLodTerrain
and addVoxelGeneratorFlat
generator.VoxelLodTerrain
addVoxelModifierSphere
.VoxelModifierSphere
's radius=30 and smoothness=40.Expected behavior Preview mesh should not have any gaps in the mesh.
Environment
MRP Test VoxelModifier mesh gaps.zip