Home Unreal Engine

Having a severe case of shadow acne - dynamic lights only

Dante_mL
polycounter lvl 6
Offline / Send Message
Dante_mL polycounter lvl 6
Hello.
I'm trying to create a day / night cycle using a Dominant directional movable light. While animating my light i found that the scene is having this severe case of shadow acne. Been researching couple days of how to fix this, or at least make it less visible.

All I found was it is either impossible to get rid of it
It happens on extreme angles (isn't ideal for day cycle)
Tweaking .ini shadow depth bias can improve a bit (didn't work :/)
Adjusting the Cascaded shadow map settings (didn't work, I'd even say it made it worse (Cascade example 2))

Acne problem example
Cascade settings - 1
Range - 10000
Shadow cascades - 10
Exponents - 2
Cascade settings - 2
Range - 10000
Shadow cascades - 3
Exponents - 3

The scene has 4 movable point lights, 1 skylight and a DDLM set on normal shadow mode. I've tried the day cycle map made by Ivan Tantsiura from epic forums. The video of the cycle didn't have any shadow problems, at least non that I saw. The map still had the issues for me tho.

Help on this matter would be appreciated.
Cheers, Dante.
PS. I am running the Nov 2012 version of UDK

Replies

  • lpcstr
    Options
    Offline / Send Message
    Is this the DX9 renderer or the DX11 renderer?


    For me, the shadows in the DX11 renderer is so bad it is unusable. I've tried tweaking the setting, to no avail. Shadow mapping is not something UDK does well.
  • Dante_mL
    Options
    Offline / Send Message
    Dante_mL polycounter lvl 6
    DX9, neither renderer changes anything.
  • Ace-Angel
    Options
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    What are your PC specs? Shadows will usually be the first thing to go if your PC isn't powerful enough to render them out correctly.

    Also, does the shadow problem still persist, after you test out the level in PC-Game mode?
  • Dante_mL
    Options
    Offline / Send Message
    Dante_mL polycounter lvl 6
    Aye it does. Always am testing in game mode.

    My pc specs are
    i7-940
    gtx 560 ti
    12GB of RAM
    And a lot of HDD space.

    Should be powerful enough to handle this.
  • ambershee
    Options
    Offline / Send Message
    ambershee polycounter lvl 17
    UDK's Cascaded Shadow Mapping is just awful to work with. I usually prefer to take the hit and use their older system when possible.
  • XilenceX
    Options
    Offline / Send Message
    XilenceX polycounter lvl 10
    ambershee wrote: »
    UDK's Cascaded Shadow Mapping is just awful to work with. I usually prefer to take the hit and use their older system when possible.
    Which system are you refering to Amber?
    Anyway what I do to circumvent this problem is to turn off the Use Precomputed Shadows option on all my objects. However the downside of that is that I can't control the quality of the shadows anymore. Changing the cascaded shadow settings doesn't change anything on that type of shadows and I only use it because it has almost no shadow acne. If there is any way to control the quality of this "other" type of shadows I'd say they are definitely the way to go.
  • ambershee
    Options
    Offline / Send Message
    ambershee polycounter lvl 17
    Precomputed shadows means shadows that are calculated outside of run time; i.e for static light sources.

    I'm referring to non-cascaded shadow mapped shadows - i.e not using dominant light sources and disabling cascaded shadow mapping.
  • Dante_mL
    Options
    Offline / Send Message
    Dante_mL polycounter lvl 6
    Sadly turning off Precomputed shadows isn't affecting anything.
    I read that UE3 supports shadow volumes, but was taken out in, i believe April build 2010.
    If it would be possible to use that, i would use it instead of shadow mapping. Is it still possible to get shadow volumes? If so how?
  • ambershee
    Options
    Offline / Send Message
    ambershee polycounter lvl 17
    Changing AllowShadowVolumes from false to true in UDKEngine.ini may well do it - you may also need to change some other flags.
  • Dante_mL
    Options
    Offline / Send Message
    Dante_mL polycounter lvl 6
    Fair enough, i'll give it a try.
  • Dante_mL
    Options
    Offline / Send Message
    Dante_mL polycounter lvl 6
    Either i do not find a flag that needs to be changed or it simply doesn't add the volume.
    Changing AllowShadowVolumes to true doesn't seem to change anything.
  • XilenceX
    Options
    Offline / Send Message
    XilenceX polycounter lvl 10
    Well the use of the Precomputed Shadows option is quite significant for me.
    This is with the default setting:
    http://imageshack.us/photo/my-images/707/precomputed.jpg/
    And this is with Precomputed Shadows deactivated:
    http://imageshack.us/photo/my-images/69/nonprecomputed.jpg/
    Please note that I also have Precomputed shadows fored off in the world properties so maybe this is why this works.

    So changing this setting makes the shadow acne quite subtle unless you have a gray material like the rock I posted to demostrate the change. However as I wrote before the quality of these "new" shadows can't be controlled with the cascade numbers in the DDL anymore so that's a bummer.
    So Amber are you using prebuilt lighting then or is that another form of dynamic lighting? If I turn off the CSM and use regular directional lights I only get shadows from objects that have Use Precomputed Shadows turned off. However these seem to be even more aliased than the CSM ones so that isn't helping.
    nonprecomputed.jpg
  • Dante_mL
    Options
    Offline / Send Message
    Dante_mL polycounter lvl 6
    Turning off Precomputed shadows is a good method to hide a majority of artifacts. It does the job. But then it just leaves me the weirdly triangulated shadow problem, You can see it in the second cascade setting example.
  • XilenceX
    Options
    Offline / Send Message
    XilenceX polycounter lvl 10
    Dante_mL wrote: »
    Turning off Precomputed shadows is a good method to hide a majority of artifacts. It does the job. But then it just leaves me the weirdly triangulated shadow problem, You can see it in the second cascade setting example.
    While I am not 100% certain what you mean by triangulated, your 2nd example just seems to require higher resolution shadows. Which is what I meant by not being able to change/improve the quality of this type of shadows. I mean theoretically you could increase the wholescenedominantshadow resolution or what it's called in the .ini files... but for me that does nothing in this situation. :shifty:
  • Dante_mL
    Options
    Offline / Send Message
    Dante_mL polycounter lvl 6
    So no one actually knows how to increase the resolution? Or is it too complicated?
Sign In or Register to comment.