Convert triangle meshes to SDF3 and voxel-based cache/smoothing #44
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This allows importing triangle-based closed-surface meshes, solving #14. It could be optimized by filtering triangles on evaluation, but it is good enough for low poly meshes.
The new VoxelSdf SDF3 can be used both as a cache for slow evaluations (large SDF3 hierarchies) and SDF3 smoothing with trilinear interpolation (if its meshCells < renderer's meshCells for that bounding box).
New example (monkey_hat)
Original model (a slightly modified Suzanne from Blender --- eyes were different surfaces):
![Screenshot_20220101_010431](https://user-images.githubusercontent.com/4929005/147848085-b5e5168e-c030-459e-a754-efee35274665.png)
Result (without VoxelSdf and larger meshCells):
![Screenshot_20220101_010435](https://user-images.githubusercontent.com/4929005/147848086-93e4f190-34c3-448d-b65a-08720084f9db.png)