Ray traced distance field shadows contact shadows impossible?

Is the any way to get accurate contact shadows with ray traced distance field shadows, i have am using a distance field resolution of 100 and the offset is set to 0.0

There are some big improvements coming in 4.9. Maybe trying using the 4.9 preview as a test and see if it improves your use case.

Sadly i am getting the same problem in 4.9 this needs a fix.

Darn I was hoping 4.9 would help ya. Thats beyond my area of expertise, maybe someone else here can give more suggestions. Good luck!

Thank you, and when using directional lights im getting no distance field shadows at all.

Hi Elias,

While I want to address the contact points for your original question, I first want to get the issue out of the way that you mention you cannot see Distance Field shadows being cast with your Directional light. I’ve seen a couple of users posting this, so I’ve made a simple sample project with two maps. The first is with a Directional Light and the second with a Point light. The default lighting method for dynamic shadow (Cascaded Shadow Maps) has been disabled so we can focus on Distance Field Shadows only.

Attached here is the sample project, and two images for what each level should look like. You should not have to do anything other than open the project to see things working correctly. I’ve also exaggerated the soft shadows so that it’s easier to see the distance fields in action.

[Test Project][2]

If you’re not seeing the results like mine here are some things to check.

  • Engine Scalability is set to EPIC on all channels.
  • You must have have a DX11 GPU and a OS that can use it. (ie. Windows PC or Mac using Bootcamp to run Windows)
  • Check the Light sources (directional and Point) to make sure Ray Cast Shadows is enabled. Directional light Cascaded Shadow Maps should be set to 0 for this test.
  • Directional and Point light must be set to Movable.

If you’re seeing anything different than above in this specific example, please post your DxDiag along with relevant screen shots to illustrate the difference from my images.

Once we get this squared away and know that Distance Fields are behaving correctly we can take a look at the other issue, which shouldn’t be as much a problem and will probably only require adjusting the DF resolution for the mesh.

Let me know.

Tim

Thank you for your reply and here are my results.

http://pastebin.com/vSM7y8ey

And here is comparison between distance field shadows resolution set to max 100, cascaded shadows maps and inset shadows.

Hi Elias,

This actually looks to be a issue with Radeon GPUs from what I can see. I had one of the guys on our Support staff that has a Radeon 200 series card with the same driver as you give this sample project a test and the Directional wasn’t working for him as well.

I’ve submitted UE-20358 and linked this post, along with the one in the forums and the other on AnswerHub. Once we have an update I’ll post in all the posts.

In the meantime you can try to revert to an older driver to see if this resolves the issue. With AMD that seems like a very arduous task though.


To go back to your other issue. Distance Fields are never going to be a 100% accurate tight bounding mesh. This shadowing method is intended to be use in combination with shadow maps that can provide much more accurate shadows., but is definitely more expensive to use because of that.

You really shouldn’t have to ever go as high as 100% for a mesh distance field resolution. For some meshes it will only improve so much before not doing so anymore regardless of the resolution.

To adjust cascaded shadow maps you can see the basics here in our Lighting Guide on the wiki: A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums

Thank you for you reply and thanks for the helps so far, i hope we can get a hotfix for radeon cards soon, when it comes to the accuracy of the ray traced shadows im very disappointed as when i first learned about ray traced shadows i thought finally perfect contacts shadows but i was fooled by the advertisement i guess, so i assume its not really realtime ray traced shadows or its a limitation of the distance field technique or another combination of the 2, what we need in the future is more hybrid raytracing techniques iv seen webgl and glsl demos run ray traced reflections, refractions and shadows in 60 fps so i know its possible with custom shaders etc, not to mention that shadow mapping in general is an outdated
and very expensive technique when it comes to performance, now we just wait for forward rendering so we can get accurate caustics and refraction.

No guarantee on this being pushed into a HotFix, but I’ll update on the status of the ticket once there has been any progress made.

Thank you and its good to know im not the only one with this problem.