Zylann / godot_voxel

Voxel module for Godot Engine
MIT License
2.72k stars 251 forks source link

VoxelMeshSDF incorrect BAKE_MODE_ACCURATE_NAIVE description about sign calculation #658

Closed Piratux closed 5 months ago

Piratux commented 5 months ago

VoxelMeshSDF baking mode BAKE_MODE_ACCURATE_NAIVE in description mentions, that SDF sign is calculated using raycasts. However only BAKE_MODE_APPROX_FLOODFILL does this.

Other methods calculate sign based on dot product between triangle normal and position (not exactly sure how or why this works). See https://github.com/Zylann/godot_voxel/blob/master/edition/mesh_sdf.cpp#L674

image

Zylann commented 5 months ago

Interesting. I don't remember why that is. I wonder how relevant it is to detail this so much though, it gets out of sync so easily...

Zylann commented 5 months ago

Changed in 1111df304a1f8b0b249b064674338d98398e95d6