- Home /
Grass Animation
On my forum link (Here : http://forum.unity3d.com/threads/153621-Real-Time-Project-ShadeCreest-UnityTech ) its was a comment about the grass animation.
This is what the comment was
**> Your grass need some work, the hole
grass bends (Real-time grass only bends at upper parts.**
Does anyone knows how to get the grass only bends at upper parts ?
Thanks :D
Ignore that comment. From the video your grass is looking just fine as far as I'm concerned. Trying to bend the individual blades at runtime will probably kill your performance.
I wouldn't take a comment too seriously from someone who didn't take the time to fix "hole," but ... the idea is grass bends in a non-linear fashion. The edge of bent grass is a curve ins$$anonymous$$d of a straight (diagonal) line.
To do that, give grass billboards more verts along the sides, and have the shader bend using something like windAmt*(localY squared). The thing is, there's a lot of grass, and the trick doesn't look that much better.
Answer by iwaldrop · Oct 06, 2012 at 05:35 PM
The grass needs to be of multiple transforms, and each needs to bend it's own amount. The first piece will be the lower, and each successive piece will be placed at the top of the one before it. Child each transform to the one before it.
As you bend the first piece notice that all pieces bend with it. Now, simply apply your bending effect to each transform and adjust your settings accordingly to make it look natural.
You might also experiment with Random.Range(lower, upper) so that it has some divergence from the value you set in the inspector.
Have fun!
Your answer
![](https://koobas.hobune.stream/wayback/20220613081952im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
grass animation changing color 2 Answers
Vegetation animation on non-terrain mesh? [YES] 1 Answer
Can the animation editor create local rotational data? 3 Answers
Adding animation clips via script 2 Answers