Search Unity

SMART SHADOWS - get the best of dynamic shadows

Discussion in 'Assets and Asset Store' started by WildMageGames, Nov 8, 2017.

  1. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    283


    Smart Shadows
    for Unity 5 to 2023

    Asset store - Documentation - Support - MORE DETAILS

    Smart Shadows
    is a dynamic shadow manager that automatically and smoothly enables and disables dynamic shadows when you move on the scene, depending on the desired maximum simultaneous shadows, the maximum shadow activation distance, and the pertinence of the shadows, improving a lot rendering performances.

    The algorithm chooses which shadows to enable based on a light priority algorithm, which offers a lot of customization to match your scene constraints. This allows to have a lot of dynamic shadows in the scene by automatically enabling only pertinent shadows and disabling others.

    With this tool, you will get the best of dynamic shadows, without the performance issues.

    Features

    • With the Maximum Simultaneous Shadows, lights are sorted by pertinence depending on the player position and the custom light settings, and only the highest priority shadows are activated.
    • Maximum Light Influence Distance to activate only the shadows within a given range.
    • Smooth Fade In and Out Transitions, hardly noticeable by the player, even more when focused on playing.
    • Set the Light Shadow Importance, and custom Settings, to better control which lights are activated and what happens when their shadow is disabled, to better match your scene constraints.
    • Use the Range and Intensity Reduction to reduce the light illumination when its shadow is disabled, to reduce inconsistent scene lighting.
    • Enable the Shadow Resolution Reduction to reduce automatically the resolution of the lowest priority shadows, to improve the computational time.
    • Use the Quality Level Settings to adapt the shadow constraints to the device performances.
    • Included Animation Scripts for fire, flickering and periodic lights.

    Wild Mage Games Quality

    • Clean source code included.
    • Detailed documentation.
    • Reactive and efficient customer support.

    Upcoming Features

    Please do not hesitate to contact me if you have a feature request.

    Videos


    Images
     
    Last edited: Sep 2, 2023
    Lars-Steenhoff likes this.
  2. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    283
    Smart Shadows is on sale until December 8th: 30% OFF
    If you use dynamic shadows and want to boost your game performances, do not miss this opportunity!
     
  3. ScoobyNooby

    ScoobyNooby

    Joined:
    Nov 14, 2017
    Posts:
    45
    interesting. but I don't see any stats.
    So how does this work. raycast detection?
     
  4. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    283
    You are right, I should do some benchmarks to give an idea of performances improvements.
    The difficulty for such benchmarks is that each game has very different results, depending on geometry compexity, draw calls, shadow distances, light ranges, platform hardware, etc.
    My demo scene has really coarse geometry so each shadowmap computation is not that costly, but the performances are already way better.
    I will at least measure correctly the performances changes on the demo scene and think about a more "representative" demo for benchmark.

    It does not do any raycast. You can have an idea of the algorithm on section 3.1 https://www.wildmagegames.com/data/SmartShadows.pdf

    Note that I am open to feature suggestions :)
     
  5. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    283
    Here are some very rought stats, recorded while walking on the demo scene in a similar way than in the video.
    This is just illustrative, like I said more serious stats should be done.

    Quality settings : fantastic
    Hardware: AMD FX-8350 + ATI Radeon RX 480 Graphics
    Total lights: 68

    Smart Shadows disabled:



    Smart Shadows enabled - maximum of 12 lights (what you can see on the video) :

     
  6. haleler51

    haleler51

    Joined:
    Apr 9, 2015
    Posts:
    30
    Will definitely pick this up soon, after a paycheck. This looks like exactly what I need. I'm surprised there haven't been other shadow culling solutions.
     
    WildMageGames likes this.
  7. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,527
    Thanks for making this!
     
  8. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    283
    Thanks, I am glad you like it :)
    Do not hesitate to rate or comment on the asset store, it really helps.
    Also, if you have requests or suggestions, do not hesitate.
     
    Lars-Steenhoff likes this.
  9. TTG-Quintessential

    TTG-Quintessential

    Joined:
    Dec 5, 2017
    Posts:
    7
    Does this work with Lightweight Render Pipeline? and if so, it looks like we have a problem, so advice will be good, we just purchased it, and the demo appears to work in a New Project just as in your videos, however running the demo scene in our project produces the following:



    Please advise, we were hoping this would work
     
  10. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    283
    Hello, thanks for purchasing Smart Shadows.

    Unfortunately, in LWRP the asset can not work, because LWRP does not support real time point light shadows, and the number of active spotlight shadows is very limited. I was only able to run the demo without artifacts by disabling all scene shadows. I will try a bit more but I really do not think that LWRP is intended to be used with several real time shadows, so the asset will be useless in that configuration.

    Note that the artifacts are not created by my asset, because it only manages active shadows, but come from the limitations of LWRP.

    I will add that limitation in the description for future user.

    Also, if your primary intend was to use it on LWRP you can send me a refund request by email.
     
    Last edited: Jan 5, 2020
  11. TTG-Quintessential

    TTG-Quintessential

    Joined:
    Dec 5, 2017
    Posts:
    7
    Dayum, thanks for the reply, we got the package for LWRP, on the sale, we'll keep it in our back pocket for future projects, no need for a refund, but yeah it will be good to note it in the Asset Store, tbh, I think it's becoming a requirement that the Asset Store should force evryone to have a compatability checkbox, so many good assets out there that don't work or don't work 'yet' with LWRP :(

    Cheers
     
  12. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    283
    I am sorry you wanted to use it in the LWRP.

    It is not exactly my asset that is "not compatible" with LWRP, because it only manage the active shadows, it is more that using several dynamic shadows is simply not possible in LWRP. LWRP is not made for real time shadows.

    I just added a note on the asset store so it will be more clear for future users, it will be visible when the change is validated by the asset team :)
     
    Last edited: Nov 28, 2019
  13. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    283
    The asset does work with orthographic camera and forward rendering. Here is a screenshot of the asset working with orthographic camera.

    smartshadows orthographic.png

    The artifacts that are visible when enabling orthographic cameras are just due to the camera switching to forward rendering because Unity that does not support deferred rendering with orthographic camera, and is not related to the asset.

    For the demo scene to run nicely with orthographic camera and forward rendering, be sure to configure correctly the quality settings and set a high "light per pixel" value. For your own scenes it is advises to break the huge floor object in smaller floor objects, so the light per pixel value do not need to be too high. Again, this is just how forward rendering works, and not related to the asset.
     
  14. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,316
    Hello,

    this sounds interesting :) is it compatible with Enviro Sky?
    And in large worlds, there is still a problem in Unity when too far away from the direct (sun)light, the shadows flicker/jitter a lot. Is this problem solved with this asset?

    Thanks a lot!
     
  15. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    283
    Hello,

    I do not know about Enviro Sky. If they do not override the light shadow parameters it should work fine. I will look what I can found about it.

    No, it will not solve the sun light shadow issues for large worlds. The asset disable and disable light shadows according to a priority algorithm, but do not improve the way they are computed. Note that depending on how your large world game objects are loaded or streamed, you may have to call a light register method so they are taken into account by the manager, but standard loading methods are automatically handled.
     
  16. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,316
    Thanks for the info :)
     
  17. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    647
    Hello I'm interesting in using your asset, Just have a question is there api or way to assign new player during playmode? Cause we are changing our camera from player to cutscene camera. Let me know if thats possible :) Also I'm intersted how exaclty is that work, Is just fade down and turn off shadow of light? or modify something more, I just need to be sure Cause we are already enabling and disabling lights components on distance ad well as modify light intensity for example fire flicker, Will it be problem here? Cause we just would to use your system only to shadow modification. Last question is what about performance if there is like thousands objects on scene? How much check it will affect cpu?
     
    Last edited: Apr 22, 2020
  18. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    283
    Hello :)

    - There is an object in the scene which is the ShadowManager, from which the positions are computed in the algorithm. You can simply set the ShadowManager gameobject as a child of you active camera, and change its parent when changing camera.
    - The shadow manager will smoothly enable and disable the shadows by changing their strength and then enabling/disabling them. It can also change the intensity and range of the lights, but it is disabled by default. So no problems if you only want the shadow feature.
    - If you enable and disable lights there is no problem, the algorithm will simply consider them or not. You should only not change the shadow settings, or change them using the GameLight proxy object which is used as reference for the "default values" of the light.
    - The algorithm performance do not depends on the number of objects on the scene, only on the active lights, and has a negligible computational cost.
     
  19. franky_li

    franky_li

    Joined:
    Aug 8, 2016
    Posts:
    163
    Hi, just bought your asset, but it seems, that it can't remove shadows from trees that are spawned with VSP, what makes it useless for me. Do I miss any setting? If not, could you please give me a refund.
    Regards
    Frank
     
  20. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    283
    Hello,

    thanks for purchasing Smart Shadows.

    Can you tell me more about your issue ? What is VSP ? The asset should disable the light shadows in real time depending on the shadows manager settings (maximum shadows, distance limit). When you manually disable the shadow of a light in the unity editor, does it disable the tree shadows ?
     
  21. franky_li

    franky_li

    Joined:
    Aug 8, 2016
    Posts:
    163
    VSP is Vegetation Studio Pro, I use it to spawn the trees, but your asset can not detect the trees for some reason. Even with + 20 trees in front of the camera it says that it detected 2 shadows and all tree shadows stay no matter what distance I set.

    I can manually disable those shadows!
     
  22. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    283
    Thanks for the details.

    I see, I think there is a misunderstanding on what does the asset: it does not disable individual object shadows, it disable the light source shadows. For instance if you have a large scene with 50 light sources that computes shadows, you can enable the shadows for only 5 of them. The lights that emit shadows will be updated when you move on the scene.

    Disabling individual object shadows, such as trees in a large open world scene, could be nice feature indeed, but this is not part of the package yet.

    If you intended to use the asset in that specific use case and if you want a refund because it is not of use for you, you can send me your invoice info by email.
     
  23. franky_li

    franky_li

    Joined:
    Aug 8, 2016
    Posts:
    163
    I've send you a mail.
     
  24. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    283
    Your refund is in progress :)
     
  25. hacker3220

    hacker3220

    Joined:
    Sep 2, 2013
    Posts:
    5
    Does it work on Mobile?
     
    Lars-Steenhoff likes this.
  26. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    283
    Hello,

    Yes, it works on all platforms.

    However, be careful that you need to use a render pipeline that supports real time point light shadows, because if it is not the case the asset will be of no use. For instance the Unity URP does not have real time point light shadows.
     
  27. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    647
    I have one more question before buy, What if we have a problem with directional light shadows, We would like to cull them on distance is that possible, or it just hide shadows on certain light, not by object distance but by light distance, I hope You know what I mean :)
     
  28. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    283
    Hello

    The script can enable and disable directional light shadows using the same algorithm based on the distance from the player to the light source. So if you have several directional lights, the script will enable only the closest ones, and the other directional lights will not have shadow enabled.

    However, do not hesitate to give me more details about your scene and use case, because directional lights are usually for "global" lighting.
     
  29. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    647
    Yes exactly we have only 1 directional global light, so I assume in this case it wont optimzie that at all? We have problem with low angle light long shadows
     
  30. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    283
    Yes, if you only have one directional light, the asset will be of no use for that case. The asset is made to enable and disable point (or cone) light shadows, it can not improve the directional shadow lights. Maybe try to look at the shadow cascade quality settings to tweak the distance.
     
  31. mick129

    mick129

    Joined:
    Jun 19, 2013
    Posts:
    228
    It is said that it is compatible to Unity 2020.1. Doest that mean LTS and future version (2021) will not be supported? I am mostly interested for HDRP.
     
  32. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    283
    He
    Hello,
    "to 2020.1" means that's the last version I tested, but I plan to continue the support on next Unity versions.
    Note that HDRP is compatible, but due to the disappearance of the "shadow strength" settings the shadows can not smoothly appear and disappear, they will be ON or OFF. I was not able to solve that issue yet.
     
    mick129 likes this.
  33. mick129

    mick129

    Joined:
    Jun 19, 2013
    Posts:
    228
    Thank you for the quick answer. I will give it a try :).
     
  34. xlinkz

    xlinkz

    Joined:
    Aug 31, 2013
    Posts:
    9
    maybe im late to the party... works in Unity 2021.2?
     
  35. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    283
    Hello,

    Yes it will work on Unity 2021.2.

    On legacy render pipeline all features works perfectly.

    However, with URP and HDRP, the smooth fade in/out effect of shadows can not work since Unity removed the "shadow strength" value within the new render pipeline. Shadows will simply be enabled/disabled.

    Do not hesitate if you have more questions,

    Best regards,

    Arnaud