diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2014-09-01 19:46:17 +0400 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2015-01-20 11:29:56 +0300 |
commit | 1ed88bb24e13f7d911de708e5b2479a937734183 (patch) | |
tree | 4d8e7ba536ab50c1eb53c0b19112e0f017dc24e0 /source/blender/blenloader | |
parent | d8cf12fe5a18309e968ffc3b326d70554013b5a7 (diff) |
Partial response force for hair collisions.
This implements a penalty force as well as a repulsion force to avoid
further penetration, as suggested in
"Simulating Complex Hair with Robust Collision Handling"
(http://graphics.snu.ac.kr/publications/2005-choe-HairSim/Choe_2005_SCA.pdf)
Friction forces are still missing. More problematic is handling of
moving colliders, when face swap places with the hair vertex and a
collision is missed, putting the vertex inside the mesh volume. Larger
margins might help, but ultimately using Bullet collision detection is
probably more reliable and failsafe.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 054c9cb96e7..1a772a9657e 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -113,6 +113,7 @@ #include "BKE_armature.h" #include "BKE_brush.h" +#include "BKE_cloth.h" #include "BKE_constraint.h" #include "BKE_context.h" #include "BKE_curve.h" @@ -3940,6 +3941,9 @@ static void direct_link_particlesystems(FileData *fd, ListBase *particles) if (psys->clmd->sim_parms->presets > 10) psys->clmd->sim_parms->presets = 0; } + if (psys->clmd->coll_parms) { + psys->clmd->coll_parms->flags |= CLOTH_COLLSETTINGS_FLAG_POINTS; + } psys->hair_in_dm = psys->hair_out_dm = NULL; |