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

    iileychen

    Joined:
    Oct 13, 2015
    Posts:
    104
    Waiting URP version.
     
  2. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,366
    Later this year yes.
     
  3. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,366
  4. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,869

    I LOVE YOU!
     
    tatoforever likes this.
  5. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    Hi people, I had this asset recommended and we would like to know if with it we can solve this known problem of unity's built in render pipeline:
    https://forum.unity.com/threads/directional-light-shadows-flickering-issue.672094/
    our project is the one of the last post, the city builder one. The problem as the post says is the shadow jittering when both: rotating the camera and some rotating objects that cast/receive shadow are being rendered.

    We are thinking to switch to URP but if this asset could solve that problem we would love to try it.
     
  6. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    839
    For me it helped a ton and pretty much removed the flickering. I don’t even notice it anymore.
    Talk to the developer, @tatoforever , he is very helpful and also has a discord channel.
     
    tatoforever likes this.
  7. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    Yeah I already joined the discord channel, are you developing for mobile by any chance?
     
    dsilverthorn and tatoforever like this.
  8. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    839
    No, I’m not doing mobile at this time.
    I hope it works for you!
     
  9. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    871
    I used it for mobile in the past and it worked well.

    I switched to URP tho.
     
    NeatWolf and pistoleta like this.
  10. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    Do you know if this works on mobile opengl 3? Because this is a major huge improvement if it does
     
    NeatWolf likes this.
  11. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,869
    YES.
    Check the other thread.
     
    NeatWolf likes this.
  12. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    I tried and this looks pixelated. I loaded the scene with the water. Is there a trick to it?
     
  13. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,869
    THE OTHER THREAD.
     
    NeatWolf likes this.
  14. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    839
    This is a Teaser for an upcoming project continuing the Apollo's Dream series.

    The video was made with Unity 2019 using this asset.
     
    tatoforever and PutridEx like this.
  15. Unplug

    Unplug

    Joined:
    Aug 23, 2014
    Posts:
    256
    hi guys, maybe you can help me out, i reopen my project, some meta file were corrupted, force to delete some unity folder to reimport stuff. after that, all shader related to naturemanufacture and AFS went white displaying error in the shader

    all material using those shader turn white. The reason i'm asking this here is that the shader error point to unityshadowlibrary.cginc

    operands to "%" must be integral at /unityshadowlibrary.cginc

    naturemanufacture have pretty essential and common shader, what am i supposed to do at this point ?
    (i have already tested deleting shader cache)
    This is running v2.2.5 in Unity 2017

    I have turn off auto graphics API for windows, to only use D3D11, should I reset that to auto, close restart, let thing compile and turn off after ?
     
    Last edited: Oct 17, 2021
  16. Unplug

    Unplug

    Joined:
    Aug 23, 2014
    Posts:
    256
    Can you please provide me an archive version of NGSS that is still compatible with Unity 2017. I want to try to set back original unityshadow librairy and reinstall a correct version. Maybe multiple version are being mixed up. Tell me please your email and what is needed

    I was able to reproduce the bug AND the fix in a new scene.

    while in 2017.4
    1- import naturemanufacture foliage asset
    2- import current 2.3.8.1 NGSS
    3- install with provided installer, delete shader cache folder and reboot
    4- everything work fine
    5- reimport naturemanufacture shader
    6- shader no longer compile and show error linked to shadowlibrary

    to fix again
    1- uninstall NGSS librairy
    2- delete shader cache
    3- reboot, eveything is still broken
    4- reimport shader
    5-everything work fine

    At that point, you can reinstall ngss, as long as shader are not reimported, their working bersion is cache and everything work.

    I have not tested a build to see if it get recompile in build and if everything goes pink again. At least now I know problem is between NGSS and multiple shader such as naturemanufacture and AFS. Hopofully I can get a fix or a working version for 2017
     
    Last edited: Oct 21, 2021
  17. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,869
    I think you will need to delete the LIBRARY folder of your project.
    Sometimes, when updating a project through several unity versions, the library folder gets corrupted.
    If you delete it, Unity will rebuild it from scratch, fixing migration errors.
    It will take some time though.
     
    Unplug likes this.
  18. Unplug

    Unplug

    Joined:
    Aug 23, 2014
    Posts:
    256
    the project was not updated, but some file were reimport. See my second post to understand how I can reproduce the error in a new fresh project.
     
  19. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,366
    You can download the latest version of NGSS in Unity 2018/2019/2020 and move that folder to your Unity 2017 project. It still work, is just that Unity doen't alloy me anymore to upload packages compatible with version older than two years...
     
  20. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,366
    Btw,
    If you want real-time fast response, join my discord. Im there 24/24, anyday. I check the forums not very often.
     
  21. JudahMantell

    JudahMantell

    Joined:
    Feb 28, 2017
    Posts:
    476
    Hey, Tato! This asset looks fantastic, but I'm using URP. Do you have an estimate on when it will be available?
    Thanks!
     
  22. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,366
    Hi,
    I'm currently working on it, should be available as a free update in the coming weeks. :)
     
  23. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    871
    Gasp for real!? And a free update?! You're too good to us T_T

    EDIT: I will gladly test if you're doing that, I work with android too :3
     
    tatoforever likes this.
  24. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,366
    Awesome,
    If you want to early test it, please join my discord (the link is in my signature). That would be great! :)
     
  25. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    839
    This video was made using NGSS. No better solution for shadows exist for Unity!



    Third in the Apollo’s Dream series, we make these for all people to find some peace and beauty in this world of chaos. We hope you enjoy it.
     
  26. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,366
    Beautiful work! :)
     
  27. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    839
    Thank you!

    And thank you for your work! It truly does bring out the beauty in the scene. So glad I purchased NGSS!
     
    Teila and tatoforever like this.
  28. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Best shadows ever. I love this asset.
     
  29. ciorbyn

    ciorbyn

    Joined:
    Oct 17, 2013
    Posts:
    138
    Hi, I have a question...

    is this addon capable of making darker shadows?
    I ask because the default "Strength" of the lights in unity at the maximum value 1 makes the shadow more washed out than it would be in reality in relation to the light and I'm looking for something that bypasses that parameter.
     
  30. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    871
    In that scenario if true i'd mayb reccomend a different baking solution like Bakery

    I don't think this will help with that shadow issue as it's an issue with ambient light and probably color grading/tonemapping not the shadow itself.
     
  31. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,682
    I'm not sure what your setting or what you're doing, but is it possible you have ambient light higher than you want? That would make shadows dim.
     
  32. ciorbyn

    ciorbyn

    Joined:
    Oct 17, 2013
    Posts:
    138
    Yes, of course the shadows are strictly related to the lighting settings and are attenuated or strengthened in relation to Scene light / envoroment light / enviroment reflection.

    What I would like however is:
    based on this ratio to have a greater administration of the degree of darkness in order to have stronger light / shadow contrasts than those obtainable with the basic values.

    I am looking a tool that can go beyond the standard value.
     
  33. look001

    look001

    Joined:
    Mar 23, 2017
    Posts:
    111
    Thank you for this asset! How is the status of URP version? I would like to switch to URP but I need these shadows...
     
  34. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    why would you like to switch to URP? It's horrible performance
     
    atomicjoe and tatoforever like this.
  35. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,366
    Later this year for the public version, we have a private version to be released in the coming weeks for a specific group of testers.
     
  36. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,869
    @tatoforever when are you releasing Forgotten Memories for PC? I really want to play that game! :p
     
  37. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,366
    It will be exclusive to Nintendo Switch for a couple of months. Then PS4/PS5 and PC will follow in late 2023! :V
     
    atomicjoe likes this.
  38. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,869
    Have you released it for Switch already?
    I love the Switch, but the poor little thing can't compare to a desktop GPU that's larger than the whole console LOL
     
  39. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,366
    Hehe, not yet. If we are lucky we publish late 22 - early 23.
     
    atomicjoe likes this.
  40. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,869
    Ok, no pressure, just release it when it's ready! :D
    Remember:
     
    Janoooba and tatoforever like this.
  41. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    712
    This is wrong, maybe you thought about HDRP - that is horrible performance. It's just not meant for games.
    URP however is great. I use it to achieve better graphics than standard. The only thing missing from URP is shadows - shadows are baaad. But they were also bad in standard so....
    This is what I did with URP:


    and

     
    tatoforever likes this.
  42. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    712
    When I saw the forum post about someone asking for the URP version I was tempted to reply with it will never be released....but wow you are on the verge!
    If there's room I'd love to be a beta tester for the URP version. The current shadows are .... not current! I mean they are baaad. Currently I have to use the trick of putting 1 spot light on the player for indoor scenes whenever he goes and of course that means if you rotate the camera the light rotates too, it's only noticeable if you pay attention but dang....sure would be nice not to have to do that.
    But the biggest issue is that constant warnings about shadows not fitting in a 4096x4096 shadow map....my scene isn't even big....
    I have a 3070 so I can test for the high end users. I also have a 1050 laptop.
    Let me know if you are interested.
     
    tatoforever likes this.
  43. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    @SilverStorm if your URP version runs faster than the built-in, that just means that you were doing it wrong in built-in. Built-in mobile shaders do not use PBR lighting, so it is literally impossible that URP is faster. On top of that, just run the profiler, your URP shaders are megabytes large in RAM (larger than the whole unity engine for one single shader!). In Built-in, the shader was rarely more than 3MB.

    In your game, the difference may be not enough to even notice, but that doesn't mean it´s faster than built-in.
    Anyway, use whatever you want, but trust me, URP is horrible performance compared to an optimized version of Built-in, that´s why many of us stick to it until URP is fixed.
     
  44. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,366
    URP performance in some Unity versions and some platform is worse than Built-in.
    @SilverStorm For the private test, head to the discord channel.
     
    atomicjoe likes this.
  45. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,869
    In my experience, stay away from the "new" scriptable render pipelines and learn the tricks to optimize your scenes with Built-in Forward render instead (or Deferred if you really need to render a lot of dynamic lights).

    There is nothing you can do with even HDRP that you can't do with Built-in. (except for floating origin rendering, but there is lots of ways to bypass its need anyway.)

    On the flip side, URP is slower, uglier and has less features than built-in forward. But also, the scriptable render pipelines are a nest of bugs, regressions, instabilities, completely incompatible with nearly a decade of shaders and source of all kind of frustrations.
     
    tatoforever likes this.
  46. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,366
    @atomicjoe, There's also a way to reuse forward opaque depth without a depth pre-pass that makes BIRP even faster than URP. Is a very small simple script that I wrote. But you gotta make sure nothing is enabling forward depth pre-pass (Screen Space Shadows and Motion Vectors enable depth pre-pass in a hidden way). Also PPv2 stack might not work or requires setup/change (I'm also not using PPstack due it is inefficiencies, rather an optimized micro stack).
    In conjunction with GPU Instancing (where possible), makes URP look like a toy in terms of performance.
    Furthermore, if you can manually render your scene doing indirect instancing (at least the static portion of it), you can get even greater increase of performance, this is what SRP Batcher does behind.
    However, I'm still porting NGSS to URP because there's many people already working with URP that needs better shadows.
     
    atomicjoe likes this.
  47. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,869
    I was just computing the depth myself in my opaque shaders and storing it in the alpha channel to ditch the depth pre-pass. (since I'm using my own custom shaders for everything and a floating point screen buffer for HDR anyway)
    But I didn't know you could reuse the opaque pass z-buffer.
    How do you do that? (in a fast and compatible way I mean)

    I will still store the depth in the alpha channel, since I'm making a copy of the whole opaque pass anyway for screen space effects, but now I'm curious! :p
     
    Last edited: Jun 4, 2022
  48. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,366
    Add this to your main camera. It manually sets camera render targets (color/depth buffers) and blits the depth buffer into a readable format (F32_unorm).
    Make sure nothing is enabling the depth pre-pass (eg: directional light with cascaded shadows enabled or Motion Vectors) or through Camera DepthTextureMode. Double check in the frame debugger to be sure.
    In some platforms like the Nintendo Switch the framebuffer is ina redable format, theres no even a single blit, is used directly. Performance increase by 15-30% using this trick.
    Note: It might interfere with your PPV2 stacks because renders the scene to temp RTs.
    [EDIT] Forgot to remove some dependencies of my game. I've replaced the file.
     

    Attached Files:

    Last edited: Jun 4, 2022
    nirvanajie, blueivy and atomicjoe like this.
  49. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,869
    WTF??!!
    What is this sorcery!! :D
    How comes the depth buffer is directly readable?
    This is a super awesome trick!
     
  50. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,869
    THANK YOU!!
     
    hopeful likes this.