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

    Demhaa

    Joined:
    Jun 23, 2018
    Posts:
    35
    How well do translucent objects fair for shadow cast/receiving?
     
  2. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    I'm not sure to understand your question but Unity don't do any sort of translucency by default, however there's a number of asset store packages such as UBER shader and AFS that does translucency and are compatible with NGSS.
     
    hopeful likes this.
  3. Passeridae

    Passeridae

    Joined:
    Jun 16, 2019
    Posts:
    395
    Hi!
    Do you have any plans on releasing HDRP version any time soon? If so, do you have at least an approximate time frame in mind?
    Thanks!
     
    Gooren likes this.
  4. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    Hi @passeridaepc,
    Not anytime soon, more like sometime in the future and for obvious reasons. Both HDRP and URP are usable for end users but not for Asset Store devs like me. I have already wasted a good amount of time porting NGSS to SRP so I decided to put it on hold for now but I will eventually comeback and finish (or redo) the work when SRPs is more feature complete and extendable.
     
    corjn, bac9-flcl and hopeful like this.
  5. Stormbreaker

    Stormbreaker

    Joined:
    Aug 15, 2012
    Posts:
    161
    @tatoforever I seem to be getting a weird square artefact from point lights when placed near a surface (screenshot attached). The shadow from the cube looks great. I can fix it by changing NGSS_PCS_SOFTNESS_FAR to 0 but then that defeats the point of the product.

    Any idea what is causing this and how to fix it? Doesn't really matter in this demo scene but it looks pretty bad and pronounced in my actual level.

    Details:
    Unity 2019.3.14.f1
    MacOS Catalina, Metal API
    All 3 NGSS CGincludes added
    Surface material using Standard shader
    32-bit shadows enabled
     

    Attached Files:

  6. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    Hi,
    Those are normal shadowmapping artifacts with large kernel soft-shadows. You can mitigate this problem by rising the shadows bias, reducing the softness amount and by disabling self-shadowing on objects that don't need to cast shadows, such as floors or ceilings (or even delimited exterior walls). Also, enabling PCSS algorithm helps fighting this artifacts quite a lot as unocludded fragments are discarded and not shadowed.
    You can also enable slope based bias but currently only works on Spot Shadows and directional lights, I'm working on a solution for point lights that should land in the next version soon (v2.3).
     
    hopeful and Stormbreaker like this.
  7. Stormbreaker

    Stormbreaker

    Joined:
    Aug 15, 2012
    Posts:
    161
    Thanks for the quick response and tips, great support for a great product! :)
     
    tatoforever likes this.
  8. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    Do let me know how it goes and don't forget our discord channel for real-time support! :)
     
    Stormbreaker likes this.
  9. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    A new family product of NGSS is coming soon to the Asset Store and it's called NGSSEB (Next-Gen Screen-Space Edge Bevel).

    NGSSEB OFF:
    upload_2020-5-25_17-24-29.png

    NGSSEB ON:
    upload_2020-5-25_17-25-6.png

    - Super optimized and fast, adjustable quality
    - Plug and play, does not require any asset modification, just drag the script to one object in your scene and voila!
    - Compatible with any built-in renderer (custom or not) and any modified library. Future SRP port in process
    - Smooth look, perfect for scenes composed of models that need this edgy attached/soldering look.

    Lifetime 50% discount if you've purchased any license of NGSS.
    Showcase video and more info soon. :)
     
    Last edited: May 25, 2020
    Stardog, OCASM, led_bet and 4 others like this.
  10. Whatever560

    Whatever560

    Joined:
    Jan 5, 2016
    Posts:
    518
    I'm quite interested in that :). Some questions : what about the slight artifacts under the cube, is this a mandatory side effect? To what end can this be stretched/configured and what about textures? Does this affect the whole scene or selected objects only?
     
  11. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    @Whatever560
    This technique uses a command buffer to patch the GBuffers on the fly before the lighting pass, so it affects the whole screen. Is not perfect as you can see (like most images effects) but like NGSS, I'm going to improve it and support it even more overtime. :)
    Nothing needs to be configured or set, just drop the script to one of your cam in the scene and that it. Only 3-4 values to change on the script.
     
  12. bac9-flcl

    bac9-flcl

    Joined:
    Dec 5, 2012
    Posts:
    829
    That looks gorgeous! Can't wait for 2.3 and this new asset. :)
     
    tatoforever likes this.
  13. PerunCreative

    PerunCreative

    Joined:
    Nov 2, 2015
    Posts:
    113
    Any news or ETA of SRP compatibility? (NGSS and NGSSEB)
     
    Gooren likes this.
  14. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    NGSSEB is finished, I'm writing documentation, getting images and video for the Asset Store page. It will be launched in a week or two.
    NGSS port to SRPs is on hold for the time being until SRP stop being re-rewritten and get more stable.
     
  15. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    More NGSSEB showcase:

    upload_2020-6-1_18-14-31.png

    upload_2020-6-1_18-14-19.png

    More images and video with game models coming later today. :)
     
    led_bet, OCASM, Passeridae and 2 others like this.
  16. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    874
    For some reason the directional shadows script stopped working for me with android build target in 2019.3.15

    And idea whats going on with that? I've been trying to figure it out for 3 hours. Even installing the libraries only gets the simple blur slider working, PCSS doesn't work at all.

    And outside of that i can only get the shadow softness slider working with deffered rendering, so i just don't get whats going on, all other settings don't work.

    But they work fine on a point light with the NGSS_local. I've never had this happen before
     
  17. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    Make sure first all libraries are installed in the correct place, also check your project Graphics Settings and make sure cascaded shadows is enabled for your mobile graphics tiers with the corresponding renderer setting (Deferred or Forward). Directional PCSS only works when Cascaded Shadows are enabled. However, it's not recommended to enable cascaded shadows or deferred on mobile for performance reasons though.
    Also, PCSS doesn't work on platforms where inline sampling isn't supported. Last time I heard still not implemented on Metal v1 and OpenGL/GLES (all versions) and will probably won't get added either as Unity is not updating built-in anymore. Although, point light PCSS works fine on those platforms because they are set as depth cubemaps, so it's possible to re-create PCSS without inline sampling.
     
  18. Demhaa

    Demhaa

    Joined:
    Jun 23, 2018
    Posts:
    35
  19. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    It works with what's visible to the Gbuffer (anything on the screen).
     
  20. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    874
    Looks like it works, i guess i didn't realize about cascades when making a new project.

    Sadly it looks like I desperately want the performance gains of URP for Android T_T

    I can get 60 on standard, but its significantly less stable. Eagerly waiting for the SRP port!

    At the very least standard soft shadows would be nice :<
     
  21. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    @sacb0y
    SRP is right now on hot waters but once it will calm down we will resume SRP port.
    Btw, on Mobile is not recommended Cascaded shadows neither PCSS. You can use NGSS PCF without cascades perfectly fine without impacting performance.
    PS: What parts of SRP was more stable/faster than built-in, lighting, batching, etc? I guess you are using forward rendering on SRP, right?
     
    GridWanderer likes this.
  22. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    874
    But it seems like I have to turn them on for soft shadows to work at all. With cascades off I just get normal shadows. :(

    URP main benefit is it handles material variants better. More similar to unreal engine where many materials are supposed to be less of a problem.

    It also handles post processing better cause you can force depth texture off. And the post processing effect (like DoF) will disable as a result. This is great for me cause I target many platforms. Standard has a similar setting but it doesn't work the same, PPS will force the depth texture even if the effect isn't used.
     
  23. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    @sacb0y,
    If you turn cascaded shadows off and you don't see soft-shadows that means you din't installed NGSS libraries (or installe the libraries in the wrong folder). On every Unity update you have to re-install NGSS libraries as Unity install will delete them.
    URP batchs by shader variants (instead of materials).
     
  24. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    874
    But if i install the libraries I also install the denoiser right? That gave me horrible performance in android in the past.

    i think it didn't even matter if i had it turned off.
     
  25. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    No, the denoise only works when cascaded shadows are enabled. What you need to do in order to get the best performance with NGSS on mobile:
    - Install all NGSS libraries
    - Disable Cascaded Shadows in Graphics Settings Pannel (for mobile hardware tier)
    You should get about 30% faster rendering.
     
    GridWanderer likes this.
  26. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    874
    ok i'll try that
     
    tatoforever likes this.
  27. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    Let me know how it goes, how much you gain in perfs if noticeable or not (you should see some improvement though).
    Cheers,
     
  28. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    874
    Does NGSS have an issue with "shadow mask" instead of "distance shadow mask"?

    The shadows seem to break when shadow mask is used, causing the model to turn all black, or even the application to crash.

    Performance is pretty good tho otherwise.

    Unfortunately not enough compared to SRP :/

    Even with shadows disabled standard renderer struggles to stay close to 60 or even above 40 or 50 depending on how much of the screen is taken up by some objects.

    Meanwhile SRP is basically locked to 60 with the same shader features, better if i scale them back.
     
    Last edited: Jun 6, 2020
  29. Zarkow

    Zarkow

    Joined:
    Jul 27, 2015
    Posts:
    92
    Hi,

    have a dark dungeon crawler in Early Access and am finally getting around to looking at improving shadows. The game is using Deferred rendering, so there is a lot of real-time lights, nothing baked.

    One of the major headaches when having lots of flashlights, magical weapons that give of light and other scenarios, is unfortunate edge-cases, such as a sword in flames needing to cast light, so a spot-light have to do - but one either have to give it a very short range and turn of shadows, or try to accept self-shadowing artifacts, as no bias or near plane setting is ever perfect.

    My concept is to have for instance a sword in flame light up the area around a player, and the player-model itself, and disregard the shadow (as the full length of the sword is in flame), but still needing some geometry to cast shadows, such as walls and larger obstacles. The best solution would probably if one could set a shadow-mask, based on a layer, where only elements noted would cast shadows.

    is this something that this nice asset can help with also, or is it something that could be added in the future?
     
  30. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    @sacb0y,
    Well yeah URP will outperform built-in in forward if you are using multiple lights or has many materials using the same shader variants. On the other hand, if you have a custom forward implementation on built-in with multiple lights in a single pass and a controller material environment it will outperform URP. We did couple of tests some time ago with our custom built-in forward renderer and URP was a bit slower.

    As for the Shadowmasks and distance shadowsmasks it should normally work as with Unity shadows. If you have a problem please provide me a bug report steps or test case. I'm about to submit a patch update next week and will include on it.

    @Zarkow,
    If I'm understood correctly, what you are describing can be achieved through light layers with two lights in your flame sword. One light will affect the entirely scenery with shadows but not your character, the second light will affect your character only and won't cast shadows.
     
  31. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    874
    Actually, thinking about it i think the conflict is with amplify shader. The flickering and other issues only happen on my custom shader.

    But i'm not sure if it's an issue for you or for amplify...

    As for the performance thing, i guess that makes sense but i don't think i have the time to do such a thing when i'm already doing so much other stuff myself DX

    SRP would be the easier faster option probably. And my project is still relatively early in it's life so it wouldn't be the worst thing.
     
  32. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    @sacb0y
    Flickering with dynamic shadows or baked shadows? Send me the shader through discord (https://discord.gg/gJU2x7) or email to support AT psychozinteractive DOT com. Will take a look at and tell you where the problem comes from.
     
  33. Rich_A

    Rich_A

    Joined:
    Nov 22, 2016
    Posts:
    338
    I realise its a beta, but any word on 2020.1 support, or the 2.3 release?
     
  34. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    Built-in renderer didn't changed on v2020 last time i tried NGSS was working fine. What version exactly are you referring?
    There's a small NGSS update coming next week with a couple of minor features and improvements/fixes (including a working auto-installer that doesn't require admin rights) alongside NGSSEB release before v2.3.
    Realistically speaking v2.3 should be released around this summer.
     
    OdderOtter likes this.
  35. Zarkow

    Zarkow

    Joined:
    Jul 27, 2015
    Posts:
    92
    I just realized that this will not solve the core-issue, as Characters (there is a squad of them) would then still be lit through walls for any of these special lights too (not a great solution to have each character / operator in its own layer, as it impacts also real projectile calculations, interactions with other objects and characters etc that need the filtered raycast to avoid hitting wrong things etc).

    I would be very cool if one could designate a gameobject (a collection of meshes) that would 'not cast' shadow from a specific light, but cast from others. Not sure how hard it would be do implement it, but I have a feeling that it is doable, even in Deferred rendering.
     
  36. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    Shadows and lights layers can't be separated, they work together in both built-in and HDRP/URP. You can split shadows and light at the shader level but you have to implement and handle light and shadows rendering yourself. However, that would imply create your own custom renderer). Unless you need only 1 unshadowed light per shader/material but I guess that's not the case?
     
  37. wilgieseler

    wilgieseler

    Joined:
    Oct 17, 2013
    Posts:
    84
    I would like to echo the request for SRP/HDRP/URP support, please! HDRP and I think also URP are considered "production ready"/"stable" by Unity. We'd really like to develop on the new pipelines, and neither has support for penumbral shadows.

    I'm having trouble tuning the shadow appearance satisfactorily for an open-world game in URP, and more control over shadow appearance would be so wonderful. URP (especially once they add Deferred support, allegedly in 2020.2) will be perfect for our game besides the shadow quality.

    I've purchased the asset and tried it out, but the legacy render pipeline requirement is a problem. Also, the installation process requiring modification of the Unity install (instead of residing entirely in the Assets folder) is very scary for source control, updating Unity, and working on multiple projects. I would think the SRP version would not have this issue?

    As you are thinking about future versions, I think an asset that really did a great job providing lots of artist control to Unity shadows would be very popular. So far, the first party ones have been lacking in my experience, and not being a graphics programmer it would be awesome to just have better control. So if you have any ideas about more options to achieve realistic or stylized looks, I'm sure people would find a use for them.

    A more detailed and friendly inspector or documentation on the settings would be great. (Assume I know nothing!)

    Really impressed with the asset so far, really wishing I could use it in SRP, and looking forward to future releases.
     
    Passeridae and GridWanderer like this.
  38. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,293
    But not by the community.
     
    led_bet, Rich_A and tatoforever like this.
  39. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    Hello wilgieseler,
    I understand your concerns but we as asset store devs are really getting hurt by current state of SRP and how Unity is handling it's dev.
    Both HDRP and URP are not really production ready, specially HDRP. Even URP is not really feature complete, still getting tons of API changes and new features. I can't devote all my time to working around fixes, API changes or SRP bugs support. I better use that time to support and improve the current product now and port it over later with even more features once SRPs gets more solidified.
    I'm looking for later summer for URP version and HDRP fill follow just after.
    For source control projects you can simply edit your shaders and add one pragma directive to them to make them point to where NGSS libraries resides in your project Asset path (It's explained in the documentation).
    If you need help you can send me all your shaders and I'll do the change for you.
    Cheers! :)
    [EDIT] I meant "Cloud Builds" not "Source Control" my bad. :eek:
     
    Last edited: Jun 10, 2020
  40. Gooren

    Gooren

    Joined:
    Nov 20, 2015
    Posts:
    332
    You could get in touch with MicroSplat developer. He is already knees deep in the SRP support issues. But has come up with quite a few smart solutions.
    SRP support adds the extra edge.
    Yep, stuff changes still, but I have to say HDRP works wonders for us.
     
    Rowlan likes this.
  41. Rich_A

    Rich_A

    Joined:
    Nov 22, 2016
    Posts:
    338
    SRP and HDRP support would mean a worse asset. All of the creator's time would be taken up by support problems and bugfixes, instead of actual features.

    More asset creators should refuse to support URP/HDRP until major problems have been fixed and it is actually ready for production.
     
    led_bet, tspk91, tatoforever and 2 others like this.
  42. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    Btw,
    Forgot to clarify an important detail about project versioning and NGSS.
    The only source control projects that needs the extra edit on their shaders are the ones doing cloud builds. If you don't have NGSS installed in your machine, you will not have the NGSS shadows instead Unity default shadows but nothing will break, is the same as not having NGSS installed.
    I'm about to push a small update that contains couple of minor fixes and QoL improvements including a fix for the library auto-installer (you won't need to run Unity in admin mode anymore) that will allow you to install/uninstall libraries with one click anytime.
     
    Last edited: Jun 9, 2020
    hopeful likes this.
  43. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    Added a new optimization that drastically reduces the sampling over any given distance. Can go as low as 4spp at distance.
    The distance can be set to any value (at the component level) eg 10m, 100m etc and will interpolate between 4spp up to your current sampling quality in that distance range. Works for all shadows. No noticeably visual difference.
    Less bandwidth waste, more free speed and predictable performance tweaks.
    I'm wrapping out a small trailer video for NGSSEB and will send both for Asset Store review next week.
     
    GridWanderer and Gooren like this.
  44. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
  45. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    Version v2.3.0 have been submitted for review. Features and Changes:
    - Added a new optimization that interpolates and reduces sampling over a given distance
    - Fixed the NGSS Libraries auto-installer, it perfectly works now
    - Allow installation of NGSS Libraries from custom paths (path must be provided to the installer)
    - Addition of a new optional Shadow Bias library (must be installed through the libraries installer)
    - Denoiser can now be disabled without uninstalling the libraries
    - Fixed a bug related to a Min attribute on NGSS scripts
    - Fixed Frustum Shadows blending with Local lights
    - Improved Shadowmask blending with real-time shadows
    - NGSS scripts don't manage anymore Quality Settings and Graphics Settings (except for screen space shadows replacement)
    Note: Unity has deprecated Asset Store upload tools on Unity 5.6 which means the package can't be installed directly from the Asset Store in Unity 5.6. You have to download the package on a newer version of Unity and manually copy the Psychose Interactive folder in your project. The new Shadow Bias Library won't work with Unity 5.6 either. You can always email support if you need the compatible 5.6 package.
     
  46. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,685
    What does this effect do to characters in the scene? I'm having difficulty visualizing that.
     
  47. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    Smooth hard edges at the Gbuffer level (not the geometry level).
     
  48. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    New v2.3.0 is live on the store.
     
    hopeful, Rowlan and Lars-Steenhoff like this.
  49. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    A micro patch (v2.3.1) have been submitted for review, it fixes a NGSS library installer bug on Mac. If you are on Windows you don't need this patch. If you are on Mac wait for the update to be approved or PM me through discord channel if you need the file right way.
     
    Lars-Steenhoff likes this.
  50. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    The patch (v2.3.1) is live now in case you where wondering. Still waiting for NGSSEB approval though. :)