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"

How to reduce noise on PCSS shadows

Hello, I'm trying to use PCSS shadows for my project but there's too much noise generated with the current implementation. Is there a way to reduce it either in the editor or the source code?

alt text

alt text

alt text

Product Version: UE 4.17
more ▼

asked Oct 15 '17 at 10:30 PM 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 would need to increase number of samples taken for both blocker search and shadow filtering. It can be done in defines of ShadowPercentageCloserFiltering.ush

more ▼

answered Oct 16 '17 at 06:57 AM

avatar image

7.9k 130 31 293

avatar image ujrkingdom Oct 16 '17 at 11:47 AM

Hi Deathrey, I tried increasing the samples up to 15 (as crazy as that is), it tanked my fps to 2 and the noise was still there (although marginally reduced). Is this the only way to reduce it?

avatar image Deathrey Oct 16 '17 at 11:52 AM

What kind of noise exactly are we talking about? Can you post a gif or something like that?

avatar image ujrkingdom Oct 16 '17 at 12:09 PM

Not sure if its artifacting or noise, but its definitely there.



avatar image Deathrey Oct 17 '17 at 09:07 AM

Yeah, PCSS implementation is still experimental in UE4, so I think improvements will be implemented at some point.

I haven't looked in-depth at PCSS in UE4, but I can tell you that in regards to shadow filtering, you always have to choose between either banding artifacts or noise, depending on the sampling pattern.

The biggest problem for you right now, is that noise changes each frame, even when the camera is stationary. If you ask me, I think that it is only acceptable, when camera is in motion.

Usually penumbra sizes are quite small and temporal aa does amazing job at getting rid of the noise, but in your case, perhaps, modifying PCSS code, to use a different sampling pattern is what you need to make the noise less apparent and frame to frame coherent.

Going from sobol random to a much simpler fixed disc is probably worth trying.

avatar image ujrkingdom Oct 17 '17 at 11:11 AM

Alright I'll try doing that, thanks for all the help BTW, there isn't any documentation for this stuff online so I assumed only engine developers to know about it. I assume you aren't getting any noise in your projects when using PCSS? If that's the case are you using dynamic lighting at all or could this be simply related to certain project settings that I have enabled/disabled?

avatar image Deathrey Oct 17 '17 at 03:00 PM

There is no documentation about specific implementation in UE4, and it is unlikely that there should be one, but PCSS itself is well documented and there are quite a few papers, including specific implementation examples with shader code existing on the web.

The noise is definitely not project specific, but under certain conditions, it is more noticeable than desired.

Don't be afraid to experiment a bit. For example, you can remove frame index for SobolRandom, replacing it with constant integer. Settings PCSS_SHARE_PER_PIXEL_QUAD to 0 should also help.

(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