Search Unity

[Released] Physically Based Area Lights - redLights 2.0

Discussion in 'Assets and Asset Store' started by MPanknin, Feb 9, 2015.

  1. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    So I understand. Real-time lighting. Can do android. No shadows for now but probably coming. Excellent... I suppose I had better think seriously about this one. Seems like a great choice for procedurally generated content?
     
  2. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    From what I have read on this thread, I would use the word possibly, not probably.
     
  3. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    okay. fair point. I am ever the optimist I suppose : )
    I could handle a cheap flat shadow overlay in 99% of our output anyhow

    Thanks for the heads up though
     
  4. PiotrW

    PiotrW

    Joined:
    Nov 2, 2014
    Posts:
    20
    I got small problem. When I scale rectangle light up, and up ... for example 500 x 200 it is going to kill my PC. I can scale down my scene but I think it should be scale independent when it is going about performance. Is it a bug or something different?
     
  5. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Sounds like a bug to me. Can you PM me a Screenshot if possible and I'll look into it asap.

    Thanks
     
  6. hitking100

    hitking100

    Joined:
    Oct 4, 2011
    Posts:
    75
    Any word on the Alloy shader testing ?
     
  7. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Yes, of course.

    Support for Custom Shaders will be in the next update. This includes for example support for Alloy as well as Skyshop. We will post some screenshots next week.

    Have a great evening!
     
    Last edited: Mar 15, 2015
  8. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    I don't see why it should not work with procedurally generated content. As long as your materialshaders are supported you should be good to go. The next version will include support for legacy shaders as well as support for custom shaders shaders. Alloy, Skyshop etc.
     
  9. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Can also do iOS and WebGL.
     
  10. GREBENOTS

    GREBENOTS

    Joined:
    Jan 24, 2013
    Posts:
    44
    Excellent package, and worth the $80 for how good things look. However, have you noticed any bugs in which the culling mask for the area lights do not stick?

    For instance, I remove certain aspects of the mask in the inspector, and it will keep my changes only until I select the item in the inspector again.
     
  11. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    I thought we had fixed this already. But there might have been some minor changes throughout the beta version up into 5.0 that we have missed. I'll look into it.
     
  12. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    @GREBENOTS

    Patch sent via PM. If that fixes the issue we will include it in the next release.
     
    Last edited: Mar 17, 2015
  13. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    We just submitted the next version 2.2.

    The new version includes support for legacy and custom shaders such as Skybox. Alloy integration is still WIP and didn't make it in this release. 2.2 also includes preview support for mobile. It should run fine on current/not too old Android & iOS devices.

    We will do a bit more testing with older devices. Results will follow shortly.

    A couple of screens to shorten the waiting time. Enjoy!





     
    FreakForFreedom likes this.
  14. FreakForFreedom

    FreakForFreedom

    Joined:
    Jan 22, 2013
    Posts:
    156
    Support for custom shaders? Sweeeeeeet! :)
    Are there any news for the support of textured emitters?
     
  15. Pulov

    Pulov

    Joined:
    Feb 20, 2010
    Posts:
    824
    Texte emit woul espe hot.
     
  16. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Texture support for rect emitter will be in the next release. Maybe sphere & disc emitter as well.
     
  17. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Sry, but still no approval. No idea why it takes so long this time. It's almost been a week now.
     
  18. Ghosthowl

    Ghosthowl

    Joined:
    Feb 2, 2014
    Posts:
    228
    Just wanted to point out, I was very interested in purchasing this asset until I read there was no shadows. So put me down as someone who will purchase if shadows are added.
     
  19. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Good morning. 2.2 is finally online.
    • Support for legacy/custom shader
    • Support for Skyshop
    • Preview support for mobile
    • Bug fix light culling mask
    • Bug fix light crashed when scaled too big
    • Couple of other improvements and bug fixes
    Meanwhile we have already prepared 2.3 that will be submitted this week.
     
  20. MPanknin

    MPanknin

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

    we just added a poll to this thread regarding 4.x support.
    What do you think?

    Martin
     
  21. Hexaedre

    Hexaedre

    Joined:
    Jan 23, 2015
    Posts:
    110
    Hi,

    I just bought redlight 2.0. I want to use it for the interior lights in an architectural visualisation. It appears that the light is passing through walls and floors. Walls and floors are static.

    Is there a way to fix that ?

    I use Unity 5.0.0f4, I am in deferred, linear space.
     
  22. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    You would need shadow support for that, which we don't support right now.
    You can try to adjust the lights range parameter to influence the area of effect for the lights.
     
  23. Ducahl

    Ducahl

    Joined:
    Dec 9, 2014
    Posts:
    20
    Hello,

    I am in need of cheap lighting for 100's of sconces in scene. I have tried just using point lights but they produce about 2 draw calls a pop, and that is without shadows.

    I noticed that your other package redlights 1.0 is screenspace, is there some sort of performance benefit to redlights 2.0 or is the real benefit real-time area lights?

    Ideally I'm looking for a solution for lighting that will either be fake lighting I can batch, or screen spaced lighting that will put more load on the gpu.
     
  24. tyrot

    tyrot

    Joined:
    Aug 18, 2013
    Posts:
    36
    it looks really amazing. I loved it .. and im gonna buy asap. I am also working on archviz and -
    2 questions
    1- Soft shadow support (even fake-ish:) ok) when?
    2- can you stop light leakage using some collision objects may be- it could be a temporary fix..

    this is most exciting lighting plugin for a loooooong time. thanks again...
     
  25. DeveloperRLA

    DeveloperRLA

    Joined:
    Jun 17, 2013
    Posts:
    53
    Is it possible to use IES profiles not created with iesgen 4? I have a specific set of IES profiles I need to use on projects. Thanks!
     
  26. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    You have to import your profile into iesgen and then export it back again. The reason is that there are so many different flavors of the IES format out there that we didn't bother to write a parser, that can read them all. Iesgen does that for you and outputs a very clean and nicely formatted profile, that you can feed into our redLights.

    So the answer to your question is yes and no. You can use own profiles, but you have to reformat them first.

    If you are unsure, you can send me one of your profiles via PM and I'll test it for you.
     
    Last edited: Mar 30, 2015
  27. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Hi,

    regarding shadows. We are currently experimenting with different techniques, but it's a tough problem, so please don't expect shadow support soon.

    Regarding light leakage. Right now each light has a range parameter. The light attenuates with distance from it's source within this range and will always reach zero intensity once the range distance is reached. We might add another mode that ignores the range in the falloff calculation and simply falls off with some 1/d^2 function. Once it reaches the range distance it simply gets cut off. I'll post some screnshots later, to explain what I mean by that.
     
  28. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Hi,

    we haven't done detailed benchmarks to compare the performance of the two versions. But I would expect redLights 2.0 to perform much better than the first version. But since our lights are kind of standard lights with some custom code in it they have similar behaviour whan it comes to draw calls.
     
  29. paulojsam

    paulojsam

    Joined:
    Jul 2, 2012
    Posts:
    575
    its possible to have the rectangule of light, with a reflective texture also i wonder
     
  30. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Hi, texture support is on the way. We already have a working version, but we need to shape things up a bit.
    Will be in the next release.

     
    FreakForFreedom likes this.
  31. paulojsam

    paulojsam

    Joined:
    Jul 2, 2012
    Posts:
    575
    good news, i will have more screenshots application of your wonderfull asset in a few days also.
     
  32. paulojsam

    paulojsam

    Joined:
    Jul 2, 2012
    Posts:
    575
    hmmm another doubt, i put a terrain on the scene and the textures are white, id assume this is the shader configuration on the graphic settings, its possible to use terrains with your shaders
     
  33. Zicandar

    Zicandar

    Joined:
    Feb 10, 2014
    Posts:
    388
    I'm trying out your asset, and while the idea is great, and the sphere, rect and tube lights so far seem fine, I'm having some issues with the disk light.
    Mainly it's angle attenuation: It's far to harsh, leaving a noticeable edge.
    (Unity spot light to the left, disk light in middle, and sphere light on the right.)

    Another thing I noticed while poking around in your code was that the diffuseAtten in the disk light can go over 1. I'm not sure if this is intentional, but I doubt it.

    Something nice you might want to consider adding is a specular scaling (normalization) based on the radius, as the diffuse is pretty unaffected by radius, while the size of the radius (for all lights I think), really affects the sum of the specular light, effectively breaking light conservation.

    I'd be happy to discuss and possibly help out fixing these issues, as I need them fixed ASAP!

    A few really minor things:
    Your manual claims there to be 7 test scenes with the pack, only 3 are included.
    Your asset store page links to the german version of your site.
    Your lights also seem to use handles instead of gizmos for drawing their range indicators, this resulting in them not getting darkened when behind stuff, makes it ALOT harder to tweak to not pass through walls!
    Your "emittor's" (the meshes "being" the light sources) are dual faced, even for the directed lights such as Disk and Rect.
     

    Attached Files:

  34. Zicandar

    Zicandar

    Joined:
    Feb 10, 2014
    Posts:
    388
    Another issue I have found:
    The intensity when using your slider doesnt handle ctrl+z ! This is very irritating!
    If I get some time over I'll try to fix it myself, and in that case I could send you the code?
     
    ryschawy likes this.
  35. mkgm

    mkgm

    Joined:
    Apr 10, 2015
    Posts:
    134
    @MPanknin
    great asset.... I'll be waiting for shadow support :)
     
  36. TechiTech

    TechiTech

    Joined:
    Dec 13, 2014
    Posts:
    212
    So even though customers who have paid over $80.00 for your arealights 1 won't be able to get arealights 2 ??

    That's very disappointing to hear.

    I won't be purchasing any products of your products.
     
  37. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Hi guys, sry for the late reply. It's been some busy days lately.

    @TechiTech. redLights 2.0 is a completely new piece of software. There is maybe 5% left of the old codebase and therefore we can't provide this as a free update. Thanks for your understanding.

    @paulojsam. I'll look into what's going on with the terrain.
     
    Last edited: Apr 17, 2015
  38. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    @Zicandar. I answered most of your questions via mail. We will post a summary for other users here as soon as we have figured out / discussed all your issues.
     
  39. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    @paulojsam

    Ok, Terrain is working. Sry, I didn't have any appropriate textures at hand :)




    What you need to do is setup the terrain shaders to consume our lighting code. It's the same process as setting up custom or legacy shaders. However, since Unity's terrain rendering is a bit more involved, I'll walk you through it quickly.

    I know the following seems horribly complicated at first, but it really takes only a couple of minutes.

    1. Download the built-in shaders for your Unity version
    http://unity3d.com/get-unity/download/archive

    2. Copy the directory builtin_shaders\DefaultResourcesExtra\TerrainShaders somewhere into your project
    For example: Assets\redLights\LegacySupport\TerrainShaders

    3. Copy the file redLights\LegacySupport\AutoLight.cginc into the following subdirectories:
    • ..TerrainShaders\Details\
    • ..TerrainShaders\Splat\
    • ..TerrainShaders\Trees\


    4. Add the necessary multi_compile directives:
    • #pragma multi_compile REDLIGHT_USE_LAMBERT
    • #pragma multi_compile REDLIGHT_USE_NORMAL
    To do this open the following files:
    • LegacySupport\Terrain\Splats\AddPass.shader
    • LegacySupport\Terrain\Splats\FirstPass.shader
    • LegacySupport\Terrain\Splats\Specular-AddPass.shader
    • LegacySupport\Terrain\Splats\Specular-Base.shader
    • LegacySupport\Terrain\Splats\Specular-FirstPass.shader
    • LegacySupport\Terrain\Splats\Standard-AddPass.shader
    • LegacySupport\Terrain\Splats\Standard-Base.shader
    • LegacySupport\Terrain\Splats\Standard-FirstPass.shader
    In each of these files you find a surface function that has a signature void surf(Input IN, inout SurfaceOutput o).

    Directly above this line you insert one of the above multi compiles. I used the following combination:
    • LegacySupport\Terrain\Splats\AddPass.shader - REDLIGHT_USE_LAMBERT
    • LegacySupport\Terrain\Splats\FirstPass.shader - REDLIGHT_USE_LAMBERT
    • LegacySupport\Terrain\Splats\Specular-AddPass.shader - REDLIGHT_USE_NORMAL
    • LegacySupport\Terrain\Splats\Specular-Base.shader - REDLIGHT_USE_LAMBERT
    • LegacySupport\Terrain\Splats\Specular-FirstPass.shader - REDLIGHT_USE_NORMAL
    • LegacySupport\Terrain\Splats\Standard-AddPass.shader - REDLIGHT_USE_NORMAL
    • LegacySupport\Terrain\Splats\Standard-Base.shader - REDLIGHT_USE_LAMBERT
    • LegacySupport\Terrain\Splats\Standard-FirstPass.shader - REDLIGHT_USE_NORMAL
    As an example. For AddPass.shader it looks like this:


    5. Restart Unity. The terrain shaders should now work correctly with our lighting functions:

    Hope this helps. If you have any more questions, I'm here.

    Thanks,
    Martin
     

    Attached Files:

    Last edited: Apr 17, 2015
  40. paulojsam

    paulojsam

    Joined:
    Jul 2, 2012
    Posts:
    575
    Thank you, appears a bit confusing, i have to spend some time with it.
    Meanwhile ...



    Invasion of the Body Watchers!!!
    Turn Based Paranoiaaaaaaaa!!!

    http://invasionofthebodywatchers.com/

    Obviously, i am using your Redlights 2 package, im quite glad with it, now to learn how the terrain can be corrected.
     
  41. FreakForFreedom

    FreakForFreedom

    Joined:
    Jan 22, 2013
    Posts:
    156
    Soo... any news about textured emiter or shadow support for this neat little gem? :)
     
  42. BigB

    BigB

    Joined:
    Oct 16, 2008
    Posts:
    672
    Hi,

    Just got this, but Unity crashes once I open one of the levels.
    I'm on Unity 5.01.
    What's wrong ? Is Unity 5.01 not supported ?
     
  43. MPanknin

    MPanknin

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

    Unity 5.01 will be supported soon. There have been some minor updates in the built-in shaders. We are currently adjusting our code to account for this.

    Nevertheless for the sake of completeness, can you please PM me en editor log file after you experienced such a crash?

    Thanks,
    Martin
     
  44. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    @FreakForFreedom. Textured emitter will be in the next release, Shadow support won't.

    We try to submit it by the end of this week.

    Martin
     
    FreakForFreedom likes this.
  45. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    @paulojsam. Haha, looks awesome! Thanks for sharing the screenshots!
     
  46. DennG

    DennG

    Joined:
    Dec 5, 2013
    Posts:
    158
    Looking great!
    Waiting for the Alloy and shadow support, before I buy it though.

    Grüße aus Minden
    Dennis
     
  47. giraffe1

    giraffe1

    Joined:
    Nov 1, 2014
    Posts:
    302
    another vote for shadow support before I buy!
     
  48. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Hi @all.

    We know you all want and need shadow support. We do too! But let me be really clear on this. It is a tough problem and up until now we don't even have a theoretical solution that would be feasible.

    There are a couple of ideas floating around in our dev team regarding shadow support, but this is still in a super duper experimental stage.

    So please don't expect shadow support to be implemented too soon. There is still quite a bit of other features that we need to address first.
     
    blueivy and FreakForFreedom like this.
  49. Zicandar

    Zicandar

    Joined:
    Feb 10, 2014
    Posts:
    388
    Once you support light cookies shadows kinda come by themselves.
    As for example a shadow for a point light can be represented by a cubemap that stores the depth to objects from the source. Then in the shader, well, you can simply compare that depth value to your distance to the light source...
    For light sources with large areas they emitt from this ofc becomes not so viable. But still, for your sphere and disk lights (point and spot's) it seems like a reasonable solution?
    As for how to get the depth, same as unity shadows? Shader replacment and Camera.RenderWithReplaced.

    Yes I'm aware that the amounts of memory used for all these textures add up quite fast, for realtime shadowcasters this isn't nearly as big an issue, as the textures can be re-used in exchange for a lot of drawcalls. But for shadows that are "baked" I guess there could easily be an issue.
    One way to get around the low'ish resolution shadow textures that would be used is to use Hardware PCF filter?

    Ofc more complex solutions could be used, but shouldn't this be enough to get some shadows up please?
     
  50. Iegor-Antypov

    Iegor-Antypov

    Joined:
    Dec 5, 2014
    Posts:
    1
    Hello, lighting looks great!
    Can You please expand on this?
    If we have a profile of suitable format, is it possible to apply it to point light on runtime?
    (after downloading from remote location, for instance)