Search Unity

POLM - GPU Lightmapper - NLM denoising test !

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

  1. jjejj87

    jjejj87

    Joined:
    Feb 2, 2013
    Posts:
    1,117
    Thanks for the reply. I am excited that the rendering part is handled by POLM.
     
  2. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    Baked in Play Mode :

    12345.jpg photo_2017-11-18_11-53-54.jpg photo_2017-11-18_11-53-56.jpg photo_2017-11-18_11-53-58.jpg
    12345.jpg



    photo_2017-11-18_11-53-56.jpg
     
    Vagabond_ likes this.
  3. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    In mobile game test
    512x512
    500 samples
    ~3 min (not whole scene baked)
    photo_2017-11-18_12-54-03.jpg
    photo_2017-11-18_13-05-29.jpg
    photo_2017-11-18_12-54-03.jpg photo_2017-11-18_12-54-09.jpg photo_2017-11-18_12-54-10.jpg photo_2017-11-18_13-05-28.jpg photo_2017-11-18_13-05-29.jpg
     
  4. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    1024
    photo_2017-11-18_13-31-43.jpg photo_2017-11-18_13-31-47.jpg photo_2017-11-18_13-31-49.jpg photo_2017-11-18_13-31-51.jpg
    photo_2017-11-18_13-31-43.jpg
    photo_2017-11-18_13-31-47.jpg
    photo_2017-11-18_13-31-51.jpg
     
    blitzvb likes this.
  5. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    3 Min GTX 960 2gb
    1024x1024 Brute Force ~ 700 rays IBL as sky light
    Mobile scene + diffuse shaders + without post effects

    photo_2017-11-19_01-00-14.jpg photo_2017-11-19_01-00-19.jpg photo_2017-11-19_01-00-21.jpg photo_2017-11-19_01-00-23.jpg
    photo_2017-11-19_01-00-21.jpg
    photo_2017-11-19_01-00-14.jpg
     
    Vagabond_ likes this.
  6. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Hi, do you use any lights or only emissive materials ?
     
  7. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    IBL + Emissive + 1 Area light

    Most renderers used Emissive materials as light sources
     
  8. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874


    Also i couldn't find any way to use per object lightmapper (appear black or untouched after finishing bake)
     
    Vagabond_ and blitzvb like this.
  9. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    Another idea:
    Why we need to recompute (on start) when we just changed resolution or lightmap settings without southing the scene ?
     
  10. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    You mean that if we change material only or a light we do not have to stop and start the baking process ( like progressive lightmapper ) !?
     
  11. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    No. Don't see Precompouting with a simple change (cache the precomputing)

    My new favorite design like Vray and Maya style :

    Untitled.jpg


     
    Vagabond_ likes this.
  12. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    OK, i get it. Precomputing ( building the texels or lumels ) is really needed only if the meshes are changed and not if only a material or a color or light is changed. I bear in mind that and is in the TODO list !
     
  13. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    blitzvb likes this.
  14. Vagabond_

    Vagabond_

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

    i am still in process of developing the tool and meanwhile i created a build demo where you can test how the Lightmapping currently works. Below is a link to a Windows x64 DX11 build. You can download it and give it try. I will be glad to get some benchmark results. There are 1000 samples that need to pass and the time is printed in the UI. You can move around while the Lightmapping is progressively calculated.

    Please post your graphics card model and the time needed to complete the 1000 samples at 512x512 resolution. Thanks!

    1. Again, note that this is experimental and some issues are presented as well as the GI algorithm needs some improvements. There is some info in the demo as well.
    2. At least DX11 capable GPU is required with 2 GB RAM. High End GPUs are recommended even though mid range GPUs should work well as well.

    The GPU i am using is a GTX 750 Ti - 2GB RAM which is below mid range and it works nice !

    Download Windwos x64 DX11 Demo Build !
    https://drive.google.com/file/d/161bv2HyQhK9twLJxHWnnUIpaf4t1lTQU/view?usp=sharing

    P.S. - the scene from the Unity's Tank Demo Project is used for the Demo !
     
  15. Tenebris_Lab

    Tenebris_Lab

    Joined:
    May 23, 2017
    Posts:
    35
    Sweet, running now.
    Make sure to add an interior scene also.

    GTX 970 :
    1024x1024x18 - 14:49m (Massive difference in responsiveness of scene)
    512x512x19 - 5:41m
    256x256x23 - 2:07
    128x128x36 - 2:37

    A note, it seems your counter is a little broken. Jumped from 1:30 to 2:31 on 128 Bake ... So perhaps result is a minute less on all counts?
     
    Last edited: Nov 20, 2017
  16. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Nice, thanks. Twice as fast as my GPU :)

    I will try. All light types are supported as well which is good ( i guess ), so i guess i can try to put some simple interior scene !
     
    Tenebris_Lab likes this.
  17. N00MKRAD

    N00MKRAD

    Joined:
    Dec 31, 2013
    Posts:
    210
    Woah, that's pretty amazing.

    Though I wish it used a realistic, preferably interior scene.
     
  18. Vagabond_

    Vagabond_

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

    This is the second request for an interior test scene. I will see what i can do !
     
  19. N00MKRAD

    N00MKRAD

    Joined:
    Dec 31, 2013
    Posts:
    210
    I'm excited :D

    Here are my results on a GTX 1060 6GB:

    1024: 13:04
    512: 5:39
    256: 2:55
    128: 1:16
     
  20. Tenebris_Lab

    Tenebris_Lab

    Joined:
    May 23, 2017
    Posts:
    35

    Interesting to see how those generations compare (970 vs 1060)
     
  21. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    I found that timer is off with a minute. 5:39 should be 4.39. ( i fixed it here ), however i like the performance so far! Hopefully i will manage to increase the speed even more !
     
  22. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Yes, it is nice how both gave similar results. 1060 is great GPU !
     
  23. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    I can't see lightmap after bake:

    GTX 960


    Untitled.jpg
     
  24. Tenebris_Lab

    Tenebris_Lab

    Joined:
    May 23, 2017
    Posts:
    35
    Download Sketchup v2015 of this Church-of-the-Light

    Should give great comparison for dark spaces.
     
  25. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Strange!

    Only after bake ?
    Were they visible while baking ?
     
  26. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    No. ALways is black even during bake

    Also in editor version (beta) i had same issue in per object lightmapper
    But in Complete lightmapper everything was OK
     
  27. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    Here same aliyeredon2 issue on Geforce GTX770 2GB (Windows 10)
     
    Last edited: Nov 20, 2017
    UnityLighting likes this.
  28. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    windows 8.1
     
  29. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Ok, i will keep this in mind. I think it could be a memory issue !
     
  30. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    How many GB of ram the cars is having ?

    I had a similar issue when the GPU memory is almost full !
     
  31. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    16GB Ram
     
    Vagabond_ likes this.
  32. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    My GPU has 2GB memory
    24 System Ram
     
    Vagabond_ likes this.
  33. N00MKRAD

    N00MKRAD

    Joined:
    Dec 31, 2013
    Posts:
    210
    6 GB VRAM
    8 GB System RAM
     
  34. AAK_Lebanon

    AAK_Lebanon

    Joined:
    May 30, 2015
    Posts:
    77
    8 GB RAM
    Toshiba Laptop with GetForce 930M, Core i7...
    33:55 minutes.

    However is this the expected result ? I mean Should not the picture be more realistic?
     

    Attached Files:

    UnityLighting likes this.
  35. jjejj87

    jjejj87

    Joined:
    Feb 2, 2013
    Posts:
    1,117
    Are dynamic emissive materials supported? or is this on the roadmap?

    I am really interested in this...XD
     
  36. blitzvb

    blitzvb

    Joined:
    Mar 20, 2015
    Posts:
    284
    WOW! It's absolutely amazing.

    GTX 980 - 4GB VRAM - 24 GO RAM - Win 10

    1024*1024 = 11.14
    512*512 = 4.01
    128*128 = 2.40

    Even in 1024*1024, there is some artifacts on the buildings or sharp objects :

    polm.PNG
     
  37. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Hey, thanks for the try.

    Yes most of the artifacts which pop up after bake is done, are because of the final blurring of textures. I am looking into ways to improve this.
     
    blitzvb likes this.
  38. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Hi thanks for the interest !
    What do you mean by "dynamic emissive materials" !?
     
  39. jjejj87

    jjejj87

    Joined:
    Feb 2, 2013
    Posts:
    1,117
    Didn't see that demo download link, lemme try it first

    by dynamic emmisive, I meant non static emmisive objects that can be used as semi light source that can be moved around in real time.
     
  40. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    This is a typical static Lightmapper. Lights current position only is used for the baking process, just like the Progessive Lightmapper. The only thing is that you are free to choose the objects to be lightmapped and you are not forced to used only those which are toggle as "Lightmap static". POLM is not real time !

    P.S. - Well, let me reconsider my answer. It looks like it is real time and it is at some degree. It is just possible to see the baking process while walk around but it will need time to clean up noise etc. It is totally possible to re start the process by a command which may be at any time ( when a light is moved or a color is changed ) but it will start over from the beginning and will have to wait the process again !
     
  41. jjejj87

    jjejj87

    Joined:
    Feb 2, 2013
    Posts:
    1,117
    GTX 1070 - 6GB VRAM - 36GB RAM - Win 10
    128 x 128 = 1:11
    256 x 256 = 1:24
    512 x 512 = 3:01
    1024 x 1024 = 8:27

    These times are just awesome (and the fact that game is fully functional during bake) I wouldn't mind pumping up two 1080Ti's for production to get 1024 x 1024 times under 5 min.

    Then how would I handle anything dynamic along with static objects? I get that POLM is a static lightmapper but does that mean all dynamic entries to the game world are not possible to contribute or be effected by GI?
     
  42. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    You are correct ! They couldn't.
    I think you may be got confused because you are seeing the tool do the work at runtime !?

    Think of it the same way as you are using Unity's Progressive Lightmapper !

    Every time some object move you start the process again - just like the Progressive Lightmapper ! You just can do the baking at runtime.

    The point is that nothing baked supposed to move !
     
  43. jjejj87

    jjejj87

    Joined:
    Feb 2, 2013
    Posts:
    1,117
    I get that and is not confused about it. What I am wondering is how in a scene for example have both static and non static objects and have GI working both ways? Are we using Light Probes? Or any other in house solution or is it going to default to Unity's GI?

    Or is POLM strictly for scenes without ANY dynamic objects? (I get that POLM bakes the static objects)
     
  44. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    Any news about:
    - New design (editor style)?
    - API?
    - Release date ?
    - Shadows for point ans spot?
     
  45. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    1. New design was done the next day after we talked about it. It is not 100 % the same design as you suggested but almost. It is more based on my taste. Below is a screen show !

    2. Methods will be wrapped in an API after the new Update is provided because i need to spend time to design the API based on the whole functionality !

    3. Release date is not yet clear, even though i would like to be in a matter of days, but will probably be in a couple of weeks, may be if i manage to do all that's currently planned !

    4. I think i implemented them. Not sure will check later.

    Currently i am trying to improve the BVH Acceleration structure which may speed up the performance.

    Here is a screen shot of the current UI - all groups are toggable !

    POLM_UI.png
     
    Lars-Steenhoff and UnityLighting like this.
  46. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    Very good

    Also i mentioned you before about baking progress slowed down when we have minimized the editor (unity editor)
    I think Unity editor window's update time is not full loaded. SO you should use your main render code in another thread or standalone exe. Is it true?
     
  47. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,527
    The new interface looks very clean! good work
     
  48. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Yes that's correct. Render process is slowed down when editor in not on focus.

    It works when in play mode but "Run In Background" should be enabled in case the editor in not on focus !

    I think i couldn't use another thread but will give it a try at some point. This is in the list as well !
     
  49. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,527
    Any progress if this will run on Mac OSX?
     
  50. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Thanks !