Search Unity

  1. New Unity Live Help updates. Check them out here!

    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. travisschau

    travisschau

    Joined:
    Mar 27, 2013
    Posts:
    8
    Here they are:
     

    Attached Files:

  2. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,969
    You need to enable Cascaded Shadows, like this:
    upload_2018-5-15_17-47-41.png
     
    wetcircuit likes this.
  3. travisschau

    travisschau

    Joined:
    Mar 27, 2013
    Posts:
    8
    Thank you, sorry I'd missed that! I was only looking in the Quality settings for that. Working now, looks great.
     
    hopeful and tatoforever like this.
  4. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,969
    No problem, :)
    I will add one more small update to current NGSS (default renderer) to make this process automatically so people don't have to do this if they are targetting mobile.
     
    wetcircuit likes this.
  5. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,969
    One last feature update for NGSS v1, new cascade blending for both Shadows projections (this one is StableFit):
    upload_2018-5-16_14-57-2.png
     
  6. alternativevisual

    alternativevisual

    Joined:
    Apr 16, 2015
    Posts:
    73
    Hello! I'm using now your shadows in my 2D project

    Low shadows resolution, spot lights, and flashlight bounce light is point
    Pretty good result :) but it will be not really playable with shadows on slow computers...Like mine =)
    How it could be speed, quality upped via upcoming NGSS V2? And with default deferred rendering?
     
    tatoforever likes this.
  7. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,969
    @N3ON47
    Beautiful,
    I will recommend LW renderer and the upcoming NGSS for LW. It looks like you don't need plenty of lights casting shadows simultaneously anyway, only a couple of those. You can have up to 8 casting shadows in NGSS LW which runs on the same pass.
    PS: Your project will benefit a lot form Raytraced Primitive Shadows (speed and quality)! ;)
     
    Last edited: May 17, 2018
    alternativevisual likes this.
  8. alejobrainz

    alejobrainz

    Joined:
    Sep 10, 2005
    Posts:
    250
    Do you have an ETA for the upcoming Raytraced Primitive shadows and semi-transparent shadows from semi-transaprent meshes?
     
  9. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,969
    I said v1.8.5 will be the last feature update but I wasn't quite happy with current blending so here is new cascade blending in v1.8.6 (available in the coming days):

    PS: If you folks found something that needs to be addressed, it's now or never. :cool:
     
    Last edited: May 17, 2018
    Aniow, Lex4art, Akshara and 2 others like this.
  10. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,969
    Sometime this summer! ;)
     
    alternativevisual likes this.
  11. jakakettu

    jakakettu

    Joined:
    Sep 7, 2015
    Posts:
    3
    The company where I work at uses your shadow asset in its current project. The asset itself is really awesome and really makes the lights look super cool! One thing that we have noticed that could use a small improvement is the contact shadows image effect. While it really provides nice depth to the scene it can also be quite erratic at times especially when the camera is moving slowly. Would is be possible to use temporal filtering or some other technique to make the shadows be less erratic whilst the camera is moving slowly? Unity worker Kejiro (https://github.com/keijiro/ContactShadows) did something similar in his version which can be found in his Github. If this could be achieved then we would be more than happy! :) Cheers!
     
    tatoforever and hopeful like this.
  12. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,969
    NGSS v1.8.6 is submited to the store for Review. Features and changes:
    - New Cascade Blending. As Shown in the previous video/image works with both shadows projections.
    - Support for OpenGLCore API (It was partial in the past and inline sampling doesn't work there so I added couple of fallbacks to make it bullet prof with that API).
    PS: Ask support if you want the package right away.
     
  13. mitchtbh

    mitchtbh

    Joined:
    Dec 8, 2013
    Posts:
    66
    Absolutely love this asset - shadows look amazing!

    Any chance of adding AR support in the future? (being able to use these lights on a transparent plane to just render shadows).
     
    tatoforever likes this.
  14. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,969
    @mitchtbh
    What you are looking for are transparent geometry that only receives shadows from any caster/light? If so, I got a solution for that, poke me out at support email. :)
    Regards,
     
  15. JJJohan

    JJJohan

    Joined:
    Mar 18, 2016
    Posts:
    213
    Hello, I've got a few quick questions about this asset as I have a pretty particular use case that I'm not sure it's suitable for. I'm not particularly concerned if the shadows are hard or soft, but more so their stability. We're using very large areas in an enterprise application - the closest I can come up with as an example would be Google Earth. Essentially we're running into issues because of our fairly large near-far clip ranges, regardless of tweaking shadow distance or playing with the bias values.

    Are there any examples of this asset being used in a large-scale environment where precision would otherwise be an issue with the default Unity shadows?
     
  16. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,969
    @JJJohan
    The largest example (that I'm aware of) where NGSS is used is Rust, a popular open world game on PC with very large open areas. But NGSS will not improve precision per see, it will only make your shadows look better (specially with low ress shadows). More precision can be obtained using 32bits depth maps and larger shadowmap resolutions.
    However with raytraced/raymatched solutions, such as Contact Shadows it can help mitigate shadowmap artifacts such as acne and panning. This is something that I'm heavenly researching right now and soon a new version of NGSS will provide super precise ultra fast raymarch shadows. First with primitives Signed Distance Fields using analytical functions and then with any kind of given mesh using baked Signed Distance Fields volumes.
    PS: Current NGSS comes with a fast and cheap ContactShadow solution.
     
  17. ceebeee

    ceebeee

    Joined:
    Mar 7, 2017
    Posts:
    397
    Challenge Accepted! :p (I think I know the answer already but figured worth an ask)

    So I've been playing with using Contact Shadows after our previous discussion, but I've found a limitation with them that is concerning.
    Looks fine:


    oops:

    It seems as soon as part of an object goes off frame, the Contact Shadow effect disappears for that portion.

    I'm guessing you're going to say it's because it's using the free depth map the camera generates. but is there any way to fix this? For doing cutscenes this is a problem, though I can use the other technique we previously mentioned to get around it I suppose, giving the ground it's own Unique shadow for that purpose.


    On another topic, I saw this article, and I thought you may enjoy it:
    http://colourmath.com/2018/development/signed-distance-fields-in-unity/

    He talks about how to implement arbitrary mesh SDF at real time speeds. This might be good for your efforts?

    Thanks. :)
     
    tatoforever likes this.
  18. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,969
    @ceebeee
    In rasterization you can't access data outside the screen because there is none, only what's visible is accessible through shader programs.
    If we can access data outside the screen then raytracing would be matter of few samplings. :D
    Voxelization and signed distance fields (to some extends) of the scene it's just a hacky way to represent scene spacial and visual data.
    So yeah, rasterized based effects will remain limited and that's the reason why nVIDIA and Microsoft are working on the real-time Raytracing API (to help gatter that outside the screen data). :cool:
    PS: I'm heavily researching raytraced-like solutions. Primitive Shadows is just one of the many features to come out of it. ;)
     
    Last edited: May 23, 2018
  19. ceebeee

    ceebeee

    Joined:
    Mar 7, 2017
    Posts:
    397
    I also have another question. In the documentation it says:
    "To change soft-ness of the shadows change the Shadow Strength property on the
    light."

    I'm pretty sure this used to work. but using the latest version of NGSS, and under 2017.4.3f1, it doesn't seem to work anymore. Changing the Shadow Strength slider just make the shadows fade in and out.

    Did something change on NGSS' end, or on Unity's?
     
  20. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,969
    @ceebeee
    Which light are you referring?
    With Spot and Point shadows Shadows strength value will change soft-ness. On directional shadows you do that within the NGSS_Directional component under "Global softness" property. It have been like this since v1.5.
     
  21. ceebeee

    ceebeee

    Joined:
    Mar 7, 2017
    Posts:
    397
    oh i'm sorry, for some reason I thought it worked on all lights. My bad. :X
     
    tatoforever likes this.
  22. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,057
    Will your improved shadows require the new pipelines, or will they work with the existing/default pipeline? Do you have a better idea of when they'll be ready to release?
     
  23. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,969
    @gecko
    New NGSS is only for HD/LW pipelines as with current pipeline there's not much you can do without renderer sources.
    To be released sometime this summer.
     
    alejobrainz likes this.
  24. spaceemotion

    spaceemotion

    Joined:
    Sep 29, 2015
    Posts:
    89
    @tatoforever Will the new version have an upgrade cost or be for free to existing customers?
     
    Last edited: May 28, 2018
  25. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,969
    @spaceemotion
    This is how it looks (discount and support wise) for NGSS products:
    - Current NGSS version planned support -> as long as Unity keep supporting the current pipeline.
    - New NGSS versions will be paid and only available for HD/LW pipelines (50% discount if you own current NGSS).

    They are all separate products, so no problem in updating one, it won't break the others. No collision feature either as both targets different hardware/platforms (specially the HD/LW pipelines). Updates will be as with current NGSS, community most wanted/requested features will be priorized first (as soon as the base product get's released this summer).
     
    Last edited: May 29, 2018
  26. ekergraphics

    ekergraphics

    Joined:
    Feb 22, 2017
    Posts:
    257
    Is this going to be the same for NGSS 2.0?
     
  27. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,969
    @ekergraphics,
    Well, shadowmap is data that is outside the screen (as grabbing local lights space data != main screen data) and primitive shadows is Signed Distance Field data (world space data). So to answer your question, to some extend yes. :)
    PS: In the far far future, when Unity implement DXR, we will able to sample data ouside the screen with less headaches and limitation. ;)
     
  28. ekergraphics

    ekergraphics

    Joined:
    Feb 22, 2017
    Posts:
    257
    So, with the above in mind, is it possible to use NGSS as a sort of ambient occlusion effect, that's rendered on top of Unity's existing shadows, but perhaps actually only from the near plane and below? That is, only the small bits that Unity actually misses? And then fade it out after a certain distance from the geometry, like you do with ambient occlusion?
     
  29. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,969
    It's not possible, you can't render Unity shadows and NGSS shadows. Plus it will double bandwidth use = super slow.
     
  30. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,001
    Hi.
    Contact shadow is too hard on my character face! can't I make it a bit more smooth?

    I also used SE Screen-Space Shadows but it's too soft and noisy. So I thought NGSS may be better but it is too harsh on my character skin! I really need to make it more soft.
     
  31. local306

    local306

    Joined:
    Feb 28, 2016
    Posts:
    125
    Hey, would you have any suggestions on how to lower the quality of point and spot lights above and beyond changing the samplers per frag in UnityShadowLibrary.cginc?

    I'm working on a VR project using a single point light to dynamically light the environment. My rendering budget is nearly all eaten up at this point, hence the inquiry. Dropping to the lowest POISSON_16 samplers per frag really helped and the end result really doesn't look too bad in VR.

    Just curious whether there are any pointers I could apply to get me a little further away from the dreaded frame drop haha.

    Also, is there a similar contact shadow solution for point and spot lights? From the manual, it made me believe that the current script is only applicable to directional lights.
     
  32. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,969
    @ksam2,
    You can play with the softens property but ContactShadows is not a full shadow replacement, it must be a hard shadows to fill gaps left by shadowmapping artefacts.

    @local306,
    At 16 samplers you are hitting the bare minimum NGSS can offer (Unity default is 4), you should not have any performance impact hit, what's your testing hardware?
    There's plans to improve ContactShadows (Beyond directional support) but not right now. First need to finish the base features of upcoming NGSS family products and then from there add more features on every major version. It's targeted later for this summer. :)

    PS: Sorry for the response time, for some reason I didn't received the email notifications. :\
     
    alternativevisual likes this.
  33. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    1,439
    You may want to update this assets store page as it clearly hints HD & LW pipelines will be part of this asset with following message:
    Don't get me wrong, I think this asset is affordable already and don't mind extra cost for SRP version at all, just find it weird that the store page markets like it's included in the future update of this asset.
     
  34. nbac

    nbac

    Joined:
    Jul 7, 2015
    Posts:
    250
    how do i influence the shadow strength for pointlights since the strength is controlling the softness?
     
  35. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,969
    @rizu,
    You are right, will do soon. :)

    @nbac,
    With external light sources such ambient, baking, etc. No easy way to do it in a per light basis as no renderer sources. This won't be a problem with SRP as Lights params are fully accessibly.
     
  36. nbac

    nbac

    Joined:
    Jul 7, 2015
    Posts:
    250
    hm to bad .. there is no workaround or something? using it in vr and i do use a second light atm with no shadows to brighten them up but this is not practicable in vr at all... with just a view lights per pixel
     
  37. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,969
    @nbac,
    The only workaround is to clamp the returned shadow (between 0.0 and 1.0) to your desired value but this will be your shadows opacity for all those shadow types because the shadow renderer does not contain light indexes and is internally managed by the default renderer.
     
    Last edited: Jun 11, 2018
  38. romaing

    romaing

    Joined:
    Feb 11, 2010
    Posts:
    24
    Did you find a way?

    It should be useable with Unity Cloud Build.
     
  39. Justin_Wingfall

    Justin_Wingfall

    Joined:
    May 15, 2014
    Posts:
    104
    estimate date for NGSS 2.0?
     
  40. local306

    local306

    Joined:
    Feb 28, 2016
    Posts:
    125
    Thanks for the reply. I'm working with a GTX 980 so not the most cutting edge. The character models I have in the scene are fairly detailed as well, so they are probably sucking back some significant rendering power as well.
     
    tatoforever likes this.
  41. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,969
    @RadioFolk
    Sometime this summer. Preview videos coming soon! :)
     
    alternativevisual and OCASM like this.
  42. ikke

    ikke

    Joined:
    Jan 23, 2008
    Posts:
    14
    The NGSS Shadows are fabulous!

    Now testing in WebGL, I can't get them to work in a build, has anyone had succes in WebGL?
    (Unity 2018 webGL 2.0)
     
  43. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    1,439
    Just a heads up, I did notice that HDRP master (and core) just got PCSS shadow filtering natively. But I'm sure NGSS for LW and HD will still have additional feats to make it worth using :)
     
    tatoforever likes this.
  44. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,969
    @ikke,
    Make sure your shaders are SM3.0. PCSS is not supported in WebGL as there's no inline sampling.

    @rizu
    Yes, the new raytraced primitive shadows and other new stuff that default Unity shadows don't have. Plus different quality sets at your disposal. ;)
     
  45. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,969
    Minor NGSS update submitted to the store (v1.8.7). It adds backwards compatibility with Unity 5.6.6 (was hardcoded up to 5.6.5). Now it should work "theoretically speaking" up to 5.7.0. I don't think Unity will add anymore versions of 5.6 though.
    PS: New NGSS is coming along very well, hopefully new showcase videos soon! :)
     
    EvilFox, Baraff, brisingre and 5 others like this.
  46. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    503
    Does this work in latest unity 2018 version?
     
  47. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,969
    Yes. Release candidate and beta versions of 2018 are fully tested. Alpha versions not guaranteed.
     
  48. romaing

    romaing

    Joined:
    Feb 11, 2010
    Posts:
    24
    To work well with version control - and UCB - we really need another way than "hacking" the Unity install. Is there a workaround or another way?
     
  49. No0B25

    No0B25

    Joined:
    May 2, 2016
    Posts:
    67
    Not for now. The proper way to do it is a custom Scriptable Render Pipeline, which I believe @tatoforever is also working on.
     
    alternativevisual likes this.
  50. local306

    local306

    Joined:
    Feb 28, 2016
    Posts:
    125
    Question: Is there a way to create an if inside of the UnityShaderLibrary.cginc that would allow you to switch the samplers per frag #define value based on the platform being used?

    For example, if I wanted to build and app that was Desktop and VR capable, the if would catch what is running and setup the appropriate sampler count to avoid having to make two separate builds?
     
unityunity