Search Unity

[RELEASED] Yak - Hair and fur system for Unity

Discussion in 'Assets and Asset Store' started by tirioko, Mar 29, 2021.

  1. tirioko

    tirioko

    Joined:
    Mar 11, 2015
    Posts:
    17



    Yak is a set of compute and geometry shaders, for fast rendering and editing hairs. Hairs are made by real geometry (from geometry or compute shaders) and are dynamical, with adjustable stiffness and gravity (per hair set) and wind support.

    Yak have fast and easy grooming editor, with options for painting colors (separately for hair base, middle and tip), loading color texture, hair cut or increase length, bending hairs by different ways, clumping, twisting, etc.

    Yak have own layer system, with layers of 3 types: for short fur, medium hairs and long hairs.

    Supports HDRP (using geometry shaders), Universal Render Pipeline and Standard Render Pipeline (geometry is created by compute shaders, works on iOS and Android)



    LAYERS
    patchesExplanation.jpg
    There are 3 types of hair layers in Yak: short, medium and long hairs. The difference between layers, except initial length, is in number of mesh segments per hair. Short have 4 segments (with 4 control points), medium have 8 (4 control points) and long have 32 segments (with 8 control points) . For performance and memory reason, medium and short hairs are grouped into patches, with 4 or 8 hairs in patch, respectively. Hairs of one patch share same color and grooming parameters (control points).
    Number of layers is not restricted.

    MOTION VECTORS
    motionVectors.jpg
    Yak generates correct motion vectors for HDRP on any kind of animated objects, skinned meshes or blendshapes.

    COLORING
    You can load texture to set hairs colors or paint colors by brush directly on the model. Loaded texture itself doesn't saved in yak assets or memory. Instead, color information is saved for each hair (for long hair) or hair patch (for medium and short).
    You can paint color for hair base, hair middle, and hair tip separately.

    GROOMING
    To edit hairs lengths and directions, bend and curl, there are 7 brushes:
    Grow/Cut - Increases or decreases (hold SHIFT) length of hairs. Length is set as percent of Maximal Hair Length of current layer. So if you want to change lengths of all hairs in layer, go to Layer properties – maximal length.
    Drier – Work as hair drier, bending all hairs inside brush radius. To set bend direction, hold CTRL button and left mouse button and drag mouse. Hold SHIFT to straighten hairs.
    Hand – you can drag and bend hairs with your mouse. More suitable for long hairs.
    Clump point – bend all hairs inside brush radius to the center of brush. Hold SHIFT to straighten hairs.
    Clump multy – bend all hairs inside brush radius to the centers of clusters.
    Curl – curl all hairs inside brush radius.
    Add/Remove– Delete (hold SHIFT) or add hairs to the layer.

    RUNTIME EDITING
    Yak supports editing hairs in runtime. Example scene is included into the package. Runtme editor is more simple and game-like, compare to editor in edit mode of Unity, but you can easily modify it.


    Demo of runtime editor download:
    PC: https://tirioko.com/demo/YakHairDemo.zip
    Android: https://tirioko.com/demo/YakHairDemo.apk
     
    Last edited: Aug 16, 2021
    mgear likes this.
  2. tirioko

    tirioko

    Joined:
    Mar 11, 2015
    Posts:
    17


    Version 1.1, which have Universal Render Pipeline support and works on mobiles (using URP or Standard) is out. Also it includes runtime coloring and grooming example (which works on mobiles), and detailed, textured model of Lion, for HDRP, with hairs
     
  3. victorkin11

    victorkin11

    Joined:
    Apr 20, 2013
    Posts:
    165
    Any Demo or document?
    Asset store page description is so simple just can't tell what really can expect. At least show more inspector about what it have!
    Also the limitation, can it using with blend shapes?
     
  4. tirioko

    tirioko

    Joined:
    Mar 11, 2015
    Posts:
    17
    I'm preparing new version, should be ready in 2 weeks, and I will add better description and some new explanation movies.

    Blendshapes are supported, yes
     
    cwnitschmann and look001 like this.
  5. hommes_doutant

    hommes_doutant

    Joined:
    Mar 12, 2021
    Posts:
    3
    Hi, the asset doesn't seem to work at all on Unity 2020.3.10f1 with HDRP, can you confirm this ?
    On the supported Unity versions it states 2020.1.17 or higher but it doesn't seem to be the case.
     
  6. tirioko

    tirioko

    Joined:
    Mar 11, 2015
    Posts:
    17
    Yes, I wrote in the overview, that it supports Unity 2020.1.17, Unity 2019.4 and below. I don't know why AssetStore display that it supports higher versions. But I will make an update for latest versions of HDRP, it almost ready, hope to upload it in one week
     
    hommes_doutant and look001 like this.
  7. hommes_doutant

    hommes_doutant

    Joined:
    Mar 12, 2021
    Posts:
    3
    Thanks for your reply, looking forward to the release !

    Edit : Sorry for bothering you again, but do you have an estimate to when at the latest, this new version will be released ?
     
    Last edited: Jun 18, 2021
  8. tirioko

    tirioko

    Joined:
    Mar 11, 2015
    Posts:
    17
    Certainly will upload it to the Asset Store on this week
     
  9. ccjay

    ccjay

    Joined:
    Mar 24, 2014
    Posts:
    12
    This thing looks like it has huge potential. The hair rendering looks amazing compared to similar products I've seen. The capability of painting root / body / tips of hairs is great.

    I'm a little on the fence since assets like this break so easily as Unity Upgrades and I am already on 2021.

    You really produced something amazing here though.

    I would like more documentation about this asset as well.. What's the performance like, what can it do during runtime, ect.
     
    tirioko likes this.
  10. tirioko

    tirioko

    Joined:
    Mar 11, 2015
    Posts:
    17
    New version 1.2 of Yak is ready! It supports HDRP, URP and Standard pipelines on Unity 2019, 2020 and 2021.1

    In the next update (2 - 3 weeks) I will improve lighting and will make brushes more comfortable to work.

    P.S. There are example of runtime editing of hairs, with simple UI, (color, cut, grow, clump) in YakSampleSceneURP
     
    Coyroski and ccjay like this.
  11. BunnyViking

    BunnyViking

    Joined:
    Nov 28, 2019
    Posts:
    7
    Do you have the manual uploaded anywhere ? I'd like to know more about the product since you dont have previous assets and are charging a premium price.

    Is it for hair ? for fur ? Is it voxel based physics modelling or something else ? What's the setup like ?
     
    Qleenie likes this.
  12. tirioko

    tirioko

    Joined:
    Mar 11, 2015
    Posts:
    17
    This video describes the process of hair editing:

    Also there are a way of runtime editing of hairs (works on PC, Android and iOs) example is included into package, I will try to make explanation video asap.

    Editing of hairs is based on new way of editing hairs by different brushes, not guides, like in other hair editing software. But I will add guides in next versions, because guides are more suitable for long hairs.

    You can create short fur, medium hairs and long hairs - there are 3 length presets. Short and Medium have 4 control points per hair, long - 8 control points. Position (relative to vertex indices of original mesh), control points and colors are saved for each hair in a tricky compressed way, so size of hair asset files is pretty small.

    Help for current version of Yak is attached. I'm working on better explanation of hair editing process, etc
     

    Attached Files:

    Last edited: Jul 7, 2021
    BunnyViking likes this.
  13. tirioko

    tirioko

    Joined:
    Mar 11, 2015
    Posts:
    17
    Small new update 1.21 is out. It improves editing process: now selection is locked, while hair edit mode is active, so object cannot be accidentally moved. Also yak objects correctly disappear on gameObject disable or deleting
     
  14. Coyroski

    Coyroski

    Joined:
    May 19, 2020
    Posts:
    8
    Excited to try out the updates! Gonna upgrade my project to 2021.1 too.

    Keep up the good work! :)
     
  15. tirioko

    tirioko

    Joined:
    Mar 11, 2015
    Posts:
    17
    New version 1.3 of Yak is out!
    Changes:
    1) Performance in URP about 2x times faster.
    2) Lighting in HDRP is better.
    3) Brushes are improved, hair drier (bend hairs) brush supports separate editing of hair base, tip and middle.
    4) New runtime hair editor included into the package.


    Runtime hair editor demo example can be downloaded for PC: https://tirioko.com/demo/YakHairDemo.zip
    And Android: https://tirioko.com/demo/YakHairDemo.apk
     
    victorkin11 likes this.
  16. victorkin11

    victorkin11

    Joined:
    Apr 20, 2013
    Posts:
    165
    It look great, but for fur only, can it make long Straight hair? also I don't see it can make Curly hair!
    Also android demo freeze when I try to edit.
     
  17. tirioko

    tirioko

    Joined:
    Mar 11, 2015
    Posts:
    17
    Demo doesn't include all possibilities of editing in edit mode, it just to show main options, so I didn't include Curly hair into it. I will extend it later.
    Concerning long straight hair: now maximal subdivision for hair is 32 segments (with 8 control points), which is quite enough for long hairs. Length itself is not restricted, it can be increased in layer property (not included into demo, demo is simplified and game-like).
    Concerning freeze on android: it appear when unity create collision, based from skinned mesh. In real application you can prepare collision object during editing, not necessary to do it runtime.
     
  18. CyborgGames

    CyborgGames

    Joined:
    Mar 2, 2017
    Posts:
    7
    How customize fur albedo color? I have many light and a fur have too white color, which the can't edit.
     
  19. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    210
    I have some questions about long hair: Will it fall naturally with gravity, and collide with meshes? How is collision handled? Is this customizable (e.g. is source code provided)?
     
  20. tirioko

    tirioko

    Joined:
    Mar 11, 2015
    Posts:
    17
    You should paint fur with more dark color... Which pipeline (HDRP, URP, Standard) do you use?
     
  21. tirioko

    tirioko

    Joined:
    Mar 11, 2015
    Posts:
    17
    No collision with meshes yet. I will include some kind of fast collision soon and probably will add realistic collision later, working on it (but realistic collision will be quite slow).
    Full source code is included into package, completely based on C# and shaders.
     
  22. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    210
    Ok, I. wouldn't mind building in my own mesh-based collision system, if there is at least an example of primitive collision handling in the code.
     
  23. CyborgGames

    CyborgGames

    Joined:
    Mar 2, 2017
    Posts:
    7
    I use pipeline: Standard. For VR project.

    If I set color of fur to RGBA(1, 1, 1, 255)byte values - mean: almost black. The fur on scene looks white-grey, in this time other objects around looks normal color. Do make color more darker not possible, only black. When color set RGBA(0,0,0,255) light not affect to the fur.
     
  24. CyborgGames

    CyborgGames

    Joined:
    Mar 2, 2017
    Posts:
    7
    Some PointLight with green color behind the object with fur look as rectangle: see attached image.
     

    Attached Files:

  25. tirioko

    tirioko

    Joined:
    Mar 11, 2015
    Posts:
    17
    I'm checking now, will make some fix on this week
     
  26. zhaobin123

    zhaobin123

    Joined:
    Aug 31, 2019
    Posts:
    1
    Hello, I would like to ask you about the use of the YAK plugin on Android and ios platforms. I switched to Android platform, but I got an error when COMPILING APK. Do YOU need any configuration, thanks。


    Unity version: 2020.1.17

    Yat version: 1.3
     

    Attached Files:

  27. tirioko

    tirioko

    Joined:
    Mar 11, 2015
    Posts:
    17
    New version 1.32 released today. Problems with standard pipeline shader and compute shader for geometry calculations are fixed.
     
unityunity