So I have a pretty big forest map, and I made some grass meshes (static objects, not using the grass tool) to place on the ground n such, but when I play the frame rate drops to 20-30 fps when looking around. What can I do to make these grass meshes not drop my frame rate?
When you place static meshes in your map directly, each mesh is using up one draw call, but if you use the foliage tool to place instanced static meshes it will combine them all into one draw call and you will get much better performance.
Seems like a good idea, but that means I have to redo all the grass placement. I tried doing that now and it just keeps spawning up in the trees and loads of grass on the ground that it just lowers the fps to 20-30 like before. Is there maybe another way? Like making the grass meshes not show up until near them? Or something like that.
You could code your own custom code to handle hiding actors that are further than a certain distance from the player, but I don’t know why you would code your own, when the built in instanced static meshes system will still be much better.
I did a test once, just to see how much better HISM (hierarchical instanced static meshes) are. I took a stair mesh with somewhere around 1,500 triangles, and I placed it in the world 5,000 times in an empty third person example map. It took my fps down to the 20’s from around 100 fps without the stairs. I then removed those and added the mesh 5,000 times with HISM and it went from 100 to 99 fps (all 5,000 meshes were still visible and there was no culling). For anything where you are going to place the same mesh with the same material many times, you need to use HISM or be prepared to pay a huge performance cost.
Alright, I tried doing the foliage thing and I just can’t do it. I tried using large patches of grass but it just overlaps on the roads and looks ugly. I tried placing smaller patches of grass but it’s gonna take WAY too long. I dunno what to do. There has to be another easier way.