Search Unity

  1. Get the latest news, tutorials and offers directly to your inbox with our newsletters. Sign up now.
    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. brisingre

    brisingre

    Joined:
    Nov 8, 2009
    Posts:
    274
    I can confirm HX and NGSS are compatible. You just have to override shadow strength in the volumetric light script, which is already an option, you don't need to modify any code.

    I haven't noticed a performance hit from NGSS but that doesn't mean you won't.
     
    hopeful, wetcircuit and tatoforever like this.
  2. Onat-H

    Onat-H

    Joined:
    Mar 11, 2015
    Posts:
    135
    NGSS came just in time for our new Trailer, thank you!!! Everything you see is realtime in unity 3D
     
    Cynicat, OCASM, daville and 7 others like this.
  3. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    651
    I still haven't figured out how to achieve lighting like that sadly :(. What did you use to get such realistic lighting?
    It looks like as an update to my Hydroform and Hx Volumetric they both cripple my fps to about 40 fps on my 2013 Radeon 5700 series card, but at the same time one of those plugins is triggering a regression in 5.6 which cripples fps so I am very confused xd. Currently filing bug reports with it at the moment.
     
    tatoforever likes this.
  4. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,083
    @SilverStorm,
    I also got a copy of Hx Volumetric cause few users where asking me to provide support to it and I never had any slowdown issue (mid range PC here btw).
     
    hopeful and wetcircuit like this.
  5. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,083
    @Onat-H
    Your lighting is wonderful, It looks almost like a step-motion movie. Good job!
    We can also see NGSS at works. ;)
    Keep it up!
     
    Last edited: Mar 14, 2017
    hopeful likes this.
  6. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,083
    Folks,
    Regarding compatibility between NGSS and other custom shader effects/frameworks.
    Normally, it should work out of the box if the framework isn't using _LightShadowData.r value internally but if that the case this value must be overridden (to avoid disparity between NGSS penumbra size and your custom effect opacity level).
    In any case, if you guys needs support to properly integrate NGSS with custom shader effects/frameworks (which won't be any longer than 1 line shader code edit), shoot me a message to: support at psychozinteractive dot com.
    I'll be happy to help. :)
     
  7. brisingre

    brisingre

    Joined:
    Nov 8, 2009
    Posts:
    274
    Got a nice screenshot of NGSS standing up to some abuse Unity's directional shadows won't.
     
    OCASM, tatoforever and Flurgle like this.
  8. daville

    daville

    Joined:
    Aug 5, 2012
    Posts:
    286
    Hi... I replaced the UnityShadowLibrary.cginc file, but everything looks Pink.

    I'm using Unity 5.5.1 f1

    And also I've already deleted the Shader Cache folder... and run Unity with Admin Privileges
     
  9. daville

    daville

    Joined:
    Aug 5, 2012
    Posts:
    286
    Sorry I forgot to add a picture of the problem

    upload_2017-3-15_9-57-39.png
     
  10. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,083
    @daville,
    What is your target platform? Can you show your console errors? Can you provide a test project?
    [EDIT] I just saw your picture after posting my message. Are you closing the Editor before setting up UnityShadowLibrary.cginc? This step must be done with the Editor closed. Also every time you do this you have to delete your project Shader Cache folder before opening it again.
     
    Last edited: Mar 15, 2017
  11. daville

    daville

    Joined:
    Aug 5, 2012
    Posts:
    286
    Target Platform is PC/Mac/Linux

    Yes, I did closed the Editor before replacing the file.

    And my project is just a new one, I only imported the Package from the store, also If I make a completely new project and create a box (or any object) it looks pink.

    Also... I tried to revert to the original ShadowLibrary and It still looks Pink :eek:

    So... I guess I broke something else.

    I'll try to uninstall and reinstall Unity.
     
    tatoforever likes this.
  12. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,083
    @daville
    If you reverted back to the stock ShadowLibrary and still looks Pink you've probably got an incomplete install or deleted something else in the process. A fresh re-install should fix it yes.
     
  13. daville

    daville

    Joined:
    Aug 5, 2012
    Posts:
    286
    I reinstalled Unity and default shadows work again... but I didn't had time to test again with NGSS because I had to go, but I'll test it tomorrow again.
     
    tatoforever likes this.
  14. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,083
    daville likes this.
  15. arnoob

    arnoob

    Joined:
    May 16, 2014
    Posts:
    155


    Here is a video of my procedurally generated environment.
    The softened shadows are really useful for my dynamic TOD, especially when the weather becomes cloudy!
     
  16. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,083
    @arnoob,
    Beautiful pre-generated grasslands. Wait and see all that with the new contact shadows coming very soon to NGSS. :D
    PS: Screenshots coming later today! ;)
     
    brisingre and hopeful like this.
  17. arnoob

    arnoob

    Joined:
    May 16, 2014
    Posts:
    155
    Thanks!

    Also what is the contact shadow you are talking about? I am already using the screen space shadows from sonic ether, wouldn't it be a bit redundant? Could you tell us more about the abstract of your technique? :)
     
  18. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,331
    IIRC, SE's screen space shadows come from just a single directional light. The NGSS method may handle more light sources.
     
    arnoob and tatoforever like this.
  19. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,083
    @arnoob,
    As hopeful said it will support multiple lights (including local point/spot shadows) plus it will be slightly faster and will take less memory (reusing the same light depth, not creating new render target to hold light raw depths).
     
    arnoob, hopeful and Flurgle like this.
  20. thelebaron

    thelebaron

    Joined:
    Jun 2, 2013
    Posts:
    617
    @tatoforever will contact shadows work alongside grass in unity's terrain?
     
  21. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,083
    It works with anything that write to the depth buffer so yes. :)
     
    Last edited: Mar 19, 2017
  22. Jick87

    Jick87

    Joined:
    Oct 21, 2015
    Posts:
    124
    Well I don't have any fancy screenshots to show or anything :p, but I just wanted to say I'm super excited for the upcoming updates. Keep up the great work! This asset is really great, and getting better all the time. :)
     
    tatoforever likes this.
  23. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,083
    @Jick87
    I forgot the progress images on screen-space shadows (aka contact shadows, aka raymatched shadows), I'll upload them tomorrow. :)
     
    punk, Flurgle, hopeful and 1 other person like this.
  24. Flurgle

    Flurgle

    Joined:
    May 16, 2016
    Posts:
    389
    @tatoforever, can you upload a shot of the new directional shadows as well (I'd like to compare it to what I'm seeing)?
     
    tatoforever likes this.
  25. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,083
    Folks,
    Got a quick question, how many of you are currently using 5.6 and how many of you plans to leave 5.5 and move to 5.6 once it's out? The idea is to support only 5.6 as rendering changed drastically on it, it will speed up NGSS development (no need to maintain different versions). Plus, directional shadows are better in 5.6. ^^
    Regards,
     
  26. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,083
  27. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    7,575
    Although I'm not using NGSS yet (still working for mobile, and we're not using realtime shadows at all there), so not exactly your target audience right now, at this phase we are generally going to always stick with the latest Unity version, unless they make really major changes (like "dropping-Beast-for-Enlighten" major).
     
    tatoforever likes this.
  28. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,331
    When 5.6 comes out, I will be moving to that.

    I suggest a post be made that's for people moving to 5.6, and one for people sticking with an earlier version, and then people can "like" whichever one supports their position.

    That way we can get feedback without potentially getting a new post here from each NGSS user. ;)
     
    tatoforever likes this.
  29. brisingre

    brisingre

    Joined:
    Nov 8, 2009
    Posts:
    274
    I have no desire to remain on 5.5, and will switch when 5.6 comes out.
     
    tatoforever likes this.
  30. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    7,486
    I'm probably going to at least experiment with 5.6. I've been having stability issues with 5.5 that I'm hoping are at least partially resolved for the next version release. Not to mention it means i'll finally have access to functional mixed mode lighting.
     
    tatoforever likes this.
  31. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,337
    I usually wait until the first service release before I upgrade… so, 5.6.1
     
    hopeful and tatoforever like this.
  32. thelebaron

    thelebaron

    Joined:
    Jun 2, 2013
    Posts:
    617
    Oh man, when I saw the alert of this thread being updated I thought it would have some tasty contact hardening shadow screenshots ;)
    I dont really see any reason to stay on 5.5 personally but my needs are more personal portfolio type stuff than an actual product, so take that for what its worth.
     
    tatoforever likes this.
  33. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,083
    @thelebaron,
    I'm composing a new outdoor scene to better showcase contact shadows. A sphere and an cube doesn't give much justice. ^^
    Shoots coming later in the day. :D
     
    wetcircuit likes this.
  34. TimNedvyga

    TimNedvyga

    Joined:
    May 18, 2015
    Posts:
    77
    Already using 5.6!

    Wait for new screens of contact shadows too ^_^
     
    tatoforever likes this.
  35. punk

    punk

    Joined:
    Jun 28, 2013
    Posts:
    390
    Will be updating to 5.6 once its stable
     
    tatoforever likes this.
  36. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,083
    Last edited: Mar 23, 2017
    Lex4art, ChinChiaYeh, punk and 7 others like this.
  37. brisingre

    brisingre

    Joined:
    Nov 8, 2009
    Posts:
    274
    That's a big difference. Looks great.
     
    tatoforever likes this.
  38. Flurgle

    Flurgle

    Joined:
    May 16, 2016
    Posts:
    389
    Freeze new features on 5.4/5.5, and support the basic features it already has. Put main dev work on 5.6+!

    Unity needs high fidelity work like yours.
     
    punk, hopeful and tatoforever like this.
  39. Jick87

    Jick87

    Joined:
    Oct 21, 2015
    Posts:
    124
    Looks amazing!

    Only one thing I was wondering about... I put the video to max quality and fullscreen and it looks like the ground texture (or something) is kinda warping when the shadow moves over it. What's up with that? Or am I just seeing things? :p

    By the way... Yes, I plan to move to 5.6 when it is released. :)
     
    tatoforever likes this.
  40. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,083
    Kind of yeah, the video compression (updating parts of the image that changes between frames), it was recorded on low quality to speed things up. Also you can get tiny micro-bumpy effects when normal mapped objects lighting drastically changes (shadowed/unshadowed) as bumped parts of the surface are visibly only when lit. But this have nothing to do with NGSS, it's real-time lighting behavior. ^^
    I plan to make a better video to showcase v1.3, trying to find good free assets. :D
     
  41. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    425
    will move prety quick. as soon as poible =)
     
    tatoforever likes this.
  42. Kolyasisan

    Kolyasisan

    Joined:
    Feb 2, 2015
    Posts:
    357
    But what about directional light PCSS? Is it coming in 1.3?
    Also, I think that this 1$ scene will help you to showcase your work a lot (https://www.assetstore.unity3d.com/en/#!/content/20040). Bought it a while ago and It looks good. It has lots of indoor lighting for you to experiment and some shadow caster that are pretty high to show your PCSS method.
     
    Last edited: Mar 24, 2017
    tatoforever likes this.
  43. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,083
    Hi Kolyasisan,
    I'm holding PCSS on directional light, waiting for an Unity feature that will allow me to do PCSS without duplicating lights depthmaps (save memory and seth passes).
    At the same time ScriptableRenderLoops is around the corner. So either of those will allow me to properly do PCSS on all lights.
    However Contact Shadows already provides similar hardening shadows at close distance between caster/receiver. It's not as perfect as PCSS but fill the gaps in between and fixes any possible bias. On top of that, it saves gazillions drawcalls. For example, in the video I showcase Contact Shadows, none of the grass was actually rendered in the directional buffer, they cast shadows for free (from the screen depth).
     
    Last edited: Mar 24, 2017
    arnoob likes this.
  44. chiapet1021

    chiapet1021

    Joined:
    Jun 5, 2013
    Posts:
    604
    I'm really looking forward to Scriptable Render Loops (and your planned Forward+ renderer) becoming officially supported in Unity!
     
    Flurgle and tatoforever like this.
  45. arnoob

    arnoob

    Joined:
    May 16, 2014
    Posts:
    155
    About contact shadows, I can confirm using Sonic ether's screen space shadows. It really makes a good effect when global directional shadows is really soft (like in cloudy environments) at no added cost. I attached a picture showing it.

    For the other questions, I am using 5.6 and will probably update further, and IMO if you want your asset to be future-proof you should keep it up with the latest versions :)

    Now a question regarding the contact shadows. Could you make it so we can easily decide which object will cast/receive it ?
    In Sonic ether's version, that the main problem. Almost everything contribute to it (even shaders thar are set to "don't write to zbuffer in shaderforge) or will receive it when it shouldn't, and it's really hard to make exceptions (for smoke, transparent surfaces etc). If you could give us control on that, that would be incredibly awesome, and would definitely make it a must buy!
     

    Attached Files:

    tatoforever likes this.
  46. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,083
    @arnoob,
    For contact shadows, there's nothing you can do about it, because it uses screen depth (instead of light depth). If your object/surface is visible on screen and it writes to the depth (opaque/alphatest/semi-transparent) then it will cast contact shadows when enabled on the given light. Even using screen-space masks you will simply read the depth wrongly and produce unwanted results.
    However, if your material don't write to the camera depth and you still cast shadows from it then you may have run into a bug and need to report it to the respective owners.
     
    arnoob likes this.
  47. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    7,575
    Maybe it has been mentioned before, but is the new stuff in 5.6 going to allow to use NGSS without replacing the cginc?
     
  48. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,083
    No, not yet. Till unity allows to replace spot/point shadows the same way it does with Directional Shadows (through Editor Project Menu).
    But once ScriptableRenderLoops become the default renderer then NGSS install will be only one step setup. As of now it's a two step setup. ^^
     
    AcidArrow likes this.
  49. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,322
    Hi there,
    Using mobile here and only directional lights. Any hopes to get this updated to work with that? It would be great to have it on my iPhone 7 and androids...
     
  50. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,083
    Hi,
    It will be available in the next update (v1.3) but email support AT psychozinteractive DOT com with your invoice number and we'll provide it.
    Regards,
     
unityunity