Does someone know how can I improve the FPS in this scene?
I’m using dynamic light because I’m making a big open world map and I’ve already setup occlusion culling for grass inside the foliage tool.
-add some hills and other stuff that blocks the view of the player
-use LOD’s for the the grass
-reduce the density
-it also depends on the shader complexity
-I personally use grass with 6 tris
When I read the thread title I was hoping to see some tips in the OP. heh
Anyway from what I’ve read in other threads it seems like the complexity of the shading model currently used for foliage is the culprit.
You can read more about it here: https://forums.unrealengine/showthread.php?36551-Overdraw-performance-hit-prohibits-foliage-rendering
Including some vague hint from Epic that they might try to make a simpler foliage shading model. It would be nice to get an update on that though.
This is something that affects all games with large outdoor environments btw so you are not alone. ^^
I think the most performance is used by the Textures, for examble i made a gras, where every Blade of gras is its own 8 tris model, but i haf just a simple texture with colors and no alpha input, so its not “masked”. This gras has no LODs but needs nearly no performance, here a littel Video.
The texture could be made with more love :rolleyes:
also intensity seems to be no problem ^^
v=ZIVe_50p3pY
with this Gras I tried to reproduce the Gras LOD technik from the Witcher 2, they also have this highpoly Gras (which is much nicer btw) models for the base and for the first (and last) LOD a REALY simple Masked 2 tris Plane-Sprite.
I am curious, could you link us to anywhere they are talking about the grass they used in ‘The Witcher 2’? Would love to read it but couldn’t find anything about it.
I can say from I experience that most performance issues related to grass come from overlapping transparency rather than from the amount of tris or even other types of shader complexity. Basically, you should try your best to leave as little empty space in your alpha as possible, try to not have many many planes overlap each other (if possible). Your LODs should be about reducing this issues rather than reducing polygon count (as an example, my LOD0 has bended, intersected grass planes to look good from above. My second LOD removes the intersecting plane because it will no longer be looked from above. This means less overlapping transparency).
If your material is taking a performance hit (wind, SSS, etc.), It’s not a bad idea to use a different material for your LODs, a cheaper version which won’t look very different because it’s not being looked at closely.
I also set my LODs to not cast any shadows and only my base mesh casts one so only the closeup has the detail it needs.
I’ll add some of my experience with this, even though it’s pretty late for the poster, might be useful for future wonderers.
Things I do with my foliage:
Make material instances out of everything (in general, have 1-5 master materials for your whole level (With special exceptions))
If your mesh only has one LOD by default, export it and reimport it. In this other Lod (LOD1 would be), reduce the lightmap resolution, disable casting shadows)
If you’re far from reaching your pool limit, duplicate the textures. This is, create another texture and force the mip level to a quite low resolution with more compression or so.
Have another master material for the lod one. Depending on the distance this gets activated and your goals, you can disable winds, surface colors, opacity masks.
Add culling distance maximum (go to your vegetation tool, select a mesh and scroll down until you see the culling distance.
Be smarter in vegetation placement. More =! better. A well placed vegetation system will need a lot less spawns to look suficing than a none one.
Disable certain types of shadows (Dynamic shadows for example) on most vegetation.
Make your level in a way that not a lot of the vegetation is rendered at once (rocks, buildings, etc).
Improve general performance by instancing all other static meshes in your level with tools (there’s a blueprint that you can make with it :).