Screenshot of my test-level with massive amounts of foliage

The foliage is currently at 254,000 instances of a mesh with 18 vertexes each, texture resolution is 2048x1024. I made the grass foliage curl outwards like a spiral with the bottom vertices scaled towards the center, so you can look down quite a bit before noticing where it clips the ground.

Edit: Added another image after finding a post with some tips to improve grass foliage:

( Album: Unreal Engine 4 - Album on Imgur )

If someone could point me in the direction of how I best get rid of the white tint at the edges of the grass leaves, I’d appreciate that immensely.

Edit: Aha, fixed it myself! It was the surrounding colors you can see when you disable the alpha channel. It doesn’t show in any preview or in Photoshop, unless you actually extract the alpha channel and make it all white, then you get to see it. So what I did was paint an entire layer green, put the picture above it, merged it. Then applied the same alpha channel to it. I might do a video demonstration of this as I’m sure this is a problem several people encounter.

Here’s the screenshot so you can compare the one to the above.

Wow, that is a ton of foliage and it looks great too. What kind of Fps are you getting?

I’m getting between 50 to 80 fps, depending on where I’m looking. Mind you I’m using a GeForce GTX 970, so the numbers are pretty high compared to the average gaming rig, but this will probably be par for the course in …3 years, I’m guessing.

I recorded a video of a flyover the area with FPS displaying enabled, so you can have a look yourself.

Not really MASSIVE amounts of foliage, def not the proper title here haha, jus a bunch of dense grass and no trees
Now DayZ & arma3 maps are massive, this is like 1 thousandth of the size
Hopefully epic are going to be doing ‘big’ things with their new ‘big world initiative’ so we can actually get ‘massive’ amounts of foliage & view distances similar to arma3 & dayz SA

The maps are massive, but AFAIK they clip the grass and it’s nowhere near as dense even then; But yes, no trees is a good point as that will up the complexity of the scene very quickly even with LOD. I’m planning to make a few trees today and see how that works.

I’d love to see how well you do trees. That grass looks really good. One thing thought - I don’t know UE4 can calculate mipmaps for textures that aren’t square but I could be completely wrong. I would also recommend adding a wind effect. It’s really easy with the “SimpleGrassWind” function in UE4. I’m really interested in optimizing foliage so if you don’t mind keep the fps count in the back of your mind when you change something.

Thanks for the compliment =)

Also, I was so tired when I made the video that I mixed up interpolation with mipmapping, just so that’s said. Besides the texture is square, hell even the UV map is uniform =D

I’ll add in the effects and replace that video when I’ve gotten around to making that tree. I’m having health problems, so I hadn’t gotten to making trees yet, but I might make a draft one very quickly so I can get an update faster.

Trees are in (well, à tree 400 times). I’m not happy with the leaves material and spacing, but at least there’s the first draft.

The performance right now is very poor, about 15 fps; but no wonder really since that scene contains 900 000 grass instances and 400 trees which each have 85 000 vertices (I wanted to see just how much I could drag out of it).

Proper lod’s could solve alot of the fps issues I’m sure you are aware of that, for this last shot from above you could do 2 planes per tree or maybe 6 with textures,
I’m still not sure how to properly set up fading like Unity has though, I know the speedtrees come with an example but its a bit complicated, in unity it could automatically blend from billboard cards to high res lod depending how far the camera is,
I hope epic is working on something like this I think they said they were on 1 of their recent twitch streams, a more automatic lod & fading solution, so Instead of popping in, its easier to make a nice fade from lod to lod

As for the grass- You’re right about dayz the view distance is cut off pretty close,
I wish there was a new way we could take advantage of some sort of ‘batching’ for grass so having a lot of it in the distance isn’t such a performance killer, I mean its just the same bunch of planes with the same bunch of textures,
I’m fine with even having mine unlit and just using emissive/self lit textured materials, hopefully Epic will figure something out with this too

Suppose for now you could render to texture some views of the grass on the terrain from far,
then put those big grass terrain textures on a huge giant plane at a really high res over the terrain,
to fake grass in the distance and fade out when you get close,
then the actual grass view distance is set to fade in at the same time giving a somewhat seamless illusion of performance friendly highly dense grass in the distance
I hope thats not the only solution though, I’m interested to see if Epic plans to tackle this with their big world ideas

It is pretty ridiculous with that last shot u posted, even to this day with our technology (and your using a gtx 970 too ffs!!)
we can only get 15 fps with such a small area of foliage. Some people may not think this area is small, but I really do, when your thinking of making a huge world with flying vehicles this is small,
Something just doesnt seem right here,
it seems like engines are going about foliage wrong or there could be something done,
I know polys are polys textures are textures you have a ton of them well it has a big impact,
but with foliage theres tons of duplicates, in this scene its just 1 tree and a few pieces of grass duplicated

You’re absolutely right about LOD, and I’m about to make new trees now using the “sapling” addon for Blender which also will make it easy(ier, rather) to make several layers of LOD.

Regarding foliage I agree with you that there should be put more an effort on that. I have a few ideas myself, if you could use a different texture based on the objects angle to the camera, you could make a sprite that always faced the camera. Use a texture that contains an image of the object from several angles and map the correct part of it to the texture. This way every object you saw from a long distance would only contain 1 face and one small texture.

An engine should be able to do this live. For each object using the same mesh and approximate world rotation/location/animation state (again dependent on quality/performance), render only one of them to a texture w. depth/normal information. Draw the rest of the objects as sprites, possibly use a particle system (but I’m speculating), and fix overlapping using the depth information and lighting with depth+normals.

In a worst case scenario you’d have nothing that overlapped, meaning you’d have no performance increase but the cost of running the algorithm. In a best case scenario you’d only draw the object once, possibly causing a massive performance increase with minor loss of picture quality.

You might be looking for impostor sprites

How do the imposter sprites work for trees? Good? Is it designed for that?
Can they fade into the high poly lod nicely? Or do they pop?
Could you fake lighting on them and get them looking nice?

I’m interested to see if you can use them nicely for distance trees,
You should have a go at it for this scene

Aha, that’s what they’re called? I remember seeing impostor sprites first time back around 15-20 years ago. It was during the tutorial and they had used it for a tree stump, but can’t remember the name of the game, but it was an rpg/adventure first person perspective. I didn’t know that was the name of those, so thanks a lot =)

But they lack part of what I was thinking of since it would solve overlapping of sprites when you rotate around them, as well as them being lighted individually. I think it would work well within a deferred render, which is where I got the idea for the improvement when reading how it used a depth buffer with a normal map.

In any case, I’m going to try them =)

Edit: Oh wait, they do support normal maps, nice!