Foliage frame rate drop and shadow issues

Hi Everyone!

This is my first post and my question is fairly beginner/intermediate. I have been using unreal for about a half of a year and have a decent amount of knowledge but there are still many things I don’t know. I am creating a farm/cornfield for a client in which the player spawns and the teleports down a path and ends in the center of the cornfield surrounded by corn. I am using a few different corn models and I have used the foliage painting tool to create the field but when I test in vr I have slowdown on the frame rate and the corn is not projecting a proper shadow. Is there a way to reduce the drop and have a proper shadow on said foliage? I have not tried forward rendering yet but I have tried overriding the lightmap’s on the corn but I still cannot achieve both. Also is there a quick way to add a bit of movement on the corn as if there is a slight breeze? Any advice would be greatly appreciated!


I’m guessing the reason you are not seeing proper shadows is your directional light is probably stationary instead of movable? There is also an option in the foliage tool for showing shadows, make sure that is on.

Have you done a GPU profile to see what is slowing it down?

with lots of meshes + shadows you are probably going to have a bad time in VR.

To make it look as if it is moving add the SimpleGrassWind node to your corns material.

Hey Xenon,
I think I can help you with this. It can get quite indepth and like a rabbit hole can go deeper as you keep venturing forward with UE4 and VR.
Couple of quick things though for you to start of with:
This might be completely wrong, but in my experience, I have had more success using the landscape painting tool over the foliage painting tool. You can assign static meshes to material layer blend in the landscape material as grass, and change theri properties almost exactly like you would in the foliage painting tool. I find that there are 2 fundamental advantages to this, a) you have control over what spawns where through painting which can be modified as needed, not like the painting foliage tool that is once painted and becomes one instanced mesh and b) you cann assign your grass or in your case corn, to take their shadows from the landscape. This saves you memory from having to build lightmaps for each individua corn mesh. Another thing you should look at is culling the corn meshes after a certain distance. I find this to be quite helpful in mainting FPS.
If you have been working with UE4 for 6 months or so, you are proably fimiliar with some of the stuff i mentioned and unfimiliar with some of it. If you have any question or need help, feel free to DM me. Its been a week since you posted this, so I am hoping you have got the help you needed. If not, DM me and i will try to help you out as best I can.

Hey Kabirpunde and Imsopiv,

Thanks so much for the replies! Changing the directional light to movable did the trick! Also I added the grass node to the various textures that make up the corn and that gave it the right amount of movement. What I did so far to reduce the frame rate drop was deleted the corn to about 5 rows and added in simple planes with a rendered image of the corn to give the illusion of corn going off into the distance. I am also going to try culling the corn at a certain distance like Kabir said and see if that can reduce the drop even further. Thank you so much for the help!