Home

Awesome

Unity hair - article supplement

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.

https://github.com/Scthe/unity-hair/assets/9325337/26348d5f-6139-4cc6-97f9-41056cbbe916

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!

https://github.com/Scthe/unity-hair/assets/9325337/4eb1208b-30e6-4238-bfd2-a781860e8c07

Using sphere collider to displace hair strands. In practice, it's even more fun than it looks.

https://github.com/Scthe/unity-hair/assets/9325337/58a5997e-42aa-4522-b947-73f98335a6bb

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.

Inside the Unity project

screen-unity

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

Inside Assets directory

Inside Blender file

screen-blender

FAQ

Why is the licence GPLv3?

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.

Q: Is the 3D model included?

Yes, check .fbx inside unity-project/Assets/Sintel.

Honourable mentions