Grass (568179)

What is the best way to make grass? Like what are the best settings to use, how to make a great looking texture for grass, billboard or non-billboard?

I have been able to create some “okay” grass textures with photoshop, paint etc. But I never seem to get something that is useable. I have noticed that the built-in terrain grass shader makes a fade from a black color to the actual texture color, I would like to remove this to make the grass better fitting for the terrain. I also tend to make the texture black and white, and then use the grass tint for better control of the grass color, without having to edit the whole texture.

I have been trying to achieve something like this kind of grass, where the color on the grass doesn’t have a gradient over it:

But it always has weird color even if I set both the dry and health color to the same. Is this something I would have to change in the grass shader?

Tips and tricks on achieving good looking grass, would be much appreciated.

One way to make grass is to 3d model the blades of grass, then make a texture of that. Use a 3dmodeling program such as blender and make a 3dmodel of a blade of grass. then copy that and past it in random locations on one plane. maybe change the size of one blade to add some diversity. Once you have a nice little group of grass, render a picture of it, then turn that into a texture for your game.

How would I be able to get the grass to be the same color over the whole texture, like in the picture above?

All I can think of would be to make the grass in your texture all one color.

I have tried that but the grass seems to have some kind of gradient on it, and how can I prevent the grass from changing color, because it seems to be reacting to the wind…

EDIT:
In the picture below the grass texture is completly white and I have used the tint to make it that color. The weird thing is that the terrain and the grass has the same RGB value, but the grass shader seems to modify that.

I might be wrong on this one but grass shader is probably changing the color depending on the camera angle. Check if your light source- it might be affecting the color.

Change the color of your grass texture to be the same green as your ground texture.
Edit the normals on your grass models to make them point directly up.

I have done that, still with no luck. The grass still seems to have some gradient on them:

NOTE: The grass and terrain has same rgb value.

Are you sure you’ve updated all the grass normals to point up ?
Also you need to have the model importer with the “normals” setting set to “import” and not “calculate”.
if that doesn’t work could you please upload or send your test files ?

I have set the DetailRenderMode to Grass, instead of grass billboard with no effect. I am not sure what else I could do without having the performance going too much down.

send over your grass fbx / obj, no need texture

I am using the builtin grass system (Unity terrain)

you need to be using a custom mesh for the grass, not sure how to do that I’ve never used their grass system :frowning:

How are you handling this, with a particle system? How do you get good performance out of this without using their system?

EDIT: I seem to have found a solution to this, now my problem is as follows: DetailPrototype - Questions & Answers - Unity Discussions

Hi, I made this distribution system a while back. Check it out. I made a few examples with some grass, maybe it fits your need. And it is free. :slight_smile: [Free]Random Distribution Tool - Community Showcases - Unity Discussions

Can I use your tool at runtime, and say generate a detail map with it and then place the grass?

Yes, but you have to use a texture to describe the masked area.

What system are you using?

I couldn’t get it to work at runtime

The system distributes gameobjects. So everything you can make into a gameobject, like prefabs can be distributed by the system. There is an option for combining meshes to reduce draw calls. This will not affect other scripts on the distributed gameobjects. In the examples I use a custom mesh to display the grass.

Have you tested the example scenes? Do they work?
I think you must have a distribution map selected (texture), or else it will not work. You can make a small 32x32 white texture. I know this is not ideal but I will make changes to it when I start using the system myself.

EDIT: After taking a closer look I see that I am using blender files in the package. You need a copy of blender to read them so that maybe why it is not working. I will update the package with .obj files instead.

EDIT 2: @ExtremePowers It is now using .obj instead of .blend files. You have to re-download the package. :slight_smile:

Okay, I have a problem where the ScreenCapture game object doesn’t have a script attached.

EDIT: How to place the grass on a procedurally generated unity terrain?