Before updating to Windows 10 you may need to return your Pro license. More information here

Fur, Hair, and Alternative Grass

Hey there,

I've spent hours trying to find a way of creating a sphere planet object with terrain on it, such as grass thats effected but local wind, I found thats it not really possible to use unity's terrain tools on anything other than a plane.

What I'm trying to do Is find some sort of Fur shader, like Cinema4Ds shader, and use it to create grass on a sphere, What would be the best way to go around doing this??


more ▼

asked Jan 04, 2010 at 11:59 AM

avatar image

21 3 2 6

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

We used the techniques found in GPU Gems Chapter 7 for rendering and animating grass in The SOL Game.

The basic idea is to do the actual grass animation on the GPU. In SOL the grass is distributed into clusters consisting of five transparent planes each. These clusters was manually positioned by the level designer. The planes was rendered using a custom shader that translates top vertices according to two sinusoids. The Cg code below shows how we did the animation in the vertex program.

v2f vert (appbase v) { float wind = _WaveAmplitude1 * sin(_WaveFrequency1 * 2 * 3.14 * _Time.y + v.vertex.x) + _WaveAmplitude2 * cos(_WaveFrequency2 * 2 * 3.14 * _Time.y + v.vertex.y);

 float split_v = 0.9; 
 v.vertex = v.vertex + wind * v.texcoord.y * _WaveDirection * (v.texcoord.y > split_v);          

 v2f o;
 PositionFog( v.vertex, o.pos, o.fog );
 o.uv = v.texcoord;
 o.lightDir = ObjSpaceLightDir( v.vertex );
 o.normal = v.normal;

 return o;


Notice that we use texture v-coordinates to tell top vertices from bottom vertices.

more ▼

answered Jan 06, 2010 at 06:47 PM

avatar image

Peter Bruun-Rasmussen
83 2 3 9

Unrelated to the question, I know, but... damn, that looked good. I hadn't seen SOL before, and I'm glad I found it through this question. I keep seeing interesting small games coming out of DADIU.

Jan 09, 2010 at 09:24 PM Ricardo
(comments are locked)
10|3000 characters needed characters left

There's a community created fur shader on the forums.

more ▼

answered Jan 04, 2010 at 01:37 PM

avatar image

AngryAnt ♦♦
4.6k 21 37 89

that's over 3 years old - is it compatible with unity3?

Nov 25, 2010 at 11:58 AM ic
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments



asked: Jan 04, 2010 at 11:59 AM

Seen: 11127 times

Last Updated: Jan 09, 2010 at 09:18 PM