Blender Git Commits

Blender Git "hair_system" branch commits.

Page: 34 / 35

July 28, 2014, 17:27 (GMT)
Stretch spring damping implementation.

This adds viscous damping to the stretching springs. Note that this does
not yet entirely remove the energy from the system: for this we first
need to implement the bending springs as well, which act based on
angles between hair segments.
July 28, 2014, 15:47 (GMT)
Use the actual gravity from the scene for the hair simulation.

A new solver struct for forces has been added, this is supposed to
organize all the external influences in some consistent way.
July 28, 2014, 15:13 (GMT)
Simulate hair in world space.

Object space is used for the DNA data, which is more suitable for tools
and object handling. For the simulation though, world space is much
better since calculating forces becomes a lot easier. Otherwise one
would have to take into account "virtual" forces generated by the
accelerated object frame of reference.
July 28, 2014, 12:21 (GMT)
Fixed a bug of the simulation stepping loop that caused excessive
increase of the overall step.
July 28, 2014, 12:13 (GMT)
Added an operator for resetting hairs to their rest positions.
July 28, 2014, 11:19 (GMT)
Implemented stretch springs for hairs based on rest length of segments.

This is still totally undamped and so will start to accumulate energy
quite quickly!

The default parameters (taken from the original paper) probably require
some tweaking, but the overall result can only be judged once the other
main forces are implemented (in particular damping).
July 27, 2014, 17:53 (GMT)
Added a HairParams struct to collect all the physical parameters of
hair simulation in one place.

This defines user-settable parameters for controlling things like
stretch stiffness, damping, etc. The defaults of these parameters
should give usable results right from the start (possibly with presets),
but tweaking may still be necessary.
July 27, 2014, 17:15 (GMT)
Introduced a rest position vector to hair points.

This defines the "natural" shapes of a hair when no external forces are
acting on it and the velocity is zero. The internal elastic forces of
the hair will cause it to always return to this rest position if
possible.
July 27, 2014, 16:49 (GMT)
Don't simulate the hair root.

This enforces the basic root constraint of hair curves. In principle we
could allow free, unconstrained hairs as well ...
July 27, 2014, 16:40 (GMT)
Keep the solver over time steps during a single modifier eval.
July 27, 2014, 16:10 (GMT)
Added time stepping in the modifier, like all the other simulations do.

This is pretty crappy in general, but there is no good alternative so
far. Eventually we'd like to separate simulation stepping from the
keyframe animation system, so that simulations can be advanced
independently. This would be very useful for tweaking (in a otherwise
constant environment), doing pre-roll, setting start frame in the cache
etc.

For now this modifier update approach is just a quick hack to get
visual feedback for the integrator.
July 27, 2014, 15:02 (GMT)
Very basic Semi-implicit Euler integrator for hair particles.

The semi-implicit (aka symplectic) Euler integrator is almost as simple
as the basic Euler integration, but conserves Energy much better.
http://en.wikipedia.org/wiki/Semi-implicit_Euler_method

It is the integrator suggested originally in this paper:
http://graphics.pixar.com/library/CurlyHairA/paper.pdf
July 27, 2014, 13:16 (GMT)
Time stepping operator for the hair system.
July 27, 2014, 12:00 (GMT)
Basic solver class, to perform iterative simulation of hair (eventually).

Data from DNA can be copied into a SolverData struct for optimized
solver access. This should happen any time the data layout is changed in
the DNA (points/hairs added or removed), since the solver works on fixed
datasets only. After each time step the solver result can be applied
back to the DNA data for display, tools etc.

It may be beneficial to keep the solver and its data around between time
steps, so the data does not get deleted automatically after applying.
Initializing the data, applying and freeing are separate functions.
July 27, 2014, 10:37 (GMT)
Macro utility for using MEM_guardedalloc in C++ hair classes.
July 27, 2014, 09:22 (GMT)
Fixed the smoothing algorithm.

The smoothing factor used for display is now exposed in RNA/modifier UI
too. This is just a debugging feature though, it doesn't really serve
any higher purpose.
July 26, 2014, 19:11 (GMT)
Particle-to-Hair copy: Use the pathcache of particle systems rather than
the base particle data.

Particles store all hair deformation and dynamics in the path cache, so
using the base data is not very interesting ...
July 26, 2014, 18:47 (GMT)
Smoothing function as a first feature in dedicated hair code.

This function is used in a number of places in the targeted algorithms.
It is a useful utility for parallel-transport of various properties
along a hair curve. With curled hair in particular the control curve
itself is otherwise too irregular to give usable results, for which the
smoothing offers an elegant solution.

The algorithm is described in detail in the paper "Artistic simulation
of curly hair":
http://graphics.pixar.com/library/CurlyHairA/paper.pdf
July 26, 2014, 08:36 (GMT)
Read/Write code for hair data.
July 26, 2014, 07:50 (GMT)
Fix for particle-to-hair copy operator.

Old particle system hair has its own local space and must be multiplied
by a per-hair matrix to get into
object space.
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021