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

POLM - GPU Lightmapper - NLM denoising test !

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

  1. Tenebris_Lab

    Tenebris_Lab

    Joined:
    May 23, 2017
    Posts:
    35
    I'd like to try? I am importing massive geometries at run-time.

    Let me know!
     
  2. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    More bounces is needed for stronger color bleeding but it needs more samples. That's why explicitly sampling light sources in important. However in lightmapping i thing blurring the result every few samples could eventually help in case the blur algorithm is good enough. I even think that the Progressive Lightmapper may be is blurring the lightmaps in the process of baking but am not sure - it just seems so !

    P.S. i actually tried blurring the texture after every sample in the "Per Object" baked and you have straight away a smooth texture, it is just the current blur algorithm is not suitable for blurring at bake process.
     
    UnityLighting likes this.
  3. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,866
    The generated lightmap textures size is too low
    How to use an separate 2048x2048 texture for each object?

    Untitled.jpg
     
  4. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Pressing Ctrl+W will open the same tool but will bake per object. You can go to Tools/Vagabond/POLM menu and you can see that there are two options to choose from. The"Per Object" one will bake up to 2K texture for every object. I just notices though that if you add two or more objects to the list and start baking them only the first one is baked and the other are black. There is some issue and i will check it. You will have to uncheck all objects from the list and keep checked the one that you want to bake until i fix it ! The objects that are unchecked will still contribute to the baking by occluding and throwing color to the object that is currently baked !

    You can go through the ReadMe file - there is some important information !
     
    UnityLighting likes this.
  5. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,866
  6. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Ok, i will check it. The "jitter" value is used when you render to screen only for anti aliasing in general !
     
  7. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,866
    2048 resolution
    3-4 bake time ~
    photo_2017-11-07_04-45-01.jpg
    photo_2017-11-07_04-46-17.jpg

    During Bake:
    photo_2017-11-07_04-45-03.jpg

    Technically everything is now OK

    Just improve editor Workflow and fix its bugs
    I'm sure this one is better than Octane with better noise reduction algorithm and more options
     
    Lars-Steenhoff likes this.
  8. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Hmm that looks pretty nice :) - how many samples for this clean bake ?

    Will do my best to improve editor and fix bugs !
     
  9. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,866
    3000 samples in ~5 min
    I couldn't fine the per object lightmapoper works, instead is change the mode's scale to 300 (~300 meter)
    Now if you want to create an Professional GPUBaker i think you must :

    1. Change the name (for Example GPULightmapper) to people find you faster

    2. Create first an easy to use API then start creating Editor based on this API..
    In this mode, everyone can use or create editor workflow based on the project needs.
    Also people can use in different cases like Runtime baking easily.

    In this mode both developers and end-users can use your asset. Developer uses API and people use your Editor. Also you can place source into dll and sell source separately (keep price low)

    Example usage:

    Code (CSharp):
    1. GPULightmapper p1 = new GPULightmapper();
    2.  
    3. MeshRenderer[] r = GameObject.FindObjectsOfTType<MeshRendere>();
    4.  
    5. p1.meshRenderers = r;
    6.  
    7. p1.textureSize = 2048;
    8.  
    9. p1.SampleCount = 3000;
    10.  
    11. p1.Render();
    Code (CSharp):
    1.  
    2. MeshRenderer[] r = GameObject.FindObjectsOfTType<MeshRendere>();
    3.  
    4. While(!p1.isBaking)
    5. {
    6.  
    7. }
    8. foreach(MeshRenderer rt in r)
    9. {
    10. GPULightmapper[] p1 = new GPULightmapper();
    11. p1.meshRenderers = r;
    12.  
    13. p1.textureSize = 2048;
    14.  
    15. p1.SampleCount = 3000;
    16.  
    17. p1.Render();
    18. }
    19.  
     
    Vagabond_ likes this.
  10. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Thanks for suggestion - this is the current plan...

    1. This will be done as soon as there is a good enough version to make an update !

    2. Now i am moving everything to separate methods to form an API. The methods are a bit more common now but will add separate functions for every task needed for preparing objects... !
     
  11. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,866
    After creating API, i can also make my own editor workflow for my own need or share with your customers

    10.000 samples + 512x512 + 3 min bake time GTX 960
    Why we must use this plugin?
    1. We can use Noise reduction mode and bake faster than PLM
    2. We can use multiple GPU's or very powerful GPUs compare to High prices limited CPUs
    3. We can skip blur filter and render with offline quality Path tracers with unlimited numbers of rays
    4. We have access to Source Code
    photo_2017-11-07_06-26-00.jpg


    photo_2017-11-07_06-26-02.jpg
     
    Last edited: Nov 7, 2017
  12. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,866
  13. Vagabond_

    Vagabond_

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

    I could provide the version with GPU rasterization - the precomputing time should be lower. It is at least for me but depends on the scene !
     
    UnityLighting likes this.
  14. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,866
    1 Hour
    ~ 28.000 samples in GTX 960
    2048x2048
    Without noise filter
    1400 mb memory usage from GPU

    photo_2017-11-07_08-08-48.jpg photo_2017-11-07_08-08-53.jpg photo_2017-11-07_08-08-55.jpg photo_2017-11-07_08-08-58.jpg


    photo_2017-11-07_08-08-48.jpg


    also a guy tell me about looking to this technology:

    https://developer.nvidia.com/optix
     
    Last edited: Nov 7, 2017
    Vagabond_ likes this.
  15. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
  16. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,866
    Does current version support multiple GPUs?
    I seen RAM usage during bake. Is it related to the POLM?

    Also i'm going to test a bigger scene to see the Memory usage

    Also POLM only bake when we are in editor. I think this is related to Editor code. You must write API separately than Editor. Editor Update time is not too much high
     
  17. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,866
    New suggestion:
    - Disabling Sun light component automatically and control sun intensity and color from POLM window(Like Octane)
    - Soft shadows for sun
    - IBL texture as sky color ( i have code to get average color from texture or cube map)



    photo_2017-11-07_09-32-22.jpg photo_2017-11-07_09-32-24.jpg photo_2017-11-07_09-32-50.jpg photo_2017-11-07_09-32-53.jpg

    photo_2017-11-07_09-32-24.jpg
    photo_2017-11-07_09-32-50.jpg
     
  18. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,866
    Baked in seconds:
    photo_2017-11-07_10-47-27.jpg

    photo_2017-11-07_10-47-27.jpg photo_2017-11-07_10-47-30.jpg photo_2017-11-07_10-47-31.jpg photo_2017-11-07_10-47-35.jpg
     
    Vagabond_ likes this.
  19. Vagabond_

    Vagabond_

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

    1. A reference to the Sun Light and its options will be added
    2. Soft shadows should be added as well
    3. IBL is in the list and i did some tests before. I think i can add this feature with ease ! Will give it a try tomorrow !
     
  20. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,866
    ~20 min GTX 960
    2048
    with post processing
    photo_2017-11-07_13-45-05.jpg
    photo_2017-11-07_13-45-10.jpg
    Vray
    photo_2017-11-07_13-45-16.jpg
     
  21. AAK_Lebanon

    AAK_Lebanon

    Joined:
    May 30, 2015
    Posts:
    77
    I am waiting to see the feature that bake GI. but I have some questions, first it seem that this asset is old and it seem that it is not updated regularly because of that I am waiting to see the new version, and the second question about the price, it will still the same or it will raise up ? the third question is that I have a laptop with Nvidia 930M (I have a desktop with higher video card) but I want to know if my laptop will work on small scenes so I can show my students the benefits of such asset.
     
  22. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,866
    Most lightmapers leaved by authors because :
    1. Asset store income is too low
    2. Received bad reviews

    POLM currently completed from technical side (i'm tester) and the quality and options is very good to use in action for both fast baking for games and long baking for visualizations.

    I'm sure POLM can be a unique lightmper for Unity. My current experience shown me that POLM is better than Octane in action (specially noise reduction options)

    API is OK, just needs to a clean Editor and API design

    930M is not usable for any GPU lightmapper.
     
    Tenebris_Lab likes this.
  23. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Hi, thanks for the interest !

    1. The asset hasn't been updated for a while just because implementation of the new version was started almost from zero and requires quite a bit of a time to get implemented.

    2. Even if the price get higher it will be with around 5-10 $ but not yet decided. The package will remain in BETA stage until it feels more complete though !

    3. Nvidia 930M supports DX11/12 and in my opinion will only be suitable to bake single, low poly objects. But i am not sure how exactly would behave such low end GPU.
     
  24. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Just to share a little new implementation.

    IBL support is added.

    Cubemaps now can be used to sample sky color from instead of using a simple color. Of course there will be an option to choose to either use a sky color or a cubemap.

     
    UnityLighting likes this.
  25. N00MKRAD

    N00MKRAD

    Joined:
    Dec 31, 2013
    Posts:
    210
    When will it get updated?

    The asset didn't get an update for half a year now.
     
  26. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Hi, as i mentioned in the thread above, this version has been started almost from zero and it is much more complex.
    There are some things yet that need work before any update is ready to be published and it will remain in BETA until it feels more complete !

    Hopefully a new update will be uploaded soon ! Thank You !
     
    N00MKRAD likes this.
  27. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Hi guys, another small update:

    Soft Shadows have been implemented ! You can see in the video comparison between hard and soft shadows in screen rendering and lightmapping.

     
    N00MKRAD and UnityLighting like this.
  28. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,866
    It's great feature
    If you implement Spot and point lights (to reduce noise) , using Soft shadows (with control over radius), we can simulate indirect shadows easily(in UE4's way):
     
    Vagabond_ likes this.
  29. N00MKRAD

    N00MKRAD

    Joined:
    Dec 31, 2013
    Posts:
    210
    Man, that stuff looks awesome.
    I'll be patient :p
     
  30. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Thanks, glad you like it !
    Doing my best :)
     
  31. Vagabond_

    Vagabond_

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

    Spot and Point light support has been added.
    Next step is to try implement area lights as well.
    Visibility check is not implemented yet which means some non directly visible to the lights areas are lit as well.

     
    UnityLighting and N00MKRAD like this.
  32. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,866
    Does support Shadows and Shadow radius ( softening shadow )?
    Also you can add lightmap scale option (like UE4) because currently with big scale models (in transform component) we have higher resolution lightmap
     
  33. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Not yet because was focused on implementing light intensity and color. Should look to that next as well !

    This is in the list already !

    Will try to implement area lights first and then will look at proper light interaction!
     
  34. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,866
    You can use custom shaders (Lightmap RGB * Albedo RGB => Emissive output) instead of Unity Lightmap Data:
    In Action it's more easy
    My Vray test:
    photo_2017-11-14_00-44-10.jpg photo_2017-11-14_00-44-14.jpg photo_2017-11-14_00-44-15.jpg photo_2017-11-14_00-44-16.jpg
    photo_2017-11-14_00-44-14.jpg
     
  35. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    I am not sure if i get this ! What exactly do you mean ?
     
  36. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,866
    Currently your lightmap textures stored into LightMap data inside Lighting WIndow
    I told you that you can use lightmap texture into Legacy Lightmapped Diffuse shader (or create new shaders based on Standard shader)

     
  37. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Aha, ok i get it now !
     
  38. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Hi,
    just to note that Area Lights support is no added. It needs a better area sampling on the GPU because currently is not uniform enough though !

    Work In Progress !

     
    UnityLighting likes this.
  39. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,866
    Can you apply noise filter (blur) during render ?
     
  40. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    You mean to be able to get cleaner result faster ?
    Currently no !
     
  41. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,521
    Im gonna buy this right now, can you please tel me if it works already on the Mac? with metal perhaps?

    very promising results, and I happy to help out with testing mac compatibilty.
     
  42. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,866
    Yes like all other renderers get final blur effect during bake
     
  43. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    I doubt they are blurring the renderer but more likely are using this new modern technique for cleaning up noise like in this video based on a paper ! If you mean this, it is complicated process and i have not look at this currently... !



    P.S. for lightmapping i will add some sort of blurring process in order to get faster results eventually though !
     
    N00MKRAD and Lars-Steenhoff like this.
  44. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,866
    Your noise filter applied after finishing bake. I just told you to apply it during bake time and not in the end of the baking
     
  45. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Yes sure i will give it a try. This is in the list. Only have to finish working on lights and will take a look at what i can do !
     
  46. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,866
    POLM vs Vray and PLM:

    Webp.net-gifmaker (29).gif

    Webp.net-gifmaker (28).gif
     
    Vagabond_ likes this.
  47. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Next beta will be ready for testing tonight or tomorrow !
     
    N00MKRAD and Lars-Steenhoff like this.
  48. jjejj87

    jjejj87

    Joined:
    Feb 2, 2013
    Posts:
    1,115
    Hey Vagabond, great product!

    I just wanted to ask few things.

    1. POLM is a vertex AO baker that is adding GPU GI baking features, correct?

    2. Does this mean that the only "baking" part is handled by POLM and the actual render via Unity's default GI?

    3. Can we get a large area benchmark that can represents a real world usage instead of a boxed room? (eg. 200m x 200m with relatively populated area, then timed POLM vs Unity GI baking)

    Thanks!
     
  49. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,866
    I'm not authur but i'm its beta tester :

    1. AO baker and GI baker are two separate API in polm. Lightmapping is still developed separately

    2. POLM used gpu ray traced algorithm for lightmapping without touching Unity's GI. Like all other Offline CG renderes (quality is same in my testes)

    3. I will get latest beta tomorrow. I will try a larger scene with terrain . Box scenes used to test only Noise and GI quality (It's too harder than textured scene even big a scene)
     
  50. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Hey there,

    1. POLM in its current state ( the version in the store ) can bake AO to textures ( same as Lightmapping ) or to vertex colors. You have both options !

    The next version i am working on now supports Global Illuminations and all Light types. However it needs some optimizations before it hits the Asset Store. When it does it will be still in beta stage as i mentioned. You will be able to bake a list of objects -> one by one, to bake scene to Lightmaps and later the screen to an image. ( At least that's the plan ! )


    2. All the precomputing ( preparing for baking ) as well as the rendering part is done on the POLM side. There is no any part of the tool to deal in any way with any of the Untiy's Lightmappers. It is all separate tools and algorithms !

    3. I am thinking of providing a DX11 runtime build where you will be able to test Lightmapping at runtime while walking in the scene. ( I just thought that will be nice to test it that way ). Only have to check if this will be possible to be done at runtime but i think it will be. So i guess i will be able to provide here a link toa DX11 build of some scene where you are going to be able to see the lightmapping process at runtime !

    I haven't test it at wide areas just because of the GPU i am using which is not powerful enough for that. That's why i would like to receive some feedback based on the demo build that i would like to provide.
    200x200 m seems OK. It all depends on the total scene complexity though. With the graphics card i am using i am able to bake some objects in seconds and some group of objects in minutes. Bu again all depends on complexity and Lightmaps resolutions etc..... !
     
    Last edited: Nov 18, 2017
    UnityLighting likes this.