Blender Git Loki

Blender Git "temp_merge_gooseberry_hair" branch commits.

Page: 10 / 11

January 19, 2015, 16:54 (GMT)
Switched to the modified CG method that supports constraints, and
added back structural stretch springs.
January 19, 2015, 16:54 (GMT)
Implemented a modifier conjugate gradient algorithm to support stable
constraining.

The algorithm is described in the paper "Large Steps in Cloth Simulation"
(Baraff/Witkin 1998). The same method was (incorrectly) implemented in
the old cloth solver.

It is based on restricting the degrees of freedom (ndof) of vertices
using a block matrix and a vector of target velocity deltas.
See chapter 5 of the paper for details.
January 19, 2015, 16:53 (GMT)
Reimplemented Goal springs for the Eigen CG solver method.

Note that goal springs currently are really bad ... They have a factor
on hairs that "fades" goal influence from the root to the tip. The last
point on the hair is completely free, which makes the goal springs
pretty much useless on their own without supporting bend stiffness.
Can only assume this was added to compensate unphysical behavior of
goal springs when using uniform weight, but it's a poor replacement for
true localized bending forces ...
January 19, 2015, 16:53 (GMT)
To make gravity a true force vector, multiply by the mass.
January 19, 2015, 16:53 (GMT)
Alternative new solver for cloth using the Eigen CG solver instead of
a custom built solver.

The old cloth solver is broken unfortunately. Eigen is a designated
linear algebra library and very likely their implementation is a lot
better (can't compare until it's implemented though).

Only basic gravity is active atm, spring forces, external force fields,
damping and volumetric friction have to be added back by converting
the data into the Eigen format.
January 19, 2015, 16:52 (GMT)
Don't try to enforce a velocity change for pinned vertices; their
velocity is defined externally by hair root motion.
January 19, 2015, 16:52 (GMT)
Use squareroot of the current epsilon error target for CG, since we
square this value anyway.
January 19, 2015, 16:52 (GMT)
Disabled collision culling on the inside of the collider faces for now,
this seems to remove too many contact points somehow ...
January 19, 2015, 16:52 (GMT)
Fix for collision response, the impulse response was far too small.
January 19, 2015, 16:52 (GMT)
Use the S matrix of the modifier CG algorithm for implementing collision
responses.

The S matrix together with the z Vector encodes the degrees of freedom
of a colliding hair point and the target velocity change. In a collision
the hair vertex is restricted in the normal direction (when moving
toward the collider) and the collision dynamics define target velocity.
January 19, 2015, 16:52 (GMT)
Better contact point near-test for hair.

This simply uses the position above the triangle instead of the
intersection point of the vertex path. The other method was broken
anyway, but also has a problem catching all the contacts reliably. The
new method might have a few false positives but that is acceptable.
January 19, 2015, 16:51 (GMT)
Fixed for hair collision detection, old/new positions were swapped.
January 19, 2015, 16:51 (GMT)
Reduced minimum for cloth solver substeps to 1.

This is not very useful for artists, but helps with debugging.
January 19, 2015, 16:43 (GMT)
Removed own debug print.
January 19, 2015, 16:43 (GMT)
Added a comment and use the new CG solver as the "official" version now.
January 19, 2015, 16:43 (GMT)
Fixed implementation of the Conjugate Gradient method for the cloth
solver that properly supports constraints with some degrees-of-freedom.

The previous solver implementation only used the S matrix (constraint
filter matrix) for pinning vertices, in which case all elements are
zero and the error doesn't show up. With partial constraints (useful for
collision contacts) the matrix has non-zero off-diagonal elements and
the algorithm easily diverges.

There are also initial steps for implementing collision prevention as
described in the Baraff/Witkin paper "Large Steps in Cloth Simulation"
(http://www.cs.cmu.edu/~baraff/papers/sig98.pdf).
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.
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021