Search Unity

  1. We want you to join us at GDC this year! Take a peek at all of the events we will be hosting during the week of GDC.
    Dismiss Notice
  2. Tell us about your experience here and you’ll get early access to the 2018 Game Studios report + more goodies.
    Dismiss Notice
  3. Unity 2017.3 has arrived! Read about it here.
    Dismiss Notice
  4. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice
  5. We've closed the job boards. If you're looking for work, or looking to hire check out Unity Connect. You can see more information here.
    Dismiss Notice

[RELEASED] - Screen Space Area Lights (SSAL)

Discussion in 'Assets and Asset Store' started by MPanknin, Mar 25, 2013.

  1. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Hi xenex, just sent you a PM.
     
  2. mstevenson

    mstevenson

    Joined:
    Sep 24, 2009
    Posts:
    161
    I've been experimenting with adding SSAL to an Oculus Rift project, however it seems only to support rendering from a single camera. Any thoughts on how I might be able to modify the system to support a multi-camera setup?
     
  3. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Hi mstevenson,

    this feature is already on our list, since another user also had problems with a two camera setup. However it will probably take a bit until it's implemented, since we are currently deep in crunch on another project. But I'll try to get it done asap.
     
  4. mstevenson

    mstevenson

    Joined:
    Sep 24, 2009
    Posts:
    161
    Thanks, glad to hear! SSAL has been working great for me, by the way. It's exactly what I've needing to cheaply simulate GI.
     
  5. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Great! If you can share some footage, we would love to see what you have been using our lights for!
     
  6. QuantumTheory

    QuantumTheory

    Joined:
    Jan 19, 2012
    Posts:
    885
    MPankin,

    Can you speak to the performance numbers I'm finding with the lights? Are there optimizations that can be done?

    Thanks!

     
  7. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Hi QuantumTheory,

    sry for the late reply. I'm sure there are certain optimizations, that we can implement, but I really need to think about it first, before I can tell you something more specific. Unfortunately right now we are burning on another project, so I'm afraid it will take a little while. But I will address this, as soon as possible.

    Thx for your patience.
     
  8. QuantumTheory

    QuantumTheory

    Joined:
    Jan 19, 2012
    Posts:
    885
    Any update on a new release?
     
  9. blueivy

    blueivy

    Joined:
    Mar 4, 2013
    Posts:
    498
    Why are the lights impacting performance when they're not on screen?
     
  10. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Yep, I continued working on it today. First item on my list is support for multi camera setups, as this has been requested by a couple of users so far.
    After that I will look into improving performance, however this is still a bit shady on what exactly will be implemented, so no specific information on this front so far...

    Do you mean lights are being rendered, independent of the respective gameobject being active/inactive? If so, this is fixed.
     
  11. blueivy

    blueivy

    Joined:
    Mar 4, 2013
    Posts:
    498
    Ok thanks that's what I meant :)
     
  12. LeeAllen

    LeeAllen

    Joined:
    Aug 7, 2012
    Posts:
    136
    I am getting a "The type or namespace name `UnityEditor' could not be found" error when attempting to build out a test build with nothing but the demo scenes and SSAL. What am I doing wrong?

    Thanks!
     
  13. LeeAllen

    LeeAllen

    Joined:
    Aug 7, 2012
    Posts:
    136
    No one else is having this issue? I tried the build with Webplayer, and OS now with the same problem. Please help
     
  14. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Hi LeeAllen,

    you aren't doing anything wrong. The problem is that in the AreaLightRenderer I currently use the PlayerSettings class from the UnityEditor package. This is necessary cause I need to account for changes in color space (gamma vs. linear). And the UnityEditor package is not available at runtime and that is, what is causing the error. Hm..

    Please try the following workaround, while I think about another way of handling the two colorspaces...

    1. Open the script AreaLightRenderer.cs
    2. Find the line "using UnityEditor;" and change it to "//using UnityEditor;"
    3. Find the following lines:
    if(PlayerSettings.colorSpace == ColorSpace.Linear)
    {
    Shader.SetGlobalFloat("_LinearPow", 2.2f);
    }
    else
    {
    Shader.SetGlobalFloat("_LinearPow", 1.0f);
    }
    4. Delete those lines and replace them with:
    Shader.SetGlobalFloat("_LinearPow", 1.0f); if you are using gamma colorspace
    Shader.SetGlobalFloat("_LinearPow", 1.0f); if you are using linear colorspace

    Hope, that helps
     
  15. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Hi Guys,

    I just uploaded an updated package to the asset store. It includes the following fixes:

    • Removed the UnityEditor import from the AreaLightRenderer. Gamma/linear now has to be adjusted manually via a checkbox in AreaLightRenderer component.
    • Lights are correctly removed from renderer when destroyed / deactivated.
    • New lights are automatically selected and placed in the editor cameras view instead of the origin.
    • Specular component can now be activated/deactivated during runtime. Before this was only possible in editor mode.
    • Quite a bit of code refactoring cleanup.

    This update is meant to provide the patches fixes from the last weeks to users who did not receive them via private message.

    Features such as volumetric emitters, custom falloff functions, angle of effect for lights etc. are not included in this release, since they are still in an experimental stage.

    We will continue working on other open topics such as support for multi-camera setups, performance improvements etc.

    I hope, the review process won't take too long. I'll let you know, when it's available for download.

    Have a nice evening.
     
  16. blueivy

    blueivy

    Joined:
    Mar 4, 2013
    Posts:
    498
    Are you still developing these shadows? Unity definitely needs proper soft shadowing.
     
  17. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Yes, we are still working on the shadows. Compared to other open topics, they do have a lower priority, though.
     
  18. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Good morning, version 1.06 is online.
     
  19. stevenapolo7

    stevenapolo7

    Joined:
    Aug 15, 2012
    Posts:
    24
    is now possible make a spheric area light?
     
  20. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    I'm afraid no. Volumetric emitters are still work in progress.

    We have diffuse lighting implemented for spherical and cylindrical emitters, but right now there is no specular for these lights, yet.
     
  21. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Good morning,

    monochrome spherical emitters are almost complete including diffuse and specular lighting. I'll try to upload the updated package this afternoon.

    [​IMG]
     
  22. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Version 1.07 is uploaded and waiting for approval.

    To shorten the waiting time we prepared a new demo, that illustrates the difference between standard point lights and our new spherical emitters.

    Have a nice weekend!
     
  23. jellypixel

    jellypixel

    Joined:
    Jul 16, 2013
    Posts:
    146
    sehr interessant !!
    grüße aus der nachbarstadt
     
  24. bngames

    bngames

    Joined:
    Jul 3, 2012
    Posts:
    56
    would this plugin work with amplify.pt ?
     
  25. stevenapolo7

    stevenapolo7

    Joined:
    Aug 15, 2012
    Posts:
    24
    in every update you leave me impressed, the last demo is awesome, but im just waiting for the shadows :( i know thats not easy but im just saying jeje greetings
     
  26. stevenapolo7

    stevenapolo7

    Joined:
    Aug 15, 2012
    Posts:
    24
  27. blueivy

    blueivy

    Joined:
    Mar 4, 2013
    Posts:
    498
    same here! definitely need me some of them shadows! :p
     
  28. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    HI, just downloaded the available trial for Amplify Texture. Based on the steps mentioned in their readme I created a simple scene and it worked well together with our lights.

    [​IMG]

    However, I do not have any experience with the amplify plugins, so I can't provide you with a more in-depth testing I'm afraid.
     
  29. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    We will continue working on primitive emitters such as cylinders and ellipsoids, but arbitrary mesh emitters are out of the question right now. Sry... :)
     
  30. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Version 1.07 is online...

    Meanwhile we are fixing a bug, that occurs in Unity 4.x and causes problems with certain antialiasing filters and color manipulating image effects such as vignetting, contrast stretch and others... The respective patch will be included in the next release.

    If anyone needs it upfront, contact me and I will send you a pm.

    Cheers,
    Martin
     
  31. Tjomas

    Tjomas

    Joined:
    Jan 1, 2012
    Posts:
    27
    more spherical emitter screenshots ;)

    [​IMG][​IMG][​IMG][​IMG][​IMG][​IMG][​IMG][​IMG][​IMG][​IMG]
     
  32. Tjomas

    Tjomas

    Joined:
    Jan 1, 2012
    Posts:
    27
    Hi,

    i made another ssal video. it shows a new feature, which is currently in development.
    Custom falloff curves

    [​IMG][​IMG][​IMG][​IMG]

    [​IMG]

    redLights Demos / Videos
     
    Last edited: Sep 27, 2013
  33. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    962
    Must have this!
     
  34. Tjomas

    Tjomas

    Joined:
    Jan 1, 2012
    Posts:
    27
    Hi,

    the screenshot shows the current state of the custom-falloff-editor, which is included in the next update.
    it is possible to create and animate the main falloff-curve (red) via sub-curves (green).

    work in progress ;)

    $ssal_redlights_custom_falloff_animator.png
     
    Last edited: Sep 30, 2013
  35. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Version 1.08 has just been uploaded to the assetstore and will be available soon.
     
  36. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Good morning. Version 1.08 is now available for download.
     
  37. Tjomas

    Tjomas

    Joined:
    Jan 1, 2012
    Posts:
    27
    Hi,

    i replaced the falloff-texture-generation methode with a better one. It turns out, that the setPixel methode is not as fast as it should be ;)
    The new falloff-animator-version is about 10 times faster...

    The changes will be included in the next update.
    If anyone needs it upfront, contact me and I will send you a pm.

    [​IMG]
     
    Last edited: Oct 9, 2013
  38. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Just a heads up.

    Another user spotted a bug related to spherical light emitters in DX11 mode, that we are currently fixing. Thx Andrew!

    If you are experiencing any problems in this regard, we can provide you with a quick fix via PM. Otherwise it will be included in the next release, which will be uploaded next week.

    Have a nice weekend!
     
  39. LeeAllen

    LeeAllen

    Joined:
    Aug 7, 2012
    Posts:
    136
    Hi,

    I am having two issues, one straightforward and one not so much...

    1) When using public class AreaLightAnimated : AreaLight the items listed as public are not visible in the editor. I cannot type the movie folder name in or use any of the other public variables using the editor now. In the older version this worked fine. All of the public variables from AreaLight are in the editor though.
    2) I cannot use this with my animated characters. There is severe ghosting when the characters are moving. This has been the case since the first day you released the asset. I have tried a lot of different things but can't get this part to go away. Basically it means I can only use the area lights in scenes that have no character animation. I am using marmaset shaders now but have used others such as default when trying to get this to work.

    Thank you for all of your hard work, I wish I could use it in all of my project and not just the start menu.

    - Lee
     
  40. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Hi Lee,

    1. Ups, yes, this is my fault. Recently we switched to custom inspectors and I simply forgot to expose public variables of inherited classes. I'll send you a patch this afternoon.

    2. I thought we had eliminated the ghosting issue. Can you please upload an example project somewhere, so we can reproduce what's going on?

    Thanks
     
  41. LeeAllen

    LeeAllen

    Joined:
    Aug 7, 2012
    Posts:
    136
    [Sample Removed. This issue has been fixed.]

    This is a bit of an extreme example (lights turned up bright and not very distant..). In my project the camera is able to be moved around the character which makes the ghosting more pronounced from a profile view where you see the legs and arms moving a lot. Be sure to use the shift button to run in order to see the ghosting.

    Thanks!

    Lee
     
    Last edited: Oct 12, 2013
  42. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Perfect, thanks. Check your inbox.

    Martin
     
  43. LeeAllen

    LeeAllen

    Joined:
    Aug 7, 2012
    Posts:
    136
    Best support turnaround EVER!!!

    Both issues FIXED. No more ghosting and the editor has the variables accessible now!!!

    THANKS!

    Lee
     
  44. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Happy to help, and thanks for spotting the problem!
     
  45. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Hi,

    just uploaded redLights 1.09 to the asset store. It will include the follwing fixes/updates:

    Fixed ghosting bug when using SSAL with animated characters.
    Fixed unexposed variables in custom inspector.
    Fixed bug with spherical emitters in DX11 mode.

    Fallof Animator update speed can now be controlled via the editor.
    A couple of usability updates with respect to the Falloffanimator editor.

    Quite a bit of code refactoring and clean up.

    Martin
     
  46. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,426
    Great looking plugin Martin!

    Since you're doing spherical emitters now, is it at all possible to add an 'inverted sphere' to fake sky lighting?

    Thank you!

    -Steve
     
  47. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Hi Steve,

    that is a great idea! I didn't even think of that...

    It's not possible right now, but with some slight modifications it should be doable. I'll take a look.

    Thanks!

    Martin
     
  48. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,426
    Yay!

    Yea figured with the effort to simulate GI, a decent skylight coupled with SSAO would go a long way to further that cause! :D

    Cheers

    -Steve
     
  49. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,426
  50. ludos

    ludos

    Joined:
    Nov 14, 2011
    Posts:
    50
    Hi,
    You have a very interesting Project. I have been following the progress regularely. However for me it's not usable as long there are no shadows implemented. I hope you will set this feature to a higher priority soon.
    Best, Reto