måndag 27 november 2017

Hair deformation with surface modifier

In the previous post hair was animated with bones. This works well if the hair only has few degrees of freedom, like a pony-tail. However, for long, loose hair it becomes very tedious to animate the hair by hand. It would be much simpler to do a cloth simulation, but we all know that this becomes extremely slow for high-poly meshes.

In version 2.79, Blender has a new Surface Deform modifier, which can be used to speed up hair simulation. I created a low-poly hair guide and made a cloth simulation for it. The simulation is fast because the guide is a low-poly mesh. The animation was then transferred to the high-poly hair mesh using the surface deform modifier. The modifier is a bit picky; it does not work if the guide mesh contains concave faces, and the hair tends to develop spikes unless the guide is very smooth. By splitting the faces to triangles and smoothing the mesh I managed to get rid of the most glaring problems.

Here is a video that shows my take on it.

lördag 25 november 2017

Winders

This blog has been in a dormant state for a while. There are several reasons for this, one of these was that I started to get tired of the DAZ Importer and on CG in general. However, for the last month or so I started to take up Blender again, learning about the many of the awesome new features, e.g. denoising, HDRI images, shadow planes, and the surface deform modifier. It is also time to actually do something with the DAZ Importer and not just implementing it.

The topic of today's post is something I call winders. Long and flexible objects, such as chains, ropes, whips, or ponytails, often have armatures consisting of many small bones, one for each link. Posing each individual link is tedious, and it is often difficult to get a smooth curve.

Enter winders. A winder is a single bone that stretches along the entire chain, and by rotating the winder you can easily pose all links in the chain in a smooth fashion. Under the hood, a winder is implemented by Copy Rotation constraints with offset enabled. This means that once you have posed the winder, the individual links can be posed on top of that. In fact, there are two examples of winders in the MHX rig: the long fingers that pose the three finger links, and the back bone that poses the entire spine.

 To illustrate the feature, here is a model of Lara Croft (I think). The rig has been converted to MHX and we see the hair bones on the Clothes layer. The ponytail and the hair strands at her forehead are suitable examples of chains to which we can add a winder.





 

With the first bone in the ponytail selected, press Add Winder in the Rigging section of the Advanced Setup panel.










A winder bone is created, and the bones in the ponytail chain gets some constraints. The entire ponytail can now be easily posed with the winder bone.







And here is a short video where the ponytail and hair strands have been animated with winders.