I need to have grass in my scene, but without using Unity’s terrain engine.
I’m specifically looking for the effect they achieved in the last Prince of Persia, like in the image below.
The grass grows in dense patches; grass blades do not face the camera - they are rotated and tilted randomly and stay in that position.
On top of that there’s the wavy animation for wind influence, which skewes the grass blades.
One approach would be to have each grass blade a separate game object with wind animation script on it, and placement of those could be automatised by defining grass placement meshes.
The downside of it is that it very inefficient, since each grass blade needs it’s own draw call, Update() call, etc.
It would be nice if I could do it using Unity’s particle engine, which should be way better performance-wise, but I don’t know how to:
-
make the particles non-camera-facing and define rotation for them;
-
make the particles skew (or maybe I could just do it in vertex shader?)
When I finish it, I promise I’ll share it on the forum