Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Save $600 !! ✅]Global Illumination Proxy-Fast fully real time GI,Zero baking,Mobile optimized,IBL

Discussion in 'Assets and Asset Store' started by nasos_333, Aug 9, 2014.

  1. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,676
    I support the idea of getting performance tuned and GC low or to zero.

    @ikemen_blueD - Any chance of posting a screen shot that shows CORE and GI working together? Like, CORE without GI and CORE with?
     
  2. ikemen_blueD

    ikemen_blueD

    Joined:
    Jan 19, 2013
    Posts:
    341
    @hopeful

    CORE only



    Here is the image of 1 Main Point Light, using "Light/BumpMap/10-fastest shader of CORE".

    CORE + GL PROXY



    You can see GL Proxy, helps to add extra Bounced Lights contributions to the Scene.

    But, why from beginning, I insist to work CORE with GL. As you can see, 1 Main Point Light, with only 1 Bounce option, no Secondary Bounce, and, Main-Point-Light generates around 7 extra Point-Lights.

    Normal Shaders will take all 8 Lights data to its computation, which could be a performance hit. But, CORE shaders only take 1 Main Light data & 4 nearest Lights data to Main-Camera, ignores the rest (from the Game view) -> you don't get a performance hit from generating too much bounced lights ;)
     
  3. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,676
    Yes, I was thinking the same thing back when this GI system was first being developed. I thought it could be a natural pairing with CORE Framework and highly efficient, plus suitable for dynamic scenes.

    What I'm not sure about, though, is how it looks. Are there enough GI bounces with CORE to give the proper effect in a typical game setting (dungeon, whatever), or is it too stripped down? Maybe this GI looks better in its normal state, without being capped by CORE's restrictions ...?
     
  4. ikemen_blueD

    ikemen_blueD

    Joined:
    Jan 19, 2013
    Posts:
    341
    that's hard to say. It depends on many factors: like how you setup your overall Main Lightning system, GL Bounced Lightning system, ... etc. Generally, I often see Unity is quite blur sometimes. So, I guess extra Bounced Lights could increase a bit of more exposure, contrast around areas. If you are working on Mobile, CORE limit seems right. I talked to CORE publisher about extending the number of extra lights. He said 4 is the maximum for Mobile, bigger than 4, not fast anymore. So it depends on what platform you going to use. I see 4 extra is good enough, with good Range, it can give an extra Light contributions to Scene, with affordable cost. But, if you have extra resource to spend, maybe GL Proxy with Enlighten or with Unity GL system could be a good try.
     
  5. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,676
    Anyway, thank you very much for your help on this, ikemen_blueD. :)

    I'm still trying to figure out how I'm going to run my lighting / shading in areas where I'm looking for high efficiency. CORE remains an option for that, and it's good to know I can add GI Proxy to it for a little added visual interest should I go that route.
     
  6. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286
    Is CORE 4 lights a lot faster on mobile than using 4 Unity point lights ? It is always great to discover the various systems that could work with GI Proxy :)

    Jove for example is the ideal system for use with the system for DX11 games.

    Also i wonder if CORE could eliminate the point light effect (light focus, visible when light is close to surface that reflects light), since it uses a customizable lighting system. Like emulate an area light in the bounce light position.

    Here is a demo with Sky Master, enabled by the "GI Proxy" button.

    Sky Master v2.0 Demo
    https://dl.dropboxusercontent.com/u/79230236/Sky Master/UNITY 5/SkyMasterV20DEMO.html
     
  7. ikemen_blueD

    ikemen_blueD

    Joined:
    Jan 19, 2013
    Posts:
    341
    Compressing Error on Mobile platform



    None of Mobile Compress works on the "GetPixel function". Just let you know :)

    Bounce Color

    Code (CSharp):
    1.  
    2. // Line 46
    3. Bounce_color = this.GetComponent<Light>().color;
    4.  
    For example, my Main Point Light is Yellow. And, I want my Bounced Lights color all red -> set Bounce Color to Red --> run the Scene --> Bounce Color is forced back to Yellow.

    I think disable this line. Now, I can set my Bounce Color as I want to.

    LightSource Color

    Code (CSharp):
    1.  
    2. // Line 1435
    3. Out_color= Color.Lerp(GetComponent<Light>().color,lightGameObject.GetComponent<Light>().color,Color_speed);
    4.  
    5. // Line 1449
    6. Out_color = Color.Lerp(GetComponent<Light>().color,hit1.transform.GetComponent<Renderer>().material.color,Color_speed);
    7.  
    8. // Line 1466
    9. Out_color = Color.Lerp(GetComponent<Light>().color,hit1.transform.GetComponent<Renderer>().material.color,Color_speed);
    10.  
    From what I understand, when I check "Use Light Color [X]", that implies I want to lerp my current Bounced Lights color with its Light Source color. But, your line from 1449, 1466, ignores the Light-Source color contributions somehow. Why so?

    CORE

    I haven't tested yet. But, from other CORE users, CORE shaders and lights are much faster than Unity Mobile shaders and lights. Though I have no clue how he did it, but I know CORE lights just Unity lights anyway.

    I have no clue about "Point light effect (light focus, visible when light is close to surface that reflects light)", since I'm just a noob when talking about Shader haha I only know general Shader concepts. I can send you my project so you could further explore CORE and your system though.

    Man, you Sky Master demo looks so good. How mobile performance when combing Sky Master with GL Proxy? I so want to use it know hehe looking so good ;)
     
  8. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,676
    I'm not entirely sure CORE is still that much faster than Unity. Apparently it was early on, but maybe Unity has made improvements and has largely caught up.

    It would be good if someone could run some tests, but right now CORE is not optimized for U5.
     
  9. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286
    Thanks :)

    About the compression, i get some more options that some worked, but i dont know if they are relevant to your development (like RGBA Compressed ASTC 10x10 block)

    About the light source color, the code lines lerp the source color to the bounce light color, depending on the Color_speed factor. When a bounce light is created, its color has an initial value and is lerped to the final bounce color that depends on the surface color. This can be instant, or time dependent for smoother effect. Also this has the "Use_light_color" option that will lerp to the final color starting with the main source color than the initial bounce light color. So this is not used to blend the colors, but to transition them. If you would like to blend them, it would take one extra lerp or set the lerp factor to 0.5f per case.

    Sky Master has some very optimized effects, like one draw call volume clouds that also take very little CPU or skybox sky shading with SM2.0 etc, but i cant guarnatee all effects will work together efficiently and very fast on mobile, certainly depends a lot on the target and what effects will be combined. Together with GI Proxy would also be rather taxing if not super optimized in light counts.

    The system supports very fast volumetric clouds (one draw call for any cloud number and fully controllable CPU optimization, so overdraw is the only limiting factor), shader based scatter volumetric fog (applied to items that need to be scatter fogged), custom non image effect based sun shafts and physically based sky shading (skybox mode, no dome sphere needed) with the full model in SM2.0. All these help towards the optimization goal, if lower end platforms like mobile are used.

    The alternative new systems like the image effect based volumetric fog is reserved for desktop and SM3.0 use.
     
    Last edited: May 11, 2015
    ikemen_blueD likes this.
  10. ikemen_blueD

    ikemen_blueD

    Joined:
    Jan 19, 2013
    Posts:
    341
    @nasos_333 : hi there, I found that Uncompressed PSD, PNG, TIFF format, with Alpha channel, could yield an error when using with Get-Pixel function.
     
  11. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286
    Very interesting, i will probably have a section in the manual about phone texture issues, i never though Unity would not handle these automatically, seems like a rather big bug. I was testing mainly on PC, so i failed to grab all these problems before. Thanks a lot for the heads up :)

    Also here is the final Sky Master ULTIMATE v2.0 demo, it includes some extra details and enchancements

    Sky Master ULTIMATE v2.0 Demo (includes GI Proxy)
    https://dl.dropboxusercontent.com/u/79230236/Sky Master/UNITY 5/SkyMasterV20DEMO2.html
    .
     
  12. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286
    GI proxy is now on -30% SALE !!!!

    Enjoy :)
     
    Stormbreaker likes this.
  13. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286
    NOTE:

    GI Proxy is included in Sky Master ULTIMATE asset and is a true real time GI proxy system.

    No baking, image effects or shader replacement is required and is compatible with various light sources as well (Jove etc)

    The system can also be combined with Enlighten, to enchance GI in spot and point lights and be used for non static geometry and dynamic local lights.
     
    Last edited: Jul 31, 2015
  14. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286
    A question for all GI Proxy users.

    Would anyone be interested in an upgrade path to Sky Master ULTIMATE ?

    I am thinking of providing such a version and would like to gauge the interest in it.


    Also today is the last day of GI Proxy sale !!!!!!
     
  15. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286
    GI proxy is now on -50% SALE !!!!

    Enjoy fast & 100% Real Time Global Illumination approximation for dynamic worlds :)
     
    angelodelvecchio likes this.
  16. chiapet1021

    chiapet1021

    Joined:
    Jun 5, 2013
    Posts:
    605
    Hi @nasos_333! I was wondering how difficult it would be to get GI Proxy to work with the area lights in the Alloy framework? The area lights are spherical and replace Unity standard point lights for more accurate specular. I'm hoping since GI Proxy works with Jove lights, it's not much of a stretch to get it to work with Alloy as well.

    I'm not a great coder, btw, for context on my abilities. I took a couple years of programming at university, but quickly changed my major after I realized how bad I was at it. :)

    Thanks!
     
  17. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286
    That would be easy, i already have the Jove code and a bit of hacking it to fit to the Alloy system would do the work.

    Unfortunately i dont have Alloy, so i would not know where to start, so if possible post a pic of an area light Inspector that shows the component and variables and the namespace Alloy uses as well.

    In the Jove case i do it very simply, i create a Jove point light for every light created by GI Proxy, by applying the Jove script to the light when the Jove option is on and grabbing its properties at update and update the Jove light with it. The Unity lights is disabled (but still receives color and intensity information that the Jove script reads)

    If i know the equivalent paramters to Jove or Unity point lights, i can code around it very fast and send for testing
     
  18. chiapet1021

    chiapet1021

    Joined:
    Jun 5, 2013
    Posts:
    605
    I actually haven't purchased Alloy just yet either (it's on my wish list). I pulled a screenshot of the spherical area light approximation from this video. There's just a size approximation variable that I see.

    I'll see if I can get @xenius or @n00body to post here to give you more information. I would love to be able to combine these two assets together.
     

    Attached Files:

  19. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286
    From what i see the Alloy script has very little input and the main light props remain intact, which means that it may be as simple as adding this script to the bounce lights, to get the proper specular.

    Some more insight on this would indeed help further.
     
  20. chiapet1021

    chiapet1021

    Joined:
    Jun 5, 2013
    Posts:
    605
    I'm hoping it's that easy as well. :) I pinged n00body for some insight on this thread.
     
  21. Deleted User

    Deleted User

    Guest

    @nasos_333 @chiapet1021
    Greetings!

    So Alloy's lighting system is more than just spherical area lights. We also provide a physical Inverse Square light falloff that might affect your GI system if it assumes Unity's custom light falloff.

    The way our lights work is that we attach an AlloyAreaLight component to all of them which then manages the light's intensity and color internally. You can't modify the Light component's color and intensity directly, as we overwrite them as part of our script.

    Other than that, everything is mostly the same. Although we uncap the intensity since our light falloff requires that it be able to up much higher to have the same influence over long distances.

    Do you need more information than that?
     
  22. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286
    Thanks for the insight. One more question, is it possible to apply changes through script to the Unity light and then apply Alloy control over these values ?

    Or to put it another way, how do you control the individual light color and instensity ?
     
  23. Deleted User

    Deleted User

    Guest

    @nasos_333
    You set them through the properties "Intensity" and "Color" on our AlloyAreaLightComponent. It will then do the necessary calculations and then overwrite the "color" and "intensity" fields on the Light component. Setting them directly won't work, since our component overwrites them.
     
    chiapet1021 likes this.
  24. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286
    Thanks, now it is completly clear.
     
    chiapet1021 likes this.
  25. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286
    Based on the above details, i think it is still possible and not very hard, i have a workflow in mind.

    GI Proxy will normally create bounce lights with Unity and inject a Jove like script to each light (that is implemented already), then this script at start will create an Alloy light separately and parent it to the Unity light, keep a reference to its script and update Alloy light with Unity light parameters as they change through GI Proxy, plus disable the Unity light like in Jove case.

    It is slightly different, but still rather easy to perform. Of course i cant guarantee a perfect functionality without having the system to test it with, but when/if you have Alloy i can start coding a solution and send it for testing.
     
    Last edited: Oct 6, 2015
  26. chiapet1021

    chiapet1021

    Joined:
    Jun 5, 2013
    Posts:
    605
    Thanks, @nasos_333! Give me a few days (I am going on a trip and be away from my main computer), and I'll purchase the framework so I can help test. :)
     
  27. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286
    Sure, let me know and i will code around it, will be very interesting to see the results :)
     
  28. chiapet1021

    chiapet1021

    Joined:
    Jun 5, 2013
    Posts:
    605
    I'm excited to see it as well, although I'll also need to figure out some good test scenes to help gauge performance and quality, so it may be a bit longer after I get Alloy to get that all setup. :)
     
    nasos_333 likes this.
  29. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286
    That would indeed help, it will be nice to have an idea of how Alloy lights compare to Unity's in volume
     
  30. Xeon_555

    Xeon_555

    Joined:
    Nov 30, 2014
    Posts:
    4
    Hello! Help me please) how to enable global illumination, it to be so, as in unity 5 GI:
     

    Attached Files:

  31. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286
  32. Misciagno

    Misciagno

    Joined:
    Jul 27, 2013
    Posts:
    88
    Did you ever get the support with alloy lighting?
     
  33. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286
    Not yet, it was more complex than Jove case, so i did nto have the time yet to do it. The main issue is that i dont have Alloy and is a bit tricky to get it done. It was tricky with Jove too as i did not have that system either, but Jove lights were done in a different way and were easier to implement.

    I will resume on this at some point, but i cannot say when this will be.
     
  34. Misciagno

    Misciagno

    Joined:
    Jul 27, 2013
    Posts:
    88
    I was able to get it working with the alloy shaders but I need someone to do the manual conversion I did to the lights in code. I'm an artist so I don't know how to do it.

    Step 1: Save the color and intensity values of the light the system created.
    Step 2: Add the "AlloyAreaLight" script to the created light. This is located in Assets>>Alloy>>Scripts>>AreaLight
    Step 3: Apply the original color and intensity values for the light again, Alloy overrides them once you add the "AlloyAreaLight" script.

    This needs to be done every time a new light is added, maybe even redo the whole process for value changes.

    teaser_render42.jpg
     
    Last edited: Dec 29, 2015
  35. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286
    I am currently at vocation, and i have limited resources, but i will try to work on this in my laptop and see if i can send an automation script as soon as possible. Thanks for the insight in this.

    The described procedure seems easy to perform. The other issue is that Alloy changes the Unity light intensity and color internally, thus to change these must have a reference to the Alloy script, since GI Proxy is required to change these values.

    It will be great to have the Alloy library reference and the parameters that must change, so i can integrate in the code. Also the Alloy code will have to be changed to do everything in LateUpdate so GI Proxy may alter the Unity light and the script grab the parameters to send to the Alloy script, that is the most tricky part, as the Alloy script must not change the parameters before there is a chance to register them.
     
    Last edited: Dec 30, 2015
  36. Misciagno

    Misciagno

    Joined:
    Jul 27, 2013
    Posts:
    88
    If you need me to do anything just send me a PM.
     
  37. chiapet1021

    chiapet1021

    Joined:
    Jun 5, 2013
    Posts:
    605
    @nasos_333 have you tried asking the Alloy folks like @n00body for assistance? They have supported integrations with other assets.
     
  38. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,079
    Looks really nice, I hate unity GI but your GI solution looks great
     
  39. Arganth

    Arganth

    Joined:
    Jul 31, 2015
    Posts:
    277
    i am very interested in this asset as unity GI drives me crazy right now
    I wonder how much it would help me

    i build procedural maps at runtime out of predefined tiles with DunGen
    (tiles are translated/rotated)

    as far as i know baking does not work (especially not with rotating tiles) -> prefab lightmap script provided by one unity developer does not work for my use case

    precomputed GI does also not really work (correct me if iam wrong)

    but I want high graphical GI fidelity and the demos you provided look really nice :)

    so will this asset help me achieve this? (and does it work with the UBER shader)
    (and having infinigrass i know the great quality of your assets :) )
     
    Last edited: Jan 9, 2016
  40. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286







    The system approximates GI by spreading standard Unity point lights, so while not as accurate as voxel based GI, it can give nice result with tweaking and is very fast if tweaked properly.

    It is also fully dynamic and works with procedural levels and with directional, spot and point lights and i have a system to work with Jove as well, but the bounce lights may also be adapted to other systems with area lights (e.g. Alloy), some may be harder to convert than others though, but theoretially the bounce lights can be anything.

    It is also compatible with all shaders that are compatible with Unity lights and requires zero baking or shader replacements or image effects.

    I am preparing a demo now that will use Unity 5 image effects in combination, the system is compatible with all of them as well. I post some pics above.

    There are parameters for controlling which lights will affect specific layers and be created on specific tags or layers, plus controls for bounce light creation speed and spread (e.g. offset from hit surfaces etc)

    If Unity point lights work with UBER shader, this should also work. Note that Unity point lights may create specular reflections if created very close to surfaces, this can be tweaked with a bigger offset of the point lights from the surface or layer out the very specular heavy surfaces for example (i have an offset use for lowering specular effect in last pic, starting with 2 offset and moving to 4 and 6 for bounces further away from surfaces so they affect specular less)

    The end result can look very good and the approximation is best when lights can cover detail well, but are not too many, so there needs to be a balance per case or world scale, which is adjustable through lots of parameters in the script. Also there is a hero follow mode for the sun, so the bounces are created only around the hero for better performance.

    Let me know for further questions.
     
    ksam2 likes this.
  41. Arganth

    Arganth

    Joined:
    Jul 31, 2015
    Posts:
    277
    looks beautyful ;)
    think you have sold me on it :D
     
  42. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286
    :)

    The system is also a general purpose light spreading system, so can be used for things like spreading lights to use for baking / lightmaping too, that is another use that i have seen from users of the system.

    Or can be used together with Unity 5 GI, the bounce lights will overlay over any Unity 5 GI effects as well.

    I also forgot to mention that it works with colliders, so this is a requirement to get lights registered for bounces.

    It is also included in Sky Master ULTIMATE system and is synched with the sun.
     
    Last edited: Jan 10, 2016
  43. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    You make lot of videos of your plugins , but you don't make any tutorial video about tweaking and using your GI system, what a shame.
     
  44. Arganth

    Arganth

    Joined:
    Jul 31, 2015
    Posts:
    277
    do you also use if for outdoor scenes then? (with skymaster)
    baking terrain just takes really long in unity
     
  45. Arganth

    Arganth

    Joined:
    Jul 31, 2015
    Posts:
    277
    first time i read about this system was today and i was instantly hooked

    infinigrass and skymaster seem to get more attention
    and infinigrass is really nice from my experience :)
     
  46. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286
    It can be used with outdoors too and has a handy hero follow mode so lights are only spread at a grid around the hero. This is on top of the per layer and tag controls (so lights may be cut back if hit on water for example or roofs that player wont see etc)

    You will still need colliders for everything that can cut back light transport though, for example on trees etc
     
  47. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286
    I have some samples (Attrium example etc) to showcase the parameters used to get the effects (the pics i post come directly from the included demos, in the latest ones i only have a few image effects added, the rest are the same as the current Attrium demo for example).

    I will try to create a video tutorial too, perhaps to showcase how to debug the system and adjust its parameters, that could be useful.
     
  48. chiapet1021

    chiapet1021

    Joined:
    Jun 5, 2013
    Posts:
    605
    +1 for tutorial videos or some other step-by-step instruction on how to setup a simple scene with GI Proxy. Since it's very customizable, all of the options are a bit intimidating at first glance. The documentation is also very thorough, but again, it's not easy to figure out how to jump right in.

    Support for Alloy shaders would be great. I know you're working on that, but just wanted to throw that reminder in. :) Also, Jove 2.0 has unfortunately been retired from development. :(
     
  49. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286
    The Alloy proved a lot of tricky unfortunately because it regulates the lights itself (so comes in contrast with GI Proxy). I will try to circumvent this by using Late Update for example, but i am not 100% sure it is possible without changing the core of the system (which of course can be done still, but is much more work than doing an external scipt like in Jove, plus requires lots and lots of extra testing since the core of the system will be touched).


    About tutorials, I will try to create a few videos today and post them for reference, hope i have the time :)
     
  50. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286
    Here is a few tutorials that showcase what the various major parameters do and how they affect the outcome, also how the grid of lights can be controlled around the player.

    GI Proxy Light Grid around player density & placement


    GI Proxy Bounce light tweaking creation distances between lights & from source


    GI Proxy Bounce light controls Intensity - Fade Speeds - Offset from surfaces
     
    chiapet1021, Arganth and zenGarden like this.