ce8f30f92cdf9d9cf8f7448ed8212581a565b9d7
OpenVDB has a voxel size limit defined by the determinant of the grid transform, which is equivalent to a uniform voxel size of `sqrt3(3e-15) ~= 1.44e-5`. The `mesh_to_density_grid` function was using an arbitrary threshold of `1.0e-5` for the uniform voxel size. In this case the voxel size is `~1.343e-5` so it passes the Blender threshold but crashes in OpenVDB. This fix adds some convenience functions to check for valid grid voxel size and transform based on the same determinant metric. This is now employed consistently in the mesh_to_density_grid, mesh_to_sdf_grid, and points_to_sdf_grid functions to avoid exceptions in OpenVDB. MOD_volume_to_mesh, node_geo_volume_to_mesh, BKE_mesh_remesh_voxel have not been modified, since they have their own error checks with larger thresholds. Pull Request: https://projects.blender.org/blender/blender/pulls/138481
…
Blender
Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline—modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.
Project Pages
Development
License
Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different but compatible license.
See blender.org/about/license for details.
Description
Languages
C++
78%
Python
14.9%
C
2.9%
GLSL
1.9%
CMake
1.2%
Other
0.9%
