Search Unity

  1. Unity 2019.1 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. SunnySunshine

    SunnySunshine

    Joined:
    May 18, 2009
    Posts:
    643
    Interesting. What exactly do you mean by "semi-transparent"?

    The problem I have is that I want to blend an object in with its environment based on z-depth (essentially making it fade out the closer it is to the surface behind), but the only way to access the depth buffer is in the transparent queue. However, putting an object in the transparent queue makes it unable to receive shadows. This is my problem.

    (The object doesn't even need to use alpha at all, it could simply use GrabPass and lerp to its color based on depth. The problem is in order to access depth, it needs transparent pass, and transparent pass removes shadow reception.)

    Would your custom solution work for this scenario?
     
  2. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,722
    @SunnySunshine
    What exactly are you trying to achieve with such effect? A water shader, or just regular Standard shader that fades with the background? I need to understand exactly, otherwise I can't tell you if my custom solution will solve your problem or not. Maybe you can approach the problem differently?
     
  3. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,722
    @SunnySunshine
    This is a quick way to have hackish semi-transparent surfaces to receives shadows:
    https://drive.google.com/open?id=1Q1OULvSt9ecanQLa7Gt6ERFvcLZTFyn8

    I quickly dit it using a surface shader. The best way to do it is to write a custom CG shader where you access the built-in macro functions to add lighting to it and decode shadows directly on the fragment shader. But is not recommended for simple stuff, unless you need a more complex effect. Hence why I asked what where you trying to achieve.
    Cheers,
     
  4. SunnySunshine

    SunnySunshine

    Joined:
    May 18, 2009
    Posts:
    643
    I'm trying mitigate clipping between two intersecting bodies by blending them in based on distance:
    https://gyazo.com/ba04757274cb58056108593f36bf548d
    (Toggling depth fade on and off.)

    Here, the larger sphere is opaque and the smaller one is using a transparent depth fade shader. The problem now is that the object in transparent pass doesn't receive shadows:
    https://gyazo.com/11e3860733d9cb425ef613b368cd38a1
    (Toggling depth fade shader on and off with shadows present.)

    I can imagine that since the object doesn't lie flat on a shaded surface, but rather has its own shape, it may complicate things.
     
    Last edited: Jan 28, 2019
  5. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,722
    @SunnySunshine
    Yeah, that's an interesting problem. I have some ideas to tackle it but first, could you please write me to: support AT psychozinteractive DOT com
    and we will pick up there. I don't want to derail the thread (even if it's shadows related) I have to keep the noise as low as possible and I feel like we going to have multiple back/fort messages. :)
    See ya there. :D
     
    SunnySunshine likes this.
  6. mehrankan

    mehrankan

    Joined:
    Apr 12, 2015
    Posts:
    52
    that's good to know man.
     
    tatoforever likes this.
  7. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,722
    Folks,
    We've figured out the problem with the asset submission and it was my v2 package that had the same name as the old package. So the solution was to deprecate the old one temporally while the new one gets enabled by the asset store folks. So you should have access to NGSS v2 somewhere today.
    Here is the the new link to NGSS v2:
    http://u3d.as/1qNz
    Just in case, please read the documentation, lot of things changed in v2. :)
     
    ceebeee, Bartolomeus755 and WuceBayne like this.
  8. Suki-W

    Suki-W

    Joined:
    Mar 11, 2014
    Posts:
    33
    Can we get a video tutorial for NGS 2.0? Thanks.

    Do we have to make whole new project? Or delete using the NGS 1.9.6 UnityShadowlibary or revert back to default UnityShadowlibary.
     
  9. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,722
    @Suki-W
    I'm making a video tutorial, you just need to delete your old files of NGSS 1, including the ones you installed in CGIncludes folder. Then you can proceed to the instalation of NGSS 2 as described in the documentation.
     
    Last edited: Jan 29, 2019
  10. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,722
    Video tutorial:

    I also submitted a macro update with nothing new, only the video in the Asset Store page.
     
  11. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,299
    ...using that garbage os called windows 10.. just upgraded to 2.0 and the automated installer gives this error

    Access to the path is denied.

    If I launch the editor directly.... I get the Unity's bullcrap hub S***ware with an Error launching application: The application path 'C:\Program Files\Unity\Hub\Editor\2019.1.0b1\Editor\Unity.exe' cannot be opened.. when launcher with Run as administrator ... ..while launching the bullcrap hub with administrator results in the above access to path is denied error aswel..

    I guess the beta testing of 2.0 didn't go well... anyway manual install worked but be nice to get the above sorted so it's working better upgrades.
     
    TreeMSI likes this.
  12. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,722
    @Player7
    I guess the admin rights don't propagate after UnityHub launch Unity, so what is running in admin mode is the Hub instead of Unity because it launch Unity.exe with standard privileges.
    I'm looking into a way to workaround the UnityHub issue and send a quick patch update asap. For now yes, manual install as before. :\
    PS: Manual instalation steps are described in the documentation but wait for the patch if you don't want to manually install the files.
    Don't worry, I'm on it.
     
    Flurgle and Player7 like this.
  13. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,722
    @Player7
    By default Windows 10 gives applications standard user privileges, sometimes it gives less privileges depending on the security settings. So yeah, that's sux.
    But don't worry im on it.
     
    Flurgle likes this.
  14. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    333
    Hi @tatoforever !
    I bought the first version of NGSS and loved it!
    However it didn't work on Android when I tried it.
    I thought it was because there is no soft shadows on mobile.
    Now I see the new version is supposed to support GLES3, Vulkan, Switch and iOS, so... are smooth shadows working on Android Vulkan?
    My current project target is the Nintendo Switch, but since I don't have a Switch developer kit, I use an Nvidia Shield TV on Vulkan to test it, since they have the same Tegra X1 and performance should be similar (I know the Switch is underclocked, but still).
    Have you ACTUALLY tested NGSS2 on Vulkan for Android?
    I ask because Unity is supposed to support plenty of things on Android Vulkan that actually won't work, like soft shadows, compute shaders, screen space reflections and tessellation.
    Could you triple check it's ok for Android Vulkan or send me an APK of a demo?
    Any info on performance hit?

    Also, I just discovered your game Forgotten Memories.
    As a fan of Silent Hill I couldn't believe this went under my radar for almost 4 YEARS!!
    But then I saw it's for iOS only! WTF??
    Do you realize your target audience (people like me) WON'T be checking out and buying games on iOS or even Android??
    No Steam, Xbox, PS4 or Switch version?? HOW AM I SUPPOSED TO PLAY IT??
    As much as I want to buy your game, I'm not buying an iPhone to play it :p
     
    tatoforever likes this.
  15. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,722
    @atomicjoe
    Hey man! :)
    Well, yeah unfortunately NGSS is limited to what Unity supports because we use their renderer lights/depthmaps.
    In theory if you see shadows in some platforms, NGSS should work there if the platforms supports SM3.0.
    We are porting Forgotten Memories to Nintendo Switch and I posted a couple of videos in the last pages showcasing indoor NGSS shadows. So yes NGSS works perfectly fine on Switch. You just need to be careful about the quality.

    Btw, Guy Cihi (James in Silent Hill 2) is in my office right now. He owns a software company and we've been working together for quite a while now. David Schaufele (Eddie) and Guy did some voice acting on Forgotten Memories and he's the main character of our next game.

    How small is the world right? :)
    Cheers,
     
    Last edited: Jan 30, 2019
  16. Krokua

    Krokua

    Joined:
    Jul 19, 2017
    Posts:
    2
    Have only one question.
    Do I need to buy a new version if there is an old one?
    In this case, what to do with the old version?
     
  17. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,722
    @Krokua
    No, you don't to need to upgrade to the new version if you don't need it right away. The old version got deprecated in the Asset Store but you still have access to it in your account, forever.
     
  18. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    853
    It looks like if you have already bought the old NGSS, then you can upgrade to NGSS 2 for only $15, where as it would normally cost $30. Am I interpreting that correctly? That's a good deal.
     
  19. Simunek

    Simunek

    Joined:
    Jul 15, 2016
    Posts:
    15
    Hi,

    I have purchased version 1.96, can I get 2.02 or I have tu purchase it?

    Thanks for reply!
     
  20. DgoodingIndi

    DgoodingIndi

    Joined:
    Feb 8, 2012
    Posts:
    35
    Hey there. I have been playing around with Version 2 of NGSS.

    Is there any plans to add shadow strength, or Per light Opacity settings for Point lights?

    I had been using Shadow strength to fade in user placed shadows to keep shadow count down,but with NGSS they all just sort pop in as I get within the set distance, which looks pretty gross.

    The lights themselves fade, but I don't want to make light count, and shadow count a 1:1 ratio.


    If not, I wont be grumpy, the directional light library is enough to make the asset worth for me.
     
    Last edited: Jan 31, 2019
    atomicjoe likes this.
  21. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,722
    @kdgalla,
    Correct, the upgrade for v2 is only 15$. Regular price for a new user is 30$.

    @Simunek
    If you are a v1 user, you can get v2 for 50% discount @15$.

    @affordableaudio
    Unfortunately no (at least for now), the strength is only globally because I don't have access to lights index in the default renderer which means what you tweak in the GLOBAL_SETTINGS affects all your local shadows. But don't worry I'm looking into ways to improve even more these features. Could you please email support with your particular needs, I will try to think about a temp solution for ya. ;)
    And don't worry, any comment and complain is a good feedback, I take them very seriously.

    Let me know folks if you have any question, I'll be back multiple times a day to get your messages and answer back asap.
    Cheers,
     
  22. ikazrima

    ikazrima

    Joined:
    Feb 11, 2014
    Posts:
    270
    Is the upgrade period limited? Some other assets doesn't let me upgrade anymore after a number of updates, and I need to repurchase.
    Short on cash right now, but love the offer.
     
    tatoforever likes this.
  23. RonnyDance

    RonnyDance

    Joined:
    Aug 17, 2015
    Posts:
    555
    Hey I just saw your asset for the first time.
    How do you handle shadows that are far away? Normaly in Unity or AAA games you see that shadows are getting more detailed and sharper with close dinstance. Far away you don't see them or you will have pop up effects.
    How do you handle this situation? Are you using the Unity distance shadow settings? Do you also have the typical pop up effect or do you have something like a cross fade effect?

    What I am missing seeing all your Youtube videos is a comparisation video like your Shadows Vs. the normal Unity shadows.

    Cheers
    Ronny
     
  24. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,722
    @ikazrima
    As long as you own the old v1.9 you will get the discount forever. :)

    @RonnyDance
    NGSS uses Unity default renderer, so it behaves exactly the same as Unity default shadows and is compatible with any asset in the Asset Store. The only difference is visual quality. NGSS shadows looks smoother, better and provides many options to tweak shadows for your project needs.
     
    ikazrima likes this.
  25. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,722
    Upcoming frustum traced shadows in v2.1:
     
    ftejada and ceebeee like this.
  26. ceebeee

    ceebeee

    Joined:
    Mar 7, 2017
    Posts:
    339
    That looks amazing. I am just curious though, does it still basically generate 6 shadow maps like regular point lights do?
     
  27. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,722
    @ceebeee
    No, it either blends if there's any shadowmaps or apply it's own frustum traced shadows. Its directly being called into the lighting pass, no extra blit (currently the case for ContactShadows). We also get an extra bilinear sampling in that process for free.
    In fact, in the shadow pass we now have (v2.1):
    - shadowmap
    - frustrum shadows
    - and soon Primitive Shadows.

    I'm doing more experiments with primitive shadows which can come to rescue to frustum shadows to fill in invisible parts casting shadows.
     
    ftejada, ceebeee and hopeful like this.
  28. lovehate

    lovehate

    Joined:
    Jul 24, 2018
    Posts:
    1
    Hello,

    We purchased NGSS2 two days ago and we have been messing around with it since.

    Unfortunately, what I can see in the discussion above about Android is theoretical speculation that everything should be working and no actual confirmation from the author the product has been tested for this platform.

    Firstly, the automatic installer completely freezes Unity (2018.3.3f1) immediately after you click any button.

    After doing the manual installation, we experienced a 20 fps drop when building the same scene with NGSS2 shadows, compared with the default Unity shadows. Another thing - all lights turn black if you don't attach the respective NGSS2 component. Does this mean that after installation, you have to obligatory use the respective component on all scene lights?

    Can you please do some Android testing (with an actual scene that contains more than a few simple elements) to confirm whether you can reproduce the described above behavior?.

    Thanks.
     
    Last edited: Feb 1, 2019
    atomicjoe likes this.
  29. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,722
    @lovehate
    Hi,
    The game have been tested in both iOS and Android platforms, the results you hare having are expected, here is an explanation:
    It's normal that lights turn black after installing the package because the NGSS libraries are expecting being feed by NGSS components. That's the reason in the documentation and the tutorial video, it says to add the NGSS light components after the installation of NGSS libraries (before restarting the Editor).
    You don't have to attach NGSS_Local components to all your local shadows, only on the ones you want to control shadows look and one of those should have the NGSS_MANAGE_GLOBAL_SETTINGS enabled.

    If you are targeting low end devices such as mobile, disable Cascaded Shadows in your project Graphic settings. If you don't disable Cascaded Shadows the denoiser will be running after the shadow pass for your directional shadows which is not recommended for mobile.
    It is important to reduce as much as possible the sampling count for all your shadows (Directional and Local). If you build the default test scenes for your Android device, then of course it will be slow because isn't setup for mobile, is setup for Desktop.
    If you are already GPU bound, you should try to free some GPU resources to the shadows, shadows is a very expensive operation, specially on mobile.

    I'm investigating the freeze, NGSS 2.0 was tested with all versions from of Unity from 5.6 up to 2018.3.2f1 before submission to the Asset Store. Version 2018.3.3f1 was available this week and the NGSS 2 was already in review. Did you run Unity in admin mode? I will try to reproduce your freeze and issue a quick patch when I find the problem asap.

    In any case, if you are not pleased with the results, you can ask for a refund.
     
    Last edited: Feb 1, 2019
    ftejada likes this.
  30. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,722
    @lovehate
    I tested with the latest release and it works fine, no Editor hangs. I believe Unity the reason it hangs for you is because UnityHub which im doing some tests right now. I'll keep you updated on that.
     
  31. alejobrainz

    alejobrainz

    Joined:
    Sep 10, 2005
    Posts:
    250
    Really excited to be using v2 update. v1 has worked great on our game.

    We are prototyping an AR feature, and I'm having a strange issue with an ARKit Camera. I wanted to use NGSS to make a soft shadow on the floor form a directional light, but the shadow seems to be detached and actually offset from the shadows casting object and the floor. Unity Shadow Maps work fine, as soon as I switch to NGSS, it goes crazy. To make it clearer I used a quad floor with a white diffuse shader:

    This is the unity Shadow Map:
    Screen Shot 2019-02-01 at 5.11.03 PM.png

    This is NGSS:
    Screen Shot 2019-02-01 at 5.13.14 PM.png

    Screen Shot 2019-02-01 at 5.13.28 PM.png

    I sent you a couple of videos to the support email just in case.

    Please Advice.

    Best,

    Alejandro.
     
  32. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,722
    @alejandrobrainz
    Are you sure those are NGSS shadows? They don't look that much smooth. :D
    Thanks for reporting. I've followed your questions through support email, I'm looking into your issue now.
     
  33. alejojamcity

    alejojamcity

    Joined:
    Aug 30, 2018
    Posts:
    2
    They are. I put them on the lowest settings so that the shape of the shadow was clear. When set to high res and smooth they are great.
     
    tatoforever likes this.
  34. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,722
    @alejojamcity
    Sure thing, If with Unity is working great and NGSS not, then I will find the issue and fix it quick don't worry. But first I need the test case to be able to reproduce the issue. :)
    Cheers,
     
  35. Bzuco

    Bzuco

    Joined:
    Sep 6, 2015
    Posts:
    26
    @tatoforever
    Hi, I can not get to work receiver plane bias on win standalone build. It is working only in the editor for me. Am I doing something wrong? Any advice? :)
    Unity 2018.3.4, ngss latest, deferred, linear, default RP, all 3 cginc files replaced, whole Library folder deleted and recreated after unity restart.
     

    Attached Files:

    • ngss.jpg
      ngss.jpg
      File size:
      173.1 KB
      Views:
      60
  36. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,722
    @Bzuco
    Im fixing couple of minor issues reported by users and if there's any issue with that will include it in next week patch.
    I'm looking into that, making some builds to test.
    Thanks for the report.
    Will keep you updated. :)
     
    Bzuco likes this.
  37. skyecrack

    skyecrack

    Joined:
    Jan 5, 2018
    Posts:
    29
    Hey. The new version looks amazing. Any updates on cached shadows tho? :(
     
  38. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,722
    @skycrack
    Cached shadows are planned after v2.1.
     
    skyecrack likes this.
  39. Flurgle

    Flurgle

    Joined:
    May 16, 2016
    Posts:
    346
    Wow, a top 10 steam game is using NGSS (50k+ players a day):

    upload_2019-2-2_21-5-45.png



    Congrats tato. Maybe this is old news, but first time I read it.
     
    atomicjoe likes this.
  40. alternativevisual

    alternativevisual

    Joined:
    Apr 16, 2015
    Posts:
    55
    upload_2019-2-3_9-8-43.png

    Hello there ! :)

    Just bought v2. And while waiting for updates... I can't look at this inspector :mad:
    upload_2019-2-3_8-55-36.png

    And so now i'm writing custom editor for my favourite and loveable asset:p
    upload_2019-2-3_8-56-38.png
    Works with multiple objects editing, folded with animation, and code is clean:cool:

    @tatoforever, Are you interested to include this in the next updates?:oops:
    I'm gonna show a quick video on every component when i finish it.
     
    tatoforever likes this.
  41. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,722
    @alternativevisual
    You are such an awesome user! Yeah your custom inspector looks lovelly! I wrote a quick one for NGSS_Local and had plans to write one for NGSS_Directional but you beat me to it! Yes im interested, poke me through support email if you want to disscuss about it. :)

    @Furgle
    Yes, NGSS have been used in many successful commercial Unity games. Rust is one of those. Prof that it works. :cool:
    Btw, that update is related their server side builds that includes many client assets which aren't really needed to be in the server.
    Diogo Teixeira is the main Graphics programmer of Facepunch, I help him with any NGSS related integrations. They have a custom renderer. :)
     
    alternativevisual likes this.
  42. alternativevisual

    alternativevisual

    Joined:
    Apr 16, 2015
    Posts:
    55
    Fuh. Check this out)
     
    skyecrack, ceebeee and tatoforever like this.
  43. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,722
    ceebeee likes this.
  44. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,722
    New guy in the town:

    Demonstration of Primitive shadows on animated caracters using only boxes and spheres aproximations. Bonus a new capsule shadows primitive has joined the family! :)

    - Credits to the awesomesauce game World War Doh by Jam City
     
  45. alternativevisual

    alternativevisual

    Joined:
    Apr 16, 2015
    Posts:
    55
    Having a problem, when NGSS isn't imported in the project, but library is used in Unity.

    Any light source that cast shadows makes objects black.
    upload_2019-2-5_3-7-42.png upload_2019-2-5_3-22-2.png
     
  46. alternativevisual

    alternativevisual

    Joined:
    Apr 16, 2015
    Posts:
    55
    And after import, there is one little warning
    Unity 2018.3.4f1
    upload_2019-2-5_3-29-31.png
     
  47. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,722
    @alternativevisual
    That's expected. You need to add NGSS_Local component to at least one of your lights after you install NGSS libraries so the libraries are properly feeded. If you have NGSS local libraries installed and no one is feeding them all the uniform variables will be set to 0, the reason why is completly black. There's no way to set default values for uniforms, compiler ignores them. I can add extra default values in the shader but this will cause extra unnecessary computation.

    As for the warning. You can ignore that silly compile warning. If you look at the line in the library it refers to the diskRadiusPCF variable being created and feed automatically, this doesn't cause anything. It can be removed if you set it to some value before using it. But yeah, silly warning that might cause panic in some users. I need to get rid of that quick. :D
     
    alternativevisual likes this.
  48. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,722
    Same as above but instead of boxes and spheres now is fully approximated with capsules.





    Btw, this is runnig in mobile ultra faste (faster than shadowmapping). :p
    Also capsules can now have each extremities with different radiuses sices which allows to approximate body shapes of different sizes very well. Im writing a custom editor gizmo to allow users to control that cause is hard to tweak it using the Unity default capsules. In fact when the gizmo is ready, we won't need any meshrenderer in the editor anymore as primitive shadows don't need any of that. More videos soon. :)
    PS: I'm fixing all reporting bugs and should the patch be submited to the store sometime this week. @alternativevisual is helping improving editor inspectors so i can focus more on the GPU stuff. Kudos to him! :)
    - Credits to World War Doh game by Jam City New sponsor!:cool:
     
    Last edited: Feb 5, 2019
    atomicjoe, Baraff, Lex4art and 5 others like this.
  49. alternativevisual

    alternativevisual

    Joined:
    Apr 16, 2015
    Posts:
    55
    But does it support OpenGLES 2?
     
  50. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,722
    @alternativevisual
    No, same minimum requirements (SM3.0 or higher). Cause Primitive Shadows requires a high number of math instructions as shapes are created analitically in the GPU.