[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [45110] trunk/blender/source/blender/ editors/sculpt_paint/sculpt.c: Better smoothing for sculpt cube falloff.

Nicholas Bishop nicholasbishop at gmail.com
Fri Mar 23 17:59:33 CET 2012


Revision: 45110
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=45110
Author:   nicholasbishop
Date:     2012-03-23 16:59:23 +0000 (Fri, 23 Mar 2012)
Log Message:
-----------
Better smoothing for sculpt cube falloff.

The cube test, used by the clay strips brush, now smooths the corners
of the cube using the brush curve.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/sculpt_paint/sculpt.c

Modified: trunk/blender/source/blender/editors/sculpt_paint/sculpt.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/sculpt.c	2012-03-23 16:14:25 UTC (rev 45109)
+++ trunk/blender/source/blender/editors/sculpt_paint/sculpt.c	2012-03-23 16:59:23 UTC (rev 45110)
@@ -357,7 +357,11 @@
 	local_co[2] = fabs(local_co[2]);
 
 	if (local_co[0] <= side && local_co[1] <= side && local_co[2] <= side) {
-		test->dist = MAX3(local_co[0], local_co[1], local_co[2]) / side;
+		float p = 4;
+		
+		test->dist = ((powf(local_co[0], p) +
+					   powf(local_co[1], p) +
+					   powf(local_co[2], p)) / pow(side, p));
 
 		return 1;
 	}




More information about the Bf-blender-cvs mailing list