Search Unity

Bakery - GPU Lightmapper (v1.96) + RTPreview [RELEASED]

Discussion in 'Assets and Asset Store' started by guycalledfrank, Jun 14, 2018.

  1. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    Bakery results in very different lightmaps compared to unity, HDRP 2022.1.23 DX11
    - I believe unity's is more accurate, as APV gives the same lighting as unity's GPU lightmapper.
    AO is off, 5 bounces for both, same texel rate, no AO, default unwrapping and atlas packer.
    (I tried Xatlas, seems to give more similar results to unity's lightmapper but creates it's own set of issues, posted at the bottom)
    - all except barrels have auto generated lightmaps

    Unity GPU lightmapper:
    Unity_Ipt9FtO31n.png

    Bakery (same settings, adjust UV padding enabled)
    Unity_ou9Ac2UShB.png

    Bakery (same settings, no uv adjustments):
    Unity_MKFaAZ3lJ9.png

    Bakery (same settings, with uv adjustments:
    Unity_51yoTMtrTy.png

    unity's GPU lightmapper:

    Unity_qRwX0czOZ9.png

    Xatlas issue:
     
  2. orzech123

    orzech123

    Joined:
    Mar 12, 2018
    Posts:
    17
    I tried out the example_directional_SH.

    I imported Bakery_ShaderGraphURP.unitypackage, set the shader Shader Graphs/BakeryURPSHGraph for all objects' materials and hit Render button.
    These are the results: (left Build-In (correct, I guess), right URP (broken)).
    upload_2022-12-3_15-4-54.png
    Do you have any more suggestions? (I also tried other *SH* shader graphs, but with no luck)
     
  3. cataclysmicjedi

    cataclysmicjedi

    Joined:
    Jan 26, 2021
    Posts:
    3
    How do I get to use MONO SH? It doesn't appear under the list of possible options. When I tried patching bakery the lightmapper invoice is declared incorrect. And the newly purchased Bakery Render has no invoice number in UNity. This is very upsetting.
     
  4. cataclysmicjedi

    cataclysmicjedi

    Joined:
    Jan 26, 2021
    Posts:
    3
    Nevermind! I just needed to read the manual more carefully and following the registration directions. Thanks!
     
    guycalledfrank likes this.
  5. Sholms

    Sholms

    Joined:
    Nov 15, 2014
    Posts:
    85
    is possible use bakery to generate lightmaps to non statics prefabs? like for example bake the illumination for a movable prefab car/spaceship interior , etc
     
  6. Skokon

    Skokon

    Joined:
    Jul 23, 2017
    Posts:
    74
    You can set it as static and bake and then change it to unstatic, but this will cause a problem as the shadows and the Object GI will stay at the place, you should enable both realtime and baked lighting and not bake it, also use bakery light probes to get nice result
     
  7. Skokon

    Skokon

    Joined:
    Jul 23, 2017
    Posts:
    74
    Any idea why is this happening?



    After enabling the hole filling option on atlas packer it looks like this now



    This is the baked lightmap with hole filling option enabled upload_2022-12-6_20-55-41.png

    upload_2022-12-6_20-53-49.png

    This is the lighting result

    upload_2022-12-6_20-56-53.png


    Scene lighting toggled off

    upload_2022-12-6_20-57-13.png
     
  8. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    839
    @guycalledfrank
    Thanks for the great asset and making it work so easily! Here is our latest video which uses Bakery, AP4 is the finale of the AD series. Now we are looking for the next idea to strike. :D
    This began with a drawing my wife made of a deer crying on her wedding day because the groom did not show up, so I wanted to bring it to a conclusion as a part of the Dream series. Hope you enjoy it!
     
  9. yackson-cc

    yackson-cc

    Joined:
    May 14, 2016
    Posts:
    48
    Please @guycalledfrank I want use Mono SH or SH, I have the last version of Bakery, I have also the shaders implemented, but this no working, I want to know please, step by step what is the settings or baking process to achieve this.

    The first thing that have an issue is the baked maps for Mono SH:

    upload_2022-12-8_23-58-1.png

    How use the textures L1? where it must be placed on shader/material?

    In your example on shader graph for URP, this texture is not assigned on any node, but works, why?

    I must have meta pass for Normals_Maps?

    Please a detailed description how implement this are welcome.

    Thanks!
     
  10. Garret2727

    Garret2727

    Joined:
    May 5, 2014
    Posts:
    23
    I am getting some weird issue when I am trying to bake my world. The baked lights wont effect certain parts of the wall and when I have the Show Checker option enabled for debugging, the wall doesn't have the checkered area. Any ideas? upload_2022-12-10_8-46-20.png
     
  11. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,869
    Yes: you must generate the lightmap UVs for your walls.
    If it's an imported model, you can check "generate Lightmap UVs" in the import settings of the model.
    If you did it with a level design tool inside Unity, check its manual to generate their leightmap UVs.
     
  12. Garret2727

    Garret2727

    Joined:
    May 5, 2014
    Posts:
    23
    I do have the Lightmaps UVs made. But they seem a bit scrambled?
     
  13. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,869
    They're completely wrong. The checkers should look like the floor that is closer to the camera but all over the scene.
     
  14. Garret2727

    Garret2727

    Joined:
    May 5, 2014
    Posts:
    23
    Oh. I had Hole filling turned off for some reason. Must have clicked it off by accident.
     
  15. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,671
    There seems to be a new change in HDRP that flips its Meta Pass once again (just tested on latest). Both issues are caused by this. I've just pushed a patch.
    Please try updating: https://geom.io/bakery/wiki/index.php?title=Github_access

    The colored blotches? These are just texture compression artifacts. You can disable texture compression on the lightmap assets or force it off in Project Settings -> Bakery. AFAIK default progressive lightmaps are uncompressed.

    Kinda, except it's supposed to use Linear color space.

    The sphere is using a per-vertex SH lightmap in this scene, which is not supported in URP. You can remove the Lightmap Group from the sphere and rebake it. Texture SH lightmaps are supported by this shader graph (walls work OK as I can see).

    Yes (if you're OK about lighting still being static on a movable object).

    Also please take a look at this (regarding HDRP sky exposure): https://geom.io/bakery/wiki/index.php?title=Manual#Notes_on_HDRP.2FURP

    Creative! I'd suggest looking into the water shader to make it work with the fog ;)

    Both maps are automatically assigned to objects via the built-in lightmapping system.

    No.

    1. Set Directional Mode to MonoSH.
    2. Use materials that support this mode. In URP this is BakeryURPMonoSHGraph.shadergraph or BakeryURPMonoSHSpecGraph.shadergraph. They are included here, if you click "Latest URP graphs": https://geom.io/bakery/wiki/index.php?title=Bakery_-_GPU_Lightmapper
    3. Bake.

    (you can swap the order of 2 and 3, it doesn't matter).

    Hole filling and walls not having any adequate texels are not related... maybe the lightmap resolution was just too low?
     
  16. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,671
    WHO COULD'VE THOUGHT

    upload_2022-12-11_23-53-47.png

    It finally happened ._.

    In fact, it's already on the store!
    I will finally stop torturing everyone by asking to get my github patches... for some time.

    Changelog:

    v. 1.95
    https://assetstore.unity.com/packages/tools/level-design/bakery-gpu-lightmapper-122218

    - Added MonoSH directional mode. Takes 2x less memory than the cheapest Dominant Direction mode, while being close to full SH in quality.

    upload_2022-12-11_23-55-21.png

    - Added MonoSH support to the Bakery shader, as well as URP and HDRP graphs.

    - Added Atlas Preview. When the checker is shown, it opens a new window showing the UV layout of every future lightmap atlas before the bake. Useful for checking out packing quality and lightmap count.

    upload_2022-12-11_23-56-40.png

    - Area Lights/Light Meshes can now bake Shadowmasks (usable in HDRP or custom renderers).

    - Added supersampling option for directional lights.

    upload_2022-12-11_23-57-22.png

    (this is without bicubic filtering)

    - Improved point light shadow sampling (fixed some cases of banding; less samples are needed for a clean image). Old method is still available behind the “Legacy sampling” checkbox, just in case.
    - Light color temperature is now taken into account.

    - Baked Tag in LightmapParameters assets is now respected. Additionally, built-in LightmapParameters are now extended with Bakery-specific options (e.g. overriding rendering mode, enabling SSS for specific renderers without using a LMGroup, etc).

    upload_2022-12-11_23-57-55.png

    - Shadowmasks with < 4 lights will now force the texture importer to omit the alpha channel, reducing memory usage.
    - Bakery now takes the “Receive Global Illumination” option into account.
    - Added Auto-resolution option for Lightmap Groups.
    - Added Utilities -> Clear cache.
    - Added global options to generate a limited amount of mipmaps for every lightmap.
    - Added global options to control the way lightmaps are compressed on import.
    - Added global “High quality direction” toggle to control compression quality for directional maps.
    - Added global “Remove ringing” option for Legacy light probes.
    - Batch scene baker is now added to the main package.
    - Added OnPreReflectionProbeRender event.
    - Added “Ignore warnings” option to Lightmapped Prefabs.
    - Added options to disable parts of the sample adjustment algorithm to Project Settings.
    - Added a workaround for a NVIDIA driver bug when running the denoiser with low resolution.
    - Added “Direct, Indirect and Shadowmask” contribution mode for lights to use with custom shaders (same as Direct and Indirect, but the Shadowmask is also produced and assigned).
    - Added “Shadowmask with falloff” option for lights to use with custom shaders (bakes attenuation into the shadowmask).
    - Added “Suppress all popups” option to skip any dialog boxes after pressing Render.
    - Enabled Bakery shader’s per-vertex SH mode on GL and GLES.
    - Improved per-vertex baked data importing (thanks ptbarnaby).
    - Improved tooltip texts (thanks mauricepape).
    - Volume texture names are now based on their parent LightmappedPrefab name, if present (thanks Andrew Welch).
    - Bakery’s Project Settings are now stored relative to its other folders.
    - Added “First light uses Alpha” option for Volume shadowmasks, so A8 format can be used when there is only one light.
    - Log file size is now limited and doesn’t bloat forever.
    - Small improvements to the sample adjustment algorithm.
    - Small improvements to the area light weighting algorithm.
    - Removed old “GI VRAM Optimization” as it was giving more issues than it was solving; please use BakerySectors for huge scenes instead.
    - Fixed compatibility with latest HDRP.
    - Fixed issues with the new “Parallel asset import” Unity option.
    - Fixed matching a Light Mesh on a GameObject with both a MeshRenderer and an Area Light.
    - Fixed rare cases of phantom Light Mesh geometry appearing where it shouldn’t during the bake.
    - Fixed using Optix7 denoiser with “Fix bright edges”.
    - Fixed RGBM-encoded cubemaps not working properly when fed to Skylight.
    - Fixed not being able to Undo “Match skybox to skylight”.
    - Fixed matching to HDRP lights.
    - Fixed terrain hole texture resolution not being properly respected.
    - Fixed Bakery shader compilation issues in some projects.
    - Fixed Bakery shader’s specular intensity when used with a directional map.
    - Fixed some issues with the Post-packing option.
    - Fixed useless overhead from light components.
    - Fixed lightmaps reverting when light probe render is cancelled.
    - Fixed BakerySector capture point numbers drawing behind camera.
    - Fixed "Clear baked data" not reverting shadowmasked lights until scene reload.
    - Fixed some parts of the Checker Preview UI disappearing when “Scale per map type” options are unrolled.
    - Fixed SSS.
    - Fixed lightmaps disappearing on new Unity versions when trying to render reflection probes (and appearing back after playing/reloading).
    - Fixed emissive color sometimes leaking to unrelated charts.
    - Fixed ValidateOutputPath() not being called when rendering from scripts.
    - Fixed errors when using non-ASCII characters in scene and LMGroup names.
    - Fixed error when trying to bake volumes in Shadowmask mode without shadowmasked lights.
    - Fixed volume shadowmasks for point/area lights.
    - Fixed lightmap count printed to console when enabling Checker Preview.
    - Fixed axis for cubemap and cookie lights.
    - Fixed non-shadowmasked LMGroups sometimes producing empty shadowmasks when they’re globally enabled.
    - Fixed not respecting static flags and scale in lightmap when merging multiple BakerySectors.
    - Fixed unused maps still being referenced by the scene after baking multiple BakerySectors.
    - Fixed AO-only mode not working together with Baked Normal Maps.
    - Fixed “Alternative scale in lightmap” option when used together with xatlas.
    - Fixed Undo not working for Volume bounds movement.
    - Fixed rare cases of “Can't have more than one light on one object” message getting stuck.
    - Fixed an issue with Bakery trying to locate its own folder (thanks PeppeDK).
    - Fixed window jittering when DPI is 125% and Unity is between 2018.2 and 2019.1.
     
  17. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,671
    Real-time Preview was also updated!

    v. 1.195
    https://assetstore.unity.com/packages/tools/level-design/bakery-real-time-preview-164462

    - Updated to be compatible with Bakery v1.95.

    - Added HDR mode. When rendering to scene view, a full floating-point HDR image is shown, allowing for built-in RP post-processing (e.g. tonemapping) to shade it correctly.

    upload_2022-12-12_0-4-54.png

    - Fixed using Backface GI > 1.
    - Fixed cookie axis.
    - Fixed a rare case of crashing.
     
  18. Game-Dragon

    Game-Dragon

    Joined:
    Nov 16, 2012
    Posts:
    33
    I'm super excited for this update. I use Jason Booth's Better Lit Shaders. Will Mono SH be supported for that?
     
  19. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,671
    Not at the moment. TBH there seems to be many broken things in Better Lit implementation, since neither I can understand his code to integrate it properly, nor he can understand my code to do the same o_O
     
    MaxRoetzler and Gooren like this.
  20. BluWizard

    BluWizard

    Joined:
    Mar 14, 2021
    Posts:
    2
    Is 2019.4.40f1 the new minimum requirement or will that be fixed? It right now says you must have 2019.4.40f1 or newer.
     
    Last edited: Dec 12, 2022
  21. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,671
    Can you still download it to older versions? I couldn't upload it from 5.6 as I did before, because:


    https://forum.unity.com/threads/can...-from-unity-2017-1-2017-4-and-2018-1.1236052/

    :(

    However, the package itself is still compatible with older versions!

    ...

    There seems to be a typo in that answer about LTS: uploading from 2018.4.0 works fine. Reuploading now!
    However, 2017 or earlier still fails. Waiting for Unity to answer.
     
    Last edited: Dec 12, 2022
  22. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,671
    So despite Bakery still supporting all Unity versions since 5.6, Unity does not longer allow uploading assets from anything older than 2018.4. And uploading from newer versions locks older version users from using the asset. Doesn't make sense to me.







    Unity needs to fix this ASAP!
     
  23. Game-Dragon

    Game-Dragon

    Joined:
    Nov 16, 2012
    Posts:
    33
    I'm having issues figuring out how to use Bakery Volumes in URP. Trying to setup a volume for an interior part of my scene, but they're not getting the surrounding light data at all. (Using BakeryURPVolumeSpecShadowmask shader)
    upload_2022-12-12_2-38-38.png

    I've followed the documentation and example scene: Toggling Experimental > First light uses Alpha and removing the items from my Directional Light's culling mask.
     
  24. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,671
    Try BakeryURPVolumeSpec for now? Does it work? The shadowmask one is more complicated and requires additional setup.
    Is Volume set to global?
    Did it work in example scenes?
     
    Last edited: Dec 12, 2022
  25. Game-Dragon

    Game-Dragon

    Joined:
    Nov 16, 2012
    Posts:
    33
    BakeryURPVolumeSpec is giving me the exact same results. Both shaders worked in the example scenes though, so I can only assume my setup is incorrect.
    The volume is set to global with voxels set to 32 units.
     
  26. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,671
    Just reuploaded from 2018.4 instead of 2019.4, that worked fine. Uploading from 2017 is broken however. Waiting for Unity to answer, hopefully it will be solved.
    Technically you can install 2018.4 (or newer), download the asset and then copy it back to an older version project (but it's not the best UX).

    BluWizard, what version are you on?
     
  27. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,671
    Can you show me your Volume component settings as well as global rendering settings?
     
  28. Game-Dragon

    Game-Dragon

    Joined:
    Nov 16, 2012
    Posts:
    33
    By global rendering settings, do you mean Bakery Render settings or something else?
    upload_2022-12-12_3-53-3.png
    upload_2022-12-12_3-53-26.png
     
  29. Game-Dragon

    Game-Dragon

    Joined:
    Nov 16, 2012
    Posts:
    33
    Ah I see, it was the compress volumes option. Disabling that fixed it and it's working well now.
     
  30. Vincentin

    Vincentin

    Joined:
    Feb 4, 2017
    Posts:
    8
    Hi, Frank!

    I'm using Dominant Direction and with the new update I've noticed the quality and weight of monoSH.
    Any advice on how to make the projection of the native URP decals work with the monoSH shader without having to resort to volumes? I mean the same way they integrate with DD and other default shaders.

    Thank you very much!

    EDIT: Using Unity 2021.3 LTS
     
  31. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,671
    Ah yes... volume compression requires some changes to the shader. Currently URP graph doesn't support it.
     
  32. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,671
    I didn't use URP decals, so not sure how they work... possibly tricky as decal shaders are part of the URP.
    I wonder if I should maybe release some decal asset myself, as I'm using a custom mesh-based solution in my game, and the neat thing about it is how easy to port it to any pipeline... basically I just generate alphablended geometry of the right shape.
     
    Monil, Vincentin and atomicjoe like this.
  33. Vincentin

    Vincentin

    Joined:
    Feb 4, 2017
    Posts:
    8
    ;)
     
    guycalledfrank likes this.
  34. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,671
    Gooren, atomicjoe and Vincentin like this.
  35. Fluentworlds

    Fluentworlds

    Joined:
    Mar 27, 2015
    Posts:
    2
    Hello here!

    I am in urgent need to roll back to Bakery 1.9 I clicked BY MISTAKE the update button on Package Manager in unity and now I can only see the latest version of Bakery which is not what my client's current production pipeline is using. PLEASE help! This is urgent since I am on the clock for my client.

    Thank you very much in advance

    Regards,
    Carlos
     
  36. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,671
    Got your email, replied.
    But in general, they should be compatible (unless you use 1.95-only features).
     
  37. BluWizard

    BluWizard

    Joined:
    Mar 14, 2021
    Posts:
    2
    I'm on 2019.4.31f1. Which is why I asked the question if it was safe to update to 1.95.
     
    guycalledfrank likes this.
  38. trojant

    trojant

    Joined:
    May 8, 2015
    Posts:
    89
    Hi, @guycalledfrank
    I have a remote server on the Internet. Is the GPU insufficient? If the performance is improved, can it be baked?
    Thanks
     
  39. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,671
    Ah, yeah, totally safe :)

    Which GPU?
     
  40. Game-Dragon

    Game-Dragon

    Joined:
    Nov 16, 2012
    Posts:
    33
    @guycalledfrank Could you go more indepth about your door trick mentioned here?

    Dynamic doors and lighting have been the bane of my existence for quite some time lol. An example scene would be even better but I understand if you don't have time for that.
     
  41. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,671
    Oh yes, I'm not even sure about the Final Door Solution for my game either.

    Just updated that post with the example scene, check it.
     
  42. Game-Dragon

    Game-Dragon

    Joined:
    Nov 16, 2012
    Posts:
    33
    Wow, thank you for the incredibly quick response! The example scene helped me understand this solution more clearly.
    I will definitely experiment more with this, but this seems like a hell of a difficult method to setup if your game is all modular pieces like mine lol.
     
    guycalledfrank likes this.
  43. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,671
    It should be easy to automate with a script...
    Bakery has some scripting events: https://geom.io/bakery/wiki/index.php?title=Manual#Events
    So e.g.,
    Hook into OnPreFullRender(), find all doors, create LODGroups on them, bake, then get another function called by OnFinishedFullRender(), remove the LODGroups.

    I can even try hacking something quickly if you can't.
     
  44. trojant

    trojant

    Joined:
    May 8, 2015
    Posts:
    89
    Can I bake on a remote server on the internet?
     
  45. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,671
    trojant likes this.
  46. Game-Dragon

    Game-Dragon

    Joined:
    Nov 16, 2012
    Posts:
    33
    Thanks for the suggestion. The script was easy enough to whip together.

    However, I'm realizing that this method kind of falls apart with interiors. I guess I should just stick to probes or volumes?
     
  47. kolovef11

    kolovef11

    Joined:
    Dec 8, 2022
    Posts:
    4
    When I click on render, the system says: ftrace error: 500;)
     
  48. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,671
    In which sense?

    Possibly out of disk space? Or "export geometry and maps" is unchecked?
     
  49. Game-Dragon

    Game-Dragon

    Joined:
    Nov 16, 2012
    Posts:
    33
    upload_2022-12-16_15-46-48.png

    The interior doors bakes the direct and skylight, but the surrounding mesh (which is on LOD0) isn't taken into account.
    This causes the doors to look completely lit while inside.
     
  50. HunterAhlquist

    HunterAhlquist

    Joined:
    Oct 6, 2013
    Posts:
    132
    Hi, I'm trying to use ftserver on an RX580 server, and I'm getting "Error (1537): A supported NVIDIA GPU could not be found" I have RTX mode disabled, are AMD GPUs not supported for ftserver?