I’ve been trying out the grass system in Unreal 4.8. (To avoid any confusion, I mean the system where the grass density is driven by one of the landscape layers.) It looks very good, a lot like the microfoliage in the Far Cry games, but I’ve got a few questions:
-
The grass seems to be lit properly, but it isn’t affected by shadows. Obviously it would be crazy to produce shadow maps for all the grass instances, but it would be nice if they could pick up shadows from the surface where the grass has spawned. For example, if a grass mesh is spawned on a landscape, and that part of the landscape is in shadow, the whole of that particular grass mesh could be rendered as in shadow. I imagine this could give reasonable results without being too costly, but is it possible with the current implementation?
-
I had a problem where the grass would cut through other objects. For example, if the grass is quite long and a dead enemy is lying on the ground, the grass appears to be growing through the enemy. Is there any way to have the enemy draw on top of the grass, as though the grass were getting squashed?
-
I was wondering about the efficiency of the grass system. Is the idea that the meshes can be spawned by a shader, without the need for the CPU to place each grass mesh individually? In that case presumably the cost is similar to using tessellated materials. Would it be reasonable to have a large landscape which is mostly covered in grass (bearing in mind that the meshes will only be rendered when close to the player) or should the grass be kept for small patches?
Thanks for any help you can give!