Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

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

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

  1. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    No idea what you mean. The files are on a Synology NAS and I'm accessing it with Windows 10 via explorer (SMB2 fileshare full access). There's 3 Terabyte free space and on my local pc there's 350GB free space
    I dont even know what HDR file its talking about as I dont have any HDR files in my scene. I thought maybe its an HDR file Bakery generates for some purpose.
    upload_2020-1-17_16-18-50.png

    That doesnt work, No matter what mode I set Bakery and/or Unity to, as soon as I click Render in Bakery and it starts doing its thing, Unity swops the light to Subtractive and gives a message that "Shadowmask" is not supported by current Unity render pipeline

    Cool, thanks I got access to that. How do I use the bakery-csharp and bakery-compiled repos to update my installed version of Bakery?

    Can I just save it anywhere and then in Unity 2 times import a custom package (1 csharp and 1 compiled) and it will overwrite the one I have installed?
     
  2. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    Fist class support! Made my day! GG Poesie.
     
    guycalledfrank likes this.
  3. cbboyer

    cbboyer

    Joined:
    Jun 2, 2014
    Posts:
    20

    Is this package available t download? Did I miss the link in your comment? Amazing work!
     
  4. cbboyer

    cbboyer

    Joined:
    Jun 2, 2014
    Posts:
    20
    Frank + Keeponshading,
    I'm having a hard time getting set up with Bakery in HDRP (2019.3.0f3, same config as your questions above keeponshading). Trying to track with your conversation about Shadergraph, but I can't really figure out how to get set up with a proper Bakery SH material. I only see the bump map visible in the inspector when I select the Bakery SH materials on import.

    Can one of you guys walk me through the specific steps to create an SH-ready material within HDRP, where I can add color, normal, metallic, height, and AO? Serious thanks in advance...
     
  5. Lt-Hamster

    Lt-Hamster

    Joined:
    Feb 19, 2013
    Posts:
    6
    Hello!

    We're running into a bit of an issue. We have a fence edge piece, which is just a quad obj, that refuses to be baked correctly. It is consistantly being blown out with a blue color. This only happens on two of our teams computers. On the original computer that baked it, everything looks fine. This is one of two objects that have issues in this scene. But in other scenes they bake just fine.

    blown_out_and_good_fence.PNG
    Example of the issue is above. The right side edge is blown out while the edge on the other side works ok sometimes. Ignore that the texture doesn't line up, we attempted manually adjusting UVs.

    We've tried clearing Unity's GI cache, we've removed Bakery's temp files, we've removed all Bakery files and reinstalled them, used Unity's UV unwrapping, and unchecked Unity unwrapping. All without luck.

    Any light you can shed would be great.
     

    Attached Files:

  6. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    Here an nice SG clone of the HDRP Lit with Bakery SH bake injection.
    There is an dowload attached to the post.
    https://forum.unity.com/threads/bakery-gpu-lightmapper-v1-65-released.536008/page-76#post-5289132

    So it needs same textures as the HDRP Lit.
     
    Last edited: Jan 18, 2020
    guycalledfrank likes this.
  7. E-Cone

    E-Cone

    Joined:
    Jul 4, 2013
    Posts:
    46
    I've finally managed to assemble a bakery-based runtime RNM lightmap/lightprobe switching system and added a small hack for reflection probes. So now I can squeeze much more juice from LWRP and Oculus Quest :D
     
    guycalledfrank likes this.
  8. Daugvydas

    Daugvydas

    Joined:
    May 23, 2019
    Posts:
    2
    Problem NR. 1
    Hi, I'm working on a project that uses same fbxes in multiple scenes. When I bake one of the scenes, the fbxses that are also in onother scenes seem to lose their place in generated UV map. (basicly baking one scene, ruins onother scenes bake) I tried baking with both "adjust UV padding" enabled and disabled. This problem mostly occures when I bake the scene as a LIghtmaped prefab in one PC and trasfer it as a Unity package to another computer. The imported scene ruins other scenes lightmap UV.

    Problem NR.2
    Baking bigger scenes as a whole is most of the time not possible as I get failed memory alocation , (out of memory error), I dont seem to find what setting might cause this. I tried to lower tile size and so on, maybe you have some advices with that, I seem to be able to bake bigger scenes on lower rezolution. (Settings in which I was able to bake)
    upload_2020-1-22_17-19-53.png
    upload_2020-1-22_17-17-49.png
     
  9. cbboyer

    cbboyer

    Joined:
    Jun 2, 2014
    Posts:
    20
    This looks incredible for Quest. I'm working on an archviz scene, to have the ability to switch lights on and off would be amazing. Is this an extension of the plugin on the Bakery wiki? Any chance you'd share?
     
  10. cbboyer

    cbboyer

    Joined:
    Jun 2, 2014
    Posts:
    20
    Thanks for the info KOS - I did manage to download that originally but couldn't get it working. I need to up my Shadergraph game, I'm trying to utilize the Autodesk shader that uses separate metallic/height/AO, instead of the single mask texture. But to connect that to the SH Bakery is still out of my grasp. Anyways, thanks for your insight and for prepping that material package.

    Just to ask again - is that extension package with the foliage available anywhere? Would love to take a look at it if possible. I can tell you spent time working on it, much appreciated for the effort.
     
  11. kevojo

    kevojo

    Joined:
    Apr 25, 2017
    Posts:
    12
    UnauthorizedAccessException: Access to the path "Assets/Editor/x64/Bakery/shaderSrc/ftrace.cginc" or "C:\Program Files\Unity\Hub\Editor\2019.2.0b7\Editor\Data\Managed\UnityEngine/../../CGIncludes//ftrace.cginc" is denied.
    System.IO.File.Copy (System.String sourceFileName, System.String destFileName, System.Boolean overwrite) (at <a8ed250850854b439cedc18931a314fe>:0)
    ftShaderTweaks.CopyInclude (System.String shadersDir) (at Assets/Editor/x64/Bakery/scripts/ftShaderTweaks.cs:63)
    ftShaderTweaks.OnGUI () (at Assets/Editor/x64/Bakery/scripts/ftShaderTweaks.cs:257)

    I'm getting this issue while trying to use the shader tweaks menu. Found someone else had the issue in 2018, but as far as I could trace, it was never resolved. I tried opening unity as Admin, made no difference.
     
  12. Tudor

    Tudor

    Joined:
    Sep 27, 2012
    Posts:
    150
    Hey @guycalledfrank I'm getting these black spots on surfaces that are supposed to not be occluded. I can tell it's somehow because of the geometry and the lightmap UVs, but can you help explain what's going on? Why are the lightmap UVs diagonal for instance? (increasing the lightmap resolution doesn't fix it)

    Cheers.

    bakery diagonal uvs.png
     
  13. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,666
    It is the final lightmap file that Bakery tries to save to your output folder.

    Could be the problem. Maybe some Windows I/O APIs can't understand NAS folders. I never tested it.
    If you are going to try this again:
    - Replace this file (Assets/Editor/x64/Bakery/ by default): https://drive.google.com/open?id=1zCmGZbje2id_n0zF6zqz0yNuwC3suXQF
    - If you get the error, you will now see a popup message with the error code
    Tell me the error code as it will give the clues to fix it.

    Actually it doesn't seem like Unity allows changing this option via scripting at all. I only change it on the lights. The way it resets might be related to lighting data asset swapping or some editor/engine bug, I'm unsure. You should be able to set it again after bake, as it doesn't affect bake results.

    There is a picture with instructions where to copy each folder if you open my link.

    The latest HDRP shadergraph package is here: https://drive.google.com/open?id=1E8pbDnFbNlvmilJ83lAwJHkU3pOe_2pF

    It has subgraphs that can be dropped into any other shadergraphs and example shadergraphs that demonstrate how to connect these subgraphs to the output.
    For SH, the related subgraph is BakerySH.shadersubgraph and the example shadergraph is BakerySHGraph.shadergraph. As you can see, BakerySHGraph is mostly empty and just has the subgraph dropped into it and connected to Baked GI output:

    upload_2020-1-24_14-28-7.png


    Albedo, metallic, gloss, etc are untouched in this example, but you can extend it in any way that you like and which shadergraph nodes support. E.g. create a "sample texture 2D" node with albedo and connect it to BaseColor, etc.

    If you can find any existing shadergraph that has all the parameters you need already hooked up, you can extend it with BakerySH node, by connecting it to Baked GI output and leaving everything else untouched.

    Note that "Baked GI" output is for some reason not visible by default in newly created shadergraphs, in which case you need to press the little gear button and enable "Override Baked GI":

    upload_2020-1-24_14-33-7.png

    ...or download this :)

    That's odd, but it is especially interesting that the blown up part lines up exactly with your albedo/alpha map discontinuity. Possibly a part of the fence is unwrapped differently from the rest, possibly overlapping. Are you using your own prepared lightmap UVs or automatic ("generate lightmap UVs" checkbox)?

    These steps won't ever change anything.

    Maybe try sending me some intermediate files to debug them:
    - Make sure this is the last scene you baked
    - Go to Bakery's temp folder (default is C:/Users/You/AppData/Local/Temp/frender)
    - Send vbtraceTex.bin and ib32.bin

    Niiice!

    Known: https://geom.io/bakery/wiki/index.p..._in_one_scene_breaks_its_UVs_in_another_scene

    If disabled in both scenes, should work (i.e. stop changing UVs in any way).

    Can be another issue: https://geom.io/bakery/wiki/index.p...2Fother_version_control_system_with_Bakery.3F

    What is your VRAM size vs scene size?
    Note that bounces don't use more memory (only take more time), so you can increase them.
    The resulting image looks OK to me, and for large terrains, I'd say, 5 texels per unit is a pretty good value. Note that you can increase resolution on important objects (e.g. a particular building) by changing per-renderer Scale In Lightmap.

    Opening Unity as admin was the way to fix it. I guess it might not work now because of the mandatory Unity hub? Like, you probably only run the hub as admin, but not the editor itself. I'm not sure what to do about it, as shader tweaks rely on patching engine shaders which lie in Unity Editor's CGIncludes folder. If your user rights are set in a way to deny any access from Mono to CGIncludes path, it won't be able to patch them. Possibly installing the editor to some non-ProgramFiles location that doesn't need special user privileges for write access can resolve it.
    It would be nice if Unity allowed to override built-in shaders per-project, but it is not possible for now.

    Only authors of Unity's unwrapper can tell.

    This weird diagonal vs straight intersection is likely the issue. Maybe try
    - Angle error = 0?
    - xatlas?
    - pre-autounwrap in any modeling package?
     
    Last edited: Jan 24, 2020
    keeponshading and cbboyer like this.
  14. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    @guycalledfrank I do not see the picture you are referring to. Where do I get the picture?
    on Git I see bunch of scripts and files, dont see any pictures with instructions

    Basically I need some help here please. I have not been able to bake a single lightmap with Bakery since purchasing!
     
    Last edited: Jan 24, 2020
  15. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    @guycalledfrank After replacing that HDR file you sent via googledrive, I get:

    ERROR: 0x80070001

    upload_2020-1-24_16-27-43.png
     
  16. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,666
    Can you see this one?

    upload_2020-1-24_22-21-33.png



    Hmmm that didn't tell me much unfortunatelly. Just to check - can you test if it works when the (same) project is on your local machine, not NAS?
     
  17. the_mr_matt

    the_mr_matt

    Joined:
    Jul 21, 2015
    Posts:
    124
    Good afternoon everyone.

    I'm thinking of purchasing a new GPU and since I currently use mine a lot for light baking I want to take this into consideration. For those who have used an RTX card with Bakery, what sort of performance gains did you see (what did you use before)?
     
  18. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,666
    I didn't purchase an RTX just yet, but I was testing it with several people before releasing RTX support. On 2070 we had 171.781 sec (non-RTX mode) vs 105.916 sec (RTX mode) for Sponza.

    I've just updated the file, using a different I/O method, worth trying: https://drive.google.com/open?id=1zCmGZbje2id_n0zF6zqz0yNuwC3suXQF
    Should either write to your NAS or give a different error message.
     
  19. cbboyer

    cbboyer

    Joined:
    Jun 2, 2014
    Posts:
    20
    Frank...a million thanks for this post. First tests with HDRP + SH + Shadowmask + mixed Direct Light look absolutely insane. Will be sharing something here made w/ Bakery soon.
     
    guycalledfrank and newguy123 like this.
  20. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    Thanks @guycalledfrank this is working on my local C drive. However on my NAS, it is still not working. I can't be the only person here that have their files on a NAS, with mapped network drive. The error I now get with this new file you uploaded is:
    upload_2020-1-27_10-41-5.png
    That folder is marked as read-only if I look at it's properties in Windows Explorer. However, that can't be the issue because the version on my local C has same properties and there it works.... Would be awesome to narrow down what is causing the issue.

    Anyway, on my local C drive, I managed to finally get a lightmap bake done using Bakery. These are my settings:
    upload_2020-1-27_10-43-20.png

    And this is the result of that:
    upload_2020-1-27_10-56-0.png

    As you can see, it seems to have created some kind of heavily dithered gradient type of thing, most obvious on ceiling and walls. If I use the built in lightmapper, I get that kind of result if lightmap compression is on, and turning it off resolves that gradient dither. Is there a setting in Bakery where I can switch of lightmap compression? Or is there another setting in Bakery I should be adjusting to get rid of that gradient dither?

    Furthermore, if you look at the radiator, it seems to have flattened things out and lost detail. Which setting in Bakery can I adjust to get a better light solution/build? Is it simply a case of increasing the texels per unit from 100, up to maybe something like 150?

    Here on my tiles (individual chamfered geometry), you can also see the lack of detail. Will increasing the texel per unit solve that also?
    upload_2020-1-27_11-8-39.png

    Another issue, I get a warning with 2 or 3 objects, that they have overlapping lightmap UVs. I thought Bakery fixes that automatically.
     
    Last edited: Jan 27, 2020
  21. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    Increasing the texels per unit to 200, seems to clear up the detail in my geometry tiles, as well as the radiator. However, I still have the gradient banding/dithering issue
    upload_2020-1-27_11-45-24.png

    upload_2020-1-27_11-45-54.png
     
  22. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,666
    You can be...

    It is possible that halffloat2hdr.exe just doesn't have enough user privileges to access the drive. Do you have specific access rights for it on your system, different from C drive access? How does the beginning of your path look (mapped to a virtual drive letter or not?...).
    If you, e.g. run cmd and type
    echo test >> pathToYourNetworkFolder/file.txt

    will it work, and if not, how will it respond?

    Android project? See this:
    https://geom.io/bakery/wiki/index.p...id_project.2C_and_lightmaps_don.27t_look_good

    Note that you can increase it for radiator only, leaving everything else untouched - by tweaking Scale In Lightmap option on MeshRenderer.

    For automatically (within Unity) unwrapped models Bakery only fixes padding by running the same unwrapper using optimized settings. If Unity unwrapper produces overlaps, then it is Unity unwrapper's bug. Note that minor overlaps might be okay and you can probably ignore these messages unless you see some really odd spots on the lightmap.
     
  23. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    @guycalledfrank
    The echo test works fine. I had to wrap my path into double quotes "" as there are spaces in my path name.
    There are no weird permission on my NAS. I'm admin and have full read/write permissions on everything
    In Windows 10, I have SMB1 switch off and enabled SMB Direct (SMB2)

    Yes it is an Android project and setting compression to NONE directly on the lightmap solves the gradient banding, thanks.
     
    Last edited: Jan 27, 2020
    guycalledfrank likes this.
  24. r8zbeh

    r8zbeh

    Joined:
    Dec 4, 2018
    Posts:
    39
    HI.

    It sounds like Unity 2019.3f would be out in two weeks. has anyone tried this Asset in final candidate versions of 2019.3 ? Did it had any bug or issues ?
     
  25. tshaddix

    tshaddix

    Joined:
    Aug 11, 2017
    Posts:
    11
    First off - Bakery has been an amazing upgrade from the default Unity tooling. I was getting terrible artifacts on some low poly assets and the developer recommended I try Bakery out instead. What a game changer!

    That said, I am trying to use Bakery to render a pretty simple scene (attached image) and running into issues (2019.2.19f1). It has a single directional light and a skylight. When trying to bake with the default Bakery settings, I've started experiencing lock-up. When I first encountered it, I let Bakery run overnight and made no progress. I canceled the bake job, deleted neighboring terrains, and restarted my computer. Now Bakery is locking even earlier than before, when it is running fixpos. I've attached the log. I don't have any errors that I can see in Unity or in the log files.

    Computer:
    - Graphics: GeForce RTX 2070 (Driver 441.87)
    - CPU: AMD Ryzen 7 2700X
    - RAM: 16 GB

    Any advice @guycalledfrank ?
     

    Attached Files:

    Last edited: Jan 27, 2020
  26. tshaddix

    tshaddix

    Joined:
    Aug 11, 2017
    Posts:
    11
    Quick update here. I removed Bakery and all generated lightmaps. I then reinstalled Bakery. No changes.

    I then tried removing the terrain which allows Bakery to progress as expected. Are there known limitations with Bakery and Unity terrain?

    Turning off Terrain Optimization seems to fix it.
     
    guycalledfrank likes this.
  27. CFrosty

    CFrosty

    Joined:
    May 9, 2018
    Posts:
    8
    @guycalledfrank So no lightprobes with baked prefabs bummer. What is the suggested workflow for lighting dynamic objects in such a set up?
     
  28. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,666
    Hmmm, quite a mistery. Are you 100% sure the path is exactly identical in what you wrote in cmd and what you saw in the error message? Could it be that Unity/Mono stripped some characters?

    Another try: https://drive.google.com/open?id=1zCmGZbje2id_n0zF6zqz0yNuwC3suXQF
    Error message should be more detailed.

    From what I know it seems to work apart from UI layout being a bit broken.

    Yeah, sounds like it. I think I noticed some edge cases when Terrain Optimization can go into very long loops. Must investigate further. For your terrain it should be perfectly fine to disable it (mostly useful for HUGE detailed terrains).
    BTW, if you can send me a unitypackage with your terrain + lights scene, it should help to develop a fix.

    Engine limitation. Unity 2020 will possibly make it doable.

    TBH I don't know. Unity just wasn't designed for that (probes are a global and static structure). You can possibly reimplement light probes in your code and send your own interpolated values to shaders.
     
    Last edited: Jan 28, 2020
    tshaddix likes this.
  29. Tudor

    Tudor

    Joined:
    Sep 27, 2012
    Posts:
    150
    When I choose Xatlas in the bakery window, will the Show Checker option then reflect the way xatlas makes lightmap UVs, or will it still show unity's UVs? (because I rebaked and I'm not seeing a difference)

    "pre-autounwrap in any modeling package?"
    If I make lightmap uvs in an external modeling program, there's no way for me to know where to place this mesh in the lightmap uv, and it will be conflicting with other unity-unwrapped geometry in unity, wouldn't it? Or does unity/xatlas somehow know to generate/pack the other lightmap uvs around the ones that were predefined in an external modelling package?
     
  30. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,666
    ... will still show. xatlas will fire up during "adjusting UV padding" phase which only happens when you start rendering. "Show checker" only recalculates atlasing (the way existing individual object UV layouts are packed into atlases).
    Probably doesn't make sense - I should make adjustment happen for checker as well.
     
    Tudor likes this.
  31. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,666
    Bakery can pack atlases from many separate objects' UVs, this is fine.

    It won't. They can be mixed.

    Unity/xatlas/you generate UVs for each mesh. They split the mesh into many charts of polygons and try to pack them neatly in a square.
    Then Bakery takes these squares and packs them into an even larger square, which is the final lightmap atlas.

    The only exception is when you use lightmap groups with "Original UV" mode - this way your UVs directly define the atlas and no additional packing is performed.
     
    Tudor likes this.
  32. Tudor

    Tudor

    Joined:
    Sep 27, 2012
    Posts:
    150
    Thanks for the clarifications. I suggest you include these in the wiki as some kind of details/footnotes in the appropriate sections. For example, what I thought was that "Original UV" mode is something I need to check if I want to tell bakery to not generate lightmap uvs and instead use the mesh's uvs :D

    PS: I noticed now that if I tick off the Generate Lightmap UVs on a mesh, Bakery will use that mesh's UV1 for lightmap if that mesh does not have a lightmap-specific UV2. Which is nice to know.
     
    Last edited: Jan 28, 2020
    guycalledfrank likes this.
  33. xinuxano

    xinuxano

    Joined:
    Feb 28, 2018
    Posts:
    33
    Updating my project (VR with URP) to Unity 2019.3.0f6, testing Bakery... In my case, everything seems ok, and the process has ended without errors.
     
    guycalledfrank likes this.
  34. Goldenvale

    Goldenvale

    Joined:
    Feb 26, 2015
    Posts:
    86
    I'm using unity's paint holes on a terrain but Bakery is treating it as if it's still solid and is not allowing light through. Here's an example where I've set up a room behind a hole:

    Unity's default light baker does allow light through.
     
    guycalledfrank likes this.
  35. TinyTracker

    TinyTracker

    Joined:
    Nov 10, 2012
    Posts:
    54
    using URP Lit
    image1. Scene before baking.
    image2. Scene after baking. normal maps gone. Smoothness gone.

    There is a way to keep smoothness and normal map right
     

    Attached Files:

  36. TikabVR

    TikabVR

    Joined:
    Dec 15, 2016
    Posts:
    7
    We are having issues with getting a directional light to render with hdrp in unity 2019.1.3-2019.3.1, any suggestions? Best regards //NIC
     
  37. Hexaedre

    Hexaedre

    Joined:
    Jan 23, 2015
    Posts:
    110
    Hi,

    I can't make backery work with hdrp using Unity 2019.3.
    With the default unity 3D RP, Bakery works fine.

    Is there additional steps to make Bakery work with hdrp ?

    Cheers
     
  38. the_mr_matt

    the_mr_matt

    Joined:
    Jul 21, 2015
    Posts:
    124
    Mernin.

    The interface has some issues. I'm in Unity 2019.3.0f6 and I've got UI elements and UI builder packages installed.

    It's not a major problem for me, just wanted to let you know.

     
    xinuxano likes this.
  39. StarkYuang

    StarkYuang

    Joined:
    Oct 23, 2019
    Posts:
    1
    We're having an issue with an error that Bakery is generating. We're using Unity 2019.2.18f1 with HDRP.

    The error we're getting is:
    The loaded level has a different lightmaps mode than the current one. Current: Non-Directional. Loaded: Directional. Will use: Non-Directional.
    UnityEditor.SceneManagement.EditorSceneManager:OpenScene(String, OpenSceneMode)


    We get this error when trying to bake Directional Lightmaps, with distance shadowmask. We're baking on a GTX 1060 with the latest drivers, and plenty of hard drive space left. We can't seem to fix this ourselves so I'd appriciate it very much if you could look into this.

    EDIT: We've tested on another computer (Lenovo Legion laptop, RTX 2060) where it has the same issue (both in the regular mode and th RTX mode). We have a project with a simple scene and Bakery that still causes the error.
     
    Last edited: Jan 31, 2020
  40. SilverBugi

    SilverBugi

    Joined:
    Jan 30, 2017
    Posts:
    9
    Hey everyone!

    After Baking, my Lightmaps generate some strange seams on the UV edges of the uv shells.
    Does Bakery have a problem with flipped or rotated UV's where not all shells point to the upper direction?
    Or is there any other reason for this problem?

    SeemBug.JPG SeemBu2g.JPG
     
  41. SquallLiu

    SquallLiu

    Joined:
    Jun 19, 2017
    Posts:
    32
    We find the inconsistent result comes from cloud meshes in the sky.
    We only want to bake the shadows cast from clouds:
    • Bake with shadow mask mode.
    • Set cloud's lightmap scale to 0.
    • Set Cast Shadows to "Shadows Only".
    • Use one-side shader for clouds.
    • Set cloud's color to black.
    With 10 texels per unit, it still has a chance to have purple glitch.
    With lower setting like 9 texels per unit, the glitch is reduced. (Still a little bit glitch but it is acceptable)

    The goal is to bake cloud's shadow only and ignore GI bounce from cloud.
    Any suggestions?
     
  42. StenCG

    StenCG

    Joined:
    Mar 26, 2015
    Posts:
    66
    Hello!
    Now it very rare, so I dont keep checking.

    Last time I spent a lot of time in optimizing the all baking process with Bakery and have a few critical moments, which I can not understand.
    1. No way to use Group Selector with LOD group? Anyway LOD1 recieve shadows from LOD0. Sometimes vice versa 0_о Even without a selector
    2. Group Selector on prefab dont save params as override. Steps:
      -Add Group Selector to prefab
      -Set Lightmap group asset
      -Place prefub on any scene
      -Set other Lightmap group asset as override
      -Save scene (have dirty state)
      -Reopen sceneHave no change on Selector!
      Helps inspector debug mode. I think reason is custom gui and dirty, somewhere.
    3. Sometimes baking have "out of memory" on large/complex scene, get message about ftracelog.txt, but nowhere its not.
    4. Skylight with HDR cubemap give overexposes light. LDR cubemap - ok. Both cubamaps baked by Reflection Probe.
    I find this tool very useful and hope to use it in production.
     
    Last edited: Feb 1, 2020
  43. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,666
    Right, isn't it a new 2019.3 feature? Given Bakery assumes terrains are heightfields/regular grids, holes won't work. I wonder if there is a reliable API to get final terrain geometry with these holes included...

    That's what directional modes are for: https://geom.io/bakery/wiki/index.php?title=Manual#Directional_mode

    Which issues exactly? Do example scenes work (after autoconverting materials to HDRP)?

    What happens when you try? Also same question about example scenes as above.

    Known problem with 2019.3. They redesigned the UI for .3. Bakery wasn't ready for that.

    Can be ignored, shouldn't affect the result.

    upload_2020-2-2_19-17-6.png

    Woah, that's some strong seams. Looks like normals are completely different across the seam. Does your model use a normal map? Does it have these seams with realtime lighting if you remove the normal map? In case normal map was fixing the seams, you can try setting Directional Mode = Baked Normal Maps for Bakery.

    Can it happen in a simple scene, e.g. clouds + plane + few boxes?
    The only thoughе I have is that maybe it related to the size of the clouds relative to scene (hits some weird path in scene BVH generation inside OptiX?). Approximately, what is the size of all cloud objects combined in world units?

    I can just add some special "cloud shadow" option to directional lights instead if it helps. Not very hard to do. I imagine it as a Texture2D slot + tiling, offset and height.

    It's a bit tricky right now: https://geom.io/bakery/wiki/index.php?title=Troubleshooting#I_get_too_many_lightmaps (see " Internally Bakery splits the whole scene...")

    Couldn't reproduce. Group Selector component stores data the same way as any other components. Maybe my steps were a bit different or I didn't get the transition between "set lightmap group asset" and "place prefab". What I tried was:
    - Put LMGroup Selector on a prefab.
    - Inserted an asset to it.
    - Applied the overrides.
    - Created new scene.
    - Dragged the prefab (asset is set as it was).
    - Changed the asset.
    - Applied the overrides.
    - Created another scene.
    - Dragged the prefab (asset reflects my latest change as it should).

    The message or the log? The log is in Assets/Editor/x64/Bakery/.ftracelog.txt by default. Note that this file is not visible via asset browser (!), only in windows explorer.

    Skylight directly uses linear values stored in the cubemap. Make sure Skylight intensity=1 and color is plain white.
    Maybe check if you have some superbright objects in your scene.
    Skylight was extensively validated - the only source of overexposed values is your cubemap, and, if comes from a reflection probe, your scene objects. It is possible that some scene shaders output single NaN or Infinity values which are not noticeable in the game but blow up when Unity filters the cubemap.
     
    Last edited: Feb 2, 2020
  44. StenCG

    StenCG

    Joined:
    Mar 26, 2015
    Posts:
    66
    Thanks for you reply!
    Need without applied for contain override only in the scene. My usual use case: have regular prefab for mostly scenes, but make special override in some scenes.
     
  45. StenCG

    StenCG

    Joined:
    Mar 26, 2015
    Posts:
    66
    Could this be a procedural skybox baked in cubemap? I will check this later.
     
  46. Goldenvale

    Goldenvale

    Joined:
    Feb 26, 2015
    Posts:
    86
    They're not actual holes. They use a splat map for painting holes and that is basically used as a cutout. It should be the same as foliage mask clip.

    This could be useful:
    https://docs.unity3d.com/2019.3/Documentation/ScriptReference/Terrain-holesRenderTextureFormat.html
     
    guycalledfrank likes this.
  47. joshcamas

    joshcamas

    Joined:
    Jun 16, 2017
    Posts:
    1,276
    My project has dynamic ambient lighting, as well as a dynamic directional light as the sun. Is bakery usable for a project such as this?
     
  48. vice39

    vice39

    Joined:
    Nov 11, 2016
    Posts:
    108
    What do I do with "Denoiser error - unknown error (1)" ?

    Running on 2019.3 (which I know is not officially supported. Is that the cause?)
    Latest nVidia drivers.
     
  49. SquallLiu

    SquallLiu

    Joined:
    Jun 19, 2017
    Posts:
    32
    It won't happen in a simple scene.
    Each cloud is separated plane with the size of 50 x 50.


    Cloud shadow option would be helpful.

    Thanks.
     
    guycalledfrank likes this.
  50. r8zbeh

    r8zbeh

    Joined:
    Dec 4, 2018
    Posts:
    39
    Hi @guycalledfrank
    I got a custom lit shader made by Amplify Shader Editor. and I need to bake my scene with SH Directional mode
    Is there any tutorial how to tweak my shader to work like bakery shader ?
    i have seen the amplify shader on community extensions page but Seems to only work with HDRP/URP ASE template !
     
    Last edited: Feb 5, 2020