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. Dismiss Notice

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

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

  1. Loards

    Loards

    Joined:
    May 2, 2013
    Posts:
    112
    Also, today i started to get this error, from one bake to another:
    upload_2019-2-26_19-1-13.png
    The thing is, i don't have any group called LookDev_VLM so i don't know what is going on and the error started just from one bake to other with no change in anything.
     
  2. greengremline

    greengremline

    Joined:
    Sep 16, 2015
    Posts:
    183
    So we went ahead and reverted back to before the latest update and it appears that only rooms baked with the new update (1.51) have the problem - it might be due to encoding issues? We noticed that there are differences depending on the encoding settings - if you set lightmap encoding to medium, it makes things really bright..whereas if you set it to high, it breaks uvs upon restart

    For now we'll just stay on the old update
     
    Last edited: Feb 27, 2019
    guycalledfrank likes this.
  3. fseraph1

    fseraph1

    Joined:
    Jul 12, 2013
    Posts:
    8
    @guycalledfrank
    Bakery is a great tool for our open world game ! but I found a serious problem, when bake multi-terrain scene, the neighbor terrain will have noticeable seams even if the "Fix seam" checked, I post a screenshot. is there any suggested solution?
    seams_normalview.jpg
     
  4. jxxxxst

    jxxxxst

    Joined:
    Nov 3, 2012
    Posts:
    50
    Hi Frank, following scenario :
    Lightmapped prefabs in a scene without lightprobes, one lightprobe group on a different gameobject (no prefab).
    Hitting bake light probes breaks the lightmapped prefabs lightmaps.

    Anything you can do about it, or is this not a supported scenario?

    Kind Regards!
     
    Last edited: Feb 27, 2019
  5. b4th

    b4th

    Joined:
    Jul 4, 2016
    Posts:
    65
    Hey @guycalledfrank, have you seen this talk done by NaturalMotion regarding their work on specular cube maps for mobile in CSR Racing? (6:35-21:40)



    Do you know if any of these innovations are still applicable to Unity 2018/2019, and if so, could they potentially be rolled into Bakery in a future update? It would be wonderful to have more fine-grained control and get more bang-for-buck out of Reflection Probes.
     
    keeponshading and guycalledfrank like this.
  6. topofsteel

    topofsteel

    Joined:
    Dec 2, 2011
    Posts:
    999
    I'm not getting AO on 2018.3.0. Anyone else?
     
  7. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,627
    Just in case, try disabling Terrain Optimization in experimental settings. It seems like there are cases where it doesn't work great.

    Vertex lighting is currently implemented through additionalVertexStreams. That means vertex-baked objects can't be properly batched/combined. You can attach many instances together (one big mesh) and bake vertex lighting for that. In fact, it would be faster than Unity batching, but possibly slower than GPU instancing.

    Material variations is one thing, every vertex carrying different data is another...
    With proper hacking you can pull that off by baking vertex lighting for all instances into a texture and addressing it using something like SV_InstanceID * instanceVertexCount + SV_VertexID.

    The "VLM" group is autogenerated from static objects with Scale In Lightmap = 0. They won't get any baked lighting, but they need to be taken into account during the bake, as they still affect surrounding geometry. I'm not sure how you managed to summon this error, but search for anything with Lightmapped Static + ScaleInLightmap=0 + possibly broken mesh (e.g. actually having 0 vertices).

    Can you try disabling Terrain Optimization in experimental settings? This will change the way terrains are processed, possibly fixing the issue.

    If you reopen the scene after baking the probes, does it look good?

    I didn't - will take a look!

    What do you get instead?
     
  8. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,866
    Unity already uses 2 LDR textures to emulate 1 HDR texture on mobile. I'm pretty sure they are already calculating convolutions the way the video shows, so I think all of this is already implemented except for the antialiasing of reflections through mipbias. (which doesn't give great results anyway and must be implemented in the realtime shader)
    About the prettier baked reflection probes, I do just that in my game by telling Unity to render the baked cubemaps in 2048x2048 and then manually set the rendered textures to 512x512 size in the editor. This way, Unity downsamples the 2048x2048 cubemaps to 512x512 keeping much higher detail. (this technique only works for baked reflection probes)
    I have automatized this making an AssetPostprocessor script that lowers the texture resolution to 512 as long as the name of the texture has "ReflectionProbe" in it.
    Just modify the example script of the AssetPosprocessor page and put this:
    Code (CSharp):
    1.         if (assetPath.Contains("ReflectionProbe-")) {
    2.            TextureImporter textureImporter  = (TextureImporter)assetImporter;
    3.            textureImporter.maxTextureSize = 512;
    4.         }
    5.  
     
  9. buildcorner

    buildcorner

    Joined:
    Nov 25, 2017
    Posts:
    1
    2.png 1.png 2.png 1.png When I am importing the Bakery - GPU Lightmapper, unity console gives some error message ?
    Any Solution?
     
  10. tkslan

    tkslan

    Joined:
    Sep 30, 2016
    Posts:
    28
    Hi, Mr F.
    I run in trouble and can't find proper solution. My main scene is in RealtimeGI, but I also loading additive scenes baked in bakery with full light. My problem is that after unload of detail scene (bakery baked), Realtime GI on main scene is not switching back on. I found temporary workaround with "combie with realtime gi", but it is introducing artifacts on bakery baked content. Maybe there is some hack to force GI light to turn back on? Or other solution ?
     
  11. Artificial_Illusions

    Artificial_Illusions

    Joined:
    Jul 24, 2018
    Posts:
    20
    Hello, I just got Bakery, I am very interested in the quality and render times it provides.
    I initially was using Progressive Lightmapper with Gamma for Oculus Go VR virtual tours. Unfortunately, I cannot rely on Linear color space as the Oculus Go does not support it.
    I am currently having this issue in which the render results present a lot of light blotches (attached), I tried with more samples, higher texel density, and higher lightmap resolution, and also tried without reflections...nothing worked.
    Is there any solution?
    Thanks!
     

    Attached Files:

  12. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    935
    “Material variations is one thing, every vertex carrying different data is another...
    With proper hacking you can pull that off by baking vertex lighting for all instances into a texture and addressing it using something like SV_InstanceID * instanceVertexCount + SV_VertexID.“

    You always impress. I will take a deep dive in this direction.
    Thanks for inspiration through knowledge and alien support.
    You completly demystified LightMapping for me in a few months.
     
    guycalledfrank likes this.
  13. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    935
    You could have a look on ArchViz Pro 6. The creator additionally provides an HDRP Bakery scene on request. 20min bake for photorealism .Done. 2GPU.
    Best use and learning ressource i found on Store. But it s linear. Meantime he probably has the Built In pipeline scene as Bakery too.
    RGBM ecoding/decoding could work in gamma.
    Have a google.
     
    Last edited: Mar 1, 2019
    jeromeWork likes this.
  14. fseraph1

    fseraph1

    Joined:
    Jul 12, 2013
    Posts:
    8
    @guycalledfrank
    after disable terrain optimization the seam between 2 terrain Lightmap remains.so I think we need run some kind filter on the edge pixel?
     
  15. Artificial_Illusions

    Artificial_Illusions

    Joined:
    Jul 24, 2018
    Posts:
    20
    Yes, actually...it was through Oneiros in which I found out about Bakery. Morevoer, their VR scene is (I believe) geared towards sophisticated VR systems such as the Rift and Vive.
    My issues are related to Android texture encoding as I am developing for the Oculus Go. Noramlly, with Unity's Progressive Lightmapping, I have really good lightmapping results on my scene. Unfortunately, I depend on both natural and artificial lightning (skybox/directional and emissive lightning) in large indoor scenes, and I have to set my lightmap settings to very high (almost 35k indirect samples) and it takes me a whole day to bake on a GTX1060.
    Now, with Bakery, it seems like after it bakes the lights, it goes straight to encoding the textures for Android (correct me if I'm wrong, please), and I was using ETC2 encoding. I just changed to ASTC and the color bands are gone. Moreover, with ASTC, I am having several artifacts.

    @guycalledfrank Do you have a guideline on what are best lightmap settings for iOS/Android devices? I am still going through the documentation and experimenting with adjustments as I just got Bakery. Thanks!.
     

    Attached Files:

  16. Sanyol

    Sanyol

    Joined:
    Jan 28, 2013
    Posts:
    24
    Hello @guycalledfrank,

    this issue is on Unity side. Unity can't handle lightmaps created with version < 2018.3 and the lightmaps even if they are looking ok in Editor, they are broken on Android (I discovered this in another project without Bakery). Recalculating Unity lightmap on 2018.3 is fixing the problem, but unfortunately (and I have tried everything) recalculating Bakery lighting is not fixing this problem.

    I reverted project back to older version of Unity, but if you can check it in the future it would be great (it can be very hard to switch my other projects from current 2018.2~ version to the 2018.3~ ).

    Thanks and thank you for your great support!
     
    guycalledfrank likes this.
  17. Sanyol

    Sanyol

    Joined:
    Jan 28, 2013
    Posts:
    24
    One more question @guycalledfrank

    I have baked lightmaps on another PC with platform (Windows) and the lightmap looks great. Unfortunately, after pushing this scene to another PC with another platform (Android) the lightmap is compressed and it is broken on some models (it looks like they are using other model lightmap). So I have 2 questions:

    1. is there a way to change lightmaps compression on Android?
    2. Do I need to have 2 separate scenes for Android and for PC or there is any fix ?

    edit:
    Ignore the second question - the push ignores some meta files - it is working great now :)
     
    Last edited: Mar 1, 2019
  18. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,627
    Seems like you didn't import the package correctly. Try:
    - Restarting Unity
    - Importing the package again
    - Click "I made a backup, go ahead" if Unity asks

    Posting your question as a one-star review isn't really a great way to start a conversation...

    TBH, I don't know. Bakery was never intended to work with this kind of workflow, so maybe try fiddling with scripting. For example, you can try executing this after the realtime GI scene is loaded:
    Lightmapping.realtimeGI = true;


    This is known is "banding" and it's not related to Bakery settings. This is the result of texture compression Unity applies to lightmaps on mobile. Try selecting lightmap assets (the textures) and changing their compression. Usually ASTC gives better results over ETC.

    Yep, that's it!

    Can you check if these are compression artifacts or lightmap artifacts by disabling the compression completely?

    My experience here is limited, but ASTC is pretty great. On iOS AFAIK the only compressed format available is PVRTC, so there isn't much to choose.

    Hmmm. I see, it's a different kind of seam. Terrain optimization may have affect the normal discontinuity, but in your case it's low resolution shadows with no filtering over the seam. Usually Bakery fixes it for regular meshes, but not for terrains. This is really tricky to fix apart from just increasing the resolution, as different parts of the terrain can be in different lightmaps.
    In fact Bakery explicitly disables the seam fixing algorithm on terrains just because it only works for geometry inside one lightmap atlas, and because terrains are usually slow to process. If both chunks are in the same atlas, you can, however, try to enable it and see if it helps. To do so, open ftBuildGraphics.cs and find this line:

    fseamfix.Write(false);


    Replace it with:

    fseamfix.Write(true);


    That sounds very odd! Unity have some Lighting Data Asset incompatibilities, but the lightmaps are just textures, they are essentially version-less.

    When pushing, make sure you:
    - Push the *.meta files
    - Don't push ftGlobalStorage.asset and ftLocalStorage.asset

    Changing the platform to Android should force Unity to convert them automatically.

    No, you don't have to.

    Ah, perfect :)
     
    tkslan likes this.
  19. C3P

    C3P

    Joined:
    Oct 26, 2014
    Posts:
    46
    First of all, thanks for your superb level of support!
    Your earlier suggestions solved my problem.

    This question might not be directly related to bakery but i do wonder how you guys work with specular reflections.
    I set all my lights to baked, the result is that i don't have specular reflections.
    To fix this i add a realtime light but it ignores static meshes and adds light and reflections to darker areas and shadows
    Any suggestions?
     

    Attached Files:

  20. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,627
    There are at least two ways to fix this:
    a) Use shadowmask for your realtime light. This way you'll keep realtime bump/specular, but keep shadows baked.
    b) Use Bakery shader with Lightmap Specular option and bake in any directional mode (except for Baked Normal Maps). This way you won't have any realtime lights left at all, but still have specular.
     
  21. bha_unity

    bha_unity

    Joined:
    Jun 18, 2018
    Posts:
    4
    Hi Frank,

    got an Error 5120 "Can't open lms.bin". I also tried to search it but couldnt find it on my PC. Any recommendations?
     
  22. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,627
    Do you have enough free disk space? Most "can't load/save" errors are related to that.
     
  23. HenriSweco

    HenriSweco

    Joined:
    Aug 8, 2016
    Posts:
    28
    @guycalledfrank Are the baked decals still somewhere in the roadmap, or did you drop them? How goes the possibility of integrating xatlas(or some other external solution)?
     
  24. RockSPb

    RockSPb

    Joined:
    Feb 6, 2015
    Posts:
    112
    Apple support ASTC since A8 processor (iPhone 6).
     
  25. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,627
    I have them working, but the workflow and optimization are far from optimal. Basically right now I manually pick a "parent" object for every decal and hit a button to generate decal mesh:

    upload_2019-3-2_0-12-53.png

    Furthermore, generated geometry has lots of redundant vertices and edges.
    So at this point it kinda "works for me", but not a kind of technology worth selling :) I'm not sure if it should be a part of Bakery or maybe an asset on its own.

    I didn't look into this yet, but will eventually. Messing with probes at the moment.
     
  26. Loards

    Loards

    Joined:
    May 2, 2013
    Posts:
    112

    I have no idea, i just mover some light and baked again, the good thing is that one scene was only a test scene, but the error that i'm still having is this one when trying to bake light probes.
    View attachment 381385

    And there is nothing worth to see in the Console.
    View attachment 381388
     
  27. Artificial_Illusions

    Artificial_Illusions

    Joined:
    Jul 24, 2018
    Posts:
    20
    Hello, I'm still working around Bakery settings to achieve desirable results on Android. Now, I am facing a couple of worrisome time-consuming issues:
    -First, lately when I click on Render, the Progress bar hangs at 55% "Rendering lightmaps - preparing..." it can go on for hours and remain at the same %, if I force quit, and restart Unity, I am faced with the next issue:

    -Unity imports every single asset, including Bakery hdr files and the sort. Now all of this happened after I switched to ATSC compression format (strong guess, it could be something else). This process takes at least an hour and half to complete importing every single asset (mostly textures). And, after I am able to open the scene, I can render just fine. Moreover, the issue repeats all over again when the Progress hangs at 55%.
    I am not having any issues with hard drive space or GPU/RAM bottlenecking.

    These issues are starting to defeat the purpose of why I got Bakery in the first place, by taking too long to import, process, compress textures... it'd be nice to know if someone has found the right way to do this for mobile...

    Moreover, some good news, I am getting nice GI with Bakery, I'm still having small issues with some color banding and artifacts (it gets better by increasing GI samples between 32-64). And, my IES lights looks pixelated for whatever reason...probably because of wall texture UVs being too small.
     

    Attached Files:

  28. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,627
    It just says "The requested attachment could not be found.", maybe try reuploading the pics.

    When "Preparing" it just scans the scene and exports geometry to the lightmapper. If it freezes there I can only assume your scene is extremely geometry-heavy or ...? I can only suggest removing parts of the scene until it works to locate the cause. Might be terrain trees, terrain itself or some procedural/combined geometry.

    This is a question to Unity I guess. Bakery never forces it to reimport all assets. And ASTC compression is slow, no matter which lightmapper you use. I guess you can completely disable compression for testing purposes and only convert to ASTC before building.

    Pics and more info about your scene/light setup would help to identify the problem. Most of the time things like that can be fixed without increasing GI samples beyond 16.
     
    Last edited: Mar 2, 2019
  29. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,627
    So I've just completely rewrote probe rendering. The results are still written to regular Unity probes and can be used with regular shaders, but:
    - All probe lighting is calculated completely within the lightmapper, no funky ReflectionProbe rendering is performed anymore. This is faster and less error-prone.
    - Lighting precision is theoretically inferior (4 spherical harmonics coefficients instead of 9), but in practice it looks pretty good.
    - Bakery shader will allow modified light probe sampling (Geomerics trick) to improve results.

    upload_2019-3-2_16-16-36.png

    upload_2019-3-2_16-40-57.png

    upload_2019-3-2_16-50-22.png
     
    Last edited: Mar 2, 2019
  30. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    935
    Can´t wait to test.

    Probably you need something for stress testing.)
    https://github.com/Unity-Technologies/FPSSample/tree/master/Assets/Tools/LightProbeGenerator

    Asset Post Processor for Meshes with "LPG_" prefix. Assigns a Light Probe Group to the object and generates a lightprobe per vertice.
     
    guycalledfrank likes this.
  31. Garen_

    Garen_

    Joined:
    Apr 24, 2013
    Posts:
    14
    Hi @guycalledfrank I'm currently quite interested in purchasing Bakery for lightmapping. Say i have a large map which can be broken down into sectors and not all sectors need to be shown at once. From my understanding, i can use lightmap groups to bake objects from a certain sector and then at runtime i just turn on/off the different sectors? Do i need to create separate materials for each sector? If not how would it know which lightmap textures to reference? And lastly what if i need to show 2 sectors at once?
     
  32. Scarabay

    Scarabay

    Joined:
    Sep 7, 2013
    Posts:
    15
    Hi, Mr F.

    Is it possible to have indirect and shadowmasked lights at the same time?
    Directional lightmaps are used only with Full lighting mode or with Indirect\shadowmask too?
     
  33. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,627
    This would allow you to keep each sector's lightmap in a dedicated texture. If you're not sure one lightmap is sufficient for one sector, you can also bake each sector in a separate scene and then load the scenes additively or as lightmapped prefabs.

    No you don't have to. Unity references lightmaps via Mesh Renderer values.

    Well just show them. Load them as scenes or instantiate as prefabs.

    If you have > 0 bounces, indirect lighting is always baked for all lights. Tick the "Shadowmask" checkbox on the light and bake in Shadowmask mode to also render the mask for this light.
    Directional lightmaps can be baked in all modes.
     
  34. Ryan-Hayle

    Ryan-Hayle

    Joined:
    Feb 16, 2014
    Posts:
    142
    How do I get my spotlight Angle to behave the same as a Unity Spot Angle? Rather than 179, it only goes to 90.

    Before I was using the Progressive lightmapper and lighting my room with a spotlight, but with bakery I get a dark ceiling and so I am not sure what to do about this?
     
    Last edited: Mar 3, 2019
  35. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    436
    L1 mode running in Unity 2017.4.15f1 LTS


    Code (CSharp):
    1. EntryPointNotFoundException: SaveGBufferMapFromRAM
    2. ftBuildGraphics+<ExportScene>c__Iterator0.MoveNext () (at Assets/Editor/x64/Bakery/scripts/ftBuildGraphics.cs:1147)
    3. ftRenderLightmap+<RenderLightmapFunc>c__Iterator4.MoveNext () (at Assets/Editor/x64/Bakery/scripts/ftRenderLightmap.cs:3264)
    4. ftRenderLightmap.RenderLightmapUpdate () (at Assets/Editor/x64/Bakery/scripts/ftRenderLightmap.cs:2920)
    5. UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at C:/buildslave/unity/build/Editor/Mono/EditorApplication.cs:127)
     
  36. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,627
    Yeah there seems to be some mismatch between the two... I'll take a further look into it, but for now I recommend you trying an IES light, they have more realistic shapes anyway.

    bakery-csharp repository only contains the C# part of the code (because usually this is the part that needs frequent patches) - I didn't upload core changes anywhere yet. But I'm gonna submit it to the store in 1-2 days.
     
  37. RadPirates

    RadPirates

    Joined:
    Mar 13, 2017
    Posts:
    3
    Hello awesome Bakery creator!

    We are currently using Bakery for your projects and the results are pretty cool!

    Until now, we were using the "Full lightning" mode for baking our environments but we decided to switch to "ShadowMask". We are using Baked Prefab, by baking them in their own scene, and then placing them at runtime in our MainScene.

    I noticed that we could still move our main directional light, causing the direct shadows of our baked (static) (prefab) environment to move too. Is it how ShadowMask mode intended to work? Or are we missing something?

    Edit: after some test, we achieve to get the same result by using the 'Indirect' mode. So our ShadowMasks aren't working. Is there something specific to use in order to make them work with baked prefab ?
     
    Last edited: Mar 4, 2019
    guycalledfrank likes this.
  38. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,627
    Yeah it works like that if you have distance shadowmask option enabled. It's a rendering option in Unity that makes close range shadows completely realtime, with only those far away using the baked shadowmask. You can disable this option in either main Bakery window or Unity's Lighting window (in the main scene, not in the prefab scene).
     
  39. RadPirates

    RadPirates

    Joined:
    Mar 13, 2017
    Posts:
    3
    Oh I see! Thank you for the hint! The chechbox was enabled!
     
    guycalledfrank likes this.
  40. Krubbs

    Krubbs

    Joined:
    Mar 15, 2013
    Posts:
    30
    What is it? I have a big optimized object with generated UV2 (by Mesh Baker).Tiles... Colors...

     
  41. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,627
    I can't see clearly what is going on on the first pic, but the 2nd pic shows texture compression artifacts.
    Try changing compression settings on lightmap assets (they.are regular textures in your project).
     
  42. Krubbs

    Krubbs

    Joined:
    Mar 15, 2013
    Posts:
    30
    It is not compression artifacts. Default was "Medium", but threr is no difference between this and "None". Some kind of tiles is clearly visible. Result is very dirty, 64 samples at settings, lights at 32-128.
     
  43. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,627
    Colored artifacts are related to compression, I don't know any other reason for them. Bakery doesn't just write random colors to pixels.
    Can you send me the lightmap (.hdr file) and any mesh (e.g. the door) to check?
    Also what are you using for light sources?
     
  44. Krubbs

    Krubbs

    Joined:
    Mar 15, 2013
    Posts:
    30
    I use "BakeryLightMesh", Directi Light for sun, colored Sky light and point lights.
    Check this files: https://yadi.sk/d/aRDNwLkT4gJZgw
     
  45. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,627
    Sorry I can't check the meshes, as I don't have Mesh Baker. AFAIK you can convert it to regular meshes:

    upload_2019-3-4_21-6-47.png


    Your lightmap looks fine in Photoshop, no colored noisy blotches:

    upload_2019-3-4_21-8-3.png


    Perhaps you didn't change compression settings properly? Did you change it on the assets or somewhere else?

    upload_2019-3-4_21-9-35.png
     
  46. Krubbs

    Krubbs

    Joined:
    Mar 15, 2013
    Posts:
    30
    I did it like you... maybe unity must be restarted. Im now baking my scene with different settings. I'l notify you as soon as i check compression on new lightmaps.
     
  47. Krubbs

    Krubbs

    Joined:
    Mar 15, 2013
    Posts:
    30
    It is _dir maps compression fail too. I cant use compression for _final maps, and compression of _dir maps creates this artifacts. Any ideas to decrease their size? Im creating mobile app with high quality interior lighting (thanks for this plugin - it is really cool!) and several 64 mb files are not accesable.
     
  48. Ar7ific1al

    Ar7ific1al

    Joined:
    Jan 21, 2014
    Posts:
    54
    Hello,
    I picked up Bakery yesterday. It seems like a very nice tool, and it produces amazing results (from what I can see in the thread, etc.). However, I've not been able to successfully bake the lightmaps for my scene. Every time it seems to get hung up on "Adjusting sample points for world_LMA##." It sits there and never finishes. I've started the bake again (about 15 minutes ago) and it adjusted samples for LM1462, then LMA1, LMA2, LMA3, and now it's on LMA16 and has been there for about ten minutes.
    I attempted doing a bake overnight (in reality just through the morning; 6:40 to about 1:30), and it never finished that either. It got hung up on LMA10.
    I'm using a 512x512 unit terrain with a heightmap res of 512. I've got plenty of trees and grass on the terrain. Plenty of Nature Manufacture assets (rocks, mainly) using their shaders. Terrain is also using Nature Manufacture shader with snow height (from Dynamic Nature Starter Pack).
    Can't currently see my Bakery settings for the scene, since it's still attempting to bake (again, it's stuck on adjusting sample points). I believe my max resolution is set to 2048, texels per unit is default at 20, tile size is 2048... I don't remember all the settings and I'm not entirely sure which settings are or may be a factor here, if any.
    I'm on Unity 2017.4.15f1. I do a lot of world building for VRChat.

    EDIT: Also, cancelling the bake doesn't seem to work well. Even after cancelling, ftrace remains running in the background, even if I close Unity. I have to force it to exit with task manager to free up my GPU. I didn't realize this the first time I tried to bake and my VRAM was never released. I found out after closing Unity and sorting by GPU usage in task manager. Not sure if this is anything you can fix, but figured I'd mention it just in case it wasn't known or if it could be fixed. :)
     
    Last edited: Mar 4, 2019
  49. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,627
    If you're on mobile, definitely try ASTC compression instead of default ETC.
    Alternatively take a look at using RNM mode instead of Dominant Direction. This will require Bakery shader to work, and you'll get 3 maps instead of 2, but RNM should be more resistant to compression artifacts. Performance-wise it's not that bad (unless you use baked specular).

    Clearly the resolution you're using is too high for your scene (you shouldn't have 1462 lightmaps). Reduce Texels per Unit. Try something like 0.1, then increase (a lot) Scale In Lightmap for important objects.
     
  50. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    436
    bakery-csharp repository only contains the C# part of the code (because usually this is the part that needs frequent patches) - I didn't upload core changes anywhere yet. But I'm gonna submit it to the store in 1-2 days.[/QUOTE]

    oops :) I will work in blender for a few days and get back to this one