[Bf-blender-cvs] [2f5db2e] master: Fix T48986: Incorrect normals or tangents when using custom split normals.

Bastien Montagne noreply at git.blender.org
Tue Aug 2 16:08:59 CEST 2016


Commit: 2f5db2e45b7a8af51b15c45bb41f5dcb49ae9d4d
Author: Bastien Montagne
Date:   Tue Aug 2 16:05:20 2016 +0200
Branches: master
https://developer.blender.org/rB2f5db2e45b7a8af51b15c45bb41f5dcb49ae9d4d

Fix T48986: Incorrect normals or tangents when using custom split normals.

(Re)-setting custom normals could cause some unwanted splitting of some of them, leading
to slightly different tangent space. Simply enlarged slightly the threshold detecting
similar normals as identical ones for now, afarid this is the kind of issue that cannot
get a full complete solution for until we drop floats...

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

M	source/blender/blenkernel/intern/mesh_evaluate.c

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

diff --git a/source/blender/blenkernel/intern/mesh_evaluate.c b/source/blender/blenkernel/intern/mesh_evaluate.c
index 1c86fbc..fa113ef 100644
--- a/source/blender/blenkernel/intern/mesh_evaluate.c
+++ b/source/blender/blenkernel/intern/mesh_evaluate.c
@@ -434,7 +434,7 @@ MLoopNorSpace *BKE_lnor_space_create(MLoopNorSpaceArray *lnors_spacearr)
 }
 
 /* This threshold is a bit touchy (usual float precision issue), this value seems OK. */
-#define LNOR_SPACE_TRIGO_THRESHOLD (1.0f - 1e-6f)
+#define LNOR_SPACE_TRIGO_THRESHOLD (1.0f - 1e-4f)
 
 /* Should only be called once.
  * Beware, this modifies ref_vec and other_vec in place!




More information about the Bf-blender-cvs mailing list