Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

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

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

  1. OfficialDeVel

    OfficialDeVel

    Joined:
    Oct 11, 2020
    Posts:
    7
    Hello,
    Is it possible to set value of emission intensity in bakery SH material?
     
  2. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,120
    Hi,

    there might be an issue with bakery when using HDRP (2020, latest LTS). I can't seem to get ambient lighting (physical sky in HDRP) to work after a bake.

    This is the results after a bake:


    The interior works as expected, it's dark and no ambient light is inside. But the walls as you can see (also the ones on the other side) are completely dark and have no sky light, although they should. I tried using a bakery sky light and without.

    Even with the bakery sky light component, it doesn't seem to work. I'm also using unity's Physical Sky for the ambient lighting, another question is there no way to get bakery to work with HDRP's Physical sky?

    Worth noting that I also tried replacing the visual env/ambient light source to an HDRI (same as the one in the image "Sky texture" Default HDRI sky) and it's still dark

    Tested with many different sky intensities.
    Latest bakery version
    The "match" issue doesn't go away, clicked both
     
    Last edited: Nov 15, 2021
  3. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,628
    Yeah I think I copied it from the original Lit behaviour (?). If "smoothness from metallic" is false, it should take Smoothness from Base map alpha, otherwise from the Metallic map alpha. The value is multiplied by the Smoothness slider.

    I was going to test that, but:

    upload_2021-11-15_17-4-5.png

    2021.2.1 and 2021.2.2 straight up crash on startup on my PC :confused:

    https://forum.unity.com/threads/unity-2021-2-0b1-does-not-start.1132336/
    Seems like it's going to be fixed in the next Unity version, but for now I won't be able to debug it.

    Does it happen after you bake with Bakery or the default lightmapper as well? Does it happen if you bake without any light probes (so no lighting data asset is generated)?

    My favourite method: just use single Skylight. Works OK IMHO: https://twitter.com/guycalledfrank/status/1457740614808838157

    With such large windows it should look pretty good. If you still want to use area lights, just put a Light Mesh component on your existing lights and click "Match lightmapped to area light".

    The streaks are definitely not caused by the lights, but it looks like your objects are not unwrapped for lightmapping?

    upload_2021-11-15_17-13-51.png

    True.

    I haven't, as I didn't realize there is a need. Currently RTPreview receives downsampled textures and it doesn't account for specularity. Making a complete path-tracer is the easiest problem to solve here, but the bigger issue is properly supplying all material data to it. Unity defines a "meta pass" system which standartizes albedo and emission, but it doesn't go beyond that, meaning that there are as many ways of encoding glossiness/roughness as there are different shaders. I can make a single set of PT-compatible standartized shaders for each pipeline and it'll work, but I don't know if it's convenient, especially if you want to build the same interactive scene with different shaders.

    BTW, I tried to apply denoising in real-time on top of RTPreview, but it... made it not so real-time :)
    DLSS and other denoisers used in games are much faster (but slightly less accurate) than OptiX/OIDN, but AFAIK you can't simply download DLSS SDK, it should be specifically discussed with NV...

    Do you mean launching RTPreview via code and getting the image back? I don't have such API currently, but it's not a problem to add if it's what you need.

    Thank you :)

    Clever! :D

    Hmmm... how dark is it? Do you have to increase the exposure to see it? Recently I noticed that my OptiX5-based denoiser (which tonemaps->denoises->untonemaps) can ignore some very dark noise. Using OpenImageDenoise fixed it. Can you try it?
     
  4. Faikus

    Faikus

    Joined:
    Jan 3, 2011
    Posts:
    229
    Just did a quick test with 2021.2.2. It only happened when I baked with Bakery, had light probes, and after saving the scene. The reflection probe was okay in Play mode when I used the builtin lightmapper (with or without light probes).
     
    guycalledfrank likes this.
  5. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,628
    Yes, you can change this HDR color's intensity:

    upload_2021-11-15_17-58-43.png

    upload_2021-11-15_17-58-54.png

    Or do you mean shader graph materials? They have it too:

    upload_2021-11-15_18-1-57.png

    It won't work for baked objects, it should be baked into lightmaps. I think your Skylight might be too dark, default HDRP's HDRI exposure is very high. Try following: https://geom.io/bakery/wiki/index.p..._use_Skylight_with_a_procedural_sky_shader.3F
    It will capture existing skybox with proper intensity to use in Skylight. Don't use a tint color (leave it to white) and set intensity to 1.

    Tried with Bakery + without probes?
     
  6. Faikus

    Faikus

    Joined:
    Jan 3, 2011
    Posts:
    229
    Yes, with Bakery and without light probes the reflection probe was fine in this test. So it only happened if all three of the following are true: 1) Bakery 2) light probes 3) save scene
     
    guycalledfrank likes this.
  7. Daniel_Dickinson_RCad

    Daniel_Dickinson_RCad

    Joined:
    Apr 3, 2021
    Posts:
    9
    Thanks for getting back. I should clarify, we are not looking for a real-time solution. In ArchViz (& Automotive) most companies offer high-resolution rendered images for marketing purposes.

    Currently anyone doing real-time ArchViz either has to duplicate there scene in a rendering app (eg. 3DS Max/V-Ray) & re-setup all there lighting & materials to produce a render, or offer a rasterized image captured in-engine, which doesn't really hit the quality threshold for offline images, even with high-quality baked lighting. Some companies simply don't offer marketing renders & just supply a real-time PC or VR application.

    Ideally we can simply capture high quality path-traced images from our real-time setup, with all our lighting & materials in-tact & no additional setup. We have this working for the most part, but the process is pretty tedious. We currently have 2 problems we're facing -
    - We need to have our artists go through all of the lighting in the scene & match up the perceived real-time lighting to our baked lighting.
    - We'd like to automate the denoising step, currently we are taking the output images & denoising them with an aftermarket denoiser (Topaz AI).

    What we're after is to simply press a button & have all the bakery lights convert to real-time equivalents, then have an image be rendered, denoised & saved to disk at whatever resolution we require. Usually around 16k.

    Now we have reasonably strong programmers / technical artists. Given enough time we could probably solve these problems ourselves. I'd wager most ArchViz studios are comprised of artists though & do not have the resources to approach this problem.

    As to the specularity issue you raised, how are Unity handling it with the default path-tracer? Have they introduced a new pass specifically for path-tracing? I think a dedicated shader would definitely defeat the purpose here unfortunately.

    I'd also like to add, if you market this well, this is not just for the ArchViz & Automotive industry. Every game company needs high-res, high-quality images for there promo materials. If they're already using bakery, chances are they're targeting a reasonably high level of visual fidelity that would lend itself to path-traced rendering. If it could be used to render out videos for trailers, even better. They could even slap the "Rendered In Engine" tag in the bottom corner of the screen :).
     
    Last edited: Nov 16, 2021
    guycalledfrank likes this.
  8. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,120
    edit: nvm. Thanks!
     
    Last edited: Nov 23, 2021
    guycalledfrank likes this.
  9. roundyyy

    roundyyy

    Joined:
    Dec 23, 2019
    Posts:
    110
    I have problem to correctly bake paper thin double side plane meshes. Materials are marked as doubleside global illumination (usually this helps on built in lightmapper), also on bakery doubleside gi is set to 1. But one side is always very dark

    Thanks :)
     
    Last edited: Nov 18, 2021
  10. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,347
    I get black areas in RT Preview (Pathtracer), also lightmaps get affected (see cube):

    upload_2021-11-17_12-15-6.png

    Unity 2021.2.1.f1
    HDRP (problems caused from here? : No black areas on same meshes in Builtin Pipeline!)
    Mesh is properly unwrapped on UV2 in 3dsmax.
    No difference if I use Max or Unitys unwrapped UVs.
    No difference if I use XAtlas or Default.

    Black areas "jump" and change size when I change/adjust/reimport UVs.

    Also sometimes meshes are invisible in Preview and don´t recieve lightmaps although UVs are fine.

    Also Unitys primitives (Box, Sphere, etc) sometimes appear black in RT-Preview.

    Also I pasted my InvoiceNrs for Bakery and Preview into the patch window but I get "Incorrect lightmapper invoice"....
     
    Last edited: Nov 17, 2021
  11. mikeohc

    mikeohc

    Joined:
    Jul 1, 2020
    Posts:
    215
    I have a small light leak from a mesh. Tried disabling "Adjust sample positions" from the documentation, but still getting the same leak. Any idea on how it can be prevented?

    Screenshot (385).png
     
  12. Immersive-Matthew

    Immersive-Matthew

    Joined:
    Mar 24, 2020
    Posts:
    137
    I need a little help as I am unclear after reading the manual how I can make a Bakery Light only light objects on a certain layer. Any tips? I did implement a clunky workaround by adding a plane only rendered on one side facing the light I do not want to light up objects on the other side but this works but may not work in all situations. Someone on the Discord mentioned Bitmasks but after playing arounf with it, I was unable to get it to work. I assumed the Bitmask number relates to the layer number but this seems to not be the case no matter the combo I tried? How would I use Bitmask so light A only shines on object B and not C?

    Is sectors maybe what I am looking for?

    Thanks for the help.


    BTW...The baked results with Bakery is MILES better than the Unity one. Need to replace all my baked lights now with it.
     
    guycalledfrank likes this.
  13. FoxUmkov_POP

    FoxUmkov_POP

    Joined:
    Nov 6, 2018
    Posts:
    12
    Hello is there any way to run several baking light processes at the same time? I’ve tried to do this but one process interrupts other one. I need to use my graphic card resource maximally but one baking process uses about 9% of it.
     
  14. azganmtgo

    azganmtgo

    Joined:
    May 3, 2020
    Posts:
    12
    Okay so I have this:
    2021.2 bakery does not seem to work very nice. I seem to have all black lightmaps do you know if this issue was fixed?
     
  15. Immersive-Matthew

    Immersive-Matthew

    Joined:
    Mar 24, 2020
    Posts:
    137
    I cannot speak to the Bakery as I just got into it and am getting great results in 2021.1.17f1, but I did want to say that I was briefly on 2021.2.x and the Unity light baking and even real time lights were a total mess so perhaps Bakery is also suffering from whatever is going there?
     
  16. azganmtgo

    azganmtgo

    Joined:
    May 3, 2020
    Posts:
    12
    Yes, it's really messed up, but it looks really good and performs really well too :) I'd like bakery to support asap
     
  17. Immersive-Matthew

    Immersive-Matthew

    Joined:
    Mar 24, 2020
    Posts:
    137
    That is interesting as while I found the editor's performance to be better, the builds took 4x longer. How are your builds in 2021.2.x?
     
  18. AliceWasNeverHere

    AliceWasNeverHere

    Joined:
    Aug 16, 2021
    Posts:
    11
    Hi Frank,

    Thanks for your simple, easily understood instructions. I'm amazed at your service level and the Bakery asset is proving to be exceptionally valuable beyond the sticker price in terms of build quality and time savings. I've only had it for two weeks, but already can't imagine giving it up.

    One thing I'm still having trouble with is reflection probes, though I know it's not your asset causing the problem. "Nearly" every time I click Render Reflection Probes after a successful bake, Unity removes the Bakery lightmaps from "Lighting > Baked Lightmaps" and starts a fresh GI bake with the following warning:

    Lighting data asset is incompatible with the current Unity version. Please use Generate Lighting to rebuild the lighting data. Realtime Global Illumination cannot be used until the lighting data is rebuilt.

    I'm using Unity 2020.3.22.f1 with Bakery 1.9 and the latest GitHub patches. Do you suggest a newer version of Unity than the latest LTS or have any idea where I should look to solve this problem? I just began teaching myself 3D modeling and game design in August, so the shear number of checkboxes and sliders and dropdowns (oh, my!) still overwhelms at times. Just figuring out the right questions to ask is stretching my Google-foo to its limits (which I love).

    If it's relevant, my project has an always-loaded "main" scene with environment, terrain, fps player, etc. There are also interior scenes (floors) within a high-rise building to be loaded additively on demand at runtime with a persistent elevator scene to move between them.
     
    guycalledfrank likes this.
  19. Friks

    Friks

    Joined:
    Jun 29, 2014
    Posts:
    4
    I'm running 2021.2.3f1 also and am encountering the Lighting data asset is incompatible with current Unity Version.
     
    AliceWasNeverHere likes this.
  20. Marco-Sperling

    Marco-Sperling

    Joined:
    Mar 5, 2012
    Posts:
    620
    Trying to get the latest version from github results in this error printed to the console:

    Code (CSharp):
    1. Curl error 18: transfer closed with 323151 bytes remaining to read
    2. Download error (bakery-csharp)
    3. UnityEngine.Debug:LogError (object)
    4. ftUpdater:DebugLogError (string) (at Assets/Editor/x64/Bakery/scripts/ftUpdater.cs:48)
    5. ftUpdater/<DownloadItem>d__13:MoveNext () (at Assets/Editor/x64/Bakery/scripts/ftUpdater.cs:68)
    6. ftUpdater/<DownloadItemIfNewer>d__15:MoveNext () (at Assets/Editor/x64/Bakery/scripts/ftUpdater.cs:134)
    7. ftUpdater/<CheckProc>d__16:MoveNext () (at Assets/Editor/x64/Bakery/scripts/ftUpdater.cs:160)
    8. ftUpdater:CheckUpdate () (at Assets/Editor/x64/Bakery/scripts/ftUpdater.cs:241)
    9. UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
    Any idea what's wrong?
     
  21. RobOuellette

    RobOuellette

    Joined:
    Jun 5, 2018
    Posts:
    10
    Yo!

    I have a few questions / possible bugs with the Bakery integration into Better Lit (from what I read - I should be asking you these + not Jason!)

    Most critically, it seems mask maps aren't respected when the Bakery stack is toggled on so AO, metallic and gloss isn't used. Lightmap specular still seems to function, but when I crank the reflection probe intensity up to sanity check - it has no effect on any object that's using the Bakery stack. I'm in crunch mode and praying this is one of those ez things I can fix or patch in my end. :(

    Another weird thing I noticed was that behavior using alpha clip/cutout when baking doesn't match Bakery Standard or Unity Standard when it comes to casting shadows (but this is currently solvable by just switching to standard for the bake so definitely not a blocker!)

    Thanks!
     
  22. megatonmedia

    megatonmedia

    Joined:
    May 9, 2015
    Posts:
    15
    Just got Bakery and converting my scenes to Bakery lights, but what do I use for Area Lights? Area lights aren't mentioned in the manual and I use a lot of them.
     
  23. megatonmedia

    megatonmedia

    Joined:
    May 9, 2015
    Posts:
    15
     
  24. AliceWasNeverHere

    AliceWasNeverHere

    Joined:
    Aug 16, 2021
    Posts:
    11
    This is the answer Mr F gave me above, which works great. Good luck with your project!
     
    guycalledfrank likes this.
  25. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,120
    Any chance we can get a color temperature for bakery lights in HDRP?
    For HDRP lights we only use temperature for lights, marked physical values -- hard to replicate that in color.
    One thing I miss from HDRP lights. Clicking match lightmapped to light doesn't pick up the temperature of course.

    upload_2021-11-24_9-33-43.png
     
    Last edited: Nov 24, 2021
  26. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,628
    Will test it as soon as it stops crashing.

    Without specularity, it is possible to implement.

    The HDRP one? All HDRP shaders/graphs are based on the same shader core. Unity can change the core to make it compatible with what they want, as graphs are not complete shaders, but just provide surface data.
    Patching core HDRP shaders is very risky business, as they're frequently updated, so it can easily break.

    Is it two-sided geometry or single-sided geometry with a two-sided shader? Bakery's "Backface GI" will solve the latter, but not the former.

    Weird! Can you send me a test project? Would like to debug it.

    Make sure to register here first: https://geom.io/bakery/github-access-rtpreview.html
    Patcher uses the database which is first populated through these forms.
    This workflow is awkward indeed, it just happened to be this way because the patcher was just a bonus on of top of the "register on github and download" thing... I'll do something about it.

    Hmmm. Depends on scene geometry/UV layout, although generally shouldn't happen. Can't say the reason for sure, some sample project/unitypackage would help a lot, this is something I'd rather try to prevent on the lightmapper side. The dumbest quick fix is just to place some black box behind the wall, disable its renderer, set its "scale in lightmap" to 0 and put a BakeryAlwaysRender component on it. It'll block any lighting without having much baking cost by itself or taking any lightmap space.

    You can:
    - Put Bakery Lightmap Group Selector on the objects you want to light with this specific light.
    - Create a new Lightmap Group via its interface. Set its resolution to something sensible (it'll make a separate lightmap of this size for these objects, disregarding Texels Per Unit) and make sure that Packing mode is set to "Pack Atlas".
    - On the group, enable some flag, say "1", in its bitmask:

    upload_2021-11-24_18-35-7.png


    - On the light, set bitmask to "1" only:

    upload_2021-11-24_18-35-56.png

    - Bake.

    By default all lights and all new groups (and ungrouped objects) have the "0" flag set. Lights only affect the groups having at least on of the shared flags. By setting the light bitmask to "1" you are excluding it from everything BUT your special group. As your group also has "0", all default unmodified lights will also affect it.

    Also note that GI is still global. If a particular object is lit by its own masked light, it can still bounce indirect lighting from this light to the rest of the scene.

    Thanks! :)

    Are you sure it's constant 9% and not spikes of high usage with some interruptions? Having a lot of Light Meshes (area lights) may cause that (a lot of job switching), and this is something I'll have to fix. Other light types don't have this problem.
    I never tested running multiple bakes at the same time before. Actually, I think it's kinda possible using the remote server functionality (on the same machine) and using different directories to store each scene's temp data. But the amount of steps you'd need to take to get it to work is currently large.
    I'd rather make sure that you can render with > 9% utilization, so it's interesting to learn more about the kinds of lights used in your scene or geometric complexity.
    Also make sure that you're not using very low Tile Size value (definitely not lower than 512) (or "GPU priority" in simple settings mode).

    2021.2 doesn't work in general.

    Thanks!

    Tried:
    - Created a simple scene in 2020.3.2.
    - Baked it.
    - Clicked "Render reflection probes". Got "Lighting data asset ‘emptyLightingData’ is incompatible with the current Unity version", but it's okay. Probes are baked. Baked lightmaps are still there:

    upload_2021-11-24_19-43-5.png

    - Tried the same thing, now also with light probes in the scene (default L1 mode) - still worked.

    Must be something about your project/scene settings? I'm not sure. If there is any example project I can test, please send.
    Make sure to use Bakery's own "Render reflection probes" button, not Unity buttons (these CAN make Unity to start baking its own lightmaps).

    Are they all loaded in the Editor?
    Tried the same test, now with 2 scenes... still worked :confused:

    The message itself is harmless. I've never seen it affect anything. Apparently some parts of the asset are incompatible, but these parts are unused.

    Looks like a download problem. Is your internet OK? Does it happens like this every time you try?
    You can also try downloading patches manually, without using the patcher: https://geom.io/bakery/wiki/index.php?title=Github_access

    Probably not. I barely understand how his whole shader system is wired together. Last time I tried to debug it, I didn't manage to rebuild the thing from sources, so Jason is a better bet here. My part of the code provides diffuse/specular GI, but it doesn't know anything about "mask maps", etc. Further code must properly mix it somewhere.

    https://geom.io/bakery/wiki/index.php?title=Manual#Bakery_Light_Mesh

    Added it some time ago. Can you try patching? https://geom.io/bakery/wiki/index.php?title=Github_access
     
    Last edited: Nov 24, 2021
    Marco-Sperling and PutridEx like this.
  27. AliceWasNeverHere

    AliceWasNeverHere

    Joined:
    Aug 16, 2021
    Posts:
    11
    In case you copy/pasted the invoice number like I did, double check that you didn't get a space included at the beginning of the number like I did. It took me a moment to recognize this was the problem with mine. :p
     
    guycalledfrank likes this.
  28. tng2903

    tng2903

    Joined:
    Apr 8, 2013
    Posts:
    41
    Hello @guycalledfrank, i'm learning Bakery and can't seem to figure out why my scene are not blacked out after disable the lights

    This is the scene's setup
    upload_2021-11-25_10-2-37.png

    And this is the scene before baking, blacked out
    upload_2021-11-25_10-3-12.png

    The same scene after baking
    upload_2021-11-25_10-3-49.png
     
  29. strongbox3d

    strongbox3d

    Joined:
    May 8, 2012
    Posts:
    860
    Hello guycalledfrank,

    Bakery is an awesome tool for light mapping as everyone already know by now. In Unity 2019.4.16f1 I got wonderful light maps with around 20 mbs size total. However I just upgraded my Unity to 2020.3.10f1 and the exact same light maps now have a size of 80 mbs total without changing any parameters in the Bakery window.

    Is there something that I am missing that could help me to bring the size down to what it was without having to downgrade so much the quality of the bake?

    Does anyone knows what makes the bake files size go up in size so much and how to fix this?

    Regards,
    Carlos
     
    guycalledfrank likes this.
  30. Marco-Sperling

    Marco-Sperling

    Joined:
    Mar 5, 2012
    Posts:
    620
    Maybe you were using compressed lightmaps in former versions of Unity. There's a checkbox in either bakery or on the final lightmap assets that you can check to see if this helps.
     
    guycalledfrank likes this.
  31. TriangleJel

    TriangleJel

    Joined:
    Sep 24, 2021
    Posts:
    7
    Is it possible for having a spot light to be more than 179 degrees?
     
  32. Friks

    Friks

    Joined:
    Jun 29, 2014
    Posts:
    4
    It disables all realtime lighting in the scene, so it basically renders the asset unuseable. Not quite sure what I can do about it -- it is related to reflection probes in some way because probeless scenes seem to work just fine.
     
  33. strongbox3d

    strongbox3d

    Joined:
    May 8, 2012
    Posts:
    860
    Hello Marco-Sperling,

    I didn't changed anything actually, I didn't even re-baked the light maps, I just openned a file baked using 2019 in 2020 and the file size of the light map was almost doubled. Then when I re-baked using the same settings still the size of the light map was doubled.

    Regards,
    Carlos
     
  34. knxrb

    knxrb

    Joined:
    Dec 16, 2018
    Posts:
    21
    Is there much demand for Bakery to work with AMD cards yet? I'd like to add myself as a +1 for that request please
     
  35. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,012
    It uses NVIDIA apis, so I don't think it's very possible without completely completely reimplementing big parts of the lightmapper.
     
  36. NotQuiteSmith

    NotQuiteSmith

    Joined:
    Oct 27, 2013
    Posts:
    92
    Hi,
    Could anyone post a workflow for baking prefabs? Specifically, how to use a temporary scene in which to bake each prefab.

    My workflow (1-10 included just for reference, the issue is described after them below):

    1) First time, I created and saved an empty scene - tmp\bakeprefabs.unity, in which to build/edit prefabs. Create a parent game object and add children: floor plane, single cube and point light source (enable shadows, mixed mode).
    2) Mark everything static
    3) Add "Bakery Point Light" to light
    4) Add "Bakery Lightmapped Prefab" script to root game object. (Note this displays "Error: this GameObject is not a prefab" - I assume that's OK for now?)
    5) Drag game object to a folder to create prefab.
    6) Click on game object in scene, "Bakery Lightmapped Prefab" now displays "Prefab Connection: OK"
    7) Open the main "Bakery" window, default settings, click "Render". Warns that prefabs will be overwritten and saves scene.
    8) Shadows look good. Moving the cube shows shadows are baked (undo to put cube back).
    9) Disable the in-scene prefab, then drag in the prefab again. Should be baked OK. Baking doesn't show when you double-click into the prefab!
    10) To change baking, double-click into the prefab (or edit it in scene?) then click the "overrides" dropdown and click "Apply All" to update the prefab. Then bake the scene again and the prefab will be updated with the new lighting.

    Given that the above steps work OK, I now delete the prefab in the bakeprefabs.unity scene and construct another prefab, using some of the same assets as the first prefab, etc.

    Now, when I bake this new prefab (using steps above) the lightmaps affect those from the FIRST prefab because they use the scene name in the lightmap filename. i.e. PrefabLightBakingBakery_LM0_final.hdr, etc.

    Is the scene name important? I'm wondering why it's part of the lightmap name. I've got the workflow/understanding wrong somewhere perhaps! Should I be using the "OutputPath" in "Advanced Settings" to direct the output to a subfolder named per prefab (to keep them separate)? Or the "use scene named output path"? I guess I'm just not sure how the "scene name" in which I bake prefabs is tied to the prefab itself (surely prefabs go in any scene that requires them?)

    What IS the correct workflow to bake multiple prefabs without having to check I've used the same scene name before?

    Thanks!
     
    Last edited: Nov 28, 2021
  37. FoxUmkov_POP

    FoxUmkov_POP

    Joined:
    Nov 6, 2018
    Posts:
    12

    Hello. We test Nvidia Tesla V100 and RTX 3060 are at the same baking time level. On the utilisation curve of both cards there are periodical jumps to 100% We concerned that there are periodical tasks and thought that we could run more processes to use card at 100%.
    As for lighting in scene we mostly use Light Meshes about 50-100 sources per scene. 100k - 500k triangles in scene meshes. Tile size set up to 512.
    Thanks for tip about using remote server functionality, we'll have to try this.
    Do you have any idea when the bug will be fixed?
     
    guycalledfrank likes this.
  38. Tsumitsuki

    Tsumitsuki

    Joined:
    Feb 13, 2021
    Posts:
    1
    I have the problem that my old machine died and with the new one some directories have changed.
    Now Bakery gets stuck at 55% cause it can't find certain things since the path of the project changed.

    Manually creating and copying the files to said missing path didn't resolve the issue.
    Any idea to solve this?

    Already tried:
    - reimporting bakery
    - deleting everything from bakery, removing it from the project settings, and reimporting it
    - moving said folder to the old missing path
    - moving the whole project to the old path

    upload_2021-12-1_9-41-44.png
     
    Last edited: Dec 1, 2021
  39. Zoidberg656

    Zoidberg656

    Joined:
    Sep 26, 2018
    Posts:
    16
    This is a question about the L1 light probe option for baking the lightmaps and probes at the same time for accuracy.

    Is there a way to bake a light probe group with a render sector when you have a large map and only need to bake a specific area with its own light probe group instead of rendering the entire map with the main render button?
     
  40. BroVodo

    BroVodo

    Joined:
    Oct 2, 2012
    Posts:
    52
    RTX mode isn't in available all versions of Unity that this asset says it supports.

    Does this mean I can't use certain versions of Unity with Bakery if I have an RTX card?

    If this is the case, please make sure this limitation is noted on the product page and in the manual.
     
  41. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,628
    Hmm doesn't look like the result of light baking. How do your baked lightmaps look (Window->Rendering->Lighting Settings->Baked Lightmaps)? They're likely black. What you see is probably an unbaked reflection probe (click Render Reflection Probes and Update Skybox Probe?).

    Interesting. Are you sure it's the same Bakery version, just a different Unity version? Different Unity surely can have slightly different unwrapping results, but I'm not sure it can give such a big difference. How many files are there before/after? Is it possible that there are somehow just different lightmap versions of the same baked scene, in different folders? Also enabling Checker Preview should print "Lightmap count with current settings" to console. Is it different before/after?

    Oh, now that's weirder than I thought. What number are you looking at exactly? Is it something in the Profiler? Possibly there is a bug or a precision improvement in the Profiler itself? Profiler can also do a detailed memory capture, showing exactly how much every asset takes. I wonder what's the difference here before/after.
    Maybe it somehow changed the lightmap compression/encoding during project updating? E.g. went from DoubleLDR to RGBM? The format/encoding is printed on the lightmap asset previews.

    I didn't do it because Unity doesn't support it (in real-time), so such lights couldn't be used as mixed. IES lights can handle any degree though. What is your use case?

    What does it disable exactly? Real-time lights with existing Bakery components? Real-time lights without the components? Light probe lighting?
    When baking lights having both Unity + Bakery components, and in Full Lighting mode, or if Baked Contribution is set to "Direct and Indirect", such light is considered fully baked, just like if you marked it as "Baked" and rendered using Progressive. Fully baked lights are assumed to only exist in lightmaps and light probes. You probably need some sort of mixed lighting, like:
    - Bake GI only, keep direct contribution real-time. To do so, change Render Mode to Indirect and make sure that Baked Contribution is set to "Indirect only" on the light.
    - Bake GI and shadows from static objects. Change Render mode to Shadowmask, make sure that Baked Contribution is set to "Indirect and Shadowmask" on the light. This way only dynamic objects will cast real-time shadows.

    How did you configure your lighting pre-Bakery?

    Yeah currently I don't see a good substitute for OptiX. There is FireRays aka RadeonRays, but it barely has any features (at least last time I checked). I believe Unity's Progressive is using some highly customized proprietary version of it.

    Yes, I'm not sure how the "double-click into prefab" thing works. Bakery's prefab baking function was made before it existed, so it wasn't designed/tested with this in mind, and I'm not exactly sure where to start. Also not sure how often people are working in the double-click view (personally I do everything in the "normal" scene, then apply the overrides).

    You don't need to double-click to apply, it can be done in Inspector:

    upload_2021-12-2_16-48-17.png

    Yeah... There is a catch. Lightmap names are indeed based on the scene name. I've just added this to the docs:

    https://geom.io/bakery/wiki/index.php?title=Manual#Bakery_Lightmapped_Prefab

    upload_2021-12-2_16-56-5.png

    ... it is also possible to just bake all prefabs at once, in the same scene, just moving them far apart (in case there is enough memory for it).

    Right, explains it. I will soon work on the job switching optimization when using many Light Meshes. For now, if it's possible, you can create a single combined mesh of many light meshes and use it as one. I.e. a single mesh consisting of 10 quads (or other shapes), using a single Light Mesh component with 10x samples will bake much faster than 10 separate Light Meshes (only increase "samples far", don't increase "samples near").

    Not sure what is this error exactly, can you try getting the latest patch? https://geom.io/bakery/wiki/index.php?title=Github_access
    At least it will point to the proper line number.

    Currently not, Unity doesn't support multiple light probe sets in the same scene. Light probe groups only exist as lightmapper inputs; after the scene it baked (with any lightmapper), it can only use one probe grid for the whole scene. It only recently gained the ability to combine different light probe sets from different scenes. So if you bake different areas in different scenes: yes, they can be loaded together, if this is called afterwards: https://docs.unity3d.com/ScriptReference/LightProbes.Tetrahedralize.html
    Bakery Volumes have no problems being baked in Sectors, as they don't rely on this system.

    Bakery's RTX usage doesn't depend on Unity version. Bakery is a separate executable, so it can use RTX even if you're on Unity 5.6.
     
    NotQuiteSmith likes this.
  42. FelipeFormoso

    FelipeFormoso

    Joined:
    May 31, 2021
    Posts:
    4
    Hello! I'm having this issue when baking the light in a scene, the scene was previusly lit and I just wanted to add the bakery plug in to the lights so I can bake faster. But whenever I bake the lightmaps come out completetly black or blue/purple. Maybe it has something to do with the intesity?
    Thank You!!!
     

    Attached Files:

  43. roundyyy

    roundyyy

    Joined:
    Dec 23, 2019
    Posts:
    110
    Is there any way to light up whole scene interiors globally? I don't want to place hundreds areas lights or point lights On built in lighmapper I was using second baked directional light with shadows off and low intensity. But it seems like bakery bakes shadows on directional light with shadows off. What am I missing? Thank you
     
  44. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,628
    Super weird. Are you on HDRP? If so, make sure to check HDRP-related notes: https://geom.io/bakery/wiki/index.php?title=Manual#Notes_on_HDRP.2FURP

    If not, what are your light intensities? With very high intensities I recommend using OptiX 7 denoiser.

    Yes: https://geom.io/bakery/wiki/index.php?title=How_do_I...#How_do_I_add_fake_ambient_lighting.3F
    Basically "shadow samples = 0" disables shadows on direct/point lights.
     
    roundyyy likes this.
  45. roundyyy

    roundyyy

    Joined:
    Dec 23, 2019
    Posts:
    110
    Excellent! sorry I missed that one
     
    guycalledfrank likes this.
  46. Immersive-Matthew

    Immersive-Matthew

    Joined:
    Mar 24, 2020
    Posts:
    137
    @guycalledfrank I wanted to put an issue on your radar and provide you will details to see if you can determine what is going on with a mysterious green render issue. As you can see in the 2 screenshots, one of them looks all green when it should look sunny as in the second photo. This green look impacts all scenes in my project, yet I have no green lights (especialy one that would cover all scenes across a massive area) and am not using skybox lighting. A bit of background. I have nearly 200 scenes in my project and it was baking fine with your wonderful tool for a long time with no issues. Then suddenly everything went green one day and no matter if I cleared the cache or deleted the lightmaps, it would still render all scenes as green even with very low or high bakery settings. If I baked just one scene it was fine, other than one particular scene that no matter what, always rendered green and made everything green if I rendered other scenes with it. I focused in on this scene and narrowed it down to one particular light. I am not sure why this particular light was causing the issue as it is the same as several others just like it and nothing special in terms of its setup. I had to remove it, and recreate which solved the issue. Now it is a couple of weeks later and suddenly it occurs again but this time it is not a light in the same spot as last time. As you can see the resulting lightmap is completly green (see attached reduced and converted to jpg sample). I am on Unity 2021.1.17f1, URP with the latest Bakery code from GitHub with an AMD 3900x CPU and an nVidia 3090 GPU. I am happy to work with you to investigate and get to the bottom of this. It is not a show stopper for me as I seem to be able to get around it, but it is taking up a fair amount of time (a day) each time it has occured. I appreciate any assistance here. I would also add, that djsoapyknuckles on your Discord mentioned they had the same issue with the bakery standard shader in 2018.1.9f2 that you can read here: https://discord.com/channels/648434698825236481/648434699785601027/916433813163343872

    Thanks for your help
     

    Attached Files:

    Last edited: Dec 4, 2021
  47. Immersive-Matthew

    Immersive-Matthew

    Joined:
    Mar 24, 2020
    Posts:
    137
    A follow up to the above, I found the offending light that was causing the green issue this time and it was a differnt light than last time interestingly. Took me hours to find as I have over 800 lights. I captured a video for you to show the scene being rendered with it resulting in green and without that light resulting in a correct bake. You can make out all the details of the light in the video too which I hope gives you some insights (it has been time indexed). You can find the unlisted video here: here:


    As you can see, there is nothing special about this light, yet it causes the entire scene to go green and all other sences loaded at that time. There has got to be a bug somewhere here, perhaps in Unity itself as OMG, I feel like I am constantly fighting with it over things similar to this.

    Feel free to request further details as needed as I really would like to resovle this.
     
    Last edited: Dec 4, 2021
    guycalledfrank likes this.
  48. Immersive-Matthew

    Immersive-Matthew

    Joined:
    Mar 24, 2020
    Posts:
    137
    One more thing for @guycalledfrank.

    I saw you suggesting on the Discord to move ftDilate from Bakery to Plugins to get past build failure issues and if that did not work, to just remove it. Moving did not work for me but deleting it did. Thank you. That said, my bakery renders kept getting stuck at Exporting scene - Shaded surface colors and would crash Bakery until I restarted Unity. As soon as I copied this file back to Bakery, it baked fine again. Is there a more elegant way to deal with this, or will I have to delete and copy back each time? Thanks again for the support.
     
  49. AliceWasNeverHere

    AliceWasNeverHere

    Joined:
    Aug 16, 2021
    Posts:
    11
    Do Bakery and the RTPreview recognize when they are fully patched from the GitHub repo? It seems I've clicked to check for updates an inordinate number of times and get the "restart to apply patch" every single time. Each restart after a patch check also provides an "Apply patch?" dialog.
     
    Last edited: Dec 6, 2021
  50. andreyefimov2010

    andreyefimov2010

    Joined:
    Oct 29, 2017
    Posts:
    44
    Got some interesting results with the Optix 5 denoiser (with HDRP 11):
    upload_2021-12-6_0-5-18.png

    Switching to OID fixed it for me:
    upload_2021-12-6_0-6-19.png

    But overall pretty happy with how it works with HDRP (was getting weird sky/exposure issues before) but still would be nice to have an official HDRP example from Bakery devs to provide the recommended/optimal settings
     
    Last edited: Dec 5, 2021
    KYL3R and guycalledfrank like this.