[RELEASED] Fur/Foliage shader

Asset store link

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.

2 Likes

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!

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.

2 Likes

So it’s not possible to get the fur to “fall” simulating long fur and gravity?

The fur is affected by gravity. There’s a gravity strength slider that let’s you control the amount it bends.

1 Like

Cool : )

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 :frowning:
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

What about performance ?
No Web Demo, no Buy :stuck_out_tongue:

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.

Good, it is interesting shader.

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

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?

Asset description says it works in Unity 4, but it requires Unity to download…which is it?

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.

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 + (_Windk + vGravityk);”

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?

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?

1 Like

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.