Shadow artifacts from Stationary Directional Light

I experience some shadowing artifacts in my scene right after stopping Play In Editor session as shown on the attached image:

Scene setup is following:

  • 1 Directional stationary light casting shadows
  • Box brush as the floor with default unchanged checker material
  • Both green and white cylinders are static meshes with Mobility set to Movable and default-like material, just altered base color. I am using Editor built-in Cylinder
  • All scalability settings set to Epic

Each time I restart PIE session I get same artifact pattern.

If I disable either Dynamic Shadows or Directional Lights under Show → Lighting Components this artifact disappears.

If I change light type to Movable – artifact disappears.

Another thing that might be relevant, is that the project first was created targeting Mobile and then switched to PC / Console after some time.

Edit:

After some experiments I figured out that theese shadows are somehow affected by Indirect Lighting Cache. Removing all indirect samples from the scene leads to almost black shadows.

Edit 2:

This happens even with ‘Dynamic Shadow Distance’ of the Light set to zero. Distance Field Shadows are also disabled. So no dynamic shadows in the scene at all.

Hey Druha,

If you are changing your Directional Light to ‘Stationary’ you will still have dynamic shadows, but you will also be using baked shadows as well. This is used as a performance compromise and is the middle ground when trying to combine lightmaps with dynamic lighting and shadows. Try increasing the ‘Lightmap Resolution’ of your mesh and rebuild your scene to see the changes take affect.

If this has no effect on your issue, would you mind providing me with a screenshot of your static meshes build settings. Use the image I have provided below to look in the areas that are important to pay attention to when using lightmass and baked lighting.

Static Mesh Editor

Let me know if you find out any new information pertaining to your issue, or if you need further assistance.

Thank you,

Andrew Hurley

Changing “Lightmap Resolution” had no effect at all, probably because Static Meshes with Mobility set to Movable did not receive any static lighting but just dynamic.

I am using Editor built-in cylinder as my mesh, but here are its setting from Static Mesh Editor.

I also added some info to opening post

Your directional light is set to ‘Stationary’ which means you are still using lightmaps in your scene. Your lightmap resolution is still fairly low for the size of your object. I would try increasing it to something like 128 or 256 to get cleaner lighting.

Unless you need this object to move, there should be no need to set the mesh to ‘Movable’. Try setting it to ‘Static’ and check the box that says ‘Recompute Normals’ as well.

Also, if you would like to add a bit more fill light to your scene, go to the modes tab and find the ‘Skylight’ actor. Add this to your scene and be sure to set the mobility equal to your Directional Light.

If after trying these suggestions you are still unable to get the correct lighting, let me know and I will continue to help you troubleshoot.

Cheers,

Andrew Hurley

Well, I tried setting different lightmap resolution on objects (more on ones, less on others and vice versa), but still no noticeable effect. And I found that issue still exists even if I set Dynamic Shadow Distance of the Light to zero, which as stated in description should disable dynamic shadows at all — I get no “good” shadows only the weird ones.

Also, if you would like to add a bit more fill light to your scene, go to the modes tab and find the ‘Skylight’ actor.

I already have one, but it is disabled to help track down the source of a problem.

Unless you need this object to move, there should be no need to set the mesh to ‘Movable’.

Setting the objects mobility to Static is not very viable solution, because I get this effect also on objects that need to be moved.

Hey Druha,

If you would like for me to test this asset on my end, you can zip up the .fbx file and attach it here on the AnswerHub. If you are uncomfortable with this approach you can also send me a private message on the Forums with an external link to your .fbx file uploaded to a third party file sharer like Dropbox.

Thanks,

Andrew Hurley

Maybe I was not clear in my comments, I am using default Mesh from Engine, which is located under /Engine Content/BasicShapes/Cylinder, so you already have this mesh.

Here it is in the Content browser:

Can you reproduce this issue in a new blank project with its targeted hardware initially set to Desktop/Console?

Also, I noticed the ‘Text’ actors among your cylinders and wanted to know if this was a blueprint you have created?

Yep, I can reproduce it in a new project, it is not so noticeable but still exists:

39219-atrtifact_new_project.png

Here is the project this screenshot was taken from - [Project][2].
To see it yourself just press Play then Stop. Probably you will need to choose different start position and view direction for it to happen.

Hey Druha,

I grabbed your project and tested the issue on my end and was able to confirm what you are seeing. The issue here is with the non-uniform scaling of the cylinder static mesh. If you re-scale the cylinder to its original shape, the issue goes away. This is currently a known and reported issue we we are working to have this resolved.

As a suggested workaround, you could always go into an external modeling program like 3ds Max or Blender [Free] and model the shape you want and import it into the engine. You could also create an additive Cylinder BSP and convert it into a static mesh. Both options should give you clean results without the issue you are experiencing.

If you have any other questions or need additional help let me know.

Cheers,

Andrew Hurley