The project I’m working on has a tremendous amount of foliage. We recently pushed most of our plants into the foliage mode (as opposed to regular static meshes) and have seen an improvement in performance overall, and in general on a high powered PC performance is excellent. However, as we are looking into other platforms, the current scalability options of foliage has been a roadblock.
I have found that by setting foliage.ditheredLOD 0 I can gain back a few ms, which baffles me as it seems like the foliage LOD’s less efficiently when it is denabled (most plants have 3 lod’s plus a billboard). When I disable dithered LOD they mostly show up at LOD 0, at least the ones on screen. I’m assuming there’s some overhead cost of rendering multiple LOD’s to dither them together but I see the performance loss even when the game is paused and no transitions are going on. I also understand due to the nature of mesh instancing if a mesh is close by and at LOD 0, the others in that particular instance would be at LOD 0 as well, although I don’t know why the dithered LOD seems to ignore that. Can anyone explain what is going on here?
We’ve moved pretty much every plant into foliage mode, including large trees. We were initially hoping to take advantage of the dithered LOD for the trees in particular. While there are hundreds of smaller plants that clearly benefit from mesh instancing, there might be a dozen or so of the 8 varieties of trees scattered around the map. Are we seeing a benefit from moving these trees into foliage mode, or were we better off with the proper culling offered by traditional static meshes?
One of the largest challenges we’ve run into is dealing with scalability of foliage. Idealy, the end user would have a foliage density control (or have a value set by a device profile) that would either cull flagged instances to permanently cull (like how quality settings work for static meshes) or would call an entirely new, low quantity set of instances to be displayed in place of the high density batch. I’ve tried a number of hacks like duplicating the actual foliage instance actor or copying the foliage actor to a new level that could be hidden with no success (the instances are deleted in both cases), and the command line options are limited, either cutting away strange sections with max triangle count or forcing every lod to a set value with foliage.forceLOD. Do I have any options here? My LD really doesn’t want to cut any plants in our high quality version so any info would help.
One last thing - our levels are set up with culling in mind (room or hallway like despite being outdoors). Because of the lack of debuging tools, I can’t tell if foliage is being occlusion culled, or whether the placement of multiple instances affects occlusion. Would we be better off eating the drawcalls from traditional static meshes for the bigger plants despite their numbers being in the 50 - 200 range in some scenes?