From 1ed88bb24e13f7d911de708e5b2479a937734183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20T=C3=B6nne?= Date: Mon, 1 Sep 2014 17:46:17 +0200 Subject: 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. --- source/blender/makesdna/DNA_cloth_types.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/blender/makesdna/DNA_cloth_types.h') diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h index a9e066ef45e..4d862e48109 100644 --- a/source/blender/makesdna/DNA_cloth_types.h +++ b/source/blender/makesdna/DNA_cloth_types.h @@ -99,15 +99,16 @@ typedef struct ClothCollSettings { float epsilon; /* min distance for collisions. */ float self_friction; /* Fiction/damping with self contact. */ float friction; /* Friction/damping applied on contact with other object.*/ + float damping; /* Collision restitution on contact with other object.*/ float selfepsilon; /* for selfcollision */ float repel_force, distance_repel; int flags; /* collision flags defined in BKE_cloth.h */ short self_loop_count; /* How many iterations for the selfcollision loop */ short loop_count; /* How many iterations for the collision loop. */ + int pad; struct Group *group; /* Only use colliders from this group of objects */ short vgroup_selfcol; /* vgroup to paint which vertices are used for self collisions */ - short pad; - int pad2; + short pad2[3]; } ClothCollSettings; -- cgit v1.2.3