January 19, 2015, 16:43 (GMT) |
Hair collision: Use the S matrix for enforcing contact constraints. This is a first test, the contacts are very explosive atm because they basically pin hair vertices globally on collision, which leads to stretching of the springs which is then suddenly released in the next frame. |
January 19, 2015, 16:43 (GMT) |
Preparation for collision code fixing. Instead of handling contact tests and collision response in the same function in collision.c, first generate contact points and return them as a list, then free at the end of the stepping function. This way the contact response can be integrated into the conjugate gradient method properly instead of using the hackish and unstable double evaluation that is currently used. |
January 19, 2015, 16:43 (GMT) |
Cleanup: added some comments to the members of Implicit_Data. |
January 19, 2015, 16:43 (GMT) |
Cleanup: No point in passing all the implicit solver arguments individually. |
January 19, 2015, 16:43 (GMT) |
Cleanup: removed the unused olddV vectors from implicit solver data. |
January 19, 2015, 16:42 (GMT) |
Some more debug elements for hair collisions. |
January 19, 2015, 16:42 (GMT) |
Extended line/face collision near-check, to allow for distance margins. The original BLI method for line/triangle intersection returns false in case the line does not actually intersect, but in order to generate repulsion forces we need to also handle contacts inside the margin. |
January 19, 2015, 16:41 (GMT) |
Fix bounce/repulse calculation. |
January 19, 2015, 16:41 (GMT) |
Hair debugging: use "categories" (strings) for grouping debug elements and support clearing for categories. |
January 19, 2015, 16:41 (GMT) |
Fix for hair collision detection: need to use the second point of the timestep segment. This ensures the distance for a collision pair is the one of the current point position, and the response gets calculated accordingly. |
January 19, 2015, 16:41 (GMT) |
Use repulsion forces in combination with the one-time penalty forces in collision. |
January 19, 2015, 16:40 (GMT) |
Fix for crash when going into particle edit mode with baked hair simulation. Note that this currently generates an extreme amount of points, by making a edit pathcache curve for each hair in every frame! But at least doesn't simply crash now. |
January 19, 2015, 16:40 (GMT) |
Clear debug_data pointer in local cloth modifier data of the particle systems on blend file load. |
January 19, 2015, 16:40 (GMT) |
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. |
January 19, 2015, 16:40 (GMT) |
Debug drawing for simulations, to aid in visualizing abstract data such as forces, velocities, contact points etc. This uses a hash table to store debug elements (dots, lines, vectors at this point). The hash table allows continuous display of elements that are generated only in certain time steps, e.g. contact points, while avoiding massive memory allocation. In any case, this system is really a development feature, but very helpful in finding issues with the internal solver data. |
January 19, 2015, 16:40 (GMT) |
Some initial collision code, without actual response forces still. This is still using the old BVH tree collision methods to generate contact points, similar to what cloth does. This should be replaced by a Bullet collision check, but generating contacts in this way is easier for now, and lets us test responses and stability (although in more complex collision cases the BVH method fails utterly, beside being terribly inefficient with many colliders). |
January 19, 2015, 16:40 (GMT) |
Implemented internal hair pressure to prevent hair from collapsing in on itself. This uses the same voxel structure as the hair smoothing algorithm. A slightly different method was suggested in the original paper (Volumetric Methods for Simulation and Rendering of Hair), but this is based on directing hair based on a target density, which is another way of implementing global goals. Our own approach is to define a pressure threshold above which the hair is repelled in the density gradient direction to simulate internal pressure from collisions. |
January 19, 2015, 16:40 (GMT) |
Fixed hair velocity smoothing. This is an important hair interaction feature that simulates friction between hairs in an efficient way. The method is based on the paper "Volumetric Methods for Simulation and Rendering of Hair" ( http://graphics.pixar.com/library/Hair/paper.pdf ) It was partially implemented already, but didn't work in this simplified version. The same voxel structure can be used for implemeting repelling forces on hair based on density, which can help a hair system maintain volume instead of collapsing in on itself. |
January 19, 2015, 16:40 (GMT) |
Support for various data properties of the hair grid in the voxel texture. |
January 19, 2015, 16:40 (GMT) |
Fixed voxel grid initialization from hair points and colliders by using the suggested tent function from the original paper. Plain float->int conversion for the grid location otherwise leads to skewed data and unnecessary loss of information. |
|
|
|


Master Commits
MiikaHweb | 2003-2021