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

    canek

    Joined:
    Sep 13, 2014
    Posts:
    21
    @Flurgle Thanks for replying. Yes, I did. I followed the instructions in the PDF.
     
  2. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    This is a semi-rhetorical question, but is it really the case that the system falls back to Unity default shadows when the custom shader is not set in the graphics settings? I'm toggling back and forth between NGSS and default shadows and I'm just blown away.

    Even with No Cascades, NGSS looks better than Unity default shadows with four cascades.
     
    Last edited: Apr 20, 2017
    hopeful and tatoforever like this.
  3. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    @canek
    iOS directional shadows got fixed in v1.3. I'll start replying back very soon to pre-release users, we fixing our email server right now or just wait few days more till it hit the store (already submitted).
     
  4. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    @buttmatrix
    Hi,
    Yes it was done on purpose so people can compare between default shadows and NGSS shadows without the need to do anything else. Also for very low end devices, you can still switch back at runtime to default shadows if you want. Thought, not the case with Point Light shadows as both Hard and Soft mode provides two filters (PCF and PCSS).
    With version 2.0 you will have more than two shadow filters (4 modes: Hard, PCF, PCSS and RayTraced).
    Regards,
     
  5. Kolyasisan

    Kolyasisan

    Joined:
    Feb 2, 2015
    Posts:
    397
    Hi, I've been sending you messges with request for the new version but you're not responding. What's wrong?
     
  6. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    I am interested with this asset. But I was wondering if this asset can be used with the shadow that is casted by the transparent polygons. At the moment, the unity default one just dithers the shadow with patterns to make it look like some light is passing through , but this honestly is very ugly.

    Also does it work with the deferred path lighting?
     
    tatoforever likes this.
  7. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    @Kolyasisan
    Hey, :)
    We are solving an issue with our email server, some of the emails you sent probably never reached destination. :\
    For v1.3 would be better to wait few day mores till the update hit the store.
    Sorry for the inconvenience.
     
  8. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    Hi,
    Shadows from semi-transparent materials are natively supported by NGSS and they will naturally look a bit better. This is done with the shadow collector pass (not really inside NGSS), you will write to light depth the pixels you believe occlude enough light to cast shadows.
    PS: NGSS works anywhere default Unity shadows works (including all supported platforms Unity already supports).
     
  9. Feelnside

    Feelnside

    Joined:
    Sep 30, 2016
    Posts:
    83
    Hi, I sent an email but didn't get any response. Do we have any updates related to the 1.3 version? It would be great to see how it works on android/iOS platforms becouse for now version 1.1 is not working on mobile platforms.
     
  10. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    @tatoforever Will contact shadows work in Forward? I haven't seen any indication otherwise, but the only other contact shadows asset I've seen is deferred only.

    Also, there was mention of Forward+ rendering for v2.0. Are there any details regarding that implementation at this time?
     
    tatoforever likes this.
  11. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    Ok, here is my piece after experimenting the asset in various platforms excluding mobiles.

    PC - Performance difference is great and it doesn't take much from the gpu running on GTX 660 so no brainer here.
    PS4 - Performance hit is a lot more than PC. If the game doesn't require 60fps, this asset can possibly used on selective cases.
    XboxOne - I will report this later.
     
    tatoforever likes this.
  12. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    @castor76
    Upcoming version 1.4 will provide various quality/visual sets. It should allow you to selectively get what you need depending on your target platform.
     
  13. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    @buttmatrix
    Yes, contact shadows works with Forward and it's basically free as Directional shadows requires depth. ;)
    [EDIT] Also it works on Editor scene, you don't have to hit play to preview it. Setup is as simple as drag the component to the camera.
     
    Last edited: Apr 26, 2017
    buttmatrix likes this.
  14. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    Folks,
    We got everything back, I've already started replying emails with v1.3 package. If you haven't yet emailed us about v1.3, it's a good time to do it. If you've already emailed us, stay there, you should receive an email from us in the coming minutes. :)
    If you don't get any email in the coming two hour from us it means your pre-release request got lost with our Email server crash last week. But it's ok, just write support again with your invoice number.
    Regards,
     
    Last edited: Apr 26, 2017
    punk and buttmatrix like this.
  15. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    Close up details of NGSS Contact Shadows:


     
    Lex4art, TerraUnity, one_one and 3 others like this.
  16. punk

    punk

    Joined:
    Jun 28, 2013
    Posts:
    408
    Do they work in single pass VR, do you know?
     
    tatoforever likes this.
  17. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    I still have a lot of experimenting to do, but my first reaction to v1.3 is that this is a game changer. Excellent work @tatoforever
     
    tatoforever likes this.
  18. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    How can I get access to the early 1.3 build?
     
    tatoforever likes this.
  19. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    email support (see asset store home page link)
     
    tatoforever likes this.
  20. alternativevisual

    alternativevisual

    Joined:
    Apr 16, 2015
    Posts:
    75
    One question, will this work with my weapon model? Rendering by single camera, deferred mode, cast shadows off.
     

    Attached Files:

    tatoforever likes this.
  21. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    Yes, it works with anything that writes to depth, Forward or Deferred and any platform that supports SM3. You however need to enable shadows on your light, otherwise it wont work.
    Regards,
     
  22. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    TBH, I haven't tried yet with v1.3, I'll report about it asap.
     
    punk likes this.
  23. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    Email support AT psychozinteractive DOT com with your invoice number and we'll provide v1.3.
    Regards,
     
  24. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    What technique was implemented to achieve the contact shadows, and are their plans to implement additional methods to adjust penumbra size / fade?
     
    AcidArrow likes this.
  25. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    Yes, technique is similar to Unreal Engine one plus you can tweak 4 options: shadow softness, shadow distance, ray width and ray traces (samplers per fragment). Default options should give you correct results but you can tweak it to your needs. Works in Editor View and works with Deferred and Forward rendering paths.
     
    buttmatrix likes this.
  26. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    Excellent! Just to be clear, I was referring to methods like reverse zdepth, increase shadowmap size, etc., or is this already occurring under the hood in NGSS?
     
    tatoforever likes this.
  27. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    Folks,
    Seems like Unity overrides any custom directional shadows on mobile platforms if Forward rendering path is set. I'm hacking through the rendering files to see if I can find a workaround while I check with Unity devs about that issue.
     
  28. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    This is already being taken care of in all shadowing techniques provided by NGSS.
    Btw, NGSS re-uses Unity native shadow & depth textures without duplicating or creating any extra texture.
     
    Last edited: Apr 26, 2017
    buttmatrix likes this.
  29. Teh_Lemon

    Teh_Lemon

    Joined:
    May 12, 2015
    Posts:
    17
    Here's a funny looking bug with the contact shadows. Unity 5.6, Windows 10.

    The scene view seems to be using the game camera's contact shadows while the game is playing.


    When the game isn't playing then the directional light doesn't show at all in the scene view. Or perhaps the entire scene is actually covered in shadow so it looks like it's been turned off?

    Doesn't seem to be caused by any other components on my camera or light. Forward/Deferred both look the same.
     
    tatoforever likes this.
  30. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    @Teh_Lemon
    Hi,
    Blind shot, did you attached the ContactShadow component to your main camera? If you attach it to another gameObject you will have such results. It have to be attached to your main camera so properties are copied into SceneView camera (to properly work in Editor).
    If by any means you still have this gitch, edit the ContactShadows file and comment the line above ExecuteInEditMode while we look at the problem and would be nice if you can send us a small repro projet but try first the suggestion I've made.
    Regards,
     
    Last edited: Apr 27, 2017
  31. ekergraphics

    ekergraphics

    Joined:
    Feb 22, 2017
    Posts:
    257
    I manage several different projects in Unity. Reading that this asset needs a modification of the Unity installation, if I only wish to test Next Gen Shadows on one project, will these modifications still affect my other projects?

    Also, any ETA on the scriptable rendering pipeline implementation for 2017.1 which I'm guessing won't need any modifications?
     
  32. punk

    punk

    Joined:
    Jun 28, 2013
    Posts:
    408
    Here's a pic of Brides Of Vampira using using the latest NGSS - no contact shadows

    1.31 looks really good, the only downside I noticed was that the contact shadows are pretty slow, with out contact shadows my scenes run at 100 fps, with contact shadows on they run at 60 and on a close character shot like the one below it drops to 20 fps, that's with the default settings tho 64 samples and it could be something to do with my project

    Its impossible to go back to stock shadows after using NGSS :)

    lastVampireTemplate.jpg
     
    Last edited: Apr 27, 2017
    OCASM, Flurgle, buttmatrix and 2 others like this.
  33. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    @punk,
    Reduce the contact shadow distance and samplers. See how it goes.
     
    buttmatrix likes this.
  34. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    Hi,
    For Point and Spot lights shadows yes cause you are modifying source install (CGInclude) files. But you can always switch back to your default point/spot shadows as it's a simple two steps setup.
     
  35. Deleted User

    Deleted User

    Guest

    Do the contact shadows only work with directional lights right now? I couldn't see any effect with point lights after adding the script to my main camera
     
  36. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    For now only directional lights yes, NGSS v2 will support all lights.
     
  37. punk

    punk

    Joined:
    Jun 28, 2013
    Posts:
    408
    still quite a hit, I'm using unity's post processing stack, Ambient Occlusion/SSR/Motion Blur/Bloom/etc and enabling the contact shadows takes up more juice than the entire stack, I'm assuming it's not that expensive an effect and you don't notice that on your machine? I don't really need it at the moment, so I'll just leave it off for now - just seems odd :confused:
     
  38. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    @punk,
    Have you triend disabling other effects and leave the ContactShadows alone, see if you are GPU bound on it?
     
  39. punk

    punk

    Joined:
    Jun 28, 2013
    Posts:
    408
    If disable every other effect and just have contact shadows on I get about 70fps and i'm not GPU bound, contact shadows off and everything else on I get over 100fps

    I am GPU bound if I have both on, I've got a 980ti, is it quite GPU intensive? Tommorow I'll do some better tests and some profiling
     
    Last edited: Apr 27, 2017
  40. punk

    punk

    Joined:
    Jun 28, 2013
    Posts:
    408
    It's a great product anyway I'm probably just throwing to much at the GPU
     
    tatoforever likes this.
  41. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    You should not have such hit, looks like a bug. I'm investigating.
    [EDIT]
    Got it fixed, posting the fix right now.
     
    Last edited: Apr 27, 2017
    hopeful likes this.
  42. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    User @punk discovered a small issue when the camera is really close to surfaces casting contact shadows. Found the issue and fixed it, here's the solution.
    On NGSS_ContactShadows.shader, at the end of line 92 you, will see 0.1); Simply add 0.1 to 0.1 like so:
    0.1 + 0.1
    This simply add a small offset (0.1) to avoid having too much samplers on surfaces close to camera near plane.
    PS: You don't have to redo setup in order to have the fix, just add the fix and get back to Editor. I'm going to reply everyone who sent an email for v1.3 with the new version fixed.
    Sorry for the inconvenience.
     
    Last edited: Apr 27, 2017
    punk likes this.
  43. Teh_Lemon

    Teh_Lemon

    Joined:
    May 12, 2015
    Posts:
    17
    Hi thanks for the reply. I've emailed you the repro project.

    Regarding commenting out the lines:
    Commenting out [ImageEffectAllowedInSceneView] does nothing.

    Commenting out [ExecuteInEditMode()] fixes the light not showing in scene view when the game is not playing.
    While the game is playing the bug is still present.

     
    tatoforever likes this.
  44. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    @Teh_Lemon
    This is strange, just opened your provided repro-project and there was no issue, SceneView:

    GameView:

    I'll keep looking at see if I can trigger it.
     
  45. Teh_Lemon

    Teh_Lemon

    Joined:
    May 12, 2015
    Posts:
    17
    I booted up an old backup of Unity 5.5 and updated my drivers while I'm at it (Nvidia 1070).
    Again, new empty project, imported NGSS and opened your grass showcase scene. Bug is present here too.
    Strange indeed.
     
  46. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    @Teh_Lemon
    That could be the problem (Unity 5.5). Have you tried with Unity5.6?
     
  47. Teh_Lemon

    Teh_Lemon

    Joined:
    May 12, 2015
    Posts:
    17
    Yes. My main project is in 5.60f3.
     
  48. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    Folks,
    Found a small typo on Documentation for Mac install of UnityShadowsLibrary.cginc:
    The correct path is: /Applications/Unity/Unity.app/Contents/CGIncludes/
    That's where you have to drop NGSS UnityShadowsLibrary.cginc file.
    Fixing the documentation to reflect that change.
     
  49. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    For now comment the line [ImageEffectAllowedInSceneView] at the top of the class name till I found a way to repro it, till now I was unable to re-pro it on 5.6f3.
     
  50. punk

    punk

    Joined:
    Jun 28, 2013
    Posts:
    408
    That 1.3.2 fix you sent through fixed the performance issues, barely any impact at all now, I tested it with single pass VR, currently not working, but great work as usual ;)
     
    buttmatrix and hopeful like this.