x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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

alt text alt text alt text

Product Version: UE 4.8
Tags:
more ▼

asked Aug 22 '15 at 02:29 PM in Rendering

avatar image

Elias79
21 3 8 8

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

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.

alt text

Test Project

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

df_lights.png (462.1 kB)
df_test.zip (2.6 MB)
more ▼

answered Aug 24 '15 at 05:55 PM

avatar image

Tim Hobson ♦♦ STAFF
49k 886 99 875

avatar image Elias79 Aug 24 '15 at 07:39 PM

Thank you for your reply and here are my results.

alt text

alt text

http://pastebin.com/vSM7y8ey

avatar image Elias79 Aug 24 '15 at 08:50 PM

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

alt text

alt text

alt text

avatar image Tim Hobson ♦♦ STAFF Aug 25 '15 at 03:49 PM

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: https://wiki.unrealengine.com/LightingTroubleshootingGuide#Dynamic_.28Movable.29_Lighting

avatar image Elias79 Aug 25 '15 at 07:56 PM

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.

avatar image Tim Hobson ♦♦ STAFF Aug 26 '15 at 04:12 PM

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.

avatar image Elias79 Aug 26 '15 at 08:32 PM

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

(comments are locked)
10|2000 characters needed characters left

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.

more ▼

answered Aug 22 '15 at 02:47 PM

avatar image

Devero
2.3k 114 61 232

avatar image Elias79 Aug 23 '15 at 11:40 AM

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

avatar image Devero Aug 23 '15 at 12:50 PM

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!

avatar image Elias79 Aug 24 '15 at 08:16 AM

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

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question