Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Genrich <daniel.genrich@gmx.net>2008-08-18 23:32:21 +0400
committerDaniel Genrich <daniel.genrich@gmx.net>2008-08-18 23:32:21 +0400
commit17e42222306e8671fb8937594200d350abd127f4 (patch)
tree1667ab691576f36d0af598e36f7d24a2ace4dc8f /source/blender/blenkernel/intern/implicit.c
parent8562efe8a3f25c68251b080cae8c8c7e936bf476 (diff)
Little tweaks so 0 wind results in 0 noise, also removed double-mass dependancy in cloth
Diffstat (limited to 'source/blender/blenkernel/intern/implicit.c')
-rw-r--r--source/blender/blenkernel/intern/implicit.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c
index 995ea666380..47853363e4b 100644
--- a/source/blender/blenkernel/intern/implicit.c
+++ b/source/blender/blenkernel/intern/implicit.c
@@ -1452,6 +1452,7 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec
float triunnormal[3]={0,0,0}; // not-normalized-triangle normal
float tmp[3]={0,0,0};
float factor = (mfaces[i].v4) ? 0.25 : 1.0 / 3.0;
+ factor *= 0.02;
// calculate face normal
if(mfaces[i].v4)
@@ -1465,24 +1466,24 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec
// add wind from v1
VECCOPY(tmp, trinormal);
VecMulf(tmp, calculateVertexWindForce(winvec[mfaces[i].v1], triunnormal));
- VECADDS(lF[mfaces[i].v1], lF[mfaces[i].v1], tmp, factor*verts[mfaces[i].v1].mass);
+ VECADDS(lF[mfaces[i].v1], lF[mfaces[i].v1], tmp, factor);
// add wind from v2
VECCOPY(tmp, trinormal);
VecMulf(tmp, calculateVertexWindForce(winvec[mfaces[i].v2], triunnormal));
- VECADDS(lF[mfaces[i].v2], lF[mfaces[i].v2], tmp, factor*verts[mfaces[i].v2].mass);
+ VECADDS(lF[mfaces[i].v2], lF[mfaces[i].v2], tmp, factor);
// add wind from v3
VECCOPY(tmp, trinormal);
VecMulf(tmp, calculateVertexWindForce(winvec[mfaces[i].v3], triunnormal));
- VECADDS(lF[mfaces[i].v3], lF[mfaces[i].v3], tmp, factor*verts[mfaces[i].v3].mass);
+ VECADDS(lF[mfaces[i].v3], lF[mfaces[i].v3], tmp, factor);
// add wind from v4
if(mfaces[i].v4)
{
VECCOPY(tmp, trinormal);
VecMulf(tmp, calculateVertexWindForce(winvec[mfaces[i].v4], triunnormal));
- VECADDS(lF[mfaces[i].v4], lF[mfaces[i].v4], tmp, factor*verts[mfaces[i].v4].mass);
+ VECADDS(lF[mfaces[i].v4], lF[mfaces[i].v4], tmp, factor);
}
}
del_lfvector(winvec);