January 19, 2015, 17:09 (GMT) |
Completed the implementation of bent rest shapes for hair. Basically follows the Pixar approach from "Artistic Simulation of Curly Hair". |
January 19, 2015, 17:09 (GMT) |
Target calculation for local non-straight rest shapes. This is more involved than using simple straight bending targets constructed from the neighboring segments, but necessary for restoring groomed rest shapes. The targets are defined by parallel-transporting a coordinate frame along the hair, which smoothly rotates to avoid sudden twisting (Frenet frame problem). The rest positions of hair vertices defines the target vectors relative to the frame. In the deformed motion state the frame is then recalculated and the targets constructed in world/root space. |
January 19, 2015, 17:09 (GMT) |
Have to include BLI_utildefines before BKE_collision now to have bool defined. |
January 19, 2015, 17:08 (GMT) |
Clear forces and constraints together at the start of the time step, easier to verify. |
January 19, 2015, 17:07 (GMT) |
Fix for missing initialization of local cloth modifier inside particle systems. |
January 19, 2015, 17:07 (GMT) |
Proper implementation of angular bending springs including jacobian derivatives for stabilization. The bending forces are based on a simplified torsion model where each neighboring point of a vertex creates a force toward a local goal. This can be extended later by defining the goals in a local curve frame, so that natural hair shapes other than perfectly straight hair are supported. Calculating the jacobians for the bending forces analytically proved quite difficult and doesn't work yet, so the fallback method for now is a straightforward finite difference method. This works very well and is not too costly. Even the original paper ("Artistic Simulation of Curly Hair") suggests this approach. |
January 19, 2015, 17:07 (GMT) |
Unused function declaration. |
January 19, 2015, 17:06 (GMT) |
Basic solver result feedback from the mass-spring (cloth/hair) solver. This returns a general status (success/no-convergence/other) along with basic statistics (min/max/average) for the error value and the number of iterations. It allows some general estimation of the simulation quality and detection of critical settings that could become a problem. Better visualization and extended feedback can follow later. |
January 19, 2015, 17:06 (GMT) |
Calculate bending targets based on the direction of previous segments. This makes the bending a truely local effect. Eventually target directions should be based in a local coordinate frame that gets parallel transported along the curve. This will allow non-straight rest shapes for hairs as well as supporting twist forces. However, calculating locally transformed spring forces is more complicated. |
January 19, 2015, 17:06 (GMT) |
Simple debug drawing support inside the implicit solver. |
January 19, 2015, 17:06 (GMT) |
Added a damping term for angular bending springs. |
January 19, 2015, 17:06 (GMT) |
Simple initial implementation of angular bending springs. These are much better suited for creating stiff hair. The previous bending springs are based on "push" type spring along the hypothenuse of 3 hair vertices. This sort of spring requires a very large force in the direction of the spring for any angular effect, and is still unstable in the equilibrium. The new bending spring model is based on "target" vectors defined in a local hair frame, which generates a force perpendicular to the hair segment. For further details see "Artistic Simulation of Curly Hair" (Pixar technical memo #12-03a) or "A Mass Spring Model for Hair Simulation" (Selle, Lentine, Fedkiw 2008) Currently the implementation uses a single root frame that is not yet propagated along the hair, so the resulting rest shape is not very natural. Also damping and derivatives are still missing. |
January 19, 2015, 17:06 (GMT) |
Replace the dynamic root transform in the implicit solver data with a single transform matrix. Dynamic properties of the transformation are only needed during the setup phase when they should be read from external data (hair system roots) and generate fictitious forces on each point. |
January 19, 2015, 17:06 (GMT) |
More scons fixes for physics lib. |
January 19, 2015, 17:06 (GMT) |
Fixed scons build files for new physics subfolder. |
January 19, 2015, 17:06 (GMT) |
Disabled the velocity filtering feature for now, since the weighting is incorrect. The voxel grid needs better tool support to make it usable, so fixing the filtering is not high priority right now. |
January 19, 2015, 17:06 (GMT) |
Added basic filtering feature for velocity smoothing. This is part of the original method from "Volumetric Methods for Simulation and Rendering of Hair". The current filter is a simple box filter. Other energy-preserving filters such as gaussian filtering can be implemented later. The filter size is currently given as a cell count. This is not ideal, rather it should use a geometrical length value, but this is too abstract for proper artistical use. Eventually defining the whole grid in terms of spatial size might work better (possibly using an external object). |
January 19, 2015, 17:05 (GMT) |
Made the voxel grid size for hair interaction configurable and increased the default to 32. Conflicts: source/blender/blenloader/intern/versioning_270.c |
January 19, 2015, 17:05 (GMT) |
Reduced the length threshold for disabling short hairs from 0.1 to 0.01. |
January 19, 2015, 17:05 (GMT) |
|
|
|


Master Commits
MiikaHweb | 2003-2021