Home Unreal Engine

Shadow on Foliage Paint are Way too Dark

polycounter lvl 3
Offline / Send Message
WanaBRtiBtMTuLzPsHlp polycounter lvl 3
Hello, I look around for a half day now try to find out where I can adjust the Shadow on "Foliage Paint"

"Foliage Paint" In "Instance Settings" I set Mobility to "Static" and result Shadow are way too Dark



and When I set Mobility to "Movable" the result are no Shadow on Foliage


I look for the result that give a nice shadow on Foliage but not too Dark like that

Thanks for reading!

Replies

  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Try this and replace the vector3(0,0,1) with your normal map:

  • WanaBRtiBtMTuLzPsHlp
    Options
    Offline / Send Message
    WanaBRtiBtMTuLzPsHlp polycounter lvl 3
    Obscura said:
    Try this and replace the vector3(0,0,1) with your normal map:

    With Mobility to "Static" it still the same way too Dark
     So this problem might relate to Normal Map? Thank You for the reply I will try messing around with normal map.
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Do you have the shading mode set to two sided foliage? This is an issue with how vertex normals works. If you take a plane and put a light on one of its side, the back side will be black. This effect can be reduced by making the vertex normal of the foliage mesh pointing parallel to the tip of the mesh, but this isn't suitable in some cases. It works better with lower poly grass cards.

    Check out this:
    http://wiki.polycount.com/wiki/Foliage

    And this:
    https://polycount.com/discussion/209623/smooth-foliage-like-in-breath-of-the-wild-europa-by-helder-pinto-mini-tutorial#first
  • WanaBRtiBtMTuLzPsHlp
    Options
    Offline / Send Message
    WanaBRtiBtMTuLzPsHlp polycounter lvl 3
    Yes I set two sided foliage
    But right now seem like I find a solution for this
    Image Below Instance Settings I Enables "Affect Dynamic Distance Field Lighting" & "Affect Dynamic Indirect Lighting" and Increase "Light Map Resolution" from "4" to "2064" and now after Build Light Shadow on Foliage look much more accurate now I guess?
    P.S. I did not change anything in Material Node still the same.



  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Cool, but pumping up the per instance lightmap res from 4 to 2k isn't a real solution. That is an enormous change in lightmap memory. That is simply insane. You should really try to find some other solution. Do you have wind movement on the plants? Because in that case you should simply use dynamic lighting.
  • WanaBRtiBtMTuLzPsHlp
    Options
    Offline / Send Message
    WanaBRtiBtMTuLzPsHlp polycounter lvl 3
    Yes I have SimpleGrassWind Node

    Okay now I Disable "Light Map Resolution" and the result are look OK.
    Right now UE4 are using light map from my Grass Mesh instead right? So this should not cause a problems about "Light map Memory" later right? 
     
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Simplex noise is also very expensive in your material, try changing  that noise node to use "fast gradient" instead of simplex.
    About the lightmap:
    Set the directional light to be stationary, and set the foliage to be movable. Then All static elements of the scene will use baked lighting (lightmaps) and movable things will use dynamic lighting (no lightmaps) with dynamic shadowing.
  • WanaBRtiBtMTuLzPsHlp
    Options
    Offline / Send Message
    WanaBRtiBtMTuLzPsHlp polycounter lvl 3
    Directional Light already on Stationary and about "Movable" just like on the top topic Foliage are barely have any shadow on it, not look accurate to me or Maybe this already accurate for Movable Foliage?


  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    No, you should see some shadows. Stationary light uses cascades shadows for movable stuff. Try to adjust the amount of cascades or the cascaded shadow distance until you get the desired result. 
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Its weird that you dont receive shadows by default. Do you have off scale maybe?
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    With 4 cascades and distance of 10k I get pretty visible shadows on foliage:

  • WanaBRtiBtMTuLzPsHlp
    Options
    Offline / Send Message
    WanaBRtiBtMTuLzPsHlp polycounter lvl 3
    My cascades distance are already on 20k and I increase Num Dynamic from "3" to "4" now

    I try to adjust the "direct light" angle and shadow it work fine with this angle



    But this is the mood I try to achieve. Seem like there is no shadow on my Grass because a "Direct Light" not Hit Directly on my Grass So for this scenario I should focus on Skylight than?  
    in Skylight both "Cast Static Shadow" "Cast Dynamic Shadow" already enable by default So I don't know where to adjust shadow now.


    I build another "Direct Light" adjust the angle until Shadow appear it look OK But not look like a good solution here.


  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Ok. To get fine detail in indirect lighting (thats what happens in your case, the foliage is not directly lit), try to adjust the screen space ambient occlusion settings. Play with its intensity, power, and radius settings. You can also try lowering the skylight intensity to make the indirectly lit areas somewhat darker. Occlusion will also appear more then. 
  • WanaBRtiBtMTuLzPsHlp
    Options
    Offline / Send Message
    WanaBRtiBtMTuLzPsHlp polycounter lvl 3
    Ohhh So we can adjust this kind of details in PostProcessVolume
    Thank You for your effort here Obscura. I think I getting closer to result like "Static Light Map" now. Again Thank You so much!♥


  • OtrickP
    Options
    Offline / Send Message
    OtrickP polycounter lvl 9
    Obscura said:
    Try this and replace the vector3(0,0,1) with your normal map:

    Necro'ing this post because it was so usfull, Obscura you're the bomb. Was racking my brain on some large foliage shading artifacts this worked perfectly. 
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    The real reason for why is this happening, is that the sss doesn't work with static lighting, so although the suggested solution can work in some cases, an alternative, and somewhat better solution is to not use static light.
  • wirrexx
    Options
    Offline / Send Message
    wirrexx ngon master
    oh really So if i am working with a scene that is static and i have grass in that scene, i simply have to use dynamic light? I am having the same issues with my foliage.
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    If you want SSS, yes you do need to set the lighting to dynamic because SSS is a view dependant effect.
Sign In or Register to comment.