Hi all, apologies for the long post but I want to get this discussion as complete as possible for the sake of being productive. For the past several days I’ve spent like 90% of my waking hours trying to nail down a solid approach to this issue but everything I try just seems to come with it’s own set of problems and it’s hard to see a clean way to accomplish what I want here. The problem is with grass.
The Goal
I’ve been working on this exterior environment for a fantasy/sci fi game that I’m building and I’m aiming for a somewhat realistic artstyle. My main point of reference was screenshots from Final Fantasy 15, specifically this image:
So I started looking into grass. Quickly I realized that there were limitations within Unity’s Terrain system which could hinder the look I wanted to get.
Base Terrain
After I prototyped the layout of my level, I added a terrain and started sculpting. The first results were horrendous because I only used a circle brush and made really smooth, ugly hills to act as mountains. But that’s on me. I did more research and got the new 2018 Terrain tool extension thing from Unity which has hotkeys for brushes and mountain shapes, as well as erosion tools which really helped me get that mountainous feel. As of today, I’m working with a base terrain that looks like this:
And here’s the area I’ll be showing later on that I’m trying to work on:
I’m happy with the tools I have for sculpting, but I’m a little worried about the ground textures and mountain ranges not looking how I want them to. I have a feeling the texture really impacts how the ground looks with grass, but I’ve tried dozens of different textures from Textures.com and some of them just really don’t look great when they’re tiled on this scale–unfortunately they’re not very high res so I can’t scale them up much further, but regardless that’s a somewhat different problem entirely. Just thought I’d mention it in case anyone thinks this is what I should focus on. In the meantime, I went to work on grass.
Unity Terrain Grass
My first approach was to use Unity’s Terrain “Grass Texture” tool, which just asks for a texture and lets you paint on planes. So I made my own grass texture and placed it in. But then a problem appeared:
The grass amount was coming in very sparse like this. There’s no way I could match the coverage of something like FFXV if this was the shortest distance grass can come in. So I tried to trick it: I added another grass object which was actually the same texture, so that I could add more of it in the same area. And I got this:
Clearly this wasn’t going to cut it either. No pun intended.
After adding a third grass texture I actually reached the limit of density for that area. So was that it? Did I just have to stick with individual obvious grass planes and hope that it’ll work out when I flesh out the asset library? No - I had to increase the density. I looked into it and found the detail mesh options in the terrain settings. I turned “Detail Resolution” up to max and got something like this (just an approximation because it’s hard to get my old settings back):

Not enough for me. And considering that’s still only grass, it would be impossible to add other small details like flowers or plants using this system. So I had to try another method.
Everything is a Tree
I came across this post which suggested a new method for painting grass on terrains–one that “looks better”. I tried it out. The idea is to make a grass prefab patch and then use the tree editor to place it in. Surprisingly, it worked pretty well. I made a grass patch in Blender that looked like this:
Then I added my own custom shader which gave it wind (trees don’t use wind on the default shaders unless their vertex colors are set properly). I also added a ton of features during this process to improve the color of the grass, such as desaturation, overbright to make it lighter/ignore shadows, set the render order to avoid nasty AO artifacts, etc. I ended up with it looking like this, using that same texture from before:
I added an LOD group (trees only get billboarded if they are made with tree creator, this is the SpeedTree approach which just uses Unity’s LOD group to cull at a distance). Then I started painting, getting results like this:
The difference was night and day–trees could be painted at much higher density, and adding more variations of grass actually allowed trees to be completely overlapped, with a custom density for each group that you paint in. So if you keep adding new tree duplicates you can have potentially infinite density of any combination of meshes you want. So great, problem solved, right?
My performance has more than halfed, and that’s just while standing still. With this method I lose about 30FPS for an area of this density, and that’s only with grass, not even counting other vegetation types such as flowers or actual trees. Reducing the LOD distance helped a little but obviously I can’t be reducing it too much or else it becomes an obvious fade. This is even after I disabled shadows and motion vectors for the prefab.
And it makes sense why this would happen–each patch I made is being rendered individually with it’s own LOD group. Unlike the Terrain grass, it’s not combing patches into larger meshes that are easier to render, it’s drawing each individual one and also doing LOD distance calculations for each patch, which must be hard on the processor. So with this method I can get the density and color customization that I want, but I’m losing performance because of that. I don’t want to be limited by grass before I even add the rest of assets or have a solid grasp on enemy count per area etc. So this wasn’t going to fly either.
Back to Terrain Grass
In order to get more grass density, I had to think about how the patches would behave. If my terrain were smaller then I might have more points of grass per patch, but I wasn’t about to just throw away my terrain to rebuild it in chunks. Unity’s neighbour tool is nice, but it only lets you add new terrains, not split an existing one into neighbours. So I looked up an Editor script online and ran it, splitting my terrain into 4 chunks of size 2000x2500 each. I set the grass resolution to max on all of them and I was actually able to increase density further. Now I was getting results like this:
Okay, that’s a lot more grass than before. But I had to make sacrifices: this is already 3 layers of the same type of grass, since an individual one still wasn’t enough. If I go all out and push layers to the max I get this:
I suppose that’s a reasonable coverage but now I have to paint over 5+ times to achieve this. Also, there are problems with the way the grass is placed and rendered that bug me. All of the grass is sticking up the same way and is placed somewhat evenly apart, at least evenly enough that I can see the individual grass places. The color is also an issue, I don’t have all the neat tricks my shader could provide so I get these green blobs, even tweaking the color to try and compensate it still just seems way too saturated and there’s no way to adjust it. I also don’t like how it looks at a distance, it should be a cutout texture yet the grass places look really square and blocky in the distance, as though the aliasing or something is just not making them less visible. Finally, the coverage is somewhat reasonable but for art’s sake I’d at least like the option to add more density in certain areas if needbe–say for flowers or plants or something.
So in the end, I’m back to where I started with no clue how to proceed with grass. Both methods have issues, and I can’t see any good way to get the look I want.
Thoughts
This is more of a technical question, but ultimately the method I go with should be driven by how it looks in the end assuming it performs well. I’m well aware that other aspects of the ground such as rocks, trees, logs, etc will improve the look. I’m also aware that variations of grass height and other flowers will help as well, for instance I’ve tried adding variations with Unity’s default terrain grass here:
Certainly looks a lot better than that one grass texture, yet the same issues apply to each plane. If you look closely enough it still doesn’t hold up for what I want - mostly because I can still see individual grass planes sticking out. Also, I can’t rely on variations for the entirety of my terrain grass, in my view it really should hold up in an empty field with similar grass types and I’m not happy having to rely on this to hide the grass. It also suffers from lack of normal maps/desaturation etc.
I’m also well aware that the quality of the grass texture itself can have an impact on how it looks in the terrain regardless of the method. And that’s something I have to work on as well. But still, I expected to be happier with the results at this stage and I don’t want to jump in and starting painting grass if the final result will have the same issues.
So I’m really just hoping to find a workflow or better approach to all of this. Hopefully some ideas can get thrown around in this discussion and I’ll continue to research a better way to do this. I’m just hesitant to spend more time on it and I’m considering just not having grass at all if I’m not going to be happy with any of these approaches. I should also clarify that I’m NOT saying Unity grass looks “bad” by any means, that will all be down to opinion and art style depending on the game, I’m sure the tool is great for many purposes. But as a matter of my own satisfaction and artistic intent, I’d like to do better.
Summary of Issues
-
Density - how much grass I can put in one area
-
Performance - ideally I’d want it to run as fast as Unity’s Terrain grass
-
Graphical features - normal mapping, wind settings, desaturation, overbright are all nice to have, but I can live without some of them if it means getting performant, dense patches
-
Aliasing/cutout method - The edges of how the grass is rendered and whether or not it appears “blocky” at distance
-
Distance - Either fading out, just disappearing, or shrinking in size, I’d like the LOD distance to be long enough to not be noticeable, ideally adjustable in realtime so I can add a graphics option for it
-
General look - I realize this is more artistic, but the color and placement of the grass in general for all of these methods just doesn’t make me too happy. Again, I know that variations, better textures, etc. help, but it’s hard to say what needs work and how I can actually go about making those textures. I’ve done plenty of art before, I know that looking at reference is key, but I just can’t put my finger on what makes up the reference I have (like the FFXV image), and I can’t clearly see what’s going wrong. I know that’s on me and with practice I’ll get better, but it’s worth mentioning in case someone can provide help there too.
Potential Solutions
-
Make some new performant grass method. I’ve heard about instanced grass and maybe that’s a fast way to render custom meshes with as much coverage as possible. But it would be a huge time sink to develop that system and I’d want it to be linked to terrain. I want to be able to paint the same way I do trees, and I want the result to be dynamic if I ever go back and adjust the terrain height, it shouldn’t be static. Instanced grass would need to dynamically follow the terrain and update in editor to be practical so I can view it. No clue if it’d actually slow down computers that have weak GPUs too.
-
Replace the default terrain grass shader. I tried doing this with a shader from another post but I saw no difference. Maybe I just didn’t do it right. It could help with the color but regardless it won’t help the coverage or placement, and I’d still need to have multiple layers of the same texture to get the results I want.
-
Custom LOD. I’m aware of Danny Weinbaum’s forest optimization post. His solution was to make a custom LOD group that combines meshes in an area and does LOD for the whole hex. Smart, but he’s also placing objects by hand without Unity’s terrain. Again, it’d take a long time to make a system like this and I’d also want to paint objects on terrain without hand placing.
-
Unless… I can use this custom LOD in conjunction with Unity’s trees. The data for trees must exist somewhere on the terrain, so maybe it can be accessed and used to combine meshes. I have no idea how that would work, but it’s an option. I’d really like something out of the box though, again it sounds like it’d take even longer to make that system than just hand placed custom LOD. Even if I could just group grass patch LODs I think it might help, but my guess is the combining is really what saves frames.
-
Some plug-in for terrains that adds better grass options. I don’t really want to spend money on this though, but if there’s a free script that does this it’s worth looking into.
Perhaps as a goal I should say that I want to match something like this tutorial:
That reference is probably close to what I imagine some of these areas should be. That grass is painted using that engine’s tools and I believe he mentioned something about combining it so it didn’t take a toll of the framerate. I wish something like that was possible with Unity trees for custom meshes. I’m aware part of it is the ground texture/grass texture quality, and perhaps that’s something I should look into. Still, it’s hard to really get a proper workflow/find the texture that matches what I want.
Thanks for taking the time to look through it all. Any suggestions or ideas are appreciated since I’m completely stumped.
EDIT: Unity Forums seems to have a hard time drawing one of the images, even after I replaced it with a new link. Perhaps I hit the limit. Regardless, you get the idea.























