diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-03-07 18:38:56 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-03-07 18:38:56 +0300 |
commit | 5b3dc15880b698a53f4e87c9efe2bb35139aaf25 (patch) | |
tree | 4c26a3468ed2ed7b48c9a940730d485e0d96f10b /source/blender/blenkernel | |
parent | f13dc2aac1d83a5c6636aa1cacef9d27cdac05d5 (diff) |
Normal map tangents are now not always averaged at vertices anymore,
but only when the UV's are connected. That fixes some artifacts when
baking and using tangent space normal maps. It does mean increased
memory usage because it now stores 4 tangents per face like UV's,
and increased processing time, but there's no simple way around that.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_mesh.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/subsurf_ccg.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h index af531a0d50c..34d533cc98d 100644 --- a/source/blender/blenkernel/BKE_mesh.h +++ b/source/blender/blenkernel/BKE_mesh.h @@ -96,6 +96,8 @@ float (*mesh_getRefKeyCos(struct Mesh *me, int *numVerts_r))[3]; /* UvVertMap */ +#define STD_UV_CONNECT_LIMIT 0.0001f + typedef struct UvVertMap { struct UvMapVert **vert; struct UvMapVert *buf; diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c index 0108c7a14bb..7a0c47237e7 100644 --- a/source/blender/blenkernel/intern/subsurf_ccg.c +++ b/source/blender/blenkernel/intern/subsurf_ccg.c @@ -241,7 +241,7 @@ static int ss_sync_from_uv(CCGSubSurf *ss, CCGSubSurf *origss, DerivedMesh *dm, EdgeHash *ehash; float creaseFactor = (float)ccgSubSurf_getSubdivisionLevels(ss); - limit[0]= limit[1]= 0.0001f; + limit[0]= limit[1]= STD_UV_CONNECT_LIMIT; vmap= make_uv_vert_map(mface, tface, totface, totvert, 0, limit); if (!vmap) return 0; |