Search Unity

[RELEASED] Fur/Foliage shader

Discussion in 'Assets and Asset Store' started by Goldenvale, May 14, 2016.

  1. Goldenvale

    Goldenvale

    Joined:
    Feb 26, 2015
    Posts:
    86
    With this AAA displacement/shell shader you can create realistic and dense grass, hedges and other types of foliage. The shader is also suitable for adding fur to models.





    PBR shader supports shadow casting, receiving and is affected by lighting.



    Use the alpha channel in your texture to control the height of your fur.




    Here's an example of it being used to create grass and hedges


    Features:
    - Works with DX9 and DX11!
    - Works in Unity 4.x and 5.x
    - Supports alpha channel for controlling length, as well as a slider.
    - Up to 60 layers which can be set with a slider.
    - Can cast and receives shadows.
    - Affected by lighting.
    - Option to make the fur bend with gravity.
    - Wind control.

    High performance:
    All settings are adjustable to support low to high end devices.

    Feel free to ask any questions and I'll be sure to answer them as soon as possible.
     
    Last edited: May 16, 2016
    Farelle and Bhanshee00 like this.
  2. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Does this work with skinned mesh characters?
    Does this work with characters who have morph targets / blend shapes?
    Can the fur/foliage be combed styled to lay over slightly instead of just stick straight out from the mesh?

    Can you provide a video showing this working on skinned mesh characters?
    Looks really sweet in the images above!
     
  3. Goldenvale

    Goldenvale

    Joined:
    Feb 26, 2015
    Posts:
    86
    Yes it does. I've tested it on a pretty bad model but it does work:

    I don't have any models with morph targets or blend shapes so I can't test it but I don't think it should be a problem.

    The fur is affected by gravity but you can't "comb" it in a specific direction yet. I will make that available in a future update.
     
    Last edited: May 16, 2016
    theANMATOR2b and Bhanshee00 like this.
  4. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    So it's not possible to get the fur to "fall" simulating long fur and gravity?
     
  5. Goldenvale

    Goldenvale

    Joined:
    Feb 26, 2015
    Posts:
    86
    The fur is affected by gravity. There's a gravity strength slider that let's you control the amount it bends.
     
    Bhanshee00 likes this.
  6. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Cool : )
     
  7. lenzchu

    lenzchu

    Joined:
    Dec 7, 2013
    Posts:
    15
    Hi! just bought the asset and tried it! Lovely work especially the shadowing!
    I tried it on the skinned mesh but it's giving me errors such as: MissingComponentException: There is no 'MeshFilter' attached
    I can provide you with a blendshape mesh if you need it. ^^

    Edit: The original prob was that having the Fur Shader Controller V1 component on the skinned mesh. It doesn't seem to follow as my character animates :(
    Using the shader itself is fine ^^; But the controller gives me the option to control how many shells so I do need that feature haha
     
    Last edited: May 29, 2016
  8. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    What about performance ?
    No Web Demo, no Buy :p
     
  9. Goldenvale

    Goldenvale

    Joined:
    Feb 26, 2015
    Posts:
    86
    If you can send a mesh to my support email that would be great! I'll be able to fix the problem quicker.

    I think I know where the problem is, but I need to be sure.

    The scene you see on the asset store page has a lot of objects with the shader at 60 layers and it still runs at around 100 fps. I can't put out a web demo because people can easily extract the .unity3d file and steal the shader.

    If there's anything specific you want to know about the performance I can provide you with it.
     
  10. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Good, it is interesting shader.
     
  11. lenzchu

    lenzchu

    Joined:
    Dec 7, 2013
    Posts:
    15
    Thanks for the quick respond. I can't see the link to the support email on the asset store but I did send you a message by clicking on your profile pic here haha
     
  12. noelmk

    noelmk

    Joined:
    Jun 18, 2016
    Posts:
    5
    I am currently using this in Unity 5.3.5

    I've been playing with it for a couple days now and the wind variables don't seem to do anything. Also, I looked into your code and found that you wanted to add alpha values to the fur but it was commented out. Is there a way to implement this?
     
  13. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    Asset description says it works in Unity 4, but it requires Unity to download...which is it?
     
  14. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    Apparently the developer has abandoned this asset. I've tried to contact him by PM and email, no reply.

    In addition to the incorrect claim about 4.x compatibility, the asset claims to work on skinned meshes, but at runtime, the shader+script creates a second mesh with the fur on it, which is not animated. Obviously looks a little odd, to put it mildly. Makes it useless for skinned meshes. Caveat emptor to any potential purchasers.
     
  15. Goldenvale

    Goldenvale

    Joined:
    Feb 26, 2015
    Posts:
    86
    The wind control broke when I added gravity, it will be fixed in the next version. Meanwhile you can fix it by opening FurShaderV1.shader, and going to line 64 and replacing that line with "P = P + (_Wind*k + vGravity*k);"

    I've never claimed it works on animated skinned meshes. You can apply it to the mesh but it won't animate yet. I'm working on it and I will try to add it in the next version.

    And what problems are you having with Unity 4.x?
     
  16. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    So it works on skinned meshes...but not animated skinned meshes? Huh. I guess I'm not used to parsing text so closely. But it would be great if you can get that to work.

    On Unity 4.x, it throws a compiler error:
    Assets/Fur shader/FurShaderControllerV1.cs(33,38): error CS0234: The type or namespace name `ShadowCastingMode' does not exist in the namespace `UnityEngine.Rendering'. Are you missing an assembly reference?
     
    theANMATOR2b likes this.
  17. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Hope you can get that working - and - aside - there is no reason to have a skinned mesh unless it is animated - so saying it works on a skinned mesh is saying it works on animated skinned meshes.

    Will strongly consider a purchase if you get this working.