I saw a number of pre4.0 posts on this subject, but wanted to see what the latest was. I’m looking to use “grass” on an weighted and animated mesh. Where should I start? The final product is for web and mobile distribution, so if anyone has best practices, a shader example, a simple tutorial…it would be greatly appreciated.
thanks,
Rick_
There’s nothing magic about grass, it’s usually either a quad with a partially transparent texture or an actual opaque model (modeled in bunches). You can make it however you want and add it to your mesh however you want.
You can’t use Unity’s grass for that purpose and I’m not aware of any workarounds. All Unity’s grass does is apply a texture to a quad and randomly place it on the terrain (and set a relatively short culling distance).
Check out the “ats-” shaders (google 'em). Most of them are free in the asset store. They’re a good starting point for animated grass/foliage. If you’re targeting mobile, you’re going to want to use an alpha blended shader (as opposed to alpha tested). Alpha testing is expensive in those cases. That’s at least the case of iPhone builds, you’ll want to check on Android.
The mobile shaders in my signature will offer speed gains for mobile as well.