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
AgeCommit message (Collapse)Author
2015-01-20Moved the cloth solver code into a new subfolder/library inside BlenderLukas Tönne
code. The implicit solver itself should remain agnostic to the specifics of the Blender data (cloth vs. hair). This way we could avoid the bloated data conversion chain from particles/hair to derived mesh to cloth modifier to implicit solver data and back. Every step in this chain adds overhead as well as rounding errors and a possibility for bugs, not to speak of making the code horribly complicated. The new subfolder is named "physics" since it should be the start of a somewhat "unified" physics systems combining all the various solvers in the same place and managing things like synchronized time steps.
2015-01-20Desperate attempt to get stable collisions: Disable restitution andLukas Tönne
handle only one collision contact at a time. Collision still randomly explodes, even with differing results on the same file. This could indicate a threading issue, possibly also related to the dependency graph since multiple objects are involved in collisions.
2015-01-20Revert "Ignore velocity changes when the cloth solver does not converge."Lukas Tönne
This reverts commit c52b8ae818844965d56714a71255408873275dc1. Sadly, at this point solver convergence is an exception rather than the rule... Individual hairs can "explode" easily and thus disable the whole simulation, which isn't helpful either.
2015-01-20Ignore velocity changes when the cloth solver does not converge.Lukas Tönne
This helps keep the simulation stable as long as there are only a few substeps that become too constrained for the solver. Eventually we need better feedback about these solver results, so that artists can tweak situations specifically to resolve bad solver results. This is somewhat similar to the camera tracker, which also can run into cases that cannot be resolved and have to be fixed manually.
2015-01-20Moved collision response into the main cloth sim source file and fixedLukas Tönne
some coordinate transform issues. Collision response should be regarded as part of the dynamics system instead of the basic collision detection.
2015-01-20Correction for inverse constraint matrix rotation.Lukas Tönne
2015-01-20Transform the constraint matrix and target solver vector z according toLukas Tönne
the root frame transforms as well. This ensures the hair constraints are actually in root space and applied correctly by the solver.
2015-01-20Use identity transform in the solver data roots to avoid possible errorsLukas Tönne
when this data is used outside the transform functions.
2015-01-20Option for disabling the root frame transformation altogether, mostlyLukas Tönne
for testing.
2015-01-20Ported root frame transformation to the old cloth solver.Lukas Tönne
2015-01-20Minor fix in debug print, so solver prints can be diff'ed.Lukas Tönne
2015-01-20A couple of defines to disable various influences on the cloth sim forLukas Tönne
debugging.
2015-01-20Debug printing code for large sparse vectors and matrices, to compareLukas Tönne
solver input/output of the old and new methods.
2015-01-20Added a new internal header for implicit solver defines.Lukas Tönne
Should become its own intern wrapper library eventually.
2015-01-20Alternative new solver for cloth using the Eigen CG solver instead ofLukas Tönne
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.
2015-01-20Don't try to enforce a velocity change for pinned vertices; theirLukas Tönne
velocity is defined externally by hair root motion.
2015-01-20Use squareroot of the current epsilon error target for CG, since weLukas Tönne
square this value anyway.
2015-01-20Fix for collision response, the impulse response was far too small.Lukas Tönne
2015-01-20Use the S matrix of the modifier CG algorithm for implementing collisionLukas Tönne
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.
2015-01-20Fixed for hair collision detection, old/new positions were swapped.Lukas Tönne
2015-01-20Removed own debug print.Lukas Tönne
2015-01-20Added a comment and use the new CG solver as the "official" version now.Lukas Tönne
2015-01-20Fixed implementation of the Conjugate Gradient method for the clothLukas Tönne
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).
2015-01-20Hair collision: Use the S matrix for enforcing contact constraints.Lukas Tönne
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.
2015-01-20Preparation for collision code fixing.Lukas Tönne
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.
2015-01-20Cleanup: added some comments to the members of Implicit_Data.Lukas Tönne
2015-01-20Cleanup: No point in passing all the implicit solver argumentsLukas Tönne
individually.
2015-01-20Cleanup: removed the unused olddV vectors from implicit solver data.Lukas Tönne
2015-01-20Hair debugging: use "categories" (strings) for grouping debug elementsLukas Tönne
and support clearing for categories.
2015-01-20Debug drawing for simulations, to aid in visualizing abstract data suchLukas Tönne
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.
2015-01-20Some initial collision code, without actual response forces still.Lukas Tönne
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).
2015-01-20Implemented internal hair pressure to prevent hair from collapsing inLukas Tönne
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.
2015-01-20Fixed hair velocity smoothing.Lukas Tönne
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.
2015-01-20Support for various data properties of the hair grid in the voxelLukas Tönne
texture.
2015-01-20Fixed voxel grid initialization from hair points and colliders by usingLukas Tönne
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.
2015-01-20New voxel texture mode "Hair", for displaying the internal hair volumeLukas Tönne
structure as a texture. This is mostly a debugging feature that may be removed again later.
2015-01-20Code cleanup: Use a variable-sized array for the hair volume velocityLukas Tönne
smoothing and collision code, split into multiple functions.
2014-11-11cloth: Avoid calling powf with integer exponentSergej Reich
This is pretty slow and even shows up in profiling.
2014-11-09Code cleanup: Remove unused functions from implicit.cSergey Sharybin
Most of the unused functions were removed. Some of them were if-defed because they are referenced from the code which was already if-defed. Reviewers: lukastoenne, campbellbarton Differential Revision: https://developer.blender.org/D868
2014-09-24Cleanup: use float versions of functions when in/output are floatsCampbell Barton
2014-08-26Move conditional out of loop since checked condition won't changeAntony Riakiotakis
2014-05-20Use int for i in hair smoothing function, we check against negativeAntony Riakiotakis
values below
2014-04-30Code cleanup: remove unused includesCampbell Barton
Opted to keep includes if they are used indirectly (even if removing is possible).
2014-04-27Code cleanup: const args and arraysCampbell Barton
2014-03-17Code cleanup: styleCampbell Barton
2014-02-07ListBase API: add utility api funcs for clearing and checking emptyCampbell Barton
2014-02-06Patch T31269: Add sewing seams to cloth simulationDaniel Genrich
Description: -------------------------- Use loose edges marked as seams as sewing springs. Usage: ------------------------- All this patch does is set the rest length to 0 and the stiffness to 1 for springs for loose edges marked as seams so that during the cloth simulation they will be brought together. Example Video: ------------------------- http://www.youtube.com/watch?v=-Y_bC0gjoM0 Original Patch by thesleepless (+ git patch by codemanx) Thank you!
2014-01-20Fix T38294: enabling hair dynamics very slow / hangs with many hairs.Brecht Van Lommel
This function call was accidentally placed inside a loop which gave O(n^2) behavior, but there's no reason for it.
2013-12-17Code Cleanup: comment unused functionsCampbell Barton
2013-12-01Code Cleanup: replace ABS() with fabsf() when used with float expressions.Campbell Barton