Inaccurate Shadows.

Hey!

I am having a problem getting accurate shadows from 3D text. The light and objects are both Movable since the text can be changed at any time through a blueprint. I am curious if there is a way to get the shadows to more accurately reflect the object casting them? The current shadows seem to just exist to far down. The letters are actually piercing the wall. So there shouldn’t be any light space between them and the shadows. This is causing them to look as though they are floating.

http://i.imgur.com/qjPL5kC.jpg

Any ideas are appreciated!

Hey!

You having this trouble because of the very sharp angle between light spots and a wall. Just try to move spots a little further from the wall. To achieve more soft look try to disable shadows on some of the spots - that will help you to get rid of the shadow intersections from the letters on the left. Also you may want to use more accurate shadow filter (in your spots properties) and set it to High.

Hope that will help you!

Hi HaxO,

When using movable lighting you’ll want to adjust the select the movable light(s) in question and adjust the shadow bias and possibly the shadow filter sharpness to get the desired results.

Here is my example of your setup.

In this scene I’m using a wall with a 3d text mesh that is recessed slightly into the wall with 3 spot lights set to movable.

Here is the default settings results:
Shadow bias: 0.5 and Shadow Filter Sharpness: 0.0

Here is the adjusted settings results:
Shadow bias: 0.1 and Shadow Filter Sharpness: 0.2

If you noticed in the bottom you’ll start to see some banding with lines running horizontally across the image. This is to be expected and is a result of taking the shadow bias that low. The way to correct this is to use Shadow Filter Sharpness at a higher value to correct but you lose softer shadows. There is a trade off here when using these two settings to get the best results.

This is not settings to use but for demonstration

Here is the adjusted settings results:
Shadow bias: 0.0 and Shadow Filter Sharpness: 5.0

I would like to suggest another method that was introduce with 4.5 though.

Ray Traced Distance Field Soft Shadows

With this you will be able to control the shadow sharpness by the source radius (low values work) and in the mesh editor under build settings in the details panel you can change the Distance Field Resolution scale to get better results for shadow quality. Default is 1. For this example I set it to 3 to get better results.

Reset all other settings back to default (doesn’t really matter) and enable the Ray Traced Distance Field Shadows check box for the movable light.

Here is the documentation: Distance Field Soft Shadows in Unreal Engine | Unreal Engine 5.1 Documentation

This is a twitch stream demonstration that is well worth the half hour to watch: - YouTube

If you have any questions feel free to ask. I don’t mind offering some tips to get the best results! :slight_smile:

Tim

Awesome! This is exactly the information I needed! Thanks!

I was trying out the Ray Trace Distance Field soft shadows. I came accross an interesting result when using a IES texture with it. where the light in the center should be more pronounced it created almost a shimmering z-fighting effect.

http://i.imgur.com/VcrAAD2.jpg

I tried using your settings and didn’t see anything really crazy on my end. I got the results I expected. With exception to one setting that I don’t understand. You’ve got the light intensity set to 0. You should have complete darkness here if there is no other lights in the area casting light.

Try setting a value of 1000 for the intensity and then build lighting. There may be some static lighting that may have been baked that needs to be cleared.

let me know if that works out. :slight_smile:

Tim