Foliage have no shadow in distance.

Do you have a moveable skylight?

You write about having a directional light, and a light source. What is the light source?

Hi!

I have a problem here with my foliage shadows. I’m using the Twinmotion trees from the plugin Twinmotion ToUnrealContent. When I’m painting the trees on the surface, the shadows appear when it is close to the camera, but as soon as I go in distance it disappears, as shown on the image. I want to have the shadows always visible from any point of view. To solve the problem, I tried everything I saw on forums:

  • I enabled Generate Mesh Distance Field in the project settings.
  • In the foliage settings of the staticMesh tree I enabled Cast shadow and Affect Distance Field Lighting. I also tried with Cast Dynamic Shadow and Cast Static Shadow, by changing the mobility of the tree from static to Movable, but nothing worked.
  • In the scene I only have a directional Light and Light source. They are all movable. In the directional Light and Light source I enabled the cast shadows option. In both of them, I enabled the distance field shadows and I increased the DistanceField Shadow Distance. I also played with the Cascaded Shadow Maps options, with the Dynamic Shadow Distance MovableLight.
  • In the StaticMesh tree, I only have 1 LOD (LOD 0). I enabled Two-Sided Distance Field Generation. In the LOD settings, I tried to change the LOD Group to different method, like foliage. In General Settings I enabled the Generate Mesh Distance Field.

With all that, I wasn’t able to solve this problem. I hope that someone will have an answer to this. Thank you!

Hi, yes it is movable

Light source is the default light that you have when you create a new scene.

Even with just the directional light and skylight the problem is still there.

I haven’t seen it, but I did all the modifications from this guide, and the problem still persist.

No I haven’t checked it, where can I find the debug view for the trees distance field?

Is it this?

Is this looking alight?

Then you have two lights? You should only have a directional and skylight to make it work…

Have you seen this guide?

It’s not just the mods, have you checked the trees actually have distance fields ( in the debug view )?

No, it’s the debug view in your scene. Nothing is going to happen if your trees don’t have good fields.

Yes, they have distance fields.

Hi, did you check “AffectDistanceFieldLightning” in your foliage (StaticMeshFoliage that you paint)?

Hi, yes I did

He has the answer, as usual!

1 Like