Describe the bug
As the title says, VoxelToolLodTerrain.stamp_sdf() doesn't work ~90% of the time. On other 10% of the time, I'm not getting expected mesh shape.
More precisely, by "90% of the time", I mean when I start the project, if I get unlucky (90% chance), no matter what I do, stamp_sdf() produces no result. In remaining case, when starting the project, if I get lucky (10% chance), I always see some result from stamp_sdf().
I have checked whether stamp_sdf() works in the following project but I get similar results - sometimes I see mesh stamped, sometimes nothing happens:
I have checked whether SDF data is correct with the following, but in all cases I saw no issues:
Printed SDF data to PNGs from _mesh_sdf.get_voxel_buffer().debug_print_sdf_y_slices(1.0).
Added prints in internal write_box_template() function.
I see no errors in console.
To Reproduce
Steps to reproduce the behavior:
Download minimal reproduction project.
Run it with Godot.
Follow the instructions shown in window upon running the project (see image below).
Notice that VoxelToolLodTerrain.stamp_sdf() doesn't work. If it does work, try closing the project and running it again (because as mentioned, in some cases it works and in some cases it doesn't).
Expected behavior
See stamp_sdf() modify terrain using mesh shape.
Environment
OS: Windows 10
Graphics card: NVIDIA GeForce GTX 650 Ti
Godot version: v4.2.2.rc.custom_build.474589eb8 (locally compiled 4.2 Godot with voxel module)
Describe the bug As the title says,
VoxelToolLodTerrain.stamp_sdf()
doesn't work ~90% of the time. On other 10% of the time, I'm not getting expected mesh shape.More precisely, by "90% of the time", I mean when I start the project, if I get unlucky (90% chance), no matter what I do,
stamp_sdf()
produces no result. In remaining case, when starting the project, if I get lucky (10% chance), I always see some result fromstamp_sdf()
.I have checked whether
stamp_sdf()
works in the following project but I get similar results - sometimes I see mesh stamped, sometimes nothing happens:I have checked whether SDF data is correct with the following, but in all cases I saw no issues:
_mesh_sdf.get_voxel_buffer().debug_print_sdf_y_slices(1.0)
.write_box_template()
function.I see no errors in console.
To Reproduce Steps to reproduce the behavior:
VoxelToolLodTerrain.stamp_sdf()
doesn't work. If it does work, try closing the project and running it again (because as mentioned, in some cases it works and in some cases it doesn't).Expected behavior See
stamp_sdf()
modify terrain using mesh shape.Environment
Zip with minimal reproduction project stamp_sdf_issue_mrp.zip