Search Unity

POLM - GPU Lightmapper - NLM denoising test !

Discussion in 'Assets and Asset Store' started by Vagabond_, Feb 5, 2016.

  1. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Hi guys !
    Another update on the progress.

    Directional lightmaps are now implemented. With that mode you can have normal maps visible on the baked objects!
    Some other things are implemented as well, for example much faster lights sampling with the Brute Force mode!

    Here is a little video showing directional lightmaps:

     
    Last edited: Dec 11, 2017
  2. blitzvb

    blitzvb

    Joined:
    Mar 20, 2015
    Posts:
    284
    wow! it's getting there.
     
  3. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    :)

    Trying to look at Mixed Light modes now !
     
  4. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Texels validation is really important in Lightmapping !

    All of these red spots which POLM detected in this scene are texels whose center is actually outside the closed area but part of the texel is inside the area ( speaking of the walls ). Some of them are based on occlusion distance which is too small like under the boxes on the floor. Based on these texels, most of the time in lightmapping, issues like light leaking or darker spots are presented. Unity is dealing with such texels by sampling neighbor texels and is trying to apply a valid color to them which seems to work but also could produce those black splotches which no one likes, like in the second image below.

    POLM will have to take care on these texels as well for best result !

    POLM_Texels_Validation.png

    This result below is based on the Progressive Path Tracer and depends on the "Backface Tolerance" value. It happens when a face is intersected from the back. This threshold value should be tweaked for best result.

    POLM_Invalid_Texels.png
     
  5. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Hi guys,

    another quick video to show an experimental denoising filter in action. This is using a "Non Local Means" filter which is more of a general image denoising algorithm rather than a specialized filter intended for filtering noise from global illumination! It takes two user inputs (currently not exposed) and seems it's doing better job than the Gaussian Blur filter !

     
    dozhwal, blitzvb, Howard-Day and 3 others like this.
  6. BinaryLegend

    BinaryLegend

    Joined:
    Aug 10, 2015
    Posts:
    21
    Any updates on the lightmapping front?
     
  7. dozhwal

    dozhwal

    Joined:
    Aug 21, 2014
    Posts:
    59
    Any news ? :)

    (please update the asset version to the lastest stable you have ! )
     
  8. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Hi guys, i am trying to work on POLM at every possible time but there is not much time i can put currently on it ( need to work on other projects etc. etc. ). So i will consider uploading an experimental version but should be clear that the old version of polm which bakes AO currently will be supported for now. POLM Lightmapper could be included as an additional package to the current and will be considered as experimental with limited support !

    Btw if anyone understands the technical side of "Mixed Light Modes" and more specifically "Shadowmask" ( how shadows are masked ) or any in depth docs etc.etc. will be good share it because i will have to implement it based on tests only as i am not aware of the proper algorithm behind it !?
     
    Tenebris_Lab and dozhwal like this.
  9. layola

    layola

    Joined:
    Aug 6, 2013
    Posts:
    94
    Any news ? :)

    (please update the asset version to the lastest stable you have ! )
     
  10. Gladyon

    Gladyon

    Joined:
    Sep 10, 2015
    Posts:
    389
    Is it possible to use this asset to pre-compute lighting at runtime in a scene completely created from scratch (nothing coming from the editor)?


    Here are some details about the context if necessary:
    I load the meshes and texture in the starting sequence, along with a text file describing the scene, then I generate all the GameObjects of the scene with some mesh combination if possible, and I add the lights as they are defined in my custom scene file.
    All of that is to allow modders to create their own scenes with their own meshes, materials and lights.

    My problem is that I cannot use Unity's Global Illumination as it is required to do some of it in the editor.
    None of the objects are set as static as none of them comes from the editor. But in reality they will never move once created.
    So, I'm looking for an asset that can pre-compute the lighting at runtime in a static scene built dynamically, while the starting sequence is running (non-blocking would be awesome, especially if it takes more than a few seconds).
     
  11. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Hi, in general would be possible to bake scene at runtime but this is not anything that could do be done in a matter of seconds. Lightmapping is slow by nature and a good amount of time is needed for a level to get baked. Plus the version of POLM which bakes light maps ( to some point ) is not released. Still have some things that block the road to update POLM.
     
    Tenebris_Lab likes this.
  12. Gladyon

    Gladyon

    Joined:
    Sep 10, 2015
    Posts:
    389
    Thank you for the answer, I'll still look forward at your work as I find it really interesting and the results are great.
     
  13. dozhwal

    dozhwal

    Joined:
    Aug 21, 2014
    Posts:
    59
    please update ! :)
     
  14. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Hi , i am looking into it !
     
    dozhwal likes this.
  15. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    One thing, probably Unity 5 will not be supported with next update !
    2017.2 ( or 3) will be set as minimum eventually !
     
  16. dozhwal

    dozhwal

    Joined:
    Aug 21, 2014
    Posts:
    59
    no update yet ? :'(
     
  17. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Hi, i did some good changes - for example you can now precompute object on CPU much faster which can be even further optimized and probably distributed on multiple cores!
    Doing more code clean up and some refactoring!
    Got per object baking working now again!
    However, things are moving a bit slowly, because of the still less time i can put on it !
    But sill pushing it for a little update :)
     
  18. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Hi guys,
    i just wanted to let you know that unfortunately i will probably skip the GI update and may be i will remove the asset from the store for a few of reasons !

    1. There seems to be some performance and behavior differences of the tool among different Unity versions
    2. Currently i am using below mid range GPU for testing which is not enough for proper testing
    3. Unity should release some time soon their GPU Lightmapper

    Because of the first two reasons i doubt i will be able to provide proper support !
     
    TooManySugar likes this.
  19. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    712
    I enjoyed tinkering with it but maybe you are right. If you feel it's time to throw in the towel or go in a different direction then no problem.
     
  20. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    Hey . Shame to see this dying but as you may know Bakery is taking the GPU lightmaping by storm with unprecedented performance and scale support. Yet its missing some stuff like shadowmasking. Did you manage to get any succes with it? If so please share on Bakery thread.