[Bf-blender-cvs] [48e0e0e2ac7] master: Fix T83439: Sculpt: Radial symmetry combined with mirroring results in texture offsets

Philipp Oeser noreply at git.blender.org
Tue Dec 29 18:40:45 CET 2020


Commit: 48e0e0e2ac73b003056f9a1c7f392b73b8d3c10b
Author: Philipp Oeser
Date:   Fri Dec 18 14:40:37 2020 +0100
Branches: master
https://developer.blender.org/rB48e0e0e2ac73b003056f9a1c7f392b73b8d3c10b

Fix T83439: Sculpt: Radial symmetry combined with mirroring results in texture offsets

Looks like this has been wrong since the introduction in rB5505697ac508
10 years ago.

To get the proper texture lookup in the mirrored area, first rotate, then
translate/flip [instead of the other way around].

Maniphest Tasks: T83439

Differential Revision: https://developer.blender.org/D9897

===================================================================

M	source/blender/editors/sculpt_paint/sculpt.c

===================================================================

diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 8b586e60032..823213007b0 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -2466,12 +2466,10 @@ float SCULPT_brush_strength_factor(SculptSession *ss,
      * across the symmetry axis and rotate it back to the original
      * position in order to project it. This insures that the
      * brush texture will be oriented correctly. */
-
-    flip_v3_v3(symm_point, point, cache->mirror_symmetry_pass);
-
     if (cache->radial_symmetry_pass) {
-      mul_m4_v3(cache->symm_rot_mat_inv, symm_point);
+      mul_m4_v3(cache->symm_rot_mat_inv, point);
     }
+    flip_v3_v3(symm_point, point, cache->mirror_symmetry_pass);
 
     ED_view3d_project_float_v2_m4(cache->vc->region, symm_point, point_2d, cache->projection_mat);



More information about the Bf-blender-cvs mailing list