Animation nodes is addon for blender, that lets you animate stuff, but it is also great for procedural art generation :).
Below is the breakdown of the most important steps to obtain results from above (this is for advanced users). Here is the file
- generating random point on mesh surface (Plane object) – it will be root of spline:
- Then I can create spline from random (x,y,z) points in loop, but this gives to noisy result (looks like lightning, jagged and random). So instead I use coherent noise – perlin noise as way of generating points for splines. This makes the splines look like wavy grass thing.
- next step is making tip of the hairs go into direction of target object (sphere). For that I just create BHV tree for target, and then I snap spline to target with ‘find nearest surface point’. If I snap spline point to target sphere I would end up with this:
But I do not want snap whole spline to sphere, but just the tips. To do this I can interpolate between originally generated point (x,y,z) and snapped to surface point (obtained from BHV find nearest node).
The red inscription says: 0 == ignore snapping, 1== full snapp to target shpere). Start value in AnimFloat is root of spline, End – tip of spline.
There is more stuff, but the basic idea is explained above.