Search Unity

2D Mesh Based Volumetric Lights

Discussion in 'Assets and Asset Store' started by reveriejake, Jul 5, 2012.

  1. reveriejake

    reveriejake

    Joined:
    Jul 8, 2007
    Posts:
    819
    @space_droid If you are using Pro please contact me and I will give you a new shader that will soften up your edges and help with Sprite issues. Otherwise there is really no way of softening up those edges using Unity Basic.

    @Bramlet Here is that flicker code! Its basic but its a good starting point. Just put it on your light you want to flicker.

    Code (csharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. [RequireComponent(typeof(Light2D))]
    5. public class Flicker : MonoBehaviour
    6. {
    7.     public bool useMeshScaling = true;  // If this is true it will scale the light using sizeVariance (Mesh Update Required)
    8.     public float sizeVariance = 0.25f;
    9.     public Color color1 = Color.red;
    10.     public Color color2 = Color.yellow;
    11.     public float updateMin = 0.05f;
    12.     public float updateMax = 0.1f;
    13.     public float transitionSpeed = 25.0f;
    14.  
    15.     private Light2D l2D;
    16.    
    17.     private float kSize;
    18.     private Color kColor;
    19.     private float targetSize;
    20.     private Color targetColor;
    21.     private float nextUpdate = 0;
    22.  
    23.     void Start ()
    24.     {
    25.         l2D = gameObject.GetComponent<Light2D>();
    26.         kSize = l2D.LightRadius;
    27.         kColor = l2D.LightColor;
    28.  
    29.         UpdateTargets();
    30.     }
    31.    
    32.     void Update ()
    33.     {
    34.         l2D.LightColor = Color.Lerp(l2D.LightColor, targetColor, Time.deltaTime * transitionSpeed);
    35.  
    36.         if (useMeshScaling)
    37.             l2D.LightRadius = Mathf.Lerp(l2D.LightRadius, targetSize, Time.deltaTime * transitionSpeed);
    38.  
    39.         if (Time.time >= nextUpdate)
    40.             UpdateTargets();
    41.     }
    42.     void UpdateTargets()
    43.     {
    44.         targetSize = kSize + Random.Range(-sizeVariance, sizeVariance);
    45.  
    46.         float cRange = Random.Range(0f, 1f);
    47.         targetColor = Color.Lerp(color1, color2, cRange);
    48.  
    49.         nextUpdate = Time.time + Random.Range(updateMin, updateMax);
    50.     }
    51. }
    52.  
     
    Last edited: Feb 20, 2014
  2. space_droid

    space_droid

    Joined:
    Feb 18, 2014
    Posts:
    8
    Question: I am using the tile builder plugin to build my levels. For some reason the 2dvls lights always render behind them so I can't see them. Is there a way to force the 2dvls lights to be in front of everything?
     
  3. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Hey,

    So I want to start with what a great asset this is! Looks great, the results are very impressive indeed, and at a great price point! So thanks for developing this!

    I have a question with regards to the radial lights. Is it possible to use the radial lights to light up other sprites in my scene? I am using the new 4.3 2D system in Unity, but when I use a radial light, and set my sprites to use the Sprites/Diffuse shader, they just appear black. I have tried the 4.3 shaders supplied in the package, but these do not work for me at all.
    I would like the radial light to not cast shadows, but light up the objects within its radius.

    Any help would be appreciated.

    Adam
     
  4. reveriejake

    reveriejake

    Joined:
    Jul 8, 2007
    Posts:
    819
    @space_droid
    I just want to double check that I have in fact answered your question via the PM system?

    @mimminito
    I have sent you an email :) Let me know if you need any more help through there!
     
  5. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    You answered everything thanks :) Looking forward to an update to fix the shaders in basic!
     
  6. space_droid

    space_droid

    Joined:
    Feb 18, 2014
    Posts:
    8
    The question regarding the spotlight shaders was answered. Thanks a lot!

    Any info on the layers questions I posted above regarding tile builder?
     
  7. reveriejake

    reveriejake

    Joined:
    Jul 8, 2007
    Posts:
    819
    Hmm no I do not have any solutions to this. It might have something to do with the way their shaders work.

    Is the plugin your using called "Tile Builder"?

    Jake
     
  8. space_droid

    space_droid

    Joined:
    Feb 18, 2014
    Posts:
    8
    Yes it is called Tile Builder. Sorry I'm new to all this so I haven't quite got layers all figured out. I wasn't sure if there was a way to tell the 2dvls lights to be absurdly on top or in front of everything else.
     
  9. reveriejake

    reveriejake

    Joined:
    Jul 8, 2007
    Posts:
    819
  10. kauaiBlake

    kauaiBlake

    Joined:
    Feb 28, 2013
    Posts:
    36
    Thanks for that video, helpful!
     
  11. reveriejake

    reveriejake

    Joined:
    Jul 8, 2007
    Posts:
    819
    Thanks! I tried recording it 3 or 4 times before just saying screw it and releasing what I put up ;). It might get an update soon once I get back on the mic and can record a better video.

    I forgot to mention in the video that there seems to be an issue with 'Anti-Aliasing' so for example when you build your project and select anything higher than 'Good' by default the lights will not render. You must turn off Anti-Aliasing... If you (Blake) or anyone else has a suggestion on how to fix this I would be happy to hear it :).

    Jake
     
  12. gamedev098

    gamedev098

    Joined:
    Jun 7, 2013
    Posts:
    7
    hey! I have a question. How does the lightning works on mobile devices ( iOS and Android )?its performance? Looking forward to your reply :)
     
  13. reveriejake

    reveriejake

    Joined:
    Jul 8, 2007
    Posts:
    819
    I know that there have been a few people running 2DVLS successfully on mobile devices but I am honestly not sure about their performance. It would depend on how may raycast calls you make (light detail) and how many verts the light generates which is dependent on how many curved surfaces your scene has.

    Anyone have any input on this?

    Jake
     
  14. DreamAlp

    DreamAlp

    Joined:
    Dec 4, 2013
    Posts:
    7
    We have been running it on mobile devices. If the lights are stationary then the mesh doesn't get updated so that isn't much of a frame rate hit. If you have lots of moving lights then it will be an issue. The other big thing is the fill rate. If you have lots of lights blending with the scene especially if they overlap you will get poor performance or if they cover a large amount of the screen. This will show up on the early Retina devices like the iPhone 4. On the latest iPad we are getting frame rates of 200 fps with a stationary light and 80 fps with a moving light when the light cover around 1/3 to 1/2 the screen.
     
  15. reveriejake

    reveriejake

    Joined:
    Jul 8, 2007
    Posts:
    819
    Thanks for the input DreamAlp.

    I also want to add that the lights will update their mesh's when other objects on the shadow layer enter the lights range and are dynamic (moving). If you want a light to remain static even if an object on the shadow layer enters its range you will want to set it to 'isStatic'. Just keep in mind that that light will no longer cast shadows.

    Jake
     
  16. reveriejake

    reveriejake

    Joined:
    Jul 8, 2007
    Posts:
    819
    Okay new screenshot of the shaders. I have been working on the Pro-Shader and I also wanted to make a clarification...

    Screenshot SOFT LIGHTING IS PRO-ONLY... Just like with Unity lighting!
    $2DVLS_Nice.PNG

    Non-Pro 2DVLS Users:
    The non-pro version of 2DVLS is meant to give an effect similar to 'Super Meat Boy' and 'Mark Of The Ninja'. Please do not purchase 2DVLS with a non-pro unity licence and expect the lighting to be soft. You should also not expect the lighting to act as an actual 'LIGHT'. As in the case of 'Super Meat Boy' and 'Mark of the Ninja', the lights are added for a toony sort of effect.

    With that said. I am TRYING to get a shader out that will behave similar to the Pro shader (with hard edges) where it lights up the scene. But keep in mind that this seems to be a nearly impossible task according to some very reputable shader programmers. The shaders I had previously faked the lighting but as many of you know in faking the lighting it also added many visual bugs...

    Pro 2DVLS Users
    Please contact me for an updated package if you need it before I release it.


    Thanks guys for your support!
    Jake
     
  17. reveriejake

    reveriejake

    Joined:
    Jul 8, 2007
    Posts:
    819
    Last edited: Mar 19, 2014
  18. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    963
    Hi,
    I like this plugin a lot, but I have to say there is still plenty of space for optimization. For my game, I did some tweaks to Light2D.UpdateRadialMesh() method, and without actually changing the code logic I've got a pretty good 30-50% performance boost: from 20 to 32 FPS on Motorola Defy (2010 Android phone) at 1000 rays, from 115 FPS to 155 FPS on my PC at 5000 rays.
     
    Last edited: Mar 17, 2014
  19. reveriejake

    reveriejake

    Joined:
    Jul 8, 2007
    Posts:
    819
  20. reveriejake

    reveriejake

    Joined:
    Jul 8, 2007
    Posts:
    819
    Okay there has been some confusion as to what to expect from 2DVLS from both me and my customers so here is hopefully a clarification as to what you should expect before buying 2DVLS. Since it has become more hastle than it is worth to support a pro-like shader for 2DVLS I have decied to stop fighting it and just release 2DVLS on Unity Basic as a 'cartoony' style lighting system. This is still a great way to improve the look and add some depth to your scenes.

    Just as you don't expect to get soft shadows with Unity Basic you should not expect to get soft shadows with 2DVLS in basic. It requires post processing which is simply not available to basic users. Same goes for being able to 'light' up your scene, it is almost impossible to do so without using some sort of post-processing.

    Below you will see 2 screenshots of the differences between how 2DVLS will look in Unity Basic and Unity Pro.

    What type of lighting to expect with NON-PRO version of Unity
    View attachment 92887
    This type is similar to lighting used in "Mark of the Ninja" and "Super Meat Boy"

    What type of lighting to expect with PRO version of Unity using 2DVLS 3.5 (Coming Soon)
    View attachment 92888
    http://reverieinteractive.com/2DVLS/ProShader/SpaceRoom/

    I hope these clarify a few things. Feel free to email me with any questions!
    Jake
     
    Last edited: Mar 25, 2014
  21. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,037
    Good - most people would be using 3D anyway if they were going for realism :)
     
  22. reveriejake

    reveriejake

    Joined:
    Jul 8, 2007
    Posts:
    819
    @orb: Glad you agree ;) 2DVLS was originally based off of the "Super Meat Boy" look anyway!

    Jake
     
  23. stulleman

    stulleman

    Joined:
    Jun 5, 2013
    Posts:
    44
    Hey Jake,

    I just have a little question as someone said it is possible and then someone said it isn't.
    I have a scene like in the image I attached.

    $game.png

    My question is, is there any possibility that everything other than the light is black? So that it simulates your view?
    (I use Unity Free!)

    Thank you in advance!
     
  24. reveriejake

    reveriejake

    Joined:
    Jul 8, 2007
    Posts:
    819
    It is possible with Free but it is not a quality solution which is why I am not going to be supporting that effect in Unity Basic anymore. If you want all of your scene objects to be black and only be lit by 2DVLS you will have to use the 2DVLS/Diffuse or 2DVLS/Cutout shaders on your objects which means you can't use sprites. There was some shader code written for sprites but it did not seem to work for long so I don't think it works any longer. Another issue with the 2DVLS/Diffuse shader is that it blends with objects behind it.

    Obviously I am going to be open to any solution to this problem and might even try to solve the issue someday but for now I am just spending too much time worrying about the shaders and not enough time improving the core code and making it optimized.

    For your level that you have pictured there though, you should be able to use the 2DVLS/Diffuse shader just fine. If you need any help setting that up just send me an email and I will try my best to help you out :)

    Jake
     
  25. NicBischoff

    NicBischoff

    Joined:
    Mar 19, 2014
    Posts:
    204
    Hi,

    Does this solution work with Unity 2D Sprite system out of the box?
    ie. flat quads and not 3d cubes.

    Nic
     
    Last edited: Mar 30, 2014
  26. Zetax

    Zetax

    Joined:
    Sep 24, 2012
    Posts:
    15
    Hey Support,

    Trying to resolve a bug/problem with no success. I´m have 3 android test devices and on the first one (Nexus 7) the 2D volumetric lights work well, but in the second and thir (Samsung Galaxy S2 and S4) the lights appear with no alpha channel applied (check the screenshoot attached).

    Could you help me with a tip or fix for this issue?

    Thanks in advance.

     

    Attached Files:

  27. Zetax

    Zetax

    Joined:
    Sep 24, 2012
    Posts:
    15
    Another shot
    1 - Top Device: Galaxy Tab (2d lights working well)
    2 - Bottom Device: Galaxy S4 (2d lights with issues)


    Please help.
     
  28. Zetax

    Zetax

    Joined:
    Sep 24, 2012
    Posts:
    15
    Wow thank you very much! That fixed my problem!
     
  29. reveriejake

    reveriejake

    Joined:
    Jul 8, 2007
    Posts:
    819
    @Zetax
    Sorry I missed your question.. I sometimes delete the forum notifications in my email without noticing. Please in the future if you have any questions email me by using the form on my website or my email address. I do check this forum but I usually don't check it regularly.

    I do try and reply to any questions as soon as possible when I get them via email because they are sent to my phone.
    reveriejake87@gmail.com

    @NicBischoff
    As I mentioned above, I sometimes miss questions in this forum so excuse me for that. If you try to use the built in shaders '2DVLS/Diffuse' or '2DVLS/Cutout' then no 2DVLS does not work with sprites right out of the box. I do have an update that I need to submit which will solve many of the issues with shaders for Pro users but as I mentioned in a post above, I have decided to go for more of a cartoon look when dealing with Basic. That means your lights will be using a custom shader in the next version which is essentially the 'Transparent/Diffuse' shader which accepts vertex colors.

    Thanks guys for the patience,
    Jake
     
  30. Chazede

    Chazede

    Joined:
    Dec 12, 2012
    Posts:
    42
    Hi jake. I was Trying to work out if a directional Shadow light was possible?
    thanks
    Charlie
     
  31. Chazede

    Chazede

    Joined:
    Dec 12, 2012
    Posts:
    42
    I am trying to make an effect like this.



    Is this possible with 2dvl?
     

    Attached Files:

  32. reveriejake

    reveriejake

    Joined:
    Jul 8, 2007
    Posts:
    819
    Unfortunately this is not possible right now. You could write a fairly simple custom solution though. Let me know if you need any help with that.

    Jake
     
  33. Kroq9Gar

    Kroq9Gar

    Joined:
    May 16, 2013
    Posts:
    5
    Dear Jake,
    I am as well having issues with the light not showing above a sprite - I have managed to bypass it by giving the sprites a slight alpha value... however this means of course that if there is anything behind them, it may make that area of the sprite look strange. Is there any fix to force the light to show above sprites which are not on the shadow layers?
    Thank you.
     
  34. reveriejake

    reveriejake

    Joined:
    Jul 8, 2007
    Posts:
    819
    Are you the person I replied to via email?

    Do you have Unity Pro? I still have not had an opportunity to focus on getting Basic shaders fixed. I have a 3 day weekend this weekend so maybe I can finally get something worked out to fix these issues.

    Let me know... My email is reveriejake87@gmail.com

    Jake
     
  35. eddie312

    eddie312

    Joined:
    Sep 13, 2012
    Posts:
    24
    Hi I just purchased the plugin and the sample project of the 2d sprite are note working properly.

    Some of the object have missing script. (im using unity4.5 don't know if there is problem with this version).

    thanks
    Eddie
     
  36. reveriejake

    reveriejake

    Joined:
    Jul 8, 2007
    Posts:
    819
    Hey guys, just noticed they had my asset for sale for 50% off. I did not realize that they was putting it up for sale today so apologies for not getting the 4.0 update up beforehand.

    Hang in there for the update!

    I have tested the new algorithm for 4.0 and in my test scene it increased the FPS by almost 100fps so it will hopefully be worth the wait for most of you ;).

    Jake
     
  37. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    I thought development had stopped! Glad to know you are still updating, be good to see the new update!
     
  38. SullyTheStrange

    SullyTheStrange

    Joined:
    May 17, 2013
    Posts:
    147
    Same, I wasn't expecting any more updates. Thanks for the news, can't wait to use it!
     
  39. reveriejake

    reveriejake

    Joined:
    Jul 8, 2007
    Posts:
    819
    No I definitely have not stopped working on it. I have mentioned before that I have sort of a juggling act going on between my day-job, school, and family time, so the time I do get to work on this stuff is limited. Also if I run into any issues during R&D it makes it take that much longer.

    Sometimes I slip and give a date like "Yeah I will try to get it out by next weekend" but for the most part I try not to do that because honestly my life is a bit hectic at the moment and its hard to judge what I will be doing from one day to the next ;).

    If you tried to contact me through email and I didn't respond then I probably overlooked it or read it and for some reason didn't get around to an immediate response and ended up forgetting to reply all together. So if anyone has sent me an email and has not received a reply please try again! It will not upset me to get 100 emails to get my attention ;).

    Anyway, yep I am still here and I am still working on this project!
    Jake
     
  40. cg_destro

    cg_destro

    Joined:
    Aug 13, 2013
    Posts:
    142
    Hey I have some request/ idea, I think it's alomst posssible to create flat shadows something like Chazede asked couple post above :) or soemting like this in link bellow
    http://sandbox.juan-i.com/longshadows/
    so flat basicly shadow generator that there you can specify shadow distance, fading area for example distance is 2 unity fading from 1 to the end of shadow and opacity control on top of that :)
    and another thing to make it work as it should would be to trace all items not only first on the line of sight and accordingly adding flat shadows to all of them.
    Would be great if you could move object up and down and upper object could cast shadows to lower ones :)

    another thing/ bug
    I would like to create something like ceiling point lights that will affect player but player can be directly under this light, right now this will block all the light and I would like to ignore player or any object if it is directly under or very close to to light source, maybe by gradually decreasing light opacity for player if collider is closer and closer to light source other than just pop up shadows :)

    that it for now :)
     
  41. fidelsoto

    fidelsoto

    Joined:
    Aug 7, 2012
    Posts:
    87
    Hi! I bought this asset recently and just now noticed that lights wont render over 2D sprites that are not in the default sorting layer. Any way to render them over any sprite regardless of its sorting layer?
     
  42. reveriejake

    reveriejake

    Joined:
    Jul 8, 2007
    Posts:
    819
    Yep send me an email please and I will give you an update. I have to head to work though so you might not get a reply back until tomorrow morning. :(

    reveriejake87@gmail.com

    Jake
     
  43. Drommedhar

    Drommedhar

    Joined:
    Sep 24, 2013
    Posts:
    78
    Hi reveriejake,

    I bought your asset and I'm really liking it.
    But I have 2 problems with it (I'm using SpriteRenderers):



    As you can see, the ladder is showing the background. The sprite itself has a alpha channel, but I even get this effect if I'm using the normal Diffuse (not Cutoff) shader of 2DVLS. That's a no go.

    When using the normal Unity Diffuse shader, it's working perfectly. Is there something you can do about that?

    The second problem looks like this:


    Here you can see light coming from the left which should shine onto the slope selected. This slope has a polygon collider and it looks like it has the shadow doubled, because it's a lot darker then the box next to it.

    All sprites in both screenshots come from an atlas map, which has an alpha channel. The rest currently looks okay, but that's what I found out right now. I hope you can help me out with this.

    Thanks in advance.

    EDIT:
    Just found out that behind the slope, the gray box is shining through (just like with the ladder). So this could be the same problem in both shots)

    EDIT:
    Maybe it's interesting for you, I'm using Unity 4.5 Beta 17 right now, if this is important.
     
    Last edited: Sep 1, 2014
  44. fivepointsevenn

    fivepointsevenn

    Joined:
    Aug 20, 2014
    Posts:
    32
    One question stops me from buying. Can this light be reflected? If I create very small cone, and point it down to a surface, can this light ray be bounced up?
     
  45. Deleted User

    Deleted User

    Guest

    Has anyone solved the problem where the light is always behind 2D sprites?

    I have seen the question several times in this forum, but not any answers. I hope someone has an answer, because I cannot use this otherwise. :-(
     
  46. suctioncup

    suctioncup

    Joined:
    May 19, 2012
    Posts:
    273
    First of all, great asset. I bought it a while ago, whilst it was still new - loved it then and love it now. Only a few issues, I'm sorry.

    Is it possible for the lights to be black? For shadows and such. Also, lights do not show when the background is white. I assume this is due to transparency or something - maybe a bool to toggle this?
    I'm also having the problem with the lights rendering under the sprites, but I can work around that with 3D.
     
  47. Guacamolay

    Guacamolay

    Joined:
    Jun 24, 2013
    Posts:
    63
    I really like the asset, just dropped it in and it worked perfectly.

    Is there any plan for more optimization? It's causing a bit of slowdown when I have a few lights onscreen at once.

    Have you tried playing with the z-axis on these sprites? I'll check again later but I'm sure I got it working this way
     
  48. Deleted User

    Deleted User

    Guest

    Yes, I have tried. No success.
     
  49. reveriejake

    reveriejake

    Joined:
    Jul 8, 2007
    Posts:
    819
    Hey sorry guys for not paying attention to this forum and again apologies to those of you who have not received an email response from me yet (I am working on it). I will attempt to answer some questions below and then announce new information about 2DVLS 4.0 which is coming very soon despite the number of delays in the past year.

    @Evorlor & @Beinscheibe
    Unfortunately the shaders for 2D sprites in 3.1.3 do not work properly for Unity Basic users. I have been working on finding a solution but for now the easiest and best solution requires pixel shaders and Unity Pro. So if either of you have Unity Pro and would like to give these shaders a try please email me reveriejake87@gmail.com. Make sure you include that your from the forums and specify that your looking for the pro shaders for 2DVLS. @Beincheibe I couldnt see the images you attached to your post =\.

    @5pointseven
    I have answered this question in the past and the answer has been not out of the box. I have had other customers write custom code to let 2DVLS do exactly what your asking. The problem is that for most cases reflecting the light would not be used and would mean bulky unnecessary code/processing for a majority of 2DVLS users. If your interested you can email me reveriejake87@gmail.com and let me know who you are from the forums and what your needing and I can try to track down a copy of that reflection code that previous user wrote. Remember to give me details about why your emailing me. I have a lot of emails coming in and its very difficult to keep track of who is who.

    @suctioncup
    Thanks for your support and glad you have liked it for so long. No need for you to apologize to me! It is me who should apologize to you for being so late to fix/update 2DVLS.

    If you own/subscribe to Unity Pro then yes as I mentioned above there is a really good solution to the shader problem which does allow you to darken your screen fully. However if your using Unity Basic its become more of an issue because I am not an awesome shader programmer and it takes me some time to figure out 'hacks' to make lights look good in Unity Basic. Your welcome to shoot me an email if you do have Unity Pro requesting the current version of the pro shaders.

    @Guacamolay
    Nice name ;). Anyway yes! See below information about the 4.0 update. Also you should make sure the lights in your scene is optimized in various ways. For example, the radial lights can be set to 'static' if you dont want them to continue to cast shadows and lights that do not move or change size will not update.

    Pro Shader (v3.x) Sample Scene
    http://reverieinteractive.com/2DVLS/ProShader/SpaceRoom/

    ---------------------------------------------------------------------------------------------
    2DVLS 4.0.0 Alpha Update

    Performance
    Test scene involving 8 dynamically moving lights (constant updates) shows the previous versions of 2DVLS will run at roughly ~250-300fps. In an identical scene running 2DVLS 4.0 the framerate jumps up to ~500-550fps. This is just the alpha version and I do expect that gap to widen once I completely finish the core code and start optimizing further. Both of course with only 2 draw calls.

    Visual Quality
    In 2DVLS 3.1.3 you must increase the number of Rays to improve the edge detection quality resulting in either crisp edge detection very poor performance or with choppy edge detection with higher performance. In 2DVLS 4.0.0 I have re-written the code from the ground up with custom edge methods. These methods allow you to completely eliminate the need for Physics2D.Raycast calls and they allow for extremely precise edge detection due to the reliability of casting lines against polygon points in your mesh.

    Shaders
    This is a very tough thing to solve for Unity basic users but I want you to know that I am working on a solution for that. Currently the best solution is obviously to use pixel shaders to render the lights onto the screen. These shaders not only allow you to darken the scene in areas a light does not reach but they also make it possible to "bleed" the lights and "blur" them. Of course the limitation is that you must be a Unity Pro user.

    Customization
    In 2DVLS 3.1.3 you was limited to 2 basic light types, Radial and Directional. These are okay until for example you need to simulate light coming from a rectangular source (florescent shop light) or a cone light casting at a slight angle as you might see outside of exterior doors. In 2DVLS 4.0 you have complete control over the shape of the light, where it casts from, and how it is cast (directional or radial).

    Below are the new light types (CS stands for "custom shape").

    • VLSRadial / VLSRadialCS
      1. Casts from a single point outwards
      2. CS lets you outline odd shapes for special cases such as shop light.
    • VLSDirectional / VLSDirectionalCS
      1. Casts from a direction
      2. CS lets you outline rooms and other odd shapes.
    • VLSArea / VLSAreaCS
      1. Has no casting points or shadows
      2. Good for filling an area with static light.
    The Obstructor Object
    2DVLS 4.0 no longer uses colliders to detect where a light is to cast the shadow. It now uses something I have called an "Obstructor" which is a Mono-Behaviour and the base of all 2D light types. This Obstructor object drives the ability for you to setup and use custom shapes. The editing of the object is similar to that of the PolygonCollider2D. If you prefer to use or have objects that use Collider2D types then you can also set the Obstructor to inherit the shape of your Collider2D object.

    New Sales Model
    • 2DVLS 4.0 at this point will be offered for ~$0-$25 on the asset store with limited shaders and no source code (Code is in DLL).
    • 2DVLS 4.0 Pro will be for sale on the Asset Store for ~$50 and it will include the pro pixel shaders.
      • Anybody who owns 2DVLS before 4.0 release will automatically get this version.
    • 2DVLS 4.0 Pro Source will be for sale on the Asset Store for ~$100 and will include everything above plus full source code.

    ----------------------------------------------------------------------------------

    Anybody who might be interested in getting an alpha copy of 2DVLS 4.0 Pro can contact me at the end of the week asking to be added to my Skype list. I will be working on it through the week and throughout the weekend and I will need help troubleshooting and trying out the newest features.

    I should have a new video showing off some of the above features posted to my YouTube channel sometime in the next couple of days.

    Thanks again guys!
    Jake
     
    Last edited: Sep 30, 2014
  50. Drommedhar

    Drommedhar

    Joined:
    Sep 24, 2013
    Posts:
    78
    Hey Jake,

    I will gladly test the new alpha (we are in touch via email right now concerning the bugs I had with transparency and lately with uGui). The guy from germany ;D

    Just send me your contact in skype and I will troubleshoot what you need