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:
authorBenoit Bolsee <benoit.bolsee@online.be>2009-04-28 02:21:42 +0400
committerBenoit Bolsee <benoit.bolsee@online.be>2009-04-28 02:21:42 +0400
commitd4f8b416e92ec5b71bddfa688e9a63ea86510721 (patch)
treedcd3c3ea83370c53a228a4fe722c0e9353a4dc2f /source/blender
parentfa826774a3f2a2db67466d38ed26fbdb845e37a4 (diff)
BGE soft body: change welding option to disable welding check by default: speeds up shape conversion. This is fine if the object has no duplicate vertices. Otherwise, bullet will be extremely slow and you can either set some welding or remove duplicates in the mesh. Welding is now displayed in linear scale: 0.0 -> 0.01, no need to use logarithmic scale ;-). Fix a bug with Bullet by which vertex array for soft body must have 3xfloat stride.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/intern/bullet.c2
-rw-r--r--source/blender/makesdna/DNA_object_force.h2
-rw-r--r--source/blender/src/buttons_logic.c9
3 files changed, 5 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/bullet.c b/source/blender/blenkernel/intern/bullet.c
index 657507ee048..44e8ed1f08c 100644
--- a/source/blender/blenkernel/intern/bullet.c
+++ b/source/blender/blenkernel/intern/bullet.c
@@ -82,7 +82,7 @@ BulletSoftBody *bsbNew(void)
bsb->collisionflags = 0;
//bsb->collisionflags = OB_BSB_COL_CL_RS + OB_BSB_COL_CL_SS;
bsb->numclusteriterations = 64;
- bsb->welding = -4.f;
+ bsb->welding = 0.f;
return bsb;
}
diff --git a/source/blender/makesdna/DNA_object_force.h b/source/blender/makesdna/DNA_object_force.h
index 73dd8b28d15..e8e865a533c 100644
--- a/source/blender/makesdna/DNA_object_force.h
+++ b/source/blender/makesdna/DNA_object_force.h
@@ -119,7 +119,7 @@ typedef struct BulletSoftBody {
float kAHR; /* Anchors hardness [0,1] */
int collisionflags; /* Vertex/Face or Signed Distance Field(SDF) or Clusters, Soft versus Soft or Rigid */
int numclusteriterations; /* number of iterations to refine collision clusters*/
- float welding; /* welding limit to remove duplicate/nearby vertices, 0.0000001..0.01 */
+ float welding; /* welding limit to remove duplicate/nearby vertices, 0.0..0.01 */
} BulletSoftBody;
/* BulletSoftBody.flag */
diff --git a/source/blender/src/buttons_logic.c b/source/blender/src/buttons_logic.c
index 8b6cc457994..eb65dcc6785 100644
--- a/source/blender/src/buttons_logic.c
+++ b/source/blender/src/buttons_logic.c
@@ -3104,12 +3104,9 @@ static uiBlock *advanced_bullet_menu(void *arg_ob)
uiBlockEndAlign(block);
yco -= 20;
xco = 0;
- if (ob->bsoft->welding == 0.f)
- ob->bsoft->welding = -4.f;
-
- uiDefButF(block, NUMSLI, 0, "Welding(10^) ",
- xco, yco, 360, 19, &ob->bsoft->welding, -7.f, -2.f, 10, 2,
- "Threshold to remove duplicate/nearby vertices. Displayed in logarithmic scale for readability: linear values from 0.0000001 to 0.01");
+ uiDefButF(block, NUMSLI, 0, "Welding ",
+ xco, yco, 360, 19, &ob->bsoft->welding, 0.f, 0.01f, 10, 4,
+ "Welding threshold: distance between nearby vertices to be considered equal => set to 0.0 to disable welding test and speed up scene loading (ok if the mesh has no duplicates)");
/*
//too complex tweaking, disable for now