Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

[Next-Gen Soft-Shadows 2] Sophisticated dynamic penumbra Shadows for Unity

Discussion in 'Assets and Asset Store' started by tatoforever, Nov 8, 2016.

?

Would you like to buy this on the Asset Store? If so, how much?

Poll closed Jul 10, 2017.
  1. I like it to be priced between 20 to 10$.

    56.8%
  2. I like it to be priced between 10 to 5$.

    39.0%
  3. Zero $, I'm not interested, I love my Unity's default aliased, pixelated horrid-shadows.

    4.2%
  1. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,893
    If you don't see NGSS shadows while having Cascaded Shadows disabled, it means you didn't installed the Libraries.
    When you install the libraries, you get a confirmation message on the Installer window and the Editor console.
     
  2. PROE_

    PROE_

    Joined:
    Feb 20, 2016
    Posts:
    16
    Hi, I'm making The Sims like building system in my game and I need to update shadows only when something is moved, does your solution support semi-dynamic shadows? Ah and if it does, can moving characters get dynamic shadows at the same time? I've read post from a long ago with you saying that it can be added with 2.0 release but I'm not sure if this feature is available or not :)
     
  3. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,893
    @PROE_,
    Yes, that feature I'm working on is called "cached shadows" and it consist of two depthmaps, one for static object (that is baked at user will) and one dynamic. Both depthmaps affect static and dynamic objects.
    Cached shadows will be available either in v2.3 or v2.4. So is planned yes. :)
     
    Last edited: Sep 19, 2019
    PROE_ and hopeful like this.
  4. N00MKRAD

    N00MKRAD

    Joined:
    Dec 31, 2013
    Posts:
    204
    Woah this sounds really interesting! Looking forward to that.
     
    tatoforever likes this.
  5. PROE_

    PROE_

    Joined:
    Feb 20, 2016
    Posts:
    16
    Great, I hope it will get released pretty soon :D
     
    tatoforever likes this.
  6. wwg

    wwg

    Joined:
    Apr 2, 2014
    Posts:
    121
    @tatoforever - I've removed the previous version of NGSS and installed the latest. I add the NGSS_Directional script to my sun light and added the NGSS_FrustrumShadows script to the main camera (and drug the sun light into the Main Shadow Light property. It looks pretty nice, but I've noticed that the NGSS_Directional script doesn't seem to have an impact. I can change parameters, or even disable it and nothing changes. What am I missing?

    Also, is NGSS intended to totally replace Unity default shadows? I've disabled the Unity shadows and the contact shadows and distant tree shadows look good, but there is no tree shadows when the camera gets close to the tree. If I enable the Unity shadows then the close-up tree shadows work.

    Thanks!
     
    Last edited: Sep 28, 2019
  7. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,893
    Can you show me an image of your Graphics Settings? Maybe you are using a custom deferred renderer with other Asset Store packages, this can override the NGSS shadows if they use their own Unity version but there's a simple way to fix it.
     
    Last edited: Sep 28, 2019
  8. wwg

    wwg

    Joined:
    Apr 2, 2014
    Posts:
    121
    Graphics Settings:
    graphics_settings1.png

    I am also using Overcloud, which has some screen space shadow effects.
     
  9. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,893
    In your built-in list of shaders. Can you send me the first file (Hidden/Internal-DeferredShading) through email support. I'm going to take a look at, pretty sure this guy is overriding NGSS shadows.
     
  10. id0

    id0

    Joined:
    Nov 23, 2012
    Posts:
    320
    Is it version for HDRP will arrive anytime soon? HDRP contact shadows is ugly &#it.
     
  11. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,893
    Hi,
    Is planned for the end of the year yes.
     
    id0 likes this.
  12. clagrens

    clagrens

    Joined:
    May 19, 2017
    Posts:
    75
    Hi, I want to ask about the Frustum Shadows is no supporting point light?
    If I add a point light in Frustum Shadows cover area, point light has no effect. And some strange edge.
    QQ截图20191004191612.png QQ截图20191004191634.png QQ截图20191004192531.png QQ截图20191004192549.png
     
  13. clagrens

    clagrens

    Joined:
    May 19, 2017
    Posts:
    75
    unity 2019.2.2 dx11
     
  14. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,893
    @clagrens,
    Frustum Shadows currently works with only one light and the distance it cast shadows is not limited to the light range. So if you have multiple local lights (one of them set as the frustum shadows light) it will case infinitely shadows (instead of light range) over the rest of lights causing weird shadows artifacts.
    This behaviour will be corrected for the next update.
     
    hopeful likes this.
  15. Pheck

    Pheck

    Joined:
    Jul 9, 2009
    Posts:
    179
    @tatoforever

    Just to be clear on the frustrum shadow issue... I am also seeing it.

    Will your update specifically fix this:
    The frustrum shadows are not currently brightened by other lights rendering on the same pixels.
    In this photo the dark (black) parts of the rock are frustrum shadows from the moon/sun position. The point light in the players hand lights up the area, but not the frustrum shadow pixels.
    upload_2019-10-4_11-41-27.png

    If this bug will be fixed, when do you think the update will release?
    (thanks)
     
  16. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,893
    Hi,
    You can fix this by editing the NGSS library UnityDeferredLibrary.cginc and move the line 248 (frustum shadows sampling) to the line 224. Paste it just after atten *= UnityDeferredComputeShadow (wpos, fadeDist, uv);
    And re-install the Directional library of course. :)
    PS: It's already fixed for the next version.
     
    Last edited: Oct 4, 2019
    clagrens and hopeful like this.
  17. unity_c1ndWE1Nn46iPg

    unity_c1ndWE1Nn46iPg

    Joined:
    Jan 13, 2019
    Posts:
    165
    Hello,
    I don't use Unity Hub and my Unity version is 2018.4.11f (Long Term Support). After I install NGSS libraries setup and attach NGSS_Local to directional light in the scene and restarted editor and then open everything terrain, and object become black except for the sky. Did I do something wrong?
     
  18. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,893
    Yes,
    You don't attach NGSS_Local to your directional light, NGSS_Local are for Point & Spot shadows. NGSS_Directional must be attached to directional light. :)
     
    unity_c1ndWE1Nn46iPg likes this.
  19. unity_c1ndWE1Nn46iPg

    unity_c1ndWE1Nn46iPg

    Joined:
    Jan 13, 2019
    Posts:
    165
    Okay, it worked!
    Once I 've done the install process, do i need to do it everytime for other scene in same project (if there's no update)?
     
    tatoforever likes this.
  20. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,893
    You add the NGSS component to lights only once and re-install the NGSS libraries only if you install a new version of Unity or a new version of NGSS.
    Cheers,
     
    unity_c1ndWE1Nn46iPg likes this.
  21. unity_c1ndWE1Nn46iPg

    unity_c1ndWE1Nn46iPg

    Joined:
    Jan 13, 2019
    Posts:
    165
    So NGSS_FrustumShadows does not work with Forward rendering? I want to use that infinite screen space shadow
     
  22. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,893
    In the next update yes, right now only Deferred.
     
    hopeful likes this.
  23. growling_egg

    growling_egg

    Joined:
    Sep 2, 2012
    Posts:
    60
    Hello! Is there a way to launch Unity as admin via Hub? Have tried launching Hub as admin, and launching Unity directly, but it takes me back to Hub to pick my project. Both ways lead to "Access is Denied." Thanks!
     
  24. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,893
    Yes, but not through UnityHub as the privileges are only retained for the Hub. You have to locate where you installed the editor and right click "Run as Administrator" then proceed to install.
     
  25. WeirdWizard

    WeirdWizard

    Joined:
    Sep 26, 2013
    Posts:
    3
    I'm wondering if this asset is what I'm looking for. What I need is a replacement for Unity shadows that can render reasonable looking shadows out to extreme distances (they don't need to work for everything just the terrain which is a quadtree of custom mesh object) without all the striping you get with the built-in shadows. I've tried the render pipelines and the LWRP is fast but has the same shadow problems as the built in renderer, the HDRP shadows work great out to the sort of distances I need them too (50k+ meters at least) but the performance in VR is terrible.
    I'm loathed to roll back to the built in renderer because I've made extensive use of shader graph already and the project is for VR so any solution must work in VR. I see the LWRP isn't supported yet, any idea when? Do the screen space shadows (which can be projected to any distance?) work in VR (and the LWRP when supported)? How does this asset handle shadows at distance, does it use cascades like the built-in system or is it an entirely different technique?
    Cheers, Dave.
     
  26. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,893
    Yes,
    Frustum Shadows allows you to render infinite view distance shadows with little to almost no cost. You can set the distance at which they start to display up to infinite. For example the typical use is a combination of DirectionalShadowmap without any cascade at close range (about 70-80metters) and from there FrustumShadows up to whatever view distance you have in your camera.
    Give it a go and if aren't satisfied please ask for a refund.
    LWRP (or URP) is being added and still planned for late this year (hopefully). :)
     
    Last edited: Oct 24, 2019
  27. growling_egg

    growling_egg

    Joined:
    Sep 2, 2012
    Posts:
    60
    I'm not sure what I'm doing wrong... I'm going to the editor .exe install location, right click, Run as Administrator, then it takes me to Hub. I can't seem to find a way to launch that doesn't take me there. When I choose my project and open, like you said, the permissions haven't carried through. Is there some way to launch Unity without Hub?
     
  28. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,893
    Can you try even without admin rights? Like try to install it and leave it there four a couple of seconds and see if it works?
    Otherwise, you can install the files manually, it's explained in the documentantion. But to make it short, you need to find where you installed Unity (or where UnityHub installed your editor) then go to Editor\Data\CGIncludes and copy paste the NGSS libraries there (Make a backup of yours if you want to revert back to Unity shadows).
    Then go to your project Library folder and delete the ShaderCache folder and restart Unity.
    Let me know if it works.
     
  29. FranciZi

    FranciZi

    Joined:
    Nov 27, 2018
    Posts:
    1
    Can't get the asset to work in 2019.2.8f1+ . Any advice appreciated.
     
  30. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,893
    Hi,
    Can you be more precise please? What installation steps you did, what's your computer and target platform, etc.
     
    Last edited: Oct 25, 2019
  31. asdzxcv777

    asdzxcv777

    Joined:
    Jul 17, 2017
    Posts:
    28
  32. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,893
  33. unity_c1ndWE1Nn46iPg

    unity_c1ndWE1Nn46iPg

    Joined:
    Jan 13, 2019
    Posts:
    165
    Will it come soon?
     
  34. growling_egg

    growling_egg

    Joined:
    Sep 2, 2012
    Posts:
    60
    Thanks, I was able to get it installed via the manual procedure. After I deleted the ShaderCache folder and restarted Unity, the lights in my game are all non-functional. I see the skybox and the sillhouettes of my game objects, but everything is black. I'll let you know if I figure out what happened.
     
  35. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,893
    Don't forget to add NGSS component to your lights so they feed the NGSS shadows library properly.
     
    growling_egg likes this.
  36. vanhalen17

    vanhalen17

    Joined:
    Apr 19, 2015
    Posts:
    46
    Hello Tato,

    I recently purchased NGSS, for the sake of its overall utility, but I did have one pointed question that I wonder if this package can help me out with. If I wanted to have a shadow from a single mesh/material/shader be semi-transparent, whether I can use softness or pure alpha transformation, without needing additional light sources, is that something NGSS could help out with?

    Note that I'm not talking about all shadows cast from a single light source, I'm talking about a singular mesh or material or shader or separate layer, that can handle this.

    Thanks,
    Alex
     
  37. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,893
    @vanhalen17,
    Not really, because NGSS uses the same built-in pipeline as default Unity shadows.
    The best you can do is enable semi-transparent shadows (punch dithered holes into the depth map). But even so, is per material. The best you can do is to moddify the dithering algorithm for semi-transparent shadows. Unity default one is ugly as fak, it can be improved but still punches in the depth value of your semi-transparent object.
    Semi transparent shadows (casting and receiving) is a very defficult problem to solve. Even if it looks simple. :cool:
    The question would be if I'm going to work on something like this in the future? Maybe, using SRP and making deep changes in the render pipeline, why not. My goal is to provide the best dynamic shadows Unity can have. :)
     
    hopeful likes this.
  38. Pecek

    Pecek

    Joined:
    May 27, 2013
    Posts:
    127
    Is anyone using frustum shadows in 2018.x? I can't get it to work(2018.4.9), the shadows work properly, I'm using deferred rendering and set the main shadow light property to directional light(which has a NGSS_Directional light component) but nothing appears either in the scene or in the game view. It works without issues in 2019.2, as far as I can tell I'm using the same setup in both cases(although in 2018 I get other issues as well, when I change any of the sliders it doesn't update until I either change the shadow resolution enum or disable\enable the NGSS_Directional component(but the same happens with the local light component as well)).
    Edit: as usual as soon as I ask for help I find the solution. I have a custom shader for deferred rendering(for Uber), built-in works just fine, sorry, it had nothing to with NGSS.
     
    Last edited: Oct 31, 2019
    tatoforever likes this.
  39. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,893
    @Pecek,
    You can also edit the custom deferred rendering and add the respective lines that samples the FrustumShadows.
    Cheers,
     
  40. praesidenter

    praesidenter

    Joined:
    Mar 5, 2016
    Posts:
    31
    Do I understand correctly that this asset functions per-Unity-version/install? So if I install this for one specific Unity version, do all projects that are made with this version have to use this asset or is there a way to do it per-project?
     
  41. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,893
    @praesidenter,
    It's per Unity & per project setup on the same computer yes. Your Unity install requires NGSS internal shadow libraries and your project requires the NGSS components in order to work. With multiple projects in the same computer you have two options.
    If you have multiple projects that don't need NGSS and others that do need it, the best thing to do is to Install a separate version of the same Unity (in a separate location). So you have the same Unity twice but one without NGSS and the other with. Or simply delete the internal libraries and work on your project that don't need NGSS and re-install the internal libraries when you need NGSS again.
     
  42. vanhalen17

    vanhalen17

    Joined:
    Apr 19, 2015
    Posts:
    46
    Well, even if this package can't help out with that specific problem, we can both agree that the default dithered shadow for a semi-tranparent object isn't very aesthetically pleasing.

    I've heard around the block that it's a hard problem, and so, I might just wait and see on this. If NGSS continues into that realm, I would look forward to it!
     
    tatoforever likes this.
  43. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,893
    @vanhalen17,
    I might provide a solution for this in the future. Though this will require another change on internal Unity files. But who cares anyways? :D
    Cheers,
     
    hopeful likes this.
  44. macish

    macish

    Joined:
    Oct 29, 2018
    Posts:
    33
    Do you have an estimate when this update will hit?
     
  45. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,893
    Before Christmas I would say. :)
     
    cpinard, hopeful and macish like this.
  46. macish

    macish

    Joined:
    Oct 29, 2018
    Posts:
    33
    So i've added the NGSS2 to my project and it works but i am loosing a lot of performance even when settings the quality to lowest with 1 directional light. Am i missing something? I somehow expected better performance than with the standard unity shadows.
     
  47. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,893
    Reduce the amount of sampling and disable the denoiser (Uninstall Directional libraries).
     
  48. macish

    macish

    Joined:
    Oct 29, 2018
    Posts:
    33
    I should uninstall the directional libraries? I don't quite follow? I installed both libraries since i use all 3 kinds of light sources (points lights later on for smaller local stuff, directional for sun/ambience)
     
  49. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,893
    If you are looking for the absolute performance then yes, you have to unsintall the NGSS Directional library as it does a denoise pass after the screen space filter (leaving only the screen space NGSS shadows filter aka NGSS_Directional).
    Let me know if its clear.
     
  50. macish

    macish

    Joined:
    Oct 29, 2018
    Posts:
    33
    No its not.. you said i should remove the NGSS Directional library and then this would leave only the screen space NGGS shadows filter aka NGSS_Directional.. either you are using the same term for two different things or i just don't understand your setup here. Sadly your manual just covers installation but not what one is actually installing.

    What is the directional library doing if its not necessary? Just denoising? why is it then no called denoising library? How does the scripts that get attached to camera and light sources correspond to thoose libraries if thoose libraries are not needed? scratching my head and don't quite understand how thoose fit tgether and how to get performance back if its possible at all.

    When i removed directional library and the component on the directional light the performance was a tiny bit better than with unity light (around 0,5-2fps faster) but the shadows looked horrible, just low res noise. So i think i am still doing something wrong.

    What would be the basic setup with NGSS to have a look like unity shadows? Would this then be slower than unity shadows or faster?

    thnx tato!