Search Unity

[RELEASED] LUMBRA : 2D Dynamic Lights and Field of view v2.0

Discussion in 'Assets and Asset Store' started by Hukha, Sep 18, 2018.

  1. Hukha

    Hukha

    Joined:
    Aug 12, 2013
    Posts:
    61
    Big.jpg
    What is LUMBRA : 2D Dynamic Lights and Field of view?
    This Asset allows you to easily add Field of View / Fog of War / 2D Lights to your Unity project. Basically, it creates a Mesh, within the parameters that are configured with a certain material. This system is incredibly fast and allowing an unlimited amount of sources. Playing with it you can create, for example; fields of vision to detect enemies, darkness with hidden objects behind, only visible when they enter the Field of View or simply beautiful 2D Lights with shadows.

    The 2d Lights system allows you to easily and without code create beautiful lights for your game 2d, fully configurable and optimized.

    Compatible with both the forward and deferred rendering pipelines and supports DX11. It works with both perspective and orthographic cameras.

    Main Features:
    • Very easy to use.
    • 2D Lights & Shadows
    • Radial or spot Lights
    • Everything is executed from the editor without the need to execute the scene.(WYSIWYG)
    • Gradient darkness to the edge of the FOV/FOW.
    • Fully configurable: Create the effect that you like.
    • It works with all types of perspective and orthographic cameras.
    • Possibility of checking if an object is inside the FOV.
    • Textures and materials support with transparencies.
    • Possibility of changing the number of verts to improve performance or quality.
    • Online documentation in Spanish and English.
    • Occlusion effect.
    • 4 different Demos + Sample scenes.
    Gallery


    Lightsall.jpg Fog of war.jpg OcclusionEffect.jpg WYSIWYG.jpg




    1. Material of shadow
    2. Material and emisor of the FOV
    3. Object we want it to be invisible

    Link to Store


    FAQ
    • Can you use it with 2D Objects?
    It can be used for any type of object, if have a Collider3D.
    • Can you use it to work on any axis?
    Yes, 2D prefabs are prepared to work on the Z axis and 3D on the Y axis, but can be edited in any way. (Script)
    • Does it work with any type of Collider?
    No, only with 3D Colliders.

    *Works with Unity 2017.1.5+
    *Uses Stencil Shader
     
    Last edited: Dec 12, 2018
  2. Hukha

    Hukha

    Joined:
    Aug 12, 2013
    Posts:
    61
    Finally RELEASED.
    Link


    Any question or doubt in this thread.
     
  3. Hukha

    Hukha

    Joined:
    Aug 12, 2013
    Posts:
    61
    [Reserved]
     
  4. Hukha

    Hukha

    Joined:
    Aug 12, 2013
    Posts:
    61
    [Reserved]
     
  5. Hukha

    Hukha

    Joined:
    Aug 12, 2013
    Posts:
    61
    Release 1.0.3
    • Now everything is executed from the editor without need to execute the scene.
    • Added a gradient darkness to the edge of the FOV/FOW.(Example Below)
    BEFORE.jpg NEW01.jpg
     
  6. Hukha

    Hukha

    Joined:
    Aug 12, 2013
    Posts:
    61
    ¡BIG UPDATE!

    2D Light & Shadows
    • Added Spot Light
    • Added Radial Light
    Editor Changes
    • Added Spawn Lights to the list
    And Minor Fixes...
    Lightsall.jpg
     
  7. jasonxtate66

    jasonxtate66

    Joined:
    Nov 21, 2017
    Posts:
    133
    Could you please show an example or make a scene of this working for a 2d, Top Down/Overhead perspective game? Or a video? The example scene is only 3D and the documentation isn't highly detailed. It seems like it should work, but hopefully I didn't waste my money on this solution.
     
  8. jasonxtate66

    jasonxtate66

    Joined:
    Nov 21, 2017
    Posts:
    133
    Here would be an example:
     
  9. jasonxtate66

    jasonxtate66

    Joined:
    Nov 21, 2017
    Posts:
    133
    Got it working slightly... would be cool to see some examples.

    My enemies are still not in the darkness though... They require RigidBody2D's, will this still work? You can't use a 3d Collider on something with an RB2D. It seems to work without a 3d Collider aside from my enemies.

    *EDIT*
    You can have hidden masks without 3d collider
     
    Last edited: Oct 20, 2018
    Hukha likes this.
  10. Hukha

    Hukha

    Joined:
    Aug 12, 2013
    Posts:
    61
    Thank you very much for your feedback.:)
    I'm happy that you like it

    Yes, the collider3d are only for collisions and create shadow.
    If you only need hidden things, they are not necessary

    If you have any problem or question, I will answer gladly

    see ya
     
  11. -Singularity-

    -Singularity-

    Joined:
    Jul 27, 2014
    Posts:
    122
    looks excellent - does it require unity 2018? I'd like this but cannot upgrade from 2017.2.0f3
     
  12. -Singularity-

    -Singularity-

    Joined:
    Jul 27, 2014
    Posts:
    122
    OK, def works in older unity versions. Any chance of getting it to work with deferred?
     
  13. Hukha

    Hukha

    Joined:
    Aug 12, 2013
    Posts:
    61
    Thank you very much for the comment.
    Right now Unity is reviewing a version adapted for 2017.1.5 or later.
    It should be accepted between today and tomorrow.

    Any problem that you could have, contact me.

    If you liked it, please rate it :)

    Thank you!
     
  14. -Singularity-

    -Singularity-

    Joined:
    Jul 27, 2014
    Posts:
    122
    Will do!

    Can you get it to work with deferred rendering?
     
  15. Hukha

    Hukha

    Joined:
    Aug 12, 2013
    Posts:
    61
    It is compatible with deferred rendering but they do not work together
    At least in the latest versions

    What do you need to do exactly, in case I can help?
     
  16. -Singularity-

    -Singularity-

    Joined:
    Jul 27, 2014
    Posts:
    122
    Id like to achieve exactly the effect in your demo, but in deferred rather than forward. the demo only seems to work in forward.

    My game uses deferred and I cannot switch to forward unfortunately
     
  17. Hukha

    Hukha

    Joined:
    Aug 12, 2013
    Posts:
    61
    If I switch to deferred in my demo scene it works normally in 2017.1 as 2018
    Which version are you using?
    What problem do you have exactly?
    Show me to know what happens ;)
     
  18. Hukha

    Hukha

    Joined:
    Aug 12, 2013
    Posts:
    61
    Release 1.2

    • Added WebGL DEMO scene. (Link)
    • Now Compatible with Unity 2017.1.5+
    • Minor Fixes.
     
  19. Hukha

    Hukha

    Joined:
    Aug 12, 2013
    Posts:
    61
    • 50% Discount applied for first purchases NOW Only until 19/11/2018
    • Now Compatible with Unity 5+
    • New Website (Link)

     
  20. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    does it use full screen post image effect to do draw shadow?
     
  21. Hukha

    Hukha

    Joined:
    Aug 12, 2013
    Posts:
    61
    No, the asset does not use full screen post image effect for nothing. :)
     
  22. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    If it is not using post processing and just be drawing a generated mesh over the top of the screen, how do you obscure the objects that are outside the boundary of the view range? Or are you drawing a full screen quad on the screen with render texture created by using a secondary camera? Or maybe a full screen quad drawn using a stencil buffer resulted from the rendering view mesh?
     
  23. Hukha

    Hukha

    Joined:
    Aug 12, 2013
    Posts:
    61
    Exactly that.

    So that you understand it better:

    1. Is the Quad you mentioned
    2. Is the Mesh generated by the asset
    3. Is the Hidden Object with certain material

    All the materials/Shaders and objects are included on the asset.
    If you do not need the shadow, you can omit the number 1.


    If you need something more @castor76 , do not hesitate to comment! ;)
     
  24. Hukha

    Hukha

    Joined:
    Aug 12, 2013
    Posts:
    61
    !Big Update 2.0!
    • Changed name to Lumbra
    • Redesigned Inspector
    • Redesigned All Images
    • New Documentation
    • Added 4 Different WebGL DEMOS(Link) with the Sample Scenes
      • Dungeon with Lights
      • Multiple Lights
      • Fog of war and Event interaction
      • Basic StencilShadow
    • Minor Fixes...
     
  25. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Report any further posts from irate users instead of directly engaging them, thanks!
     
    Hukha likes this.
  26. Hukha

    Hukha

    Joined:
    Aug 12, 2013
    Posts:
    61
    • Changed Price to $29.99
    • Improved issues with old versions of Unity (2017)​
    Buy on Asset Store
     
    Last edited: Apr 17, 2022
  27. par-002

    par-002

    Joined:
    Jul 4, 2012
    Posts:
    52
    I've sent you a couple emails but wanted to get this posted here as I think you have a good asset for this specific use case.

    I want to be able to mask the FOV highlight in a radius around the center w/out affecting the generated mesh that shows the highlight.

    This is what I'm talking about:
    FOV.png
    edit: The above image is a photoshop of what I am asking. I didn't get it to actually work lol

    Basically, I want to generate the FOV normally but remove the highlighted effect a certain radius out from the center.

    Is this possible?

    Thanks!
     
    Last edited: Nov 12, 2019
  28. par-002

    par-002

    Joined:
    Jul 4, 2012
    Posts:
    52
    So I have attempted to solve this by using the Z Depth buffer shader strategy with a circular mesh on top of the FOV but that doesn't seem to work (doesn't affect the FOV in any manner).
     
  29. Hukha

    Hukha

    Joined:
    Aug 12, 2013
    Posts:
    61
    Hello!
    First of all, sorry about the mails, i only see one from yesterday. (I will answer you here :) )
    Regarding your problem, its not a possible feature right now. I spended a few hours trying to acomplish that without any success...
    I can make this effect in the lights but not in the FOV
    Sorry for not being helpful...

    Thanks for use my Asset!
    If I can help you with something else, don't hesitate to let me know
     
  30. par-002

    par-002

    Joined:
    Jul 4, 2012
    Posts:
    52
    Ok well thank you for replying. I think what I might do is take the resulting mesh of your FOV and create a new one w/ a hole cut out of it. It wont be dynamic like what you have (which is awesome by the way) but my use will be for static objects that do not move.

    If I could ask for a feature request, I would buy another version of your FOV if it had this option.

    Thanks.
     
  31. Hukha

    Hukha

    Joined:
    Aug 12, 2013
    Posts:
    61
    Yeah, i think it's the best option, if i have time in December i will add this feature with the stability update :)
    Thanks! Now all the initial points of the mesh grow from the center. You need to make a circle and "grow" the initial verts from there.
     
  32. marcarasanz

    marcarasanz

    Joined:
    Aug 23, 2019
    Posts:
    20
    Hi,
    I recently bought your asset in the store, and i want to implement it in my project. I read the manuals and i have studied the demo scenes, but i think am missing something to achieve the implementation in my project. Right now am using Unity 2019.3.2f1 and Universal Render Pipeline with 2d lights. I explain what i want to achieve in the image above:

    The idea is to have a fov in the top of my sorting layers(background,player,etc.), except of my UI layer. And make the shadows of the colliders completely black. Can you point me where i should go? Cause what i see in your scenes is that you apply brightness to the mesh created with the material, but i can't achieve what i want in this way.
     

    Attached Files:

  33. Hukha

    Hukha

    Joined:
    Aug 12, 2013
    Posts:
    61
    Hey!
    I need more information to understand exactly your problem.
    But according to what you say, i think you need exactly the same approach of the "Dungeon" demo, try to copy it.

    In theory, you only need a StencilShadow2D where the camera aim with a FOV 2D (Or Light) to make it work.
    Remember to configure the FOV. (The obstacle mask variable needs to be configured with the same layer as your walls)

    Hope i've helped!
    Let me know if you need something more!
     
  34. MoweMax

    MoweMax

    Joined:
    Jan 1, 2016
    Posts:
    1
    Hi, I've noticed a small bug with StencilShadow2D and FOV 2D StencilShadow when both are near X = 0.0 and Y = 0.0:

    And also, it's appear that I'm unable to save scene, if I have any of 'Lumbra' prefab (even without any changes) on scene (Unity's * didn't disappear/reappear after manual save)

    Would like to have this resolved, since asset is pretty promising.
    Thanks
     
  35. AllanKotio

    AllanKotio

    Joined:
    Jan 16, 2020
    Posts:
    1
    Hi,
    The documentation is not really helpfull, i can't figure out to use the asset for my game, im basically on an amongus prototype ( just for trainning ). So i have a top down view, first, can i use 2d collider to be an obtacle ? ( i only use sprite for my rendering, no tiles )
    And do you have more complete doc or exemples ?
    Anyway if you tips for a among us fog use ;)
    Thanks

    EDIT : Finally i use fov and sprite maskable option to deal correctly, the only thing left is the text, witch i don't know how to hide yet ;)
     
    Last edited: Dec 20, 2020
    Hukha likes this.