Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Dobarro <pablodp606@gmail.com>2019-10-07 19:33:28 +0300
committerPablo Dobarro <pablodp606@gmail.com>2019-10-08 16:58:16 +0300
commitabc36cad833943c0629238bb5a62aaa4ba5679ad (patch)
tree100ccbcd59d232d66bc115f043cdea895d4ba88e /source/blender/editors/object/object_remesh.c
parent31a45666857b0b8a8b3a55ad0db5f6025711d9d4 (diff)
Sculpt: Fix projection artifacts by changing the voxel remesh isovalue
This should fix most of the shrinkwrap artifacts when the preserve volume option is active. After this commit the default voxel remehser settings should not fail in the default cube. Reviewed By: zeddb Differential Revision: https://developer.blender.org/D6010
Diffstat (limited to 'source/blender/editors/object/object_remesh.c')
-rw-r--r--source/blender/editors/object/object_remesh.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/object/object_remesh.c b/source/blender/editors/object/object_remesh.c
index a395a7013fe..35762c5861e 100644
--- a/source/blender/editors/object/object_remesh.c
+++ b/source/blender/editors/object/object_remesh.c
@@ -117,8 +117,13 @@ static int voxel_remesh_exec(bContext *C, wmOperator *op)
ED_sculpt_undo_geometry_begin(ob);
}
+ float isovalue = 0.0f;
+ if (mesh->flag & ME_REMESH_REPROJECT_VOLUME) {
+ isovalue = mesh->remesh_voxel_size * 0.3f;
+ }
+
new_mesh = BKE_mesh_remesh_voxel_to_mesh_nomain(
- mesh, mesh->remesh_voxel_size, mesh->remesh_voxel_adaptivity);
+ mesh, mesh->remesh_voxel_size, mesh->remesh_voxel_adaptivity, isovalue);
if (!new_mesh) {
return OPERATOR_CANCELLED;