Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    Dismiss Notice

[NOW FREE] Light2D - GPU Lighting System.

Discussion in 'Assets and Asset Store' started by SSS135, Mar 14, 2015.

  1. DrKucho

    DrKucho

    Joined:
    Oct 14, 2013
    Posts:
    140
    i read somewhere that using more cameras is always a performance loss, but in my case not very noticeable, maybe because my main camera is taking the game action on a fat pixel scene so its really taking only 420 x 240 pixels (approximately , cause the user can choose different resolutions but they are all fat pixel)

    and yeah , different screen ratios is a pain in ass mostly if you do a pixelated game and don't want pixels to go stupid.
     
  2. Egnech

    Egnech

    Joined:
    Aug 27, 2015
    Posts:
    12
    Hi there!

    Is it possible to set the light source ordering at the back of the object?
    On attached image you can see that the light from refrigerator should be at the back of player, But now it is at front and looks freaky.

    Is is possible, without digging into sources of asset?

     
  3. DrKucho

    DrKucho

    Joined:
    Oct 14, 2013
    Posts:
    140
    i would say no , you can't.
     
  4. Kirbychwan

    Kirbychwan

    Joined:
    Aug 14, 2012
    Posts:
    430
    Sadly, I don't think so. We were just discussing the need/importance for layer implementation. If you find a workable solution, please let us know!
     
  5. arkhament

    arkhament

    Joined:
    Jan 24, 2015
    Posts:
    114
    OMG, I really want to buy this asset but look like the the author will not return, I mean that because if you enter to the Rocket demo webplayer http://sss135.ru/light2d/RocketExample/RocketExample.html you get "404 NOT FOUND"
    But even worse if you enter the site http://sss135.ru you get a porn site, so the support is totally dead, right?

    Someone tried to contact the author by e-mail?
     
  6. Kirbychwan

    Kirbychwan

    Joined:
    Aug 14, 2012
    Posts:
    430
    Whoa, you're right. I tossed him an email to see what's up and let him know.
     
    arkhament likes this.
  7. kuchaku

    kuchaku

    Joined:
    Oct 14, 2014
    Posts:
    37
    The author did mention about being gone for a few months awhile back. But having the sites going down and re linked sounds a lot more serious.

    I'd love if a standardized 2D lighting system was a stable feature of Unity. It would really put it ahead of the pack of any other 2D engine and bring 2D into a new era. Even well made assets like this one appear to form as stop gaps, due to the difference in how invested the users of the app and the author might have in Unity itself.
     
  8. Kirbychwan

    Kirbychwan

    Joined:
    Aug 14, 2012
    Posts:
    430
    Yeah, I agree. I got a hold of the dev to let him know, and it looks like he's taken down the links for the time being, so he's still around at least. Whether he's just busy at the moment or not remains to be seen.

    I really do hope he continues supporting and updating Light2D though, it's one of the prettiest 2D light assets.
     
    Last edited: Oct 2, 2015
  9. arkhament

    arkhament

    Joined:
    Jan 24, 2015
    Posts:
    114
    I hope too that @Kirbychwan
    someone can confirm if this asset is working in unity 5.1.2 or unity 5.2? Please
    I really need this asset but I need to be sure if work out of the box in that unity versions

    Thanks
     
  10. Kirbychwan

    Kirbychwan

    Joined:
    Aug 14, 2012
    Posts:
    430
    @arkhament I'm a bit behind and using Light2D 1.2, but unless something has changed, it seems to work fine on Unity 5.2
     
  11. arkhament

    arkhament

    Joined:
    Jan 24, 2015
    Posts:
    114
    thanks you for the answer @Kirbychwan.
    Someone know the different between "Light2D - GPU Lighting System" and "Super Fast Soft Shadows" this https://www.assetstore.unity3d.com/en/#!/content/38682 it seems that the two make light from shadow or something like that. If someone can try to compare?

    Also I want to know if Light2D asset really work with mobile(ANDROID) ?

    i don't know what I need buy to make scene light this:





     
    Last edited: Oct 2, 2015
  12. Kirbychwan

    Kirbychwan

    Joined:
    Aug 14, 2012
    Posts:
    430
    @arkhament Outdoor scenes are prone to blowout with Light2D, since much of the light is additive and we can't select which layers we want lit. Can't speak for the other asset.


    Quick question for everyone using Light2D: Light2D is supposed to be run by the GPU, but in the profiler GPU is a steady 0.00ms with the CPU handling all of the Lighting system. Is this a quirk of the profiler, or has something strange happened?
     
  13. arkhament

    arkhament

    Joined:
    Jan 24, 2015
    Posts:
    114
    @Kirbychwan and what about mobile? This work in mobile? Or have a poor result in mobile?
     
  14. spryx

    spryx

    Joined:
    Jul 23, 2013
    Posts:
    360
    @arkhament I tried using this asset or a while on Android... Unfortunately, it is not optimized for mobile. I had to switch to another solution. I also had trouble with the shadow layer in mobile. The lighting camera did not seem to keep track of where the shadows should be as my character moved.

    That said, when it works, it looks great
     
  15. Kirbychwan

    Kirbychwan

    Joined:
    Aug 14, 2012
    Posts:
    430
    Sorry, I haven't used this for any mobile stuff.
     
  16. DrKucho

    DrKucho

    Joined:
    Oct 14, 2013
    Posts:
    140
    that's odd, my GPU profiler increases the blue graph when i activate the light system, and the smaller the pixel light size property the more milliseconds it takes to render. All making sense here.
     
  17. DrKucho

    DrKucho

    Joined:
    Oct 14, 2013
    Posts:
    140
    you posted this long time ago, hope its not too late, i contacted the author months ago about this, this happens when the sprite is offsetted from the center of the texture, he could not find a better solution than go to import settings of that sprite and mark it as FULL RECT.
     
  18. hunterua

    hunterua

    Joined:
    Nov 5, 2009
    Posts:
    41
    Hi,
    would you share the solution that you switched that is acceptable for mobiles ? Thank you !
     
  19. arkhament

    arkhament

    Joined:
    Jan 24, 2015
    Posts:
    114
    Soooooo..... any news about the Author of this asset? the site http://sss135.ru site still shows a porn web... or perhaps the author is now devoted to porn industry???? O_O maybe seemed more lucrative than being a developer?? we are wasting our time here in unity ???! xD
     
  20. Kirbychwan

    Kirbychwan

    Joined:
    Aug 14, 2012
    Posts:
    430
    Hard to say. The Dev's last post in the thread was in early July, so who knows. Could just be busy with stuff or could have abandoned the asset. Again, I hope he returns to support and update it, as it's currently the best looking 2D Light solution on Unity.
     
  21. Phuzz

    Phuzz

    Joined:
    Mar 31, 2014
    Posts:
    47
    I have checked the other asset Super Fast Soft Shadows, it seems really good, but now I'm afraid to buy it because this asset Light2D is the second one I buy and get ditched by developers, getting screwed third time I might as well change my avatar into a sheep . It mostly happens with 2d light plugins
     
  22. Kirbychwan

    Kirbychwan

    Joined:
    Aug 14, 2012
    Posts:
    430
    I looked into it as well; SFSS seems nice, but it also doesn't seem to have the excellent ambient light and easy-to-use light obstacle system that Light2D has...
     
  23. Mr.Stein

    Mr.Stein

    Joined:
    Dec 4, 2013
    Posts:
    169
    I bought SFSS last week, and work very good.. is very easy to implement. I do not know if it is easier than Light2D because I do not buy it, but is super easy to implement.

    There is a difference between Light2d and SFSS I think.
    In my opinion SFSS is more oriented to create different type of shadows through the light (anyway also has fairly good lighting effects). SFSS is also super fast and works great for mobile. I do not think the creators disappear that apparently are a big company http://chipmunk2d.net/ with many members.The bad thing with this asset is "This extension requires one license per seat".

    And as seen in the youtube videos with Light2D you can play a bit more with the effect of the lights and shaders, it appears that the effects of lights are better, you can also create shadows but not his strong point.

    I think SFSS is to work in brighter/moderately-bright/clear stages where you want to create shadows and Light2D is for dark/opaque stages where you want to create the effect of light or highlight at certain points..
    It seems to be the same thing but they are not, anyway with SFSS also you can use for dark stages where you want to create the light effect but I do not think you can shine with SFSS as much as LIGHT2D.

    "They are different products, but both could be used to do the same things (with different performance) if you know how apply"

    PS: sorry for my english..

    Regards,
     
    Last edited: Nov 6, 2015
  24. Mr.Stein

    Mr.Stein

    Joined:
    Dec 4, 2013
    Posts:
    169
  25. Kirbychwan

    Kirbychwan

    Joined:
    Aug 14, 2012
    Posts:
    430
    @Mr.Stein

    Thanks for the input! I understand completely what you mean regarding the dark/light stages. If only there was a suitable solution for both situations! Quick question regarding SFSS since you've been working with it: can you set entire colliders to work as Obstacles, (like Light Obstacle Generators in Light2D) or do you have to 'paint' polygon obstacles for every single object? Also, is there layer support? (Light won't affect sprites in the Background Layer, etc)

    I sadly used to use 2DLS before it was discontinued, but I've been looking at 2D DLS Pro as well... maybe I'll check them out.

    Cheers!
     
  26. Mr.Stein

    Mr.Stein

    Joined:
    Dec 4, 2013
    Posts:
    169
    @Kirbychwan
    You need to paint(not colliders) the elements you want to generate shadow, with a mini editor, :


    The layers support is for what you want the shadows affect, is not for the light.. If you want the Light dont affect the sprites in the Background Layer you need to set by material/shader. For example if I want that the light affect a tree I need to set the material/shader, if I dont want the light affect the tree then I can put the default material Sprites-Default.

    Here light would not affect the tree (look the material in the sprite is set in "Sprites-Default" ):


    Here light affect the tree(look the material and shader in the sprite) and generate shadow:


    Here light dont affect the tree but light generate shadow from the tree.
    The shadow is because in the SFPolygon script of "paint" tree I set the "Shadow layer" (First picture)


    the only thing what I don't like is the light intensity.. the light intensity is global and is inside a script in the camera, so if you want to change the intensity of only one light then are not many options.. the only options what I find is change the light color and try to find what you want but still not the same (maybe there is an option but I don't know.. would have to ask in the official thread)


    I think is better to continue the conversation in the SFSS thread haha..

    Regards,
     
    Last edited: Nov 6, 2015
    Kirbychwan likes this.
  27. boeggles

    boeggles

    Joined:
    May 23, 2015
    Posts:
    9
    Ey, has anyone tried using this with Light2D and checked if they work together?
     
  28. Mr.Stein

    Mr.Stein

    Joined:
    Dec 4, 2013
    Posts:
    169
    I do not see why they could not work at the same time, while not have the same name class or something
     
  29. boeggles

    boeggles

    Joined:
    May 23, 2015
    Posts:
    9
    I ask because the Sprite Lamp developer mentioned that it's not fully implemented with Unity which seems a little too ambiguous for my taste. I want to at least be assured that the things work together as intended.
     
  30. Mr.Stein

    Mr.Stein

    Joined:
    Dec 4, 2013
    Posts:
    169
    I can not guarantee 100% because I dont have Light2D, only I have SFSS
     
  31. boeggles

    boeggles

    Joined:
    May 23, 2015
    Posts:
    9
    Oh gotcha. Well I'll work on the hard stuff first then. Thanks.
     
  32. noanoa

    noanoa

    Joined:
    Apr 17, 2014
    Posts:
    220
    Looks fantastic. Wish there was feature limited trial version or low price version though, as it's kind of an asset which can be either great or nothing depending on your project setup. It's a nature of the asset store though...
     
  33. DrKucho

    DrKucho

    Joined:
    Oct 14, 2013
    Posts:
    140
    hey , i have read somewhere in the forums that unity plans to do 2D lighting ... anyone know something about it?
     
  34. Phuzz

    Phuzz

    Joined:
    Mar 31, 2014
    Posts:
    47
    For me, that would be the best thing unity ever did :) Also add 2D Navmesh to that for the XY Axis i wont as for anything more..... for a while :D Lets hope so!
     
  35. Kirbychwan

    Kirbychwan

    Joined:
    Aug 14, 2012
    Posts:
    430
    I haven't heard that, it's actually kind of bizarre that it's taken them this long to create a default 2D lighting system. Not sure if it'll look as nice as Light2D, though.
     
    Last edited: Jan 22, 2016
    DrKucho likes this.
  36. tomtominc

    tomtominc

    Joined:
    Nov 7, 2013
    Posts:
    13
    Does this work on the XZ plane?
     
  37. Gelo_Man

    Gelo_Man

    Joined:
    Jun 6, 2015
    Posts:
    9
    Sadly it does not.
     
  38. SamTheBay

    SamTheBay

    Joined:
    Jan 11, 2014
    Posts:
    13
    I am using this with Vectrocity and I want to have the vectors not be affected by the 2d lighting. However, it seems that I can't stop them. Does anyone have an idea of how to make this work?
     
  39. Oijadt

    Oijadt

    Joined:
    Sep 4, 2013
    Posts:
    5
    I had to create separately camera with higher Deep parameter to render things above lighting. Then of cource change Culling Mask in the new camera to render Vectrocity's vectors and remove it from the main camera.
     
  40. Kirbychwan

    Kirbychwan

    Joined:
    Aug 14, 2012
    Posts:
    430
    Can anyone tell me how to change the LightSprite's opacity and color via code?

    Trying to modify the color/alpha via a visual script editor; and trying the same methods as modifying SpriteRenderer don't seem to work at all...
     
  41. Shadeless

    Shadeless

    Joined:
    Jul 22, 2013
    Posts:
    136
    @Kirbychwan
    You have to modify LightSprite.Color. If it doesn't work for you maybe the problem is with your script.
     
  42. SSS135

    SSS135

    Joined:
    Nov 26, 2012
    Posts:
    62
    Hi, folks
    Sorry, I have stopped working on this project. To make things at least a little better, I've made it free and open source. See GitHub repo. It should become free on Asset Store in some days.
     
  43. DrKucho

    DrKucho

    Joined:
    Oct 14, 2013
    Posts:
    140
    free? is that fair for all of us that paid for it?
     
  44. Bulbware

    Bulbware

    Joined:
    Jun 3, 2016
    Posts:
    2
  45. JAMiller

    JAMiller

    Joined:
    Apr 2, 2009
    Posts:
    73
    Hello, really liking Light 2D for my game but I'm having a problem doing what is suggested in several pages on this thread:

    Drawing another camera on top using a higher depth.

    I have a camera named "Overlay camera" that renders at a higher depth, yet if I enable it all the lighting disappears and it renders the unlit scene.
    light_2d_problem.gif
    You can see in my example, when I activate Overlay Camera it is rendering "nothing" with "depth only" yet it somehow clears out the light2D entirely. It doesn't matter what layers I render, or what depth order I change the 3 cameras to, the same result happens.

    Edit: I should mention that I can use the overlay camera fine when I disable LightingSystem and Light2D Camera. (In other words it only effects Light2D)

    Any ideas?
     
    Last edited: Apr 1, 2017
  46. Bulbware

    Bulbware

    Joined:
    Jun 3, 2016
    Posts:
    2
    Hi JAMiller,

    I think you should leave the depth of Light2D Camera as it was. In my scene it is always -1 and it is the lowest depth of all cameras. Also the CullingMask for it has to be setted as LightSources.

    Now create overlay camera with higher depth and with Culling Mask rendering only a new layer. This layer shouldn't be rendered in another camera and also be sure that sprites that you want to show "behind the lights" are rendering on that layer.

    From my experience i know that it works very random for different settings but for sure it can be done.
     
  47. Kirbychwan

    Kirbychwan

    Joined:
    Aug 14, 2012
    Posts:
    430
    Can anyone else confirm that Ambient light is no longer working with unity 5.6?
    Does anyone have a fix, possibly?
     
  48. Doghelmer

    Doghelmer

    Joined:
    Aug 30, 2014
    Posts:
    112
    @Kirbychwan The Ambient light appears to be working normally for me in 5.6, so thankfully it's not a universal issue.
     
  49. AntonioModer

    AntonioModer

    Joined:
    Jul 29, 2014
    Posts:
    16
    Hi. How about XZ plane? Anyone work on it?
     
    Last edited: Jul 2, 2017
  50. zerodarkzone

    zerodarkzone

    Joined:
    Oct 13, 2013
    Posts:
    1
    Hi,
    I know this is abandoned but has anyone tried to use it on mobile platforms?.