How can grass be made?

Hello, I am wondering how grass is implemented in games. Have a look at the following screenshot (from “The Forest”):

I noticed that in many games the same “grass method” is used: You see grass up to a certain distance and only if you walk furher, the grass beyond this “end line” will be rendered. I also noticed that there is a smooth transition if you can say so.

Does anybody from you know how this exactly work and whether this can be made in JME as well.

My thought was that there are several small batches of grass which have a LOD control applied and because of that they only appear at a certain distance. What about object count and performance then?

Thanks in advance :wink:

I guess Paul’s IsoSurface (?) Open Source Project contains everything.
The most easy thing is a textured Quad with Billboard- and LOD-Control.

That means like 4 vertices per grass and done. Do some batching of like 4x4 Meters or a bit more (too much will stop LOD from working).

The Pro’s do it with some shaders using Instancing and what not. The smooth transition implies a shader (there are livetime Lod algorithms or maybe just making them transparent)

Edit: Google something like openGL Grass Shaders or openGL realistic grass.
Forest might have just bought some asset pack on the unity store :smiley:

2 Likes

Okay, I think I am going to have a look at this then!

@pspeed
Where can I find the download link of you IsoSurface. It seems, that the download links is broken or something like that.

I made a grass plugin a while ago. It’s mostly inspired from @pspeed IsoSurface.

The plugin can be found here

But if you want to have a complete overview about terrain generation and stuff. Here is pspeed library on github

1 Like

Thank you, I will try that!

More info:

1 Like

@Domenic At the end of my post there is all the source used to create my library. And don’t hesitate to aks questions if there is things you don’t understand.

1 Like

I fixed some of the links in this thread:

But when googlecode was shut down it took my releases with it so you have to build from source. Here is the project:

Going through that whole thread might be interesting anyway.

1 Like