Search Unity

  1. Click here to see what's on sale for the "Best of Super Sale" on the Asset Store
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

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:
    207


    Smart Shadows
    for Unity 5.5 to 2020.1

    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: Aug 7, 2020
    Lars-Steenhoff likes this.
  2. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    207
    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:
    207
    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:
    207
    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. pilamin

    pilamin

    Joined:
    Apr 9, 2015
    Posts:
    17
    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:
    2,818
    Thanks for making this!
     
  8. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    207
    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:
    6
    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:
    207
    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:
    6
    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:
    207
    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:
    207
    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,197
    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:
    207
    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,197
    Thanks for the info :)
     
  17. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    418
    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:
    207
    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:
    158
    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:
    207
    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:
    158
    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:
    207
    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:
    158
    I've send you a mail.
     
  24. WildMageGames

    WildMageGames

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

    hacker3220

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

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    207
    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.
     
unityunity