Blender Git Commits

Blender Git "strand_nodes" branch commits.

August 9, 2016, 15:21 (GMT)
Counteract numerical errors in distance constraint evaluation (drift).

With large steps in hair editing strokes the solution to distance-constrained
hair displacement becomes inaccurate, leading to a gradual lengthening of strands.
To counteract this the length constraints can enforce a velocity relative to the
constant target length of each segment. This results in an overall constant
length, even when the constraint solution is inaccurate for nonlinear constraints.

Note that the result would become much better with backward Euler integration,
currently there is a noticable 1-step lag between strokes and the distance fix.
August 9, 2016, 14:44 (GMT)
Tentative "stiffness" forces for resisting hair bending.

This is not really nice yet, but just serves as a test for internal forces.
August 9, 2016, 14:42 (GMT)
Merge branch 'object_nodes' into strand_nodes
August 9, 2016, 14:37 (GMT)
Merge branch 'master' into object_nodes
August 9, 2016, 14:26 (GMT)
Merge branch 'master' into strand_nodes
August 7, 2016, 08:35 (GMT)
Implementation of a basic constraint solver for strand length and root velocity.

This uses the Lagrange multiplier method for correcting the "velocity" of
vertex displacements as described in
"Linear-Time Dynamics using Lagrange Multipliers" (Baraff, 1996)

Future additions would include stiffness forces for creating more natural
hair shapes, and handling of collisions (deflection).
August 5, 2016, 09:02 (GMT)
Switch combing tool back to using vertex displacement rather than edge rotation (tentatively).

This method is more straightforward and easier to predict when testing constraint solving.
August 2, 2016, 12:12 (GMT)
New (stub) method for solving constrained hair editing with Lagrange multipliers.
August 2, 2016, 11:55 (GMT)
Always cache the original strand vertex locations during editing.

True constraint resolving for length and contacts will need this information.
July 29, 2016, 14:35 (GMT)
Enable debug drawing of hair contacts.
July 29, 2016, 14:35 (GMT)
Only generate hair contacts for points that actually penetrate the mesh.
July 29, 2016, 14:35 (GMT)
Hair edit tool settings for enabling and controlling deflection.

Unused settings, deflection is not yet implemented.
July 29, 2016, 14:35 (GMT)
Simple contact detection method for hair editing, using the typical BVH closest point method.

This method is just a placeholder, in the future it would be worthwhile to use Bullet collision
detection with ghost objects for this.

Also the code should eventually be abstracted a bit to make it agnostic to mesh formats, so it
can be used for BMesh as well as DNA strand data or physics simulation.
July 29, 2016, 14:35 (GMT)
Add a cache structure for collision contact points.

This should serve as a universal interface between possible collision
detection systems (BVH, Bullet) and the various collision response systems.
Using an new data structure means that the two sides of a collision
handling feature (detection and response) can be treated independently,
reducing code dependencies and complexity.

The properties of contact points are modeled after btManifoldPoint from
Bullet and may need to be adjusted in the future.
July 29, 2016, 14:35 (GMT)
Clear debug drawing when creating new contacts.
July 29, 2016, 14:34 (GMT)
Fix for frequent unnecessary shader recompilation during hair editing.

The depsgraph component node for invalidating the strand shader was located in
the GEOMETRY component of the object. This component by default gets tagged along
with every other object part during editing. Only standardized way of avoiding this
would be putting it in a different datablock, but the shader is very much tied to
the particular object due to the displacement function from its node tree.

For now the solution is a new component GEOMETRY_SHADER, which does not get tagged
when the ID node is tagged. It still gets regular updates from node tree changes.
This seems to be the least invasive way of avoiding unnecessary performance drops,
and can be removed and replaced easily later on without disrupting other code work.
July 27, 2016, 11:39 (GMT)
Use a "pass" concept for strand shader organization, like the GPUMaterial system.

This will allow easier addition of other shader features later on. The system
should be merged with the GPUMaterial code, but currently the material system
is too unwieldy to integrate the strand displacement code easily. With the 2.8
viewport rewrite all of this will have to be rewritten as well anyway.
July 27, 2016, 10:22 (GMT)
Removed deprecated modifier settings for static hair effects.
July 27, 2016, 09:39 (GMT)
Removed leftover enum from static effects definition.
July 27, 2016, 08:19 (GMT)
Merge branch 'strand_editmode' into strand_nodes
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021