Search Unity

[RELEASED] - Screen Space Area Lights (SSAL)

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

  1. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,462
    Really great looking Asset.

    I'm publishing mainly to Mobile. Are you planning to have this incredible asset running on Mobile?

    Cheers.
     
  2. Juntaou

    Juntaou

    Joined:
    Apr 7, 2010
    Posts:
    25
    So noticed this was on the big birthday sale and it looks great, however I had a couple questions.

    The game I'm working on uses no ambient lighting and only uses 1 main point light for most of the game. There are some scenes where there are some other lights, mainly point lights as well, but for the most part the lighting is all controlled by that single point light. Shadows are essential to the game, both ones that come from meshes as well as ones that are generated by normal maps. So I notice that shadows are on the road map, but realistically when is that going to happen. I read that it is a low priority for you which doesn't really help me all that much. So any idea when it will be a high priority and will it support both mesh and normal maps the way I described?

    Thanks!
     
  3. Tjomas

    Tjomas

    Joined:
    Jan 1, 2012
    Posts:
    27
    hi,
    both features, mobile support and shadows, are really hard to implement.
    we are working on these things, but it's still a long way.

    best, Thomas
     
  4. DrewMedina

    DrewMedina

    Joined:
    Apr 1, 2013
    Posts:
    418
    Does this support multiple cameras? Oculus rift... Thanks looks great
     
  5. DrewMedina

    DrewMedina

    Joined:
    Apr 1, 2013
    Posts:
    418
    I want to get this during the sale, is it or will it be Rift compatible?? Thanks :D
     
  6. QuantumTheory

    QuantumTheory

    Joined:
    Jan 19, 2012
    Posts:
    1,081
    The lights aren't affecting my surfaces with custom shaders. What needs to be considered when using these lights with custom shaders?

    I've modified by 2 star review since I thought it would help the sale. Thanks for fixing the performance issues.
     
  7. dark_tonic

    dark_tonic

    Joined:
    Mar 23, 2011
    Posts:
    138
    Does anyone have a vid of this plugin working for their game? I'm wondering about real world implementation, quality, and performance.

    For example, could you use this as the sole light solution for a game like Diablo 3? Lots of light sources, spherical lighting that moves with a fireball that animates across the screen, etc.

    I realize there aren't dynamic shadows currently, which is a let down, but if the light sources can animate across the screen without killing performance, that would be great.
     
  8. Tjomas

    Tjomas

    Joined:
    Jan 1, 2012
    Posts:
    27
    hi headtrip,
    we have not yet tested the lights with oculus rift.
    how does oculus rift works? two cameras and simple rendertextures, or some other special setup?
     
  9. doktor3d

    doktor3d

    Joined:
    May 7, 2013
    Posts:
    9
    The Unity plugin for the Rift has two cameras side by side, each with a post-process shader that distorts the camera view according the Rift's lens properties (barrel distortion). These shaders use a render texture.

    I would also be interested to know if your plugin will work with this type of setup.

    Also another question: I believe that your plugin does not directly render shadows, but are the built-in Unity shadows or shadow plugins like Soft Shadows compatible?
     
  10. MPanknin

    MPanknin

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

    I'm back from vacation and answers to your questions will follow shortly.
     
  11. MPanknin

    MPanknin

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

    thanks for the link. Looks very interesting. However, I'm not really sure if the two techniques will be compatible, since our lights are rendered as a postpro effect. I'm assuming the placement of the point lights in the RT GI solution is done somewhat earlier in the rendering process, so this would be a problem. Anyway, I'll keep an eye on it.
     
  12. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Hi,

    multi camera setups are currently not supported. We have this on our list, though.

    We downloaded the Occ Rift SDK and will do some testing with it today. I'll post the results here.
     
  13. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Hi,

    thanks for updating your review. We also updated our publisher reply.

    I'm guessing your custom shaders are not affected by our lights, due to a missing material property such as _Color or something. If you can provide me with one of your shaders, I'll be happy to take a look.
     
  14. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Hi,

    the arealights are certainly more expensive to render than the standard light types (points, spots and directionals). This is simply because the lighting calculation for the arealights is a bit more involved as compared to the builtin lights. But you can use multiple lights at once, no problem.

    Since they are rendered in screen space, they are independent of the geometric complexity of your scene. However, what might influence performance is generating the necessary render buffers. Per frame there are three additional calls to camera.RenderWithShader(...) to generate worldspace normal buffer, albedo buffer and a separate buffer for transparent objects. So depending on your scene, this might be expensive.

    If you can provide me with a test scene, I can throw in a couple of lights and post the results.

    As to your other questions. Yes, the lights are fully dynamic. So animating a spherical emitter, that acts as a fireball is completely possible. You can check out the demo on spherical emitter on our website.

    http://en.redplant.de/lab/ssal.html#spherical

    Hope this helps
     
  15. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Multi camera setups are currently not supported. We have this on our list, though. We downloaded the Occ Rift SDK and will do some testing with it today. I'll post the results here.

    Yes, our lights work correctly together with the builtin shadows.

    I can't really comment on the Soft Shadow plugin, since we never used it. Right now, I can't think of any reason why it should not work. But this must not be understood as a guarantee... :)
     
  16. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Shadows are still in a very experimental stage, so I'm afraid we can't tell you a reliable date until now.

    I'm not sure, what you mean by shadows generated by normal maps? Are you referring to contour shadows resulting from displacement mapping techniques?
     
  17. doktor3d

    doktor3d

    Joined:
    May 7, 2013
    Posts:
    9
    Thanks a lot. You may not be able to run the Rift SDK without a physical Rift plugged in to your machine. If this is the case and you don't have a Rift then I am happy to test something for you if you want if you PM me.
     
  18. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Thanks, we might come back to that offer. Meanwhile we did a couple of tests with the SDK and at least we got the lights to render on top of the QVRCameraController that comes with the SDK.

    This is in edit mode:


    And this is in play mode:


    If you look at the two pictures closely, you will notice, that they are slightly different from each other. I'm not sure if this might be due to the distortion introduced by the rift controller?

    Anyway, getting closer (I guess)... :)
     
  19. doktor3d

    doktor3d

    Joined:
    May 7, 2013
    Posts:
    9
    OK looks good so far, but we can't be sure it will work without a Rift plugged in to your machine, as the distortion shader only activates with a Rift plugged in.
     
  20. DrewMedina

    DrewMedina

    Joined:
    Apr 1, 2013
    Posts:
    418
    Seems good, the second shot has correct stereo depth (cross eyed 3D viewing). The editor view seems correct too, no stereo in editor is correct. I have a rift as well if you need testing, maybe an exe? The rift does not support web demos.

    Thanks for working on this!!
     
  21. jjdelorimier

    jjdelorimier

    Joined:
    Dec 13, 2012
    Posts:
    7
    sorry if this has been touched upon but is there a way to add area lights to custom 3d objects....basically I designed a space station scene and I want to be able to replace the GI self illum objects with redlight....is this possible or do you have to design scenes with redlight in mind....meaning just rect and spherical light placement.
     
  22. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Hi,

    do you mean arbitrary mesh emitter? I'm afraid no. We currently only support rectangular and spherical light emitter.

    Hope this helps.
     
  23. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Last edited: Nov 6, 2013
  24. reddotgames

    reddotgames

    Joined:
    Apr 5, 2011
    Posts:
    705
    Hello!
    We just bought your pack. After initial testing we have some questions :) Great package with potential!

    First off - image :
    $lights.jpg

    We would like to know if there is a way to specular "stay" on surface. We wanna have garage lights reflect on garage floor but from what you can see - only red and blue sphere light reflects something there. If lights are more higher - reflection go far away from ground so you cannot see it. I look at alot of your images and all your samples show light sources near floor which reflects nice on surface, so I cannot find answer.

    Second question - We would like to request great addon - lights that cast only specular - for example someone have scene ready - with lightmaps and wanna only realtime reflection on the floor - so dont need light casting light. It would be sweet to have checkbox "Generate Light".

    Third one - specular reflection with bumped surfaces. On non bumped all is nice and clear - but when you wanna use normals - specular reflection are showed as points (like cutout). You can see on our image all specular reflections are pixelated.

    4rd - area light prefabs have colliders - can we disable it? What for there are there?

    5th - we use only custom shaders - some of them act strange with your pack - what exatcly shader need to work with your pack? maybe some unity relates fallback or some other other variables. From what we find out - we have only problem with some transparent shader - light dont affect it at all.

    Thanks for answering!
     
  25. Tjomas

    Tjomas

    Joined:
    Jan 1, 2012
    Posts:
    27
    hi,

    here is a new basic tutorial video for beginners.
    hope you like it ;)

     
  26. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Hi,

    I'm not sure, if I understand your question correctly. The further lights are away from a surface, the more the reflection will diminish. Take a look at the following screenshot.



    Done, will be included in the next release.

    I'll look into it.

    Nothing actually, you can remove them. For our very first tech demo we needed colliders, since we wanted the light emitters to be clickable. We just didn't bother to remove them later.

    If using custom shaders, please make sure, they contain the following material attributes, even if you don't really need them. We need these properties internally for generating the unlit albedo buffer.

    _Color ("Main Color", COLOR) = (1,1,1,1)
    _Shininess ("Shininess", Range (0.01, 1)) = 0.01

    Hope this helps,

    Martin
     
  27. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    437
  28. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Hi,

    to be honest. I doubt it. Our lights are rendered as postpro effect in the very last stage in the rendering process. Most probably the GI solution does all its magic earlier in the rendering process. So I don't think the two will be compatible in a way, that redLights generate color bounces and all that.

    What might work is using our lights without being taken into account by the GI calculation. That means, perhaps you can use the GI package to generate all the indirect illumination using the standard lights. And afterwards our lights can be used additionally without indirect illumination. But that is just a guess, since we do not have the dynamic GI package at hand.

    I think, I could provide you with a simple scene, if you would like to test this.

    Cheers,
    Martin
     
  29. tiggus

    tiggus

    Joined:
    Sep 2, 2010
    Posts:
    1,240
    Just got this package recently and love it so far. Hoping you can help a lighting noob out here as I am having some really basic issue. I am testing some lights out with primitives and I get lots of jagged edges on a smooth cube which has the default unity specular shader. Can you advise what I might be doing wrong? All surfaces are perpendicular to each other.

    $Screen Shot 2013-11-07 at 10.26.26 PM.png
     
  30. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Good news for all the rift user. By coincidence we got our hands on a rift dev kit and could test our lights with the physical device.
    To us it seems, that everything is rendering correctly now, but as we are no experts when it comes to the oculus rift, we would like your feedback.



    For demonstration purposes we updated our apartment demo scene (windows only), which you can download at:
    http://data.redplant.de/transfer/riftLights.7z

    This update will be included in the next release.

    Have a nice weekend!
     
  31. MPanknin

    MPanknin

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

    by looking at your screenshot, I'm not exactly sure, what you are referring to? If you could upload a more descriptive example somewhere, we're happy to take a look.

    Martin
     
  32. tiggus

    tiggus

    Joined:
    Sep 2, 2010
    Posts:
    1,240
    I'm referring to the vertical lines in the wall in the picture above. The surface should be perfectly smooth so trying to figure out why it gets broken up like that when I rotate the camera.
     
  33. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Hm ok.

    At first glance I would guess, it's an SSAO issue. Do you use any other image effects on your camera?
    If that is not the case, please upload an example project somewhere, so we can reproduce, what's going on.

    Thanks,
    Martin
     
  34. tiggus

    tiggus

    Joined:
    Sep 2, 2010
    Posts:
    1,240
    Ok will upload a project, thanks. No camera effects. Very easy to reproduce, just one light on ground facing up, one cube, and rotate camera side to side looking at cube.

    EDIT: As opposed to if I just use a point light, then the surface is perfectly smooth and reflective.
     
    Last edited: Nov 8, 2013
  35. tiggus

    tiggus

    Joined:
    Sep 2, 2010
    Posts:
    1,240
    Never mind I figured it out, sorry for the confusion. I am using another addon which set my near clipping plane of the camera to .01 which causes that effect. Setting near clipping plane to .3 and it is as smooth as can be...

    Now on to making beautiful lights!
     
  36. reddotgames

    reddotgames

    Joined:
    Apr 5, 2011
    Posts:
    705
    Yes thanks for answers and waiting for new release!
     
  37. Graphicated

    Graphicated

    Joined:
    Jun 30, 2011
    Posts:
    22
    Hey,

    I tested your demo with the Oculus rift. for a first quick test, everything looks good. I bought your package hoping to use it with the oculus rift, now it is possible :D. so please, tell us how you did it, or update the asset as soon as possible so we can pull it :D
     
  38. Thomas-Pasieka

    Thomas-Pasieka

    Joined:
    Sep 19, 2005
    Posts:
    2,174
    Could you please include a Mac version of this? Thanks.
     
  39. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Good to hear that it's working as expected. Unfortunately there were quite a bit of modifications needed, so manually updating the package on your side is probably not a good idea. We will try to upload the updated version by the middle of ext week (Tuesday or Wednesday).

    I'll keep you posted.
     
  40. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Of course. Mac version will be provided tomorrow morning.
     
  41. J_P_

    J_P_

    Joined:
    Jan 9, 2010
    Posts:
    1,027
    Considering a purchase -- are there any differences between Windows and Mac support? Some features directX only?
     
  42. Don-Gray

    Don-Gray

    Joined:
    Mar 18, 2009
    Posts:
    2,278
    Hi,
    Didn't read through all the thread but did purchase it a few days ago.
    I was having a strange rendering problem and you told me to set the rendering path in the camera, which worked, thanks!
    I had been planning to use the animated area light type to show the flickering of the animated texture on a TV screen to show in the room.
    It does show a light but seems unaffected by the actual texture playing on it.
    Is it possible for the texture animation to show out onto the other objects, at this time?

    Thanks.
     
  43. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Hi,

    both versions (Win and Mac) support the same set of features. No Windows or DX-specific stuff.
     
  44. Don-Gray

    Don-Gray

    Joined:
    Mar 18, 2009
    Posts:
    2,278
    Hmm, my edit didn't make it in.
    Is there a way to make an animated texture show the variations of light on the environment (flickering) , not the texture itself?
     
  45. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Thanks. Fix will be included in the next release.

    Yes, that's possible. We did this in out apartment demo.
    Make sure that mip-maps are enabled for the images of your animation.

    If you are experiencing problems with this, let me know.
     
  46. Don-Gray

    Don-Gray

    Joined:
    Mar 18, 2009
    Posts:
    2,278
    Once I get it tweaked it will look nice! Thanks!
    The area light renderer on the camera is pretty processor intensive.
    Is there a way to rotate the direction of the script (light) if it is on a game object,
    without rotating the game object?
     
    Last edited: Nov 11, 2013
  47. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Hm, it shouldn't be. Can you please pm me a screenshot of your profiler with the renderer attached?

    Nope, not right now. But if you want to only rotate the light, then you can simply attach it to another gameobject without rotating the parent node.
     
  48. Don-Gray

    Don-Gray

    Joined:
    Mar 18, 2009
    Posts:
    2,278
    Screenshot sent.
    Guess I could try rotating the pivot point in Max, it's not flat, so either have to use it or not use it as the base object.
    Right now I just have the flat area light object in it's place. Your video was working good as far as putting out the light,
    now I'm looking for the After Effects video source file for my screen to render out individual frames, since I only have a video which doesn't work.
     
  49. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
  50. Don-Gray

    Don-Gray

    Joined:
    Mar 18, 2009
    Posts:
    2,278
    What does the Image Path need to be?
    If I bring in the default area light animated, it plays the default texture.
    But, I've yet to figure out what my path should be.
    I put in the image frames folder name, but it isn't playing, just showing the main color.

    It works if I drag my image file folder into the redLights Resources folder, it that necessary?
    No way to have it in my own targeted folder, outside of the redLights folder?
     
    Last edited: Nov 11, 2013