Very interesting twitter thread with an overview on how to perform Hair Animation based on wind Direction for Godot Engine.
Original Thread Hair Animation based on wind Direction for Godot Engine
Edited Thread Hair Animation based on wind Direction for Godot Engine
Some people seemed interested in a breakdown of this little system, so here’s a thread on how it works. 🧵
There is some preparation needed on the hair mesh for the in-engine hair shader, so, first I vertex painted the tips of the strands that come out of the solid base in white, while leaving the rest black.
Then I unwrapped a second set of UVs, with a small cut on a part of the surface that is usually hidden. It looks really messy and distorted, but it’s fine for this purpose.
I also have a rig for the hair, along with the character rig, so I posed the extremes of each wind direction in one frame and made them into separate animations.
After this, I animated a bit of wind intensity by hand in blender. This will later be blended with a more randomized vertex shader animation.
In Godot, I created a vertex shader that runs a noise texture through the UV2 and multiplies its influence by the vertex colors, so it only offsets the tip vertices.
Then it was just a matter of creating an AnimationTree and blend a BlendSpace2D containing the direction animations with the intensity animation and adjust the shader material values.
Note: remember to filter the animation blending to the hair bones only!
And there you have it! An interestingly functional solid hair mesh.
For those who are curious, this is Claire, a character from an original game I am creating. Her design is not final right now, but if you are interested in seeing more, please leave a follow!
For More twitter threads Click below