- Home /
Effecient grass for mobile devices
I want to cover a small surface with tall grass. I've tried Unity Terrain (for the first time), covered my whole area with grass, but I get a couple of thousand draw calls, which renders the game unplayable to any mobile device.
The game I'm working on has an Augmented Reality environment, so I need the whole area of grass to be visible at all times (thus it makes no sense to reduce the "detail distance", in fact, I have to raise it all the way to the top).
I thought of editing the grass.psd file and tile the whole thing a few times horizontally so that I would have to paint less pieces of grass, but I'm having some trouble with that, don't even know if it would look good enough.
Is there anything else I can do?
Does the grass need to move? (i.e. to sway in the wind) or can it just be a load a billboards? Unity's entire terrain system, not just the grass, is not really suitable for mobile devices, so I'd give up on that. The other problem you need to consider is that transparency can be expensive on mobile devices. You can reduce the need for transparent shaders by using more highly detailed models, though that will increase your vertex/tri count as a tradeoff. It really depends on what you consider an acceptable tradeoff between performance/quality.
Well, it doesn't NEED to move (it sure looks a lot more realistic and nice when it does). The thing is, that if I used a s$$anonymous$$dy camera (or at least a camera moving only to one specific direction) I could probably get away with using simple static billboards. The fact that it's an Augmented Reality app though, meaning that the user could change his viewing angle at will would make it very unrealistic.
Basically, what I had in $$anonymous$$d, is having a thick -medium height- grass or plantation (as thick as it can be, or as thick as I can fake it) and ma characters poping out of it.
I could model my grass in 3DS $$anonymous$$ax and import it to Unity (even animating it there), but even that would bump the tris/vert count and I'm not sure if I could do it efficiently enough keeping a quite low number of draw calls.
If what I have in $$anonymous$$d is not feasible, maybe I should change my whole approach, even plan the whole thing from the start.
Answer by Jaqal · Oct 15, 2014 at 03:22 PM
Try lowering your detail resolution and raising your detail resolution per patch. I was having a similar problem and once I raised my resolution per patch from 8 to 32 I saw a huge drop in draw calls and only a small difference in grass density. Turning grass billboard off will help it to appear denser as well.
Your answer
![](https://koobas.hobune.stream/wayback/20220613165133im_/https://answers.unity.com/themes/thub/images/avi.jpg)