I’m having problems with grass and my game’s performance. FPS in the game is about 250, and once I add grass it drops to 90 or so. (on my pc, and on weaker machines it goes to crap)
I would, however, like to have some grass in my game.
Are there any fast tips that you can give me to improve performance? I searched the forums and found some useful stuff, but I just thought there might be some new/more updated solutions to this problem.
Also, what to set my terrain settings to for best performance:
I am using free version of Unity.
Any other non-grass optimization tips are welcome too.
The easiest optimization for grass is to not show it. Meaning, you should use ground textures that mix very will with the grass, so you can lower the distance dramatically - so you don’t notice so much when they fade out, but you can still see them up close.
That might work in first-person shooters, but what about RTS’s? I’m having the same problem right now, where I was planning on having grass (or a “crop” texture) as one of my resources in my rts game, however after adding say a 5x5 unit patch of semi-dense grass to my scene, whenever I scroll over the thick patch of grass in-game, my fps drops significantly until the patch of grass gets to the edge of the viewing area – then the fps goes back to normal again.
I know this has a lot to do with the detail distance and detail density in the Terrain settings, however if I lower these, the player can’t see any grass at all until they zoom pretty far in on it. And by then, the detail gets drawn so the game’s fps goes to crap anyways.
Overall, I’d like to have an option where the player can see the grass from say 30-50 “meters” away, but the detail never has to be drawn. It’s whatever Unity does with the detail drawing that’s causing bad screen-stuttering for me.
Are there any solutions to this. One thread I read the guy said he manually via script lowers the terrain’s detail distance/density while the camera is scrolling long-distances. This sounds kind of like something we shouldn’t have to be doing, just to have a thick patch of grass that doesn’t cause lag.