Search Unity

[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. ekergraphics

    ekergraphics

    Joined:
    Feb 22, 2017
    Posts:
    257
    Thank you for the answer. Just to clarify, I would need to perform this two step setup every time I want to switch between projects where one uses Next Gen Shadows and the other doesn't?

    EDIT: No need to clarify, it's early in the morning. It's exactly as you said. :)
     
    tatoforever likes this.
  2. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,368
    Only once per Unity install and per Unity project (delete shader cache folder).
     
  3. alternativevisual

    alternativevisual

    Joined:
    Apr 16, 2015
    Posts:
    75
    Best shadows solution, great for my STALKER 2 game). But, may you add blending for shadow cascades, and "Screen Edge Mask" for contact shadows?
     

    Attached Files:

    wetcircuit and tatoforever like this.
  4. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,368
    Change between shadows projection to StableFit and CloseFit to see which one goes better. The latter is recommended.
    Also try removing the cascades entirely, will look pretty anyway. ^^
     
  5. QuantumTheory

    QuantumTheory

    Joined:
    Jan 19, 2012
    Posts:
    1,081
    Could this be engineered to work in unity 5.4.4?
     
  6. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,368
    Yes,
    You can install on Unity 5.4.4, it should work. Even if not officially supported, you can email support and we'll happy to help out.
     
  7. QuantumTheory

    QuantumTheory

    Joined:
    Jan 19, 2012
    Posts:
    1,081
    Thanks. I know shader keywords have changed in the last couple versions, that's why I asked.
     
  8. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,368
    Hi,
    We are not using any ShaderKeywords on NGSS 1.x and if I remember correctly it was rise to 256 in v5.5 (Unity already use a small portion of those internally for their standard shaders).
     
  9. nbac

    nbac

    Joined:
    Jul 7, 2015
    Posts:
    267
    hey used ngss in my latest viz
     
    Lex4art, punk, pixelsteam and 2 others like this.
  10. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,368
    Beautiful scene, music and shadows. ;)
     
    pixelsteam likes this.
  11. nbac

    nbac

    Joined:
    Jul 7, 2015
    Posts:
    267
    not really visible cause of the dof but the grass catches some really nice contact shadows!
     
  12. yangjianhui8

    yangjianhui8

    Joined:
    Nov 28, 2014
    Posts:
    19
    sorry! Could this be engineered to work in unity 2017 beta?
     
    tatoforever likes this.
  13. pixelsteam

    pixelsteam

    Joined:
    May 1, 2009
    Posts:
    924
    @tatoforever I am working on a large project in 5.5.3. It uses Tenkoku Lighting system.
    Has your asset been tested with it? I bought your asset but concerned about blowing up my project.
     
    Last edited: May 7, 2017
    tatoforever likes this.
  14. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    It does (source: I'm using it)
     
    tatoforever likes this.
  15. pixelsteam

    pixelsteam

    Joined:
    May 1, 2009
    Posts:
    924
    Wow. Just started doing some directional light tests.
     
  16. Invertex

    Invertex

    Joined:
    Nov 7, 2013
    Posts:
    1,546
    Small bug with your ContactShadows.cs, at least in 5.6.0p3.

    You currently do:

    Code (CSharp):
    1.         if (mCamera.renderingPath != RenderingPath.Forward && mCamera.renderingPath != RenderingPath.DeferredShading)
    2.         {
    3.             DestroyImmediate(this);
    4.         }
    But this doesn't check what the actual rendering path of the camera is currently, it only checks what the setting on the camera is, which in the case of the Default option which is "Use Player Setting", it automatically fails on any default camera since it will fail both those checks. So what you should be using is mCamera.actualRenderingPath so you know what the true render path currently being used is.

    Also, it shouldn't destroy the script.. It should just disable it. I was really confused at first why the script kept removing itself just from me clicking enable/disable, and always deleted itself once entering play.
     
    Last edited: May 9, 2017
  17. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,368
    @Invertex,
    You are right, renderingPath could return Default and the check fails. I've replaced it with actualRenderingPath which reflect the global setting better.
    Thanks for the check.
    Anyone interested in this small fix please email support right now.

    Also wanted to let you folks know that huge improvements to directional shadows quality are coming. One of those are seamless transitions between cascades splits and PCSS filtering for v1.4
     
  18. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,368
    Beautiful,
    Can you post more shots with beautiful foliage with lighting and shadows from your project? :)
     
    pixelsteam likes this.
  19. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,368
    Hello,
    I'm working on full NGSS compatibility with Unity 2017 but won't be available till Unity 2017 gets out of Beta stage.
    You can always get access to pre-release versions (email support).
    As always, will keep you updated with everything. :)
     
  20. pixelsteam

    pixelsteam

    Joined:
    May 1, 2009
    Posts:
    924
    Here are some Next-Gen Lighting and Shadow tests for our project DroneTopolis.com



     
    Lex4art, AcidArrow, punk and 3 others like this.
  21. Invertex

    Invertex

    Joined:
    Nov 7, 2013
    Posts:
    1,546
    Little thought I had, the ScreenSpaceReflections in Unity's PostProcessingStack are already raytracing into the scene to do the reflections, it seems like a waste for multiple assets to be potentially doing similar traces. I wonder if it would be possible to use its results if available to aide the performance of contact shadows. It's just a thought though, I don't know enough about how your approach works compared to theirs. They seem like two effects that would have a lot of synergy in terms of how they function.
     
  22. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,368
    @Invertex,
    It's a bit different yeah. Contact Shadows raymatchs in light directions, ScreenSpaceReflections raymatchs into surface normal direction. Also ContactShadows is not really a post-process, the reason it was added to a camera was to have shadows on Scene Editor.
    In NGSS v2.0 you'll be able to have contact shadows on every light. ;)
     
    alternativevisual, Invertex and punk like this.
  23. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    You are amazing. This asset is amazing. Thank you +1
     
    tatoforever and hopeful like this.
  24. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,368
    @pixelsteam,
    Those shots are amazing, have you tried adding ContactShadows to that scene? It will feel the gaps missing by directional shadows really well.
    Regards,
     
  25. alternativevisual

    alternativevisual

    Joined:
    Apr 16, 2015
    Posts:
    75
    Increasing shadows distance when it's evening, for more blurry looking, looks amazing!) But, Contact Shadows.. When trying to add it's to my Camera and setup it, Unity crashes, i'm using two lights on scene. (day and moon)
     

    Attached Files:

    pixelsteam likes this.
  26. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,368
    @N30N57,
    It looks to be a Unity Editor bug on Mac.
    You have any Editor.log and/or small project with a repro crash that i can take a look at?
    Regards,
     
  27. pixelsteam

    pixelsteam

    Joined:
    May 1, 2009
    Posts:
    924
    I will add those tomorrow when I test the script you had sent me.
     
    tatoforever likes this.
  28. lukedarling

    lukedarling

    Joined:
    Mar 27, 2017
    Posts:
    5
    Would this work on iOS builds? Specifically a build on iPads
     
  29. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,368
    There's currently an issue with mobile where Unity override custom shadows filtering with a default hard shadows in forward mode. It works but in deferred mode only.
    I'm trying to reach Unity folks to see why this is enforced and went they plans to lift this limitation or fix it (if it's a bug).
     
    Last edited: May 18, 2017
    ilmario likes this.
  30. lukedarling

    lukedarling

    Joined:
    Mar 27, 2017
    Posts:
    5
    Interesting. Will get it and let you know if there are any issues! Hope unity get back to you. Can't stand the amount of effort I have to go through to get somewhat decent looking shadows
     
  31. nbac

    nbac

    Joined:
    Jul 7, 2015
    Posts:
    267
    since this is my favourite shadow asset for unity at the moment i would like to do a feature request. there is still a lag of shadows in fully indirect lit areas where is no direct light. therefor unreal and for example naughty dog is using capsule shadows. i really would love to see this working in unity. i guess you know what i mean if not i can link a paper.
     
    tatoforever likes this.
  32. Klarax

    Klarax

    Joined:
    Dec 2, 2013
    Posts:
    17
    Hi,

    I followed the steps in the documentation.

    - backed up the old unity shadow library.
    - imported yours
    - opened unity
    - strength of shadows still works.

    shadows still look blocky (like old) lights have no shadow type options.

    - tried deleting the shadowcashe just incase. didn't help

    EDIT:

    Forget everything I said, I seemed to install in into an older verion of unity, and thus, the effect didnt work in my project XD

    Everything now works, and looks so much better. Thank you so much!

    I'm off to review (not under this account tho)
     
    Last edited: May 21, 2017
    tatoforever and hopeful like this.
  33. nbac

    nbac

    Joined:
    Jul 7, 2015
    Posts:
    267
    small teaser. using contact shadows i get some noisy artifacts on large surfaces. fidled around with the settings a lot without any success
     
    tatoforever likes this.
  34. alternativevisual

    alternativevisual

    Joined:
    Apr 16, 2015
    Posts:
    75
    My grass shader + NGSS low shadows resolution. :)
     
  35. nbac

    nbac

    Joined:
    Jul 7, 2015
    Posts:
    267
    still getting massive noise on very low angles of the direct light on flat surfaces any suggestion?
     
  36. Invertex

    Invertex

    Joined:
    Nov 7, 2013
    Posts:
    1,546
    Make sure your Bias on the light isn't too low.
     
    tatoforever likes this.
  37. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,368
    [EDIT]
    I got the paper (silly me). It's something I'm planing to bring in the future. Works in a similar fashion as SSAO but capsules can offsetted/projected from dominant light.
     
    Last edited: May 23, 2017
    Invertex and alternativevisual like this.
  38. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,368
    Remember that ContactShadows is not a full shadow replacement. It's only there to fill gaps, bias and peter panning issues with conventional shadows.
     
  39. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,368
    @N3ON47,
    That's one of the strength of NGSS, even at low resolutions it looks awesome.
    PS: The ground and grass textures are beautiful. ;)
     
  40. nbac

    nbac

    Joined:
    Jul 7, 2015
    Posts:
    267
    i just use it to fill the gaps but my directional sun is rotating full 360 degrees and at some point it is very flat and than i get massiv noise

    no matter what i change its just more or less noise on those angles
     
    Last edited: May 24, 2017
  41. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,368
    @nbac,
    You will always get such noises when light direction and surface normal are close 90 degrees (perpendicular) because of shadowmap depth precision.
    Best way to avoid this is to have uneven terrains or objects casting shadows that will mask the effect at extreme angles (such as in your pic). What about turning off your floor casting shadows? Set it to only receive them. In this example, ContactShadows can't do much as the ground is flat and it only coverts tiny distances, for large distance you already have the sun light shadows.
    Try my suggestions and see how it goes. I'll be happy to help. :)
     
  42. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,368
    We are working out a NGSS trailer that will be highlighted in our social media sites, this could potentially give your games some sort of visibility. So if you got any raw (or not even raw) video files of your game, simulations or even prototypes to share with us, I take them all.
    Once again thank you guys for your stellar support, NGSS 2.0 will be previewed this summer. ;)
    PS: NGSS have been chosen by Vivian Editor picks. :)
     
    Last edited: May 24, 2017
  43. nbac

    nbac

    Joined:
    Jul 7, 2015
    Posts:
    267
    i do have furniture in the room of course, just to better visualize the problem i removed everthing. here i would benefit from contactshadows a lot. i get this noise on far less extreme angles. the question is am i doing something wrong or is this a regular tradeoff/ limitation from the technique.
     
  44. equalsequals

    equalsequals

    Joined:
    Sep 27, 2010
    Posts:
    154
    Hey there, great work on the asset!

    I read a little further back in the thread that NGSS supports Single-Pass Stereo, is that also true for the Contact Shadows? I'm seeing some strange behavior in the right eye:


    This was observed in v5.6.0f3.

    Any idea what might be going on there?

    Thanks!
     
  45. Samb88

    Samb88

    Joined:
    Mar 26, 2009
    Posts:
    208
    @tatoforever Is there a way to somehow alter the shadows strength? It`s a bit dark for cartoony games!
     
  46. DanielSnd

    DanielSnd

    Joined:
    Sep 4, 2013
    Posts:
    382
    Is it working on 5.6.1? got a bunch of errors when I tried to build with it and only managed to get the point lights working :(
     
  47. brisingre

    brisingre

    Joined:
    Nov 8, 2009
    Posts:
    277
    It's a workaround and might not be an option if you're using forward rendering, but I deal w/ this by using a second non-shadowcasting light with the same position and orientation as the main light, and then tweaking the color and position of both lights until the surfaces and shadows both look good.

    The downside is that it's fiddly, and obviously as expensive as two lights (although at least the second one doesn't need shadows.)

    The upside is that you get a lot of control over what your shadows look like -- you can control their tint color, not just how dark they are.
     
    buttmatrix likes this.
  48. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,368
    Try changing ambient lighting. Upcoming update will let you do that but only globally. The reason is that NGSS 1.x is working with a black box renderer that doesn't tell you light indexes (you don't know exactly which light settings you are dealing with). In NGSS 2.0 you'll be able to tweak back strength and a bunch other settings.
     
  49. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,368
    It should work yes. What are your project/platform/renderer settings?
    Can you please submit a test case report (support AT psychozinteractive DOT com)?
     
  50. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,368
    It's true for all shadowing techniques but not ContactShadows. ContactShadows VR update is coming.
     
    buttmatrix and equalsequals like this.