This repository is a supplement to my article: "Using Unity's strand-based hair package". It includes a Blender file with sample hairstyles that were exported to Unity's strand-based hair solution: com.unity.demoteam.hair. More importantly, it's a complete Unity project that showcases all the techniques described in the article.
I've had tons of problems integrating this package into my "AI-Iris-Avatar". So I've decided to do a more thorough investigation into its content.
hair-animations-min.mp4
Using strand-based hair with animation. The hair system is parented to the mecanim's Head bone. You might also notice the SDF collider to prevent mesh penetration. This is the original Sintel hairstyle. You may arguee that the hair is too bouncy. I disagree!
hair-collisions-min.mp4
Using sphere collider to displace hair strands. In practice, it's even more fun than it looks.
hair-wind-min.mp4
Using wind force to displace hair. Strength, direction, and randomness are adjustable. It even works with colliders. The hairstyle is "cyberpunk" from original Blender 3.5 sample files. Default Unity hair material.
WARNING: Asset files for hair can be huge (120+ MB). For blender sample hairstyles, I've only included Alembic files. You have to create the hair assets yourself. Afterward, link the asset files to the appropriate "Hair Instance" components.
Everything is inside "Scene_SintelHairTest" scene.
--SCENE--. Camera, lights, background, postFX volume.--sintel2--. The main character.Hair17- the original hair cards (deactivated).Hair_collider- simplified head mesh. Used to create SDF.UnityRig- skeleton.
--SINTEL COLLIDERS--- colliders for hair physics.SintelSDF_Volume- SDF volume for the face.SintelHair - Sphere Collider- sphere collider that interacts with the hair.
--SINTEL HAIR--- original Sintel hair exported from Blender. Already parented to Sintel (in play mode, through parent constraint).--BLENDER HAIR SAMPLES--- game objects with hairstyles exported from the Blender 3.5 sample file. Already parented to Sintel (in play mode, through parent constraint).--HAIR TESTS--- simple hair systems for various tests. Usually, it's just a flat plane with hair growing out of it.Hair Wind dir- wind force game object.
Animations. Character animations from Mixamo. Showcases hair in motion during play mode.Hairblender-3.5-samples. Both "curly" and "cyberpunk" hairstyles were directly exported from the Blender 3.5 sample file. This showcases that the procedure should work with any hair.Materials. Sample materials to show how to add color to the hair.Hair_GradientYcontains a shader for hair that has a gradient from root to tip.PlaneHair. Simple hair "grown" from a plane.PlaneHair2. Simple hair "grown" from a plane.SintelHair. Original Sintel hair.SDF_CollisionTextures. The 3D texture used for signed distance field tests.
HDRI. Just the usual HDRI image for additional lighting.Scripts. Nothing related to hair. Scripts for animation switching, blinking, eye look at constraints, etc.Sintel. Character from "AI-Iris-Avatar". It also contains hair cards that were originally used. It's disabled in the scene, as we have much better-looking strands now.
Sintel-Unity-Export- collection for the 3D model. If you select and export everything insideUnityRig, you will get the original ".fbx" file.Sintel-Colliders- simplified meshes used for collision detection. The collider used in Unity is already insideUnityRig.Sintel-HairSintelHairOriginal- original Sintel's hair from "Sintel Lite 2.57b" asset. Ready for export into Alembic file.SimpleCustomHair- custom quick and dirty hairstyle for tests. Ready for export into Alembic file.
Hair-Tests- test hair "grown" on the plane.Blender-3.5-samplesCurlyHairSampleone of the hairstyles from the Blender 3.5 sample file. Ready for export into Alembic file (see particle systems). Created from the new Blender hair system (based on curves). Read my article and you will know why there is a special "--squashed-mods" version.
Scene- camera, lights, and background.
This app includes source code/assets created by other people. Each such instance has a dedicated README.md in its subfolder that explains the licensing. The paragraphs below only affect things created by me.
It's the same license as my previous project - "AI-Iris-Avatar". Check its readme for reasons.
Yes, check .fbx inside unity-project/Assets/Sintel.
- Blender, Blender Institute.
- GIMP and Inkscape. I'm so used to them I almost forgot to mention.
- Sintel Lite 2.57b by BenDansie. Used as base mesh.
- 21 Realtime man Hairstyles collection by Vincent Page.
- mixamo for animations.
- Tons of animation guides. I especially liked videos by Sir Wade Neistadt on YouTube:

