diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2019-11-05 17:01:51 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2019-11-06 21:21:43 +0300 |
commit | 265295e6a6ca9935159f75fe2956ee908c06bf4f (patch) | |
tree | 80cf12d47a553e90457e7e86a06b3ef8fb89fc98 /source/blender/blenkernel | |
parent | 9b944e530eaf9b37e254da8568689350c54b6abc (diff) |
Fix Voxel Remesher preserve volume artifacts
Should Fix T70326
This implements the shrinkwrap options suggested in D5933. I did a few
test and it seems much more stable than the previous options.
Reviewed By: jbakker
Maniphest Tasks: T70326
Differential Revision: https://developer.blender.org/D6176
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/shrinkwrap.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/shrinkwrap.c b/source/blender/blenkernel/intern/shrinkwrap.c index 28f552cec2e..0d9decbdf81 100644 --- a/source/blender/blenkernel/intern/shrinkwrap.c +++ b/source/blender/blenkernel/intern/shrinkwrap.c @@ -1513,8 +1513,9 @@ void BKE_shrinkwrap_remesh_target_project(Mesh *src_me, Mesh *target_me, Object int totvert; ssmd.target = ob_target; - ssmd.shrinkType = MOD_SHRINKWRAP_TARGET_PROJECT; + ssmd.shrinkType = MOD_SHRINKWRAP_PROJECT; ssmd.shrinkMode = MOD_SHRINKWRAP_ON_SURFACE; + ssmd.shrinkOpts = MOD_SHRINKWRAP_PROJECT_ALLOW_NEG_DIR | MOD_SHRINKWRAP_PROJECT_ALLOW_POS_DIR; ssmd.keepDist = 0.0f; ssmd.projLimit = target_me->remesh_voxel_size; @@ -1528,12 +1529,13 @@ void BKE_shrinkwrap_remesh_target_project(Mesh *src_me, Mesh *target_me, Object calc.vgroup = -1; calc.target = target_me; calc.keepDist = ssmd.keepDist; + calc.vert = src_me->mvert; BLI_SPACE_TRANSFORM_SETUP(&calc.local2target, ob_target, ob_target); ShrinkwrapTreeData tree; if (BKE_shrinkwrap_init_tree(&tree, calc.target, ssmd.shrinkType, ssmd.shrinkMode, false)) { calc.tree = &tree; - TIMEIT_BENCH(shrinkwrap_calc_nearest_surface_point(&calc), deform_surface); + TIMEIT_BENCH(shrinkwrap_calc_normal_projection(&calc), deform_project); BKE_shrinkwrap_free_tree(&tree); } |