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"

Is it possible to change shadow detail?

I want to get shadows that are a lot less detailed and more soft in nature.

Sort of like this: alt text

Is there any way to achieve this without reducing quality settings? I've tried doing some post processing effects to blur and dilate the edges of the shadows but that had little to no effect. Any files that I should look through in the source code to achieve this if post processing is not an option.

Product Version: UE 4.17
more ▼

asked Oct 14 '17 at 02:48 AM in Rendering

avatar image

12 7 14 16

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

You might need to edit shadow filtering shader and increase filter size for this effect. Also consider looking at PCSS in version 4.17 and above ( r.ShadowFilterMethod 1 console command to enable it).

more ▼

answered Oct 14 '17 at 04:09 PM

avatar image

7.9k 130 31 293

avatar image ujrkingdom Oct 14 '17 at 06:59 PM

Hi Deathrey, so I played around with PCSS and its giving me a close intended effect, the only problem with it right now is that there's too much noise on the shadows, is there anyway to mitigate it. I'm also using full dynamic lighting for my scene. I also tried playing around with Shadow BufferSize with the ShadowProjectionPixelShader.usf by multiplying it by a constant but that just scales and displaces the whole light map making it look extremely wonky.

 Settings.ShadowBufferSize = ShadowBufferSize * filterScale;
avatar image ujrkingdom Oct 14 '17 at 06:59 PM

Is this the wrong value or should I modify some other stuff?

avatar image Deathrey Oct 14 '17 at 10:25 PM

In regards to PCSS, you might want to take a look at defines in ShadowPercentageCloserFiltering.ush

As for modifying conventional PCF shadow filtering, you would need to take a look at ShadowFilteringCommon.ush, ManualPCF function in particular and CubemapHardwarePCF function in ShadowProjectionCommon.ush. Do note however, that it might not be a full list of things you would need to tweak and overall, that it is pretty large undertaking and requires basic understanding of shader coding.

For your purpose, I think that implementing a disc-shaped filter would give better results, than using default box-shaped filter. You can find in-depth information about implementation in this article.

Also, keep in mind, that it is all dependent on the shadow map resolution, and sometimes just using a lower resolution shadow will help you.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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