Home Unreal Engine

UE4-Dynamic indirect shadows?

polycounter lvl 10
Offline / Send Message
melviso polycounter lvl 10


Currently experimenting with dynamic lighting in ue4 using LPV. Any way to add indirect shadows or fake this using dynamic light? I think LPV has improved-no light leaks.

Replies

  • Maximum-Dev
    First remove your skylight, then you'll see better how LPV is bleeding through the walls/roof, this way it'll be easier for you to tweak the settings. But either way all that gives you is some bounce light that'd be acceptable-ish for outdoor only.
  • melviso
    Offline / Send Message
    melviso polycounter lvl 10
    Removed the skylight and there are still no leaks. My main problem is there is bounced lighting but indirect shadows are literally non existent and this is needed for photorealism in indoor spaces. Cryengine doesn't have good indirect shadows either but it's GI is good for indoor scenes.
  • leleuxart
    Offline / Send Message
    leleuxart polycounter lvl 10
    If performance is not an issue, the editor has an indirect dynamic shadow solution through the distance field representation. You have to have distance fields generated and the meshes casting the indirect shadow have to be Moveable. Distance Field AO/shadowing from the skylight can be kind of hard to work with for interiors though. 

    There's also custom builds like NVidia's voxel GI solution that does indirect and direct lighting, shadows, and specular. Not the most performant either.
  • melviso
    Offline / Send Message
    melviso polycounter lvl 10
    @leleuxart
    Thanks for the info. I tried the distance field and I got really weird splotches of black on the walls with barely noticeable indirect dark shadows. I think I will have to get my hands on Nvidia's voxel GI and test it out. Hopefully, my pc holds up and doesn't get burnt lol  :)
    EDIT: Gave ue4 another spin with fully dynamic lighting. Getting there :)




  • melviso
    Offline / Send Message
    melviso polycounter lvl 10
    Better refinement with ue4 lpv. I noticed the shadows on the floor created by the door openings shift or get distorted when I move the camera.
    LPV isn't there yet. Wish we could have realtime gi and shadows. Maybe in the next 3 years.
  • Maximum-Dev
    melviso said:LPV isn't there yet. Wish we could have realtime gi and shadows. Maybe in the next 3 years.
    Some other engines already do. UE4, not likely even in 3 years.

    For large scale AO you're after you need something like VXAO/VXGI which as Brian mentioned isn't very good solution in terms of performance. Your other option is to try out HBAO+ with some tweaking you can get acceptable large scale AO and performance is fine. HBAO+ is included in the same VXGI build. If you're not interested in any of that, you just gotta settle on using SSAO + DFAO. Increase your SSAO amount to something above 0.8 and tweak the radius. If you drop the skylight and instead use a cubemap in PPV, IBL will remove those dark splotches such as under the sphere. You can also increase the distance field scale on every mesh to get better DFAO results at the cost of much more memory usage.
  • melviso
    Offline / Send Message
    melviso polycounter lvl 10
    @Maximum-Dev
    Thanks for the info.

    Definitely looks better, using a cubemap in PPV gives the same results as setting the skylight to stationery. I would admit movable skylight gives better indirect shadows. Just the splotches are the let down. 
    I have tested Amazon Lumberyard, the GI is good but the indirect shadows aren't that good tbh (non existent actually). You say there are engine that already do? Any chance you can mention some of them and your experience? 

  • Maximum-Dev
    Movable skylight produces DFAO, Stationary doesn't. So by using a cubemap in PPV you can get rid of the DFAO artifacts when your skylight is Movable.

    Take a look at "Lighting and rendering" part of this article for AO stuff. https://80.lv/articles/rendering-scanned-vegetation-in-real-time/
  • melviso
    Offline / Send Message
    melviso polycounter lvl 10
    @Maximum-Dev

    Thanks. Very informative read.



    Is using hdri map also okay? Or only cubemaps work. Anyway to solve the black spots on the pillars?
  • Maximum-Dev
    The top of pillars seem to be result of low distance field resolution. Try increasing it for the pillar and see if that solves it. And yes HDRi Maps are ok. You can even save any picture/texture as 32Bit HDRI and use that. The whole point is to get some IBL which solves the DFAO artifacts as well. You can see the difference already.



  • melviso
    Offline / Send Message
    melviso polycounter lvl 10
    Yep, thanks. The dark splotches are gone.

    I increased the distance field resolution to 12. Still there. I think it might be from lpv. 


  • JordanN
    Offline / Send Message
    JordanN interpolator
     Some other engines already do. UE4, not likely even in 3 years.

    Lionhead Studios were working hard on revamping UE4's LPV.  I had a lot of hopes going for it, but once Microsoft killed Fable Legends and shut down the studio, that killed any excitement I had left for real time GI.  

    I recall an Epic employee once said on the Unreal forums they integrated the last of Lionhead's tech into the actual engine, but when I played with it, it was still pretty broken. Damn shame.  :/
  • melviso
    Offline / Send Message
    melviso polycounter lvl 10
    I can't seem to get the ceiling to shade properly, there should be darker shades on the ceiling away from the light.

    It definitely looks better now. Just the ceiling.
  • Obscura
    Offline / Send Message
    Obscura grand marshal polycounter
  • melviso
    Offline / Send Message
    melviso polycounter lvl 10
    I tried it but it gives the scene a sort of blotchy dirty look. I am trying to go for clean looking renders. Another issue is since the ao is using screen space. This might not be the best for animations as the ao seems to jump in and out of view.


  • Obscura
    Offline / Send Message
    Obscura grand marshal polycounter
    I understand the problem that occurs when the occluder is outside of the screen. To fix the blotchyness, you could try tweaking the ssao advanced settings.
  • Obscura
    Offline / Send Message
    Obscura grand marshal polycounter
    I think you should just get the VXGI from gameworks if you can.
  • melviso
    Offline / Send Message
    melviso polycounter lvl 10
    Obscura said:
    I think you should just get the VXGI from gameworks if you can.
    I think I would have to do that. Thanks
  • Maximum-Dev
    The ceiling looking bright is probably just because of how your cubemap looks like. Whatever color and brightness the bottom part of the cubemap is, that affects the bottom part of the meshes. Because it's a spherical sort of projection.

    Edit: Btw in 4.16 and beyond make sure to enter r.LPV.Mixing 0 in the console command if you have LPV enabled.
  • melviso
    Offline / Send Message
    melviso polycounter lvl 10
    The ceiling looking bright is probably just because of how your cubemap looks like. Whatever color and brightness the bottom part of the cubemap is, that affects the bottom part of the meshes. Because it's a spherical sort of projection.

    Edit: Btw in 4.16 and beyond make sure to enter r.LPV.Mixing 0 in the console command if you have LPV enabled.
    Thanks Maximum-Dev, Does portal work with lpv? To help direct light rays through windows? 
    Does LPV.Mixing have something to do with reflections and lpv size?
  • Maximum-Dev
    melviso said:
    The ceiling looking bright is probably just because of how your cubemap looks like. Whatever color and brightness the bottom part of the cubemap is, that affects the bottom part of the meshes. Because it's a spherical sort of projection.

    Edit: Btw in 4.16 and beyond make sure to enter r.LPV.Mixing 0 in the console command if you have LPV enabled.
    Thanks Maximum-Dev, Does portal work with lpv? To help direct light rays through windows? 
    Does LPV.Mixing have something to do with reflections and lpv size?
    Portals? if that's anything related to lightmass then no.
    Yes. As of 4.16 LPV.Mixing is 1 by default and that reduces reflectivity beyond LPV size, which is wrong. Changing it back to 0 will give you correct results.
  • melviso
    Offline / Send Message
    melviso polycounter lvl 10

    Portals? if that's anything related to lightmass then no.
    Yes. As of 4.16 LPV.Mixing is 1 by default and that reduces reflectivity beyond LPV size, which is wrong. Changing it back to 0 will give you correct results.
    Tried out lightmass. Of course, lighting is more accurate, I have tried Amazon Lumberyard but the AO looks pixelated and very rough. I am guessing you have tried VXGI? What was your opinion of it?

  • Maximum-Dev
    VXGI can be tweaked to give you really awesome results, compared to lightmass I'd say it's ~90% there, but will run like a slideshow. But since you can see the changes in real time that's really a good plus specially for those who haven't mastered lightmass yet.
  • melviso
    Offline / Send Message
    melviso polycounter lvl 10
    VXGI can be tweaked to give you really awesome results, compared to lightmass I'd say it's ~90% there, but will run like a slideshow. But since you can see the changes in real time that's really a good plus specially for those who haven't mastered lightmass yet.

    Yep, I have seen vids on youtube, the fps drops really badly.

    Got the ceiling to look better.lpv isn't there yet. With high quality materials, it might even read better. I will give it a go for a very small scene. I will give vxgi a go too, but from what I have seen indirect shadows in VXGI are still not there. Thanks all.

  • melviso
    Offline / Send Message
    melviso polycounter lvl 10
    VXGI Install question: I am seeing the 4.17 branch, can't find a 4.16 version. Can one download and build the 4.17 with a 4.16 ue4 version?
    From the thread here;
    https://forums.unrealengine.com/community/general-discussion/90111-nvidia-vxgi-integration/page7
    4.14 seems to be the stable version of VXGI. So can this be used with a newer ue4 version? Also is visual studio 2017 okay for compiling or an older version is more suited like visual studio 2013?
  • Ali_Youssef
    Offline / Send Message
    Ali_Youssef polycounter lvl 6
    The VXGI branch is completely separate and doesn't even require the launcher (since it's built from source code), so it doesn't matter which version of ue4 you have

    I've done some tests in VXGI and I personally really like it, and as for the performance, I found changing the following console commands help tremendously (though it's still pretty much high-end):
    • r.VXGI.StackLevels 2 - default is 5
    • r.VXGI.Range 2000 - default is 400
    • r.VXGI.MapSize 64 - default is 128
    And in post process:
    • Number of cones: 4
    • Tracing sparsity 4
    • Tracing step 0.5
    • Cone grouping around normal 0.5

    These are the settings I set immediately after creating a scene, then change them later to match the scene.
    I find this thread very useful, it mentions the most expensive settings and explains what they do so you can balance quality/performance as you see fit (last FAQ question).

    Hope this helps !
  • melviso
    Offline / Send Message
    melviso polycounter lvl 10
    @Ali_Youssef

    Thanks a lot mate for the info. So any Visual studio version will do including 2017? I remember sometime ago that newer visual studio versions may not be compatible or might pose problems
  • Ali_Youssef
    Offline / Send Message
    Ali_Youssef polycounter lvl 6
    I used 2015 and it worked fine, not sure about 2017 but if I had to guess it'll probably do just as well.
    If it doesn't, you can download Visual Studio Community, it's free
    It's here if I'm not mistaken
  • melviso
    Offline / Send Message
    melviso polycounter lvl 10
    Many thanks, mate
  • Maximum-Dev
    Did you try checking "Ambient Occlusion" in World Settings > Lightmass Settings?
  • melviso
    Offline / Send Message
    melviso polycounter lvl 10
    @Maximum-Dev
    Sorry. The last image was me still trying to get lpv to look better without ssao. It wasn't done with lightmass. I am trying to build ue4 vxgi but it seems Visual Studio community 2017 has issues. So I am gonna have to get Visual Studio community 2015. 

  • melviso
    Offline / Send Message
    melviso polycounter lvl 10
    Guys, I am trying to build ue4.sln with visual studio community 2015.
    I am getting this:
    The build tools for v141 cannot be found. Install v141 to build using the v141 build tools. I can't right click ue4 and click build. It says ue4 is incompartible.
    I downloaded vxgi 4.17.
    Any ideas on what I should do? 
  • Ali_Youssef
    Offline / Send Message
    Ali_Youssef polycounter lvl 6
    According to this, v141 is from vs 2017.
    And this apparently solves the issue for 2015, since 2017 didn't work for you.
    This basically happened because 2015 was installed after 2017, but the project was built with 2017.
    You can also try to redownload the whole thing, which takes longer but is more straightforward.
  • melviso
    Offline / Send Message
    melviso polycounter lvl 10
    According to this, v141 is from vs 2017.
    And this apparently solves the issue for 2015, since 2017 didn't work for you.
    This basically happened because 2015 was installed after 2017, but the project was built with 2017.
    You can also try to redownload the whole thing, which takes longer but is more straightforward.

    Thanks a lot, mate. It worked. I redownloaded the whole thing. 
  • melviso
    Offline / Send Message
    melviso polycounter lvl 10
    VXGI Lighting:
    Looking good. Indirect shadows created from DF indirect shadows. VXGI can catch bigger object indirect shadows not smaller ones. The indirect lighting on the sphere seems incorrect though compared to lpv. Any way to remove the very dark shading on sphere bottom?
  • Maximum-Dev
    VXGI settings by default wouldn't produce anything comparable with lightmass. Read their included PDF file in the installation folder there are some settings you can change/tweak.
    You can also enable VXAO that produces really nice large scale AO at the cost of dropping light bounces.
  • melviso
    Offline / Send Message
    melviso polycounter lvl 10
    Ok. Thanks. I am trying to use capsule shadows in the shadow areas and it isn't showing up. I have done everything required to set it up including setting up  the skeletons. Does anyone know how I can fix it?

    EDIT: It was a scale problem. Make sure your 3d app scale matches that of unreal units or else capsule shadows won't work. 

  • melviso
    Offline / Send Message
    melviso polycounter lvl 10
    Guys,I have a new scene I set up in ue4 with movable directional light and movable skylight. I have set them to vxgi indirect lighting. I also added a postprocess volume and whenever I enable diffuse tracing. Nothing happens. There is no vxgi lighting. Is there something I am doing wrong. Whereas the sample files like the cornell box or sci-fi Hallway works fine or is it my graphics card?
    EDIT: I noticed the cornell box vxgi stops working if I open the cornell  project from the editor with this file.
    I have the materials set to vxgi as well. Any help?

Sign In or Register to comment.