Search Unity

[RELEASED] 2021.7.1 Smart Lighting 2D

Discussion in 'Assets and Asset Store' started by Qzia, Dec 7, 2018.

  1. Qzia

    Qzia

    Joined:
    Jan 25, 2015
    Posts:
    138


    111.png screenshot_5.png Untitled.png scr2.png scree.png
    Smart Lighting 2D is a powerful tool to setup lighting for 2D scene.
    Initially this Lighting Engine alpha version was used for CS2D.
    There will be many more features soon!

    WINNER of the BEST DEVELOPMENT TOOL in the Unity Awards 2019


    If you have any suggestions or feature requests - feel free share it!

    • Mobile Friendly
    • 4 Tilemap Scenes & 5 Basic Demos
    • Fog of War system
    • 2D dynamic lighting with soft shadows
    • 2D Tilemaps Support (2.5D / topdown / isometric) (2018.1 or higher)
    • Super Tilemap Editor Support (2018.1 or higher)
    • Sprite Texture Based Lights
    • Supports 2D Colliders (circle, box, capsule, polygon, edge)
    • Supports Custom Physics Shapes
    • Concave & Covex Polygon collider shapes
    • Sprite texture based lighting
    • Day shadows with angle of sun
    • Day Shadows height
    • Custom darkness level (night & day)
    • Full C# Code API
    • 2D Geometry Helper API


    V1.2.2 - [19.11.2020]
    Changed: "Lighting Source 2D changed to "Light 2D"
    Changed: "Lighting Collider 2D changed to "Light Collider 2D"
    Changed: "Lighting Tilemap Collider 2D changed to "Light Tilemap Collider 2D"
    Changed: "Lighting Room 2D changed to "LightRoom 2D"
    Changed: "Lighting Tilemap Room 2D changed to "Light Tilemap Room 2D"
    Changed: "Lighting Occlusion 2D changed to "Light Occlusion 2D"
    Changed: "Lighting Tilemap Occlusion 2D changed to "Light Tilemap Occlusion 2D"
    Removed: Lighting Atlas System


    E-Mail: simonas@kuzmickas.lt
    Discord: https://discord.gg/AktrfBe
     
    Last edited: Nov 20, 2020
    AthrunVLokiz and mgsvevo like this.
  2. achan_unity

    achan_unity

    Joined:
    Apr 23, 2018
    Posts:
    13
    Hi, am considering buying your tool and I have super tilemap editor.. but I don't see in your documentation on how to enable this. Can you provide some idea on how can this be done?
     
  3. Qzia

    Qzia

    Joined:
    Jan 25, 2015
    Posts:
    138
    @achan_unity It works the same way regular Tilemaps works, however you need to uncomment one part of code in LightingTilemapCollider.cs that enables Super Tile Map Editor. I've mentioned that in roadmap, but I'll do proper info in documentation about it soon.

    For further support, it would be best if you would reach me in Discord:)
     
  4. Qzia

    Qzia

    Joined:
    Jan 25, 2015
    Posts:
    138
    I've just finished showcase video
     
    AthrunVLokiz likes this.
  5. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,422
    Does it work with Unitys Sprite Shape System which is currently in Preview out of the box?
     
  6. Qzia

    Qzia

    Joined:
    Jan 25, 2015
    Posts:
    138
    @BTStone , I haven't tested it with sprite shape much, however it should work with Sprite Shape's generated collider.
    If you would run into issues, I would help you out.
     
    Last edited: Feb 7, 2019
    BTStone and Lars-Steenhoff like this.
  7. Sylmerria

    Sylmerria

    Joined:
    Jul 2, 2012
    Posts:
    369
    Hi @Qzia

    I'm looking for a lightning engine which works with isometric tiles like this ( and if possible without isometric unity tilemap) :


    and like this



    Can you show me an example of isometric like the first image with your system ?
    And what yours need are for make compatible my game with your system ?

    Your tool look nice !
    Thanks
     
  8. Qzia

    Qzia

    Joined:
    Jan 25, 2015
    Posts:
    138
    @Sylmerria It would be great if you could join support discord, we could discuss what could be implemented there.
    I'm not really sure what kind of effect you want to achieve with the lighting.
     
  9. redis28

    redis28

    Joined:
    Apr 13, 2017
    Posts:
    3
    • I want different light sources with different materials,now use Particles/Multiply
     
  10. valentinwinkelmann

    valentinwinkelmann

    Joined:
    Nov 3, 2014
    Posts:
    190
    I am quite happy with the results, the workflow could be a bit more stable, for some things you have to press start to get the results. but otherwise it looks great. i think it would be useful to have a function to mirror lights. i try to do this by inverting the x axis (-1) but it has no effect. a mirror x and mirror y function like you know it from spriterenderers would be quite useful.

    Edit:
    wow only one post above you explain that there is even an invert function now. in this case I am completely satisfied *update*
     
  11. SiliconAvatar

    SiliconAvatar

    Joined:
    Mar 23, 2014
    Posts:
    50
    I'm using SuperTilemap Editor. I un-commented the code that was listed in the manual. I have lights. It works okay.

    Now I want to use a light tilemap collider with Super Tile Map editor. How does that work?

    Nice asset but the manual could use more instruction and tutorials.
     
  12. Qzia

    Qzia

    Joined:
    Jan 25, 2015
    Posts:
    138
    @lostdragon You should attach the component to the object with Super Tile Map script and set the type of collider to "STE Tilemap"

    Would be great if you could join Discord channel, It's easier to keep in touch for me in there.
     
  13. SiliconAvatar

    SiliconAvatar

    Joined:
    Mar 23, 2014
    Posts:
    50
    Thanks. I did a long time ago. I made a couple requests you said you would work on.
     
  14. jollyblade

    jollyblade

    Joined:
    Mar 20, 2014
    Posts:
    5
    Hi,

    This asset looks promising for me, i just have one question. I need the light to lit up particles.
    Does it work? Or is it possible to modify it easily without a huge refactor? :)

    Thank you!
     
  15. lolclol

    lolclol

    Joined:
    Jan 24, 2013
    Posts:
    212
    any coupon available man ?
     
  16. Qzia

    Qzia

    Joined:
    Jan 25, 2015
    Posts:
    138
    @jollyblade Depends on how you want to light them up, there is an option to use LightingSpriteRenderer.
    Join discord, we could find some approach to that.

    @lolclol Currently the price is still quite low, so I don't see point on giving up coupons.
     
  17. Qzia

    Qzia

    Joined:
    Jan 25, 2015
    Posts:
    138
    WINNER of the BEST DEVELOPMENT TOOL in the Unity Awards 2019

    Smart Lighting V1.1.0 Released!

    [ADDED] Isometric Tilemap Support
    [ADDED] Multiple Camera Support
    [ADDED] New LightingTextureRenderer Component
    [ADDED] New LightingParticleRenderer Component
    [ADDED] New profile settings using scriptable objects
     
    AthrunVLokiz likes this.
  18. witch_li

    witch_li

    Joined:
    Dec 28, 2019
    Posts:
    2
    i could not find "sorting layer" in light manager.
    what should i do if i want to use global light in one scene and ignore this light when character enter some zone in this scene(such like room)
     
    oriolmanya likes this.
  19. Qzia

    Qzia

    Joined:
    Jan 25, 2015
    Posts:
    138
    @witch_li It's moved to Tools/Lighting2D
    Sorry for inconvenience, a lot of changes came with latest updates, I did not updated documentation yet.

    I always suggest joining discord, I help frequently there and answer all questions: https://discord.gg/AktrfBe
     
    oriolmanya likes this.
  20. gferrari

    gferrari

    Joined:
    Jan 14, 2015
    Posts:
    135
    Hi! I have this error when I import the asset and run some demo:
    'SpriteAtlasManager' is missing the class attribute 'ExtensionOfNativeClass'!

    And some warnings:
    GameObject (named 'Sprite Atlas') references runtime script in scene file. Fixing!
    The class named 'SpriteAtlasManager' is not derived from MonoBehaviour or ScriptableObject!

    I'm using Unity3d 2019.3.2f1

    Thanks!
     
  21. Qzia

    Qzia

    Joined:
    Jan 25, 2015
    Posts:
    138
    @gferrari Hey, sorry for late reply.
    This issue happens after updating Lighting version.
    You could join Discord and I would fix it. Usually it's enough of just deleting Lighting Manager and creating new one. These issues were recently solved.
     
    Last edited: Sep 18, 2020
  22. mostlyapt

    mostlyapt

    Joined:
    Nov 5, 2016
    Posts:
    8
    Hi,

    Can you please consider adding all Smart Lighting 2D classes into FunkyCode specific namespace instead of global namespace?

    Thanks!
     
  23. Qzia

    Qzia

    Joined:
    Jan 25, 2015
    Posts:
    138
    @mostlyapt Yeah, it's roadmap and in production :)
     
    mostlyapt likes this.
  24. pewpewkaka

    pewpewkaka

    Joined:
    Mar 31, 2020
    Posts:
    1
    Hello I am having issues with sorting layers.

    No matter what I do my tile map is above the lights.

    Thank you.
     
  25. Qzia

    Qzia

    Joined:
    Jan 25, 2015
    Posts:
    138
    @pewpewkaka As far as I know you found your solution in the discord server. :)
     
  26. PhantomFox128

    PhantomFox128

    Joined:
    May 22, 2019
    Posts:
    157
    Hi there! I saw that compatibility with normal maps was something planned for a future update. Is that still the case?
     
  27. halagame

    halagame

    Joined:
    Jan 14, 2020
    Posts:
    17
    Hi, just wondering does this asset works well with 2D particle systems? for example, I have a particle system that generates several blocks of colliders, would it generate the shadows as a normal collider? if so, how can I achieve it? tks
     
  28. Qzia

    Qzia

    Joined:
    Jan 25, 2015
    Posts:
    138
    @halagame Contact me via Discord, I'll take a look at the setup.
    I wasn't aware particle system can generate colliders. It's possible to make particle system to draw lights (light sprites) as particles, but I've tried anything above that.
     
  29. edwardbinninger

    edwardbinninger

    Joined:
    Jan 26, 2019
    Posts:
    2
    Hi, thanks for the awesome asset. I am having a problem creating "soft shadows". The shadows created are harsh and dark. How can I adjust the intensity of the shadows?
    For most of my scenes I am mostly interested in “Day Shadows”, I just want a SUBTLE shadow to follow my player/enemies and I don't need any fancy shapes...

    The documentation (step 3 of the Day lighting section) it says:
    "Add 2D Light/Lighting Manager to the scene. Make sure darkness color is set to white" there is no "darkness color" setting in the Lighting Manager was this feature removed? Im sure I am missing something, any help would be appreciated! Edward
     
  30. edwardbinninger

    edwardbinninger

    Joined:
    Jan 26, 2019
    Posts:
    2
    Please disregard my last post, I found everything I needed under toolbar/lighting 2d/tools
    Thanks! Edward
     
  31. Qzia

    Qzia

    Joined:
    Jan 25, 2015
    Posts:
    138
    @edwardbinninger I hope you found everything! If you join discord, I could provide you with new version which has better support day lighting and even more features.

    I've recently implemented user friendly normal mapping!

    texture.png



    Fog of War
     
    Last edited: Sep 13, 2020
    oriolmanya likes this.
  32. oriolmanya

    oriolmanya

    Joined:
    Jul 4, 2012
    Posts:
    50
    Hi @Qzia, I’ve been playing with your tool and it is impressive. Congratulations!

    What I’m going to ask for, can sound silly, but I have my reasons I'll explain further.

    I wonder if it would be possible to make the tool work with a Perspective camera.

    • My game is already in development, and though I’m working with 2D Sprites, I’m doing it in 2.5D with Perspective cameras.
    • This allows me to place the parallax elements easily on the background (mountains) and on the foreground (blurry rocks or weed)
    • But all the interactive and main elements are on a single 2D plane on a Z-axis specific position: Player, enemies, platforms, bullets, items…
    • So, your plugin should only work with these elements on this specific plane.
    • Foreground and Background would be lightened with the standard Unity Sprite features, and they shouldn’t be affected by your light system.

    Maybe there is a workaround to achieve that? Thanks in advance
     
  33. Qzia

    Qzia

    Joined:
    Jan 25, 2015
    Posts:
    138
    @oriolmanya Thanks for reaching me out!

    Perspective camera is not supported currently. It was not priority as the tool state it's "2D" oriented.
    Though you can achieve parallax elements in orthographic camera.

    In this case there could be a workaround! But it's in the latest version which I'm working on now.
    Could you reach me out in my Discord channel?

    This could be achieve via using Lighting Room objects to make lighting ignore objects if they are behind the lighting.


    Off Topic: Day Lighting Update with Layers and Normal Mapping

     
    Last edited: Sep 18, 2020
    oriolmanya and digiross like this.
  34. Qzia

    Qzia

    Joined:
    Jan 25, 2015
    Posts:
    138
    @jollyblade Sorry for late poke, but there is specific feature now to light up ParticleSystem component!

    @PhantomFox128 Hey, with upcoming update, normal maps are supported!
    It's in the beta on discord now :)
     
  35. Qzia

    Qzia

    Joined:
    Jan 25, 2015
    Posts:
    138
    Smart Lighting V1.1.3 Released!

    Universal Rendering Pipeline is now working with Smart Lighting!
     
    YuGu_Zhang likes this.
  36. drjamiearron

    drjamiearron

    Joined:
    Jun 8, 2012
    Posts:
    134
    Hi there, a colleague recently purchased your plugin and so far so good!

    However, we currently cannot make a build of the game because of the following error:
    "Assets\FunkyCode\SmartLighting2D\Components\Manager\LightingBuffer2D.cs(138,3): error CS0103: The name 'LateUpdate' does not exist in the current context"

    I noticed in the script in question you have #if UNITY_EDITOR around the LateUpdate function, hence the error. Am I missing something here or is this a potential bug?
     
  37. Qzia

    Qzia

    Joined:
    Jan 25, 2015
    Posts:
    138
    @jamiewhitephd Which version you are using?
    Should be visible in lighting manager if it's one of the latest versions.
    If not, it's Lighting2D.cs -> VERSION constant.

    Which Unity version you are using?

    In my version LightingBuffer2D.cs does not even have 100 lines. So yours must be outdated.
     
  38. Qzia

    Qzia

    Joined:
    Jan 25, 2015
    Posts:
    138
  39. Qzia

    Qzia

    Joined:
    Jan 25, 2015
    Posts:
    138
    New shadow effects.

    zxzz.png

    walls.png
     
    AthrunVLokiz likes this.
  40. Qzia

    Qzia

    Joined:
    Jan 25, 2015
    Posts:
    138
    also implementing "Shadow Distance" effect.
     
    AthrunVLokiz likes this.
  41. Qzia

    Qzia

    Joined:
    Jan 25, 2015
    Posts:
    138
    Smart Lighting V1.1.8 Released!

    [ADDED] Light components now can display bounds
    [ADDED] Event handling takes tilemaps in account
    [ADDED] Lighting Setting: Manager instance
    [FIXED] Tilemap rotation when using lighting components
    [FIXED] Day lighting tilemaps
    [CHANGED] Tilemaps stability
    [CHANGED] Improved memory management
    [CHANGED] Performance improvements



     
  42. Qzia

    Qzia

    Joined:
    Jan 25, 2015
    Posts:
    138
    Smart Lighting 1.2.2 released + new showcase!
     
  43. pvalium

    pvalium

    Joined:
    Oct 1, 2016
    Posts:
    29
    Hi, fantastic asset.
    Is there any mobile guide in order to know best practices to earn perfomance?
    I've tried with my game in android, with default profile, and cost of enabling lights is around 15-20 fps. I pass from 55-60 fps to around 40, with two 2dSpriteLights, one 2dLigh in player, and one LightTilemapCollider2D.
    Disabling tilecollider and changin 2dlight from player to 2dSpritelight I earn around 3fps.

    Regards
     
  44. Qzia

    Qzia

    Joined:
    Jan 25, 2015
    Posts:
    138
    @pvalium It depends what is bottlenecking.
    Most likely it's GPU, so reducing lighting resolution for mobile is a standard thing. At least 0.5 in Tools/Light2D

    Join discord, I could give more tips on this. It's mostly possible to run 60fps on any device with this lighting.
     
  45. pvalium

    pvalium

    Joined:
    Oct 1, 2016
    Posts:
    29
    Yes, playing with resolution and quality light resolution I've improved a lot of fps. Thanks a lot!
    I've joined to discord, i have some questions.

    Good job!
     
  46. GameEverything

    GameEverything

    Joined:
    Feb 22, 2016
    Posts:
    10
    This is a really great asset. I mainly bought it because I need to use normal-map lighting with Canvas.

    Almost forgot a few other questions. I can't seem to find ambient occlusion.

    Is that going to be possible eventually?
     
    Last edited: Nov 26, 2020
  47. kapikapimanzyu12

    kapikapimanzyu12

    Joined:
    Nov 19, 2020
    Posts:
    1
    Hi, Thanks for the wonderful assets.
    I think it's very good and inexpensive.

    I have a question:
    is it possible to combine a particle shadow and a normal map like included in the demo scene?
     
  48. Qzia

    Qzia

    Joined:
    Jan 25, 2015
    Posts:
    138
    @GameEverything What you want to achieve with ambient occlusion?

    @kapikapimanzyu12 I did not understood the question.
    "Particle Shadow" - do you want particle to cast shadow? Particle = particle system?

    I prefer if you guys join discord, it's easier to communicate there, answer questions fast.
     
  49. D_Kond

    D_Kond

    Joined:
    Mar 3, 2015
    Posts:
    25
    Hi! Is there any way to prevent overexposing with overlapping two or more lights? Or should I control it with event handling? And can I create an unlit sprite?
     
    Last edited: Dec 21, 2020
  50. Qzia

    Qzia

    Joined:
    Jan 25, 2015
    Posts:
    138
    @Holygoe
    - "Is there any way to prevent overexposing with overlapping two or more lights?"
    - Yes, basically the end result is drawn vis shader that can be changed.
    You can find this in Lighting Manager, Camera 1: Shader
    or you can disable light HDR which would prevent lights over exposing (tools/Light2D->quality->HDR)

    - "And can I create an unlit sprite?"
    - Light Collider 2D -> Mask Effect = Unlit

    Please join discord, there I provide more in-depth answers and a little bit faster than in forum.