Grass on terrain

I was wondering what the best way is to cover large areas of my game with fluffy grass or plants.

Right now i’m using a combination of instanced models and billboarding. Looks pretty nice but I have to place every clump/plant/blade. So therefore I have to store patches of vertex data or point data for each area.

Is there some better way I can do this with maybe geometry shaders or a grass map or something (not really sure how that would work).

My current stuff look and works well enough but i’m slightly concerned about the scalability/performance of it and the amount of time it takes to actually place it all.

I’m interested to hear any thoughts/suggestions.

Thanks guys

Storing the placement data in a texture, or just an array, might work. You could generate this using Perlin noise or simplex noise (or similar algorithm). Check this out:

If you want random placement that looks natural, take a look at Poisson disc sampling too :slight_smile:

1 Like

How about a particle generator?


See what I mean here:

1 Like

I do mine based on the terrain type (should it support grass?) and the the dot product between of the normal of the terrain and up (0,1,0) if it is within a range (10 degrees say) then I know I want grass there. Pretty much all that is derived from the terrain height map and splat map.

1 Like