Search Unity

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

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

  1. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    649
    Hello,

    I notice in the documentation there is an experimental "Combine with Enlighten real-time GI".

    If I have a purely realtime GI project, can I use Bakery to create that? I have an RTX, and holy moly, this is so slow compared to your bakes.

    Honestly, I wanted to bake the lightmaps, but what I'm looking to do would go into schools, where even a few megs for a lightmap is too much for an individual scene. Enlighten seems to be the lowest file size, even if its more intensive (I'm getting 350fps right now anyway on my good machine, so should be good enough on their slow machines) ... I just wish the quality + time of the bakes were using your system, so I'm hoping thats what you are supplying with that!
     
  2. yzack_59

    yzack_59

    Joined:
    Jan 11, 2017
    Posts:
    2
    Hi,

    The Bakery standard specular shader failed to show properties in the inspector.
    I've just updated to 1.8 from previous version.

    As the documentation said, i've closed every bakery windows, restart unity, then imprt the 1.8 Packages.
    I tried also to delete bakery directories (even the editor/X86/bakery)
    Tried to do in admin mod, but always the same

    See the screenshot Capture.PNG .
     
  3. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,671
    Hmmm not sure if I remember any complete guide... for me it's mostly just experience + bits and pieces from here and there.

    Maybe Silent's guide will give you some info: https://gitlab.com/s-ilent/SCSS/-/wikis/Other/Light-Baking

    Yes!
    I finished testing v1.9 on my scenes and different Unity versions/render pipelines. Now I'm basically letting others test it so I can add any quick fixes before landing it on the store.

    Register here: https://geom.io/bakery/github-access.html
    And also here for the RTPreview if you have it: https://geom.io/bakery/github-access-rtpreview.html

    Then download patches from these:
    https://github.com/guycalledfrank/bakery-csharp
    https://github.com/guycalledfrank/bakery-compiled
    https://github.com/guycalledfrank/bakery-rtpreview-csharp

    Full instructions: https://geom.io/bakery/wiki/index.php?title=Github_access

    v1.9 comes with an automatic patcher, so it'll be easier from now on :)

    Sector system docs: https://geom.io/bakery/wiki/index.php?title=Partial_scene_baking
     
    keeponshading likes this.
  4. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,671
    Not really. If you can separate your lighting into static and realtime parts, you can use Bakery only for the static one. Enlighten is a very specific (and closed) tech with its runtime integrated within Unity. Bakery just generates textures usable by any engine and doesn't require anything too special at runtime.

    Weird, it looks as if you updated the script, but didn't update the shader? Or... not sure. Anyway, try the attached file?
     

    Attached Files:

  5. Jade_Curtiss

    Jade_Curtiss

    Joined:
    Jul 20, 2013
    Posts:
    20
    It seems Bakery Light Mesh cannot turn off the shadow, I mean the shadow it cast to other objects, not the self shadow. Am I right?
     
  6. NicolasDuboc

    NicolasDuboc

    Joined:
    May 19, 2017
    Posts:
    33
    Hello there !

    I'm running into a lightmapping issue, with some undesirable bleeding on faces supposed to be in the shadow. I've tested different baking options, without success. I realize that the lightmap resolution is quite low, but looking at the lightmap, it seems that it's high enough to have good results (which I have on other objects lightmapped in the scene). But some objects seem to maybe incorrectly align with some texels (see image attached explaining the issue), hence the lighting leaks on shadowed faces.

    I'll be very grateful if you have some insights about this.
     

    Attached Files:

  7. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,671
    OK, v1.9 was submitted to the store!

    upload_2021-6-5_13-40-56.png

    Changelog:


    v. 1.9
    - Added BakerySectors. A new experimental system to split scenes into separately bakeable chunks.
    - DX12 editor mode is now supported.
    - Added volume compression for desktop/consoles (BC6H/BC7 format).
    - Added support for custom shader-based transparency.
    - Added a patch downloading utility.
    - Lightmaps are no longer reset if the bake was canceled.
    - Clear Baked Data menu now has more options.
    - Baked Normal Maps mode now uses the expected per-pixel MikkTSpace on URP/HDRP.
    - AO intensity now works in Ambient Occlusion Only mode.
    - Added option to change IES light axis.
    - Added volume creation option to Bakery->Create menu.
    - Added OnFinishedReflectionProbes event.
    - Added some volume rotation options.
    - Global options from ftAdditionalConfig.cs were moved to Project Settings.
    - Added a global option to delete previously baked lightmap files before baking.
    - Added a global option to control the amount of info written to the console.
    - Added a global option to select volume render mode separately from the lightmap mode.
    - Added a global option to enable alternative “Scale In Lightmap” behaviour (closer to built-in).
    - Added a global option to control how the sample adjustment algorithm handles low-poly objects with smooth normals.
    - BakeryVolume UI now shows estimated VRAM usage given current settings.
    - BakeryVolumeReceiver example script was updated to also affect skinned meshes.
    - Fixed incorrectly baking HDRP scenes with very high-intensity light sources. Enabled proper HDR mode for the OptiX 7 denoiser, which is now recommended for HDRP.
    - Fixed terrains not baking properly due to DrawInstanced property.
    - Fixed terrains not receiving some local lights due to incorrectly computed bounds.
    - Fixed denoiser benchmark failing due to some version control systems locking the files.
    - Fixed a bug where some LODs didn’t receive bounces from some other LODs (v1.8 regression).
    - Fixed objects not baking if GameObject had multiple renderers with the first one being unsupported.
    - Fixed using OpenImageDenoise via Network Baking.
    - Fixed baking volumes via Network Baking.
    - Fixed occasional shadowmask leaking when the post-packing option was enabled.
    - Fixed light probe render not reloading directional maps.
    - Fixed some incorrect results when baking LODGroups added into LMGroups.
    - Fixed errors when attempting to use RenderTexture as alpha.
    - Fixed Baked Normal Maps not respecting negative scale.
    - Fixed progress bar being on top and not minimizable during scene export.
    - Fixed Bakery shaders failing to compile for mobile.
    - Fixed legacy light probe render not using RTX for direct lighting.
    - Fixed legacy light probe render sometimes producing incorrect values (Thanks, atomicjoe).
    - Fixed legacy light probe render taking dynamic skinned meshes into account.
    - Fixed active scene changing after legacy light probe render.
    - Fixed vertical slider sometimes disappearing in the UI.
    - Fixed Bakery shader not changing its RenderType tag to Opaque when changing it in the UI.
    - Fixed IES conversion process being called for already converted files.
    - Fixed error when using Checker Preview or RTPreview for the first time with many opened scenes.
    - Fixed Bakery not working if log files were marked read-only by version control.
    - Fixed ftModelPostProcessor not adjusting UV padding if ftGlobalStorage was not yet loaded, but model meta files were still accessible.
    - Fixed Bakery buttons working in Play Mode.
    - Some smaller fixes and optimizations.

    -----

    And RTPreview v1.19 was also submitted to the store!

    - Updated to be compatible with Bakery v1.9.
    - First skylight texture is now rendered in background instead of black color.
    - AO is now previewed.
    - Fixed preview window locking Bakery's DLL files.

    -----

    The "self shadow" option means the shadow from the light mesh onto other geometry (sorry if the naming is confusing).

    Yeah I think in this case you either have this leak or move it 1 texel to the right and... get the same leak from the other side. Since it's custom UVs, I recommend increasing padding (more spacing between charts) if you don't want to increase the resolution.
     
    NicolasDuboc and Scarabay like this.
  8. Thomas-Pasieka

    Thomas-Pasieka

    Joined:
    Sep 19, 2005
    Posts:
    2,174
    Unity sure is making all the wrong decisions lately.
     
    SMHall likes this.
  9. NicolasDuboc

    NicolasDuboc

    Joined:
    May 19, 2017
    Posts:
    33
    Thanks ! I already increased the padding, thinking it would improve the lightmap. But I get that considering the resolution, I should try to do it even more (as low res make a good padding less relevant).

    Theoretically, higher res would get rid of the issue ? If I understand correctly, texels are kinda being stucked between UVs island and don't have enough space to not overlap where they shouldn't.
     
  10. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    lol
     
  11. HeadClot88

    HeadClot88

    Joined:
    Jul 3, 2012
    Posts:
    736
    This honestly sucks. I was looking at getting bakery but because of unity I might not. :(
     
  12. Wawruch2

    Wawruch2

    Joined:
    Oct 6, 2016
    Posts:
    68
    Hi! I was wondering if there are any plans to make instancing working with vertex painted baking. From what I understand it's not possible because vertex paint is a part of a mesh information that is instanced but maybe I'm missing something or there's already a workaround? :D
     
  13. Jade_Curtiss

    Jade_Curtiss

    Joined:
    Jul 20, 2013
    Posts:
    20
    Then I don't think the "Self Shadow" option work properly, as you can see, below the Bakery Light Mesh turn off "Self shadow", but those cube in front of the light mesh still cast shadow.
    upload_2021-6-7_10-30-23.png

    When I turn on the "Self shadow" option, the Bakery Mesh itself cast shadow as well, and the shadow from two cubes is still there.
    upload_2021-6-7_10-37-24.png
    Is it a bug or something?
     
  14. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,671

    OK, Bakery v1.9 is out now!


    Thanks Unity for fixing this issue and removing the automatic check.



    It's relevant on any resolution. The idea is to make it cover a full texel. Small resolution = larger texels = larger padding.

    Yes, if the padding is small, increasing the resolution will increase texel coverage and prevent leaks.

    Vertex lightmaps are applied as additionalVertexStreams. This option allows you to retain the link to the original mesh asset, but Unity disables any batching/instancing when it's used.
    However, you can convert additionalVertexStreams into a regular mesh asset and use it with instancing, I have a script for that: https://geom.io/bakery/wiki/index.php?title=Community_extensions#Vertex_Lightmap_To_Mesh_Asset
    This way your mesh filter will link to the new generated file instead of the original, but there are no rendering limitations.

    Yes they will. I didn't say shadows from other geometry will disappear, only shadows from the light mesh itself on the geometry.
     
    NicolasDuboc, Mauri and Wawruch2 like this.
  15. Jade_Curtiss

    Jade_Curtiss

    Joined:
    Jul 20, 2013
    Posts:
    20
    So there is no way to disable the shadow from other geometry which produced by the Bakery Light Mesh? Since I can turn off the shadow from Bakery Point Light / Direct Light by setting the "Samples" to 0, can I turn off the shadows of Light Mesh in the future?

    Another problem is, it seems when I rendered new lightmaps, the old ones didn't get cleared. If new lightmap count is 2, and old count is 3, that is to say, if scene objects is deleted and cause lightmap count decreasing, there will be lightmap garbage remained. Am I missed something or it is a feature that would be supported soon?
     
  16. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,671
    Currently yeah.

    I can add it.
    What are you trying to achieve with shadowless area lights though? Perhaps there is an easier/less hacky way to do it?

    v1.9 now has an option to do it:

    upload_2021-6-8_12-45-56.png

    You can also delete them at any time:

    upload_2021-6-8_12-46-54.png
     
    NicolasDuboc likes this.
  17. sewy

    sewy

    Joined:
    Oct 11, 2015
    Posts:
    150
    Hello, when baking volumes I keep getting
    hf2vb (4): 23
    error. According to script it is connected with shadowmask. Could you please provide error codes list?

    I am up to date with git.


    EDIT: seems like the problem comes from - we are using shadowmask with main directional light (other lights - point, spot. are fully baked), but in this scene, there is no directional light so no shadowmask is generated. This leads to the error.

    This could probably be treated in the code - if RenderMode == shadowmask && there is no light which bakes shadows into shadowmask => dont try to render mask volume.
     
    Last edited: Jun 9, 2021
    hadynlander and guycalledfrank like this.
  18. Jade_Curtiss

    Jade_Curtiss

    Joined:
    Jul 20, 2013
    Posts:
    20
    I think it is just some visual effect and stylization needs, proposed by our artist. Since our game is cartoon rendering, enabling shadows of all lights may make the picture looks in a mess. Currently I tell them to use point lights to mimick the effect of area light, but a shadowless area light would be more appreciated.;)


    Looks like I should update to new version as soon as possible.
     
  19. ekoops

    ekoops

    Joined:
    May 24, 2010
    Posts:
    74
    Hi, lets say baking crashed or I ran out of space... Is it possible to preview what was baked anyway? I see ~1000 baked textures in the folder, but they were not applied to the models as the process of baking didn't finish.

    Asking because re-baking is overnight process for me, it takes very long and I cannot see what I need to reiterate for the next bake.

    Thank you.
     
  20. RicardCG

    RicardCG

    Joined:
    Dec 12, 2017
    Posts:
    10
    I'm having a weird issue, when I press play some times the links to my Light volumes break and I can relink them. Is this something that will be possible in the future? Is there a way to prevent that from happening? Broken link.png
     
    guycalledfrank likes this.
  21. LaurynasLubys

    LaurynasLubys

    Joined:
    Mar 7, 2012
    Posts:
    80
    Hey, Is there any reason that some of the lightmap space is not utilized?
    I come up to this because I had issue with some small objects being very dark, I increased minimum and max resolutions, then I noticed that UV is placed differently in the map. everything is squeezed to corners and there is a lot of black space remaining.

    Also, this map is from one building, that has many small meshes in it. Everything got baked into one map. Is this normal, or an option? I don't remember it being like that in earlier versions, maybe I pressed something.
     

    Attached Files:

    chino01 likes this.
  22. Goldenvale

    Goldenvale

    Joined:
    Feb 26, 2015
    Posts:
    86
    Thanks for updating Bakery, these new features are very useful!

    I did come across some problems/bugs though. I'm using the built-in renderer in Unity 2019.4.15f1.

    When I drag a gameobject with a bakery volume script on it to the shader nothing gets assigned. The same happens when I select it from the pop-up window.
    Screenshot 2021-06-11 024611.jpg

    When I add a sector to a parent gameobject that has its position set to (0,0,0) with the children objects on another position the bounding box is placed at (0,0,0) and there's no way to move it. And when I change the height of the box the objects get moved up or down, I don't know if that's intended or not. Also, there's no way to undo the move.
    (Edit: I just realised that it doesn't have to be on any gameobject specifically. But there's still the undo issue, even for any bounding box movement. When I move the bottom point down and undo the whole box moves down. Also, I don't know if this is a unity issue but the point appears behind objects which makes it hard to find.)

    I'm also having some issues with capturing a sector. I'm using the standard shader on the objects but in the preview they appear completely white. And when I put the captured asset on another sector nothing appears in the preview.

    When using volumes the unity standard shader appears completely black in shadows unless I use the bakery standard shader. Is there a way around this?
    Screenshot 2021-06-11 031356.jpg

    And a question; will there be a way to bake multiple versions of sectors? Something like with the volumes, you bake it and disable "Enable baking" with some way to switch between them. This is very useful for example when a light turns on or off, combined with the volumes.
     
    Last edited: Jun 11, 2021
    guycalledfrank likes this.
  23. MrPapayaMan

    MrPapayaMan

    Joined:
    Feb 16, 2021
    Posts:
    42
    Catching a shader issue on Android with the new update. Any advice?

     
  24. MrPapayaMan

    MrPapayaMan

    Joined:
    Feb 16, 2021
    Posts:
    42
    Also, still having issues like the one above when setting removeDuplicateLightmaps to true. Last time the fix was in the repository.



     
  25. namdo

    namdo

    Joined:
    Feb 23, 2015
    Posts:
    200
    I was wondering if you could help with this.



    In this shot the character is facing the light source and the camera is facing the character.



    In this shot, the character is facing away from the camera. The character isnt properly lit up as you can see from the character.

    Do you know that happens? I used magic light probes for the probes.
     
  26. chino01

    chino01

    Joined:
    Jul 19, 2014
    Posts:
    13
    Hey there everyone!, Mr. F @guycalledfrank firstly thanks for this great asset. It really helped us get better quality and more optimized lightmaps on our game. We use the latest version of bakery with unity 2020.3.3f1 but we tried to solve the problem in 2019.4.lts too.

    EDIT: UPDATE -1
    This seems like an issue with the models. that are created with shells(a backface created in modeling suite to render in unity). Or objects like coins, where the inside volume of an object is relatively smaller. Is that a problem? Or how can we control this setting, like a distance/radius?
    EDIT: UPDATE -2
    When I rotate this models 180 on X axis, and add a bakery sector, render individually they seem correctly lit. So confused.

    On some asset we get problems like this, some objects are completely black and we couldn't figure out what's the problem. If we move the red circled assets to a different place in this scene, or if we bake them in another scene they are fine. But when they're placed in their relevant position, lightmap uv space for this objects are completely black. And suddenly there're no proper direct light shadows in this asset, but others are fine. Can someone point us in the right direction here?


    image (2).png

    We normally use Full Lighting and Baked Normal Maps. But we tried all other settings and modes in this asset with no luck. These objects uses the same uv space in the diffuse uv channel but second channel uv's are not created outside unity, and they're set to generate uv lightmap in import settings. These are animated models so they've skinned mesh renderers. All objects are set to static. Objects are from different fbx's as some of them are animated. Other animated objects in the scene don't have any problem.

    :) thanks for your time.

    image (1).png
     
    Last edited: Jun 14, 2021
    guycalledfrank likes this.
  27. Goldenvale

    Goldenvale

    Joined:
    Feb 26, 2015
    Posts:
    86
    Some more features that would be nice to have:
    - Baking only one volume (maybe an option to pick one alongside the sector). This is useful for when you're baking a lights on/off sector.
    - Maybe integrate the lightmap swapper community extension from the wiki with the new bakery volume and sector.
     
  28. thelocationlabdeveloper

    thelocationlabdeveloper

    Joined:
    Sep 8, 2020
    Posts:
    18
    why my light settings are not working across unity collaborate?
     
  29. CoastKid

    CoastKid

    Joined:
    Jan 8, 2013
    Posts:
    64
    Just installed Bakery 1.9 (previously I used 1.55)
    When I press Render and do auto detect optimal settings I got this message:

    upload_2021-6-15_3-7-14.png

    Baking it self also doesn't work, I have latest drivers installed for my 1060GTX 6gb.
    Any idea how to fix it?
     
  30. chino01

    chino01

    Joined:
    Jul 19, 2014
    Posts:
    13
    We had the same issue because of an antivirus blocking the bakery exe files. I'd recommend checking that if it's the case.
     
    CoastKid likes this.
  31. CoastKid

    CoastKid

    Joined:
    Jan 8, 2013
    Posts:
    64
    Thanks for suggestion.
    I tried to turn off virus protection and add exclusion for the bakery exe files,
    but unfortunately it doesn't help.

    UPDATE:
    Fixing it by updating Unity version from 2020.2.0f1 to 2020.3.10f1.
    (Seems like my problem was linked to the issue with package update in old Package Manager)
     
    Last edited: Jun 15, 2021
    chino01 likes this.
  32. thelocationlabdeveloper

    thelocationlabdeveloper

    Joined:
    Sep 8, 2020
    Posts:
    18
    Did you solve the problem? I am facing the same issue.
     
  33. chino01

    chino01

    Joined:
    Jul 19, 2014
    Posts:
    13
    Bakery->Utilities-> Detect optimal settings may fix this error, after you excluded exes in the antivirus program.
     
  34. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    Ü.2
    Hi. Shadowmask for Area Lights would be really helpful.
    Is it hard to integrate them?
     
  35. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    Hi.
    With Optix 7 Denoiser it is now possible to match the high light intensities from Directional Light (PLM 100000 to Bakery 31830.99) and HDR Skylight (PLM 13.5 -> over Bakery update Skybox Probe) . Very Nice.

    Scene Window -> Bakery -11 Light Exposure
    Snipping Tool - > PLM Bake -11 Light Exposure

    Bakery Preview is set manually to Exposure 0.0003

    Do you know how can i correct adjust the Bakery preview Exposure to the Lighting Exposure from scene window (here -11)?
    For other lighting scenarios this would be very helpful.
    1.jpg
     
    Last edited: Jun 15, 2021
    guycalledfrank likes this.
  36. Jade_Curtiss

    Jade_Curtiss

    Joined:
    Jul 20, 2013
    Posts:
    20
    Hi, I'm using URP and set the Bakery Directional mode to "SH", and I have noticed that Bakery is using SetPropertyBlock to set the SH Lightmaps which is now breaking my SRP Batcher. Does any one knows how to avoid that with SH mode? Thanks in advance.:)
     
    keeponshading likes this.
  37. Tech-Labs

    Tech-Labs

    Joined:
    Feb 5, 2014
    Posts:
    105
    Hi,
    I've purchased Bakery some time ago, but never really had time to look at it. Now's the time!
    I had a copy of a larger HDRP (2020.3.7) with a lightmap that I baked the normal Unity way (there's quite a few real-time lights too). I installed 1.9, added a skylight, dropped in my HDRI cubemap, did the Detect (all Yes), set the Directional bake to Dominant direction and hit Render.
    After a minute of so and stuff happening on screen, Unity crashes and reports this. After another minute or so (I'm looking at the Unity crash reporter) my whole computer hangs. After a restart and a retry, exactly the same happened.

    Is there any way to understand where this went wrong? I have the crash logs from Unity.
    Running Windows 10, RTX2080Ti, plenty of disk space and memory.
     
  38. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,671
    Thanks a lot for the details! Yes, looks like it's the case. Volume shadowmask is not generated when there are no lights, but the script still tries to load it. Fixed it. Try updating from github (should be easy with the new patcher):
    https://geom.io/bakery/wiki/index.php?title=Github_access

    Turns out making shadowless light meshes is actually trickier than the ones with the shadows. Currently light meshes use a two-pass approach illustrated here: https://twitter.com/guycalledfrank/status/999658120292065280
    The first, distant/imprecise part is easy to compute without shadows, since attenuation and shadowing are separate. The second, detailed part is harder to compute this way, since it's currently just tracing the whole scene where everything occludes everything.
    It IS possible to add some branches/shader specializations for shadowless light meshes but the cost is increasing the complexity of the whole thing, and I'd prefer to avoid it to keep it stable.
    I'm also still not sure if it's really a solution for anything. Whatever the art style is, I'm not sure disabling shadows for anything will benefit it. It may work for some scenes and feel like a good idea, but it's a quick hack. Complex models lit without shadows tend to look quite bad (e.g. characters; a typical videogame artifact is the lacking mouth/nostril shadows; really destroys the look). I can be wrong/biased though. Can you show me a good example where it would really make a difference?

    Is it on v1.9? On v1.9 cancelling a bake in progress won't reset previous lightmaps anymore.

    Hmm... just added EditorUtility.SetDirty after the volumes are written. Should ensure that component data is fully saved. Can you check it (via patcher/github)?

    Lightmaps are currently constrained to squares with power-of-two resolution. If, given current texels per unit, all objects don't fit into a 256x256 lightmap, it will be scaled up to 512x512, but it may still be not fully utilized. If I scale them up to fully occupy 512x512, then texel size can deviate too much from the desired value. Also try it with xatlas atlas packer, it can give more stretching but utilize more space.

    If you decrease Min Resolution, you can get more smaller lightmaps instead of this big one.

    Also, just in case the building is just a single big mesh, then the problem is not in the atlas packing, but in the UVs of the mesh. Unity's unwrapper tends to generate similar corner-like layouts.

    Material doesn't store a link to the gameobject (it can't), but it copies textures/bound vectors from the object into the material. Perhaps you didn't bake this volume yet? This way there won't be anything to copy from it.

    Hmmm do you mean volume, not sector? Sectors don't have a bounding box. And yeah, volume center is always around its object's position. It's probably easier to keep it as a child in the hierarchy.

    Ouch. Fixed it :)

    What are their materials? Current capture points only use a base map (and don't use any tint color).

    Make sure another sector has the same amount/placement of capture points. The intended use case is to basically use the same sector to briefly capture the environment in one scene and then use the asset in another.

    Sectors capture the geometry/colors, not lighting, this way it can provide shadowing/bounces in any lighting scenario. Maybe I misunderstood the idea.

    Not sure your file is up to date? Maybe you have multiple versions of Bakery.cginc in the project?

    upload_2021-6-17_0-14-14.png

    Just tested on v1.9, seems to work? (split by scene + removeDuplicateLightmaps)

    upload_2021-6-17_0-43-25.png upload_2021-6-17_0-43-33.png upload_2021-6-17_0-43-39.png upload_2021-6-17_0-43-46.png

    Try Legacy light probe mode or use a shader with "Non-linear Light Probe SH" option: https://geom.io/bakery/wiki/index.php?title=Manual#Bakery_shaders


    -- will continue tomorrow --
     
  39. Goldenvale

    Goldenvale

    Joined:
    Feb 26, 2015
    Posts:
    86
    Yeah I noticed that it doesn't capture the tint, I'm using the standard shader with a tiling texture.

    I meant having the ability to bake a group of objects with different lightmaps without having to bake the whole scene. Like for example having a room as a sector with a white and red light. You bake the sector with only the white light and disable baking in the sector (like with the volumes). Then you use another sector script of the same room and you bake only the red light and disable the baking in that sector too. Then maybe another script that allows you to switch between the baked lightmaps. Combining that with the baked volumes you can switch between red and white light for static and dynamic objects.

    Something like the community extension on the wiki that lets you switch between different baked lightmap groups.
     
  40. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,671
    I hope I answered all your questions via Twitter yesterday :)

    Yeah, everybody wants it. Will add.

    Perhaps you should check Magic Lightmap Switcher? It covers a lot of different edge cases. https://assetstore.unity.com/packages/tools/utilities/magic-lightmap-switcher-built-in-rp-192332
    Author already pushed URP/HDRP version to the store and just waiting for approval.

    Component settings? Main window settings? I think people are using Bakery with Collaborate, so maybe yours is misconfigured or something? Maybe something here helps? https://geom.io/bakery/wiki/index.p...2Fother_version_control_system_with_Bakery.3F

    Weird! Maybe you had multiple copies in different folders or package importing didn't finish properly? Usually I recommend updating like this: https://geom.io/bakery/wiki/index.php?title=Manual#Upgrading_Bakery

    OK, integrated :D
    In fact, Bakery had light mesh shadowmasks since the beginning, but it wasn't wired into Unity, because Unity couldn't use it. Now, with HDRP, it can. Seems to work:

    upload_2021-6-17_21-1-29.png

    Try updating via the patcher? :)
    Just create an area light, put a Light Mesh on it, set to "Indirect and shadowmask", enable shadowmask on the HDRP light, bake.

    It's tricky because RTPreview exposure is just a linear multiplier. HDRP uses complex tonemapping which is also tweakable/replacable. Basically it can only match if the whole post-processing stack matches between the two.

    However, with "render in scene view" I can probably make it render before the original post-processing, only the image needs to be unclamped HDR (current RTPreview renders an already clamped 8-bit image).

    Unfortunately. I couldn't find any other way to set different lightmap types per-object (not per-material). Unity lightmap types are hardcoded (color/dir/mask), everything else is not managed by the engine and has to come from either a material or a MaterialPropertyBlock.
    I'd be happy if Unity had some way to avoid it, as it actually hurts my own WIP game, I'm trying to keep everything SRP-batcher-compatible (using custom SRP), but SH objects are out of luck.

    Was there a screenshot?...

    Logs would help!
     
    keeponshading likes this.
  41. MrPapayaMan

    MrPapayaMan

    Joined:
    Feb 16, 2021
    Posts:
    42
    Thanks. While streaming the lightmaps appear to attach properly per scene.






    However, once I make a build it seems that all the lightmaps are still referenced. So, all the lightmaps appear to get loaded into memory. Perhaps, in LightmapStorage? Is this on Bakery side or Unity? Having all the lightmaps load into memory I would think defeats the purpose of streaming. Thoughts?

     
  42. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,671
    Oh, also @jbooth just released Better Shaders with full Bakery support!

    https://assetstore.unity.com/packages/vfx/shaders/better-lit-shader-189232
    https://assetstore.unity.com/packages/tools/visual-scripting/better-shaders-standard-urp-hdrp-187838

    It's like surface shaders except they compile for all render pipelines and have stackable layers of features. All Bakery features are included, I helped with the integration.

    Can you send me this test project? Will debug.
     
    MrPapayaMan likes this.
  43. MrPapayaMan

    MrPapayaMan

    Joined:
    Feb 16, 2021
    Posts:
    42
    The issue was on my side. I was using addressables streaming. I didn’t set it up properly. Thank you for the continued support.
     
    guycalledfrank likes this.
  44. StoneHill1337

    StoneHill1337

    Joined:
    Nov 4, 2020
    Posts:
    19
    Hi there, after baking my Scene with Bakery there are these very bright light spots on some surfaces.
    Can someone tell my how to get rid of them?
    With Unitys build in light baking solution it helps to crank up the samples. But I can not find such option in the Bakery Settings, except for the "Samples multiplier" slider which is already on 1/1.

    Here are my Bakery settings:

    2.jpg

    And this is how it looks right now:

    1.PNG

    Thank you in advance.

    edit: I found the solution, just blur the HDR and the fireflies are gone.
     
    Last edited: Jun 21, 2021
    guycalledfrank likes this.
  45. Jade_Curtiss

    Jade_Curtiss

    Joined:
    Jul 20, 2013
    Posts:
    20
    Yes, it is just hack but may make the picture cleaner, and I just want to turn off some shadow in the scene but not every single light. If I find a corner with multiple shadow then I can keep the shadow of only one light. It should be an option for the lights.
    And following is a example corner
    upload_2021-6-18_19-2-38.png
    There are ghosting in the corner, and it is just shadows from the mikes on the table. Artist asked to turn off some shadow, and since they used light mesh, turning off the shadow from Light Mesh would be naturally what they want.
     
  46. zeux-n00b

    zeux-n00b

    Joined:
    Nov 4, 2017
    Posts:
    73
    Hello!
    I have some non urgent cloud question about baking very large scene options...
    I know you need more gpu ram to do that with one push of a button.
    Amd Ryzen cpu also have cuda cores therefor you have more ramm,
    Im thinking if i have Quadro pny p400 2gb ram could it be possible get away with some seasons baking parts, (to continue from where it left off or something
     
  47. Jade_Curtiss

    Jade_Curtiss

    Joined:
    Jul 20, 2013
    Posts:
    20
    Another question.
    How to fullfill the effect of semi-transparency shadow in the Manual, like

    I try to use custom shader-based alpha meta pass combined with blue noise texture, set the denoiser and just get the following result:
    upload_2021-6-22_20-31-11.png
     
  48. elok11

    elok11

    Joined:
    Dec 9, 2019
    Posts:
    18
    Hello, sorry for the late reply. I tried changing the normals, but it looks the same. I have two copies of that object in the same scene, and looks like only one has artifacts (first image).

    I also tried what ShaunCampbell said (thank you by the way!) about mipmapping and that did not work.

    Do you know what could be happening?
    Thank you!
     

    Attached Files:

    • ar1.png
      ar1.png
      File size:
      545.9 KB
      Views:
      369
    • ar2.png
      ar2.png
      File size:
      613.2 KB
      Views:
      345
  49. Chris3003

    Chris3003

    Joined:
    Nov 23, 2017
    Posts:
    1
    Init...
    texgi
    Loading geometry...
    Loading alphas...
    Tile size: 4096
    Device 0: NVIDIA GeForce GTX 1080 (ON)
    Used host memory: 0mb, available GPU memory: 6972mb
    MODE: texgi
    USING HALF
    Loading additional albedo: uvalbedo_GameScene no VSP_LMA44.lz4
    Loading additional lightmap: GameScene no VSP_LMA20_diffuse_HDR.lz4
    LM is half
    Loading additional lightmap: GameScene no VSP_LMA18_diffuse_HDR.lz4
    LM is half
    Loading additional lightmap: GameScene no VSP_LMA11_diffuse_HDR.lz4
    LM is half
    Loading additional lightmap: GameScene no VSP_LMA3_diffuse_HDR.lz4
    LM is half
    Loading additional lightmap: GameScene no VSP_LMA13_diffuse_HDR.lz4
    LM is half
    Loading additional lightmap: GameScene no VSP_LMA12_diffuse_HDR.lz4
    LM is half
    Loading additional lightmap: GameScene no VSP_LMA6_diffuse_HDR.lz4
    LM is half
    Loading additional lightmap: GameScene no VSP_LMA4_diffuse_HDR.lz4
    LM is half
    Loading additional lightmap: GameScene no VSP_LMA15_diffuse_HDR.lz4
    LM is half
    Loading additional lightmap: GameScene no VSP_LMA19_diffuse_HDR.lz4
    LM is half
    Loading additional lightmap: GameScene no VSP_LMA16_diffuse_HDR.lz4
    LM is half
    Loading additional lightmap: GameScene no VSP_LMA21_diffuse_HDR.lz4
    LM is half
    Loading additional lightmap: GameScene no VSP_LMA17_diffuse_HDR.lz4
    LM is half
    Loading additional lightmap: GameScene no VSP_LMA7_diffuse_HDR.lz4
    LM is half
    Loading additional lightmap: GameScene no VSP_LMA14_diffuse_HDR.lz4
    LM is half
    Loading additional lightmap: GameScene no VSP_LMA44_diffuse_HDR.lz4
    LM is half
    Loading additional lightmap: GameScene no VSP_LMA25_diffuse_HDR.lz4
    LM is half
    Loading additional lightmap: GameScene no VSP_LMA275_diffuse_HDR.lz4
    LM is half
    Load shaders...
    Loading shader lmTexGI.ptx::eek:xMain...
    Loading shader lambert_tex_gi2.ptx::eek:xMain...
    Loading shader shadow3.ptx::eek:xMain...
    Loading shader trimeshTex.ptx::intersect...
    Loading shader trimeshTex.ptx::bbox...
    Loading shader heightfieldTex.ptx::intersect...
    Loading shader heightfieldTex.ptx::bbox...
    Used host memory: 0mb, available GPU memory: 6972mb
    Used host memory: 0mb, available GPU memory: 6972mb
    Create buffer...
    Num passes: 3
    Num tex: 3
    Skipping pass LDR
    Pass GameScene no VSP_LMA44_diffuse_HDR...
    Skipping pass HDR2
    Used host memory: 0mb, available GPU memory: 6972mb
    Launch 1x1 tiles...
    Tile 0x0...
    Streaming...0
    npHD
    Launching...
    Error (-1): Unknown error (Details: Function "_rtContextLaunch2D" caught exception: Encountered a CUDA error: cudaDriver().CuMemcpyDtoHAsync( dstHost, srcDevice, byteCount, hStream.get() ) returned (700): Illegal address)

    Good day,
    I use Bakery 1.8 and have a very large scene. When I now start a bake process, I always get an error from Bakery at the same point. I have posted the excerpt from the log above. I am running out of ideas what the problem could be. A few marginal information. If I bake with Texel 5, Bounce 3 and Probes 16 it works. Bakery tells me for the process to work it must bake under 130 maps. However, if I want to beacon 6 Texel, bounce 3 and Probes 16 it is 300 maps and it then aborts at 47% approx with the message.
     
  50. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    Hi. I enabled SH in the BetterLit on a copy of the plane and added the normal map there.
    Do you have an idea what´s wrong.


    Unity 2020.3.11f1, HDRP 10.5.0
    latest Bakery updated
    latest BetterLit

    1.JPG

    All directional Lightmaps for the BetterLit plane are rendered correctly.


    2.JPG

    Test 2 Bakery SH
    Same result for this SH Demo.
    Left the SpecSH_Graph. (first 4 Lightmaps in project window overview)
    Right BetterLit SH setup. (last 4 Lightmaps in project window overview)
    3.JPG




    Test 3 Bakery Volume Shadowmask

    middle waggon : BetterLit Volume setup
    other wagons: Volume_Graph

    4.JPG
     
    Last edited: Jun 27, 2021
    guycalledfrank likes this.