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:
authorLukas Tönne <lukas.toenne@gmail.com>2014-11-06 14:17:09 +0300
committerLukas Tönne <lukas.toenne@gmail.com>2015-01-20 11:30:06 +0300
commitd05c653ade0a5e80652bb36b4d53c5a013b2fc0f (patch)
tree1c465a552b381932803047788ed2d1f0122cf611 /source/blender/blenkernel/intern/collision.c
parentc37de3871664cc5b3baf48a4b423b7a08f77bbf1 (diff)
Better grid rasterization method for hair volumetric grids.
This is based on the paper "Detail Preserving Continuum Simulation of Straight Hair" (McAdams, Selle, Ward, 2009) The main difference is that hair line segments are used rather than only rasterizing velocity at the vertices. This gives a much better coverage of the hair volume grid, otherwise gaps can be produced at smaller grid cell sizes and the distribution is uneven along the hair curve. The algorithm for rasterizing is a variation of Bresenham's algorithm extended onto 3D grids. Conflicts: source/blender/physics/intern/BPH_mass_spring.cpp
Diffstat (limited to 'source/blender/blenkernel/intern/collision.c')
-rw-r--r--source/blender/blenkernel/intern/collision.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c
index f4748f862f6..0690d0fbd8f 100644
--- a/source/blender/blenkernel/intern/collision.c
+++ b/source/blender/blenkernel/intern/collision.c
@@ -1061,6 +1061,7 @@ static bool cloth_points_collision_response_static(ClothModifierData *clmd, Coll
bounce = 0.0f;
mul_v3_v3fl(impulse, collpair->normal, repulse);
}
+#if 0
{
float d[3], md[3];
mul_v3_v3fl(d, collpair->normal, -collpair->distance);
@@ -1072,8 +1073,9 @@ static bool cloth_points_collision_response_static(ClothModifierData *clmd, Coll
BKE_sim_debug_data_add_line(clmd->debug_data, collmd->current_x[collpair->bp2].co, collmd->current_x[collpair->bp3].co, 0, 0, 1, "collision", hash_collpair(86, collpair));
BKE_sim_debug_data_add_line(clmd->debug_data, collmd->current_x[collpair->bp3].co, collmd->current_x[collpair->bp1].co, 0, 0, 1, "collision", hash_collpair(87, collpair));
}
+#endif
cloth1->verts[collpair->ap1].impulse_count++;
- BKE_sim_debug_data_add_vector(clmd->debug_data, collpair->pa, impulse, 1.0, 1.0, 1.0, "collision", hash_collpair(873, collpair));
+// BKE_sim_debug_data_add_vector(clmd->debug_data, collpair->pa, impulse, 1.0, 1.0, 1.0, "collision", hash_collpair(873, collpair));
result = true;
}