[Bf-blender-cvs] [f1981b3] fracture_modifier: partial fix for displacement / autohide flicker problem, happens now only with automerge (occasionally) and with automerge + fix normals (regularly), but for displacement and glass you mostly need only autohide; automerge and fix normals are for smooth objects where cracks should be nearly invisible (after fracturing)

Martin Felke noreply at git.blender.org
Wed Dec 30 20:48:08 CET 2015


Commit: f1981b3cfc2b592a0d3e4f227f493d0b6197d7f1
Author: Martin Felke
Date:   Wed Dec 30 20:47:25 2015 +0100
Branches: fracture_modifier
https://developer.blender.org/rBf1981b3cfc2b592a0d3e4f227f493d0b6197d7f1

partial fix for displacement / autohide flicker problem, happens now only with automerge (occasionally) and with automerge + fix normals (regularly), but for displacement and glass you mostly need only autohide; automerge and fix normals are for smooth objects where cracks should be nearly invisible (after fracturing)

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

M	source/blender/modifiers/intern/MOD_fracture.c

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

diff --git a/source/blender/modifiers/intern/MOD_fracture.c b/source/blender/modifiers/intern/MOD_fracture.c
index 3b17649..4109eb6 100644
--- a/source/blender/modifiers/intern/MOD_fracture.c
+++ b/source/blender/modifiers/intern/MOD_fracture.c
@@ -2795,12 +2795,19 @@ static DerivedMesh *do_autoHide(FractureModifierData *fmd, DerivedMesh *dm, Obje
 		BMO_op_callf(bm, (BMO_FLAG_DEFAULTS & ~BMO_FLAG_RESPECT_HIDE),
 	             "automerge_keep_normals verts=%hv dist=%f", BM_ELEM_SELECT,
 	             fmd->automerge_dist); /*need to merge larger cracks*/
-	}
 
-	//dissolve sharp edges with limit dissolve
-	BMO_op_callf(bm, (BMO_FLAG_DEFAULTS & ~BMO_FLAG_RESPECT_HIDE), "dissolve_limit_keep_normals "
-	             "angle_limit=%f use_dissolve_boundaries=%b verts=%av edges=%ae delimit=%i",
-	             DEG2RADF(1.0f), false, 0);
+		if (fmd->fix_normals) {
+			/* dissolve sharp edges with limit dissolve
+			 * this causes massive flicker with displacements and possibly with glass too when autohide is enabled
+			 * so use this only when fix normals has been requested and automerge is enabled
+			 * for glass in most cases autohide is enough, for displacements too, fix normals and automerge are for special cases where you
+			 * want to clear off nearly all cracks (with smooth objects for example), in those cases you still might experience flickering
+			 * when using glass or displacements */
+			BMO_op_callf(bm, (BMO_FLAG_DEFAULTS & ~BMO_FLAG_RESPECT_HIDE), "dissolve_limit_keep_normals "
+						 "angle_limit=%f use_dissolve_boundaries=%b verts=%av edges=%ae delimit=%i",
+						 DEG2RADF(1.0f), false, 0);
+		}
+	}
 
 	result = CDDM_from_bmesh(bm, true);
 	BM_mesh_free(bm);




More information about the Bf-blender-cvs mailing list