Search Unity

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

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

  1. sewy

    sewy

    Joined:
    Oct 11, 2015
    Posts:
    150
    Any update on this please?


    EDIT: To reexplain the problem - we have LOD0,LOD1 and only bake LOD0. LOD1 will use LOD0s lightmap and has scale in lightmap 0. Another use is if you want object to participate in the baking process (thus lightmap static, but dont want to bake Lightmap for it - scale 0)
     
  2. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    Hmmm, so I've somehow managed to ran out of actual RAM during export scene step. Unity crashes at that point.

    Any suggestions except of adding more ram? I should probably upgrade to 16GB -> 32GB though.

    Also, is there a way to debug what object is being exported currently?
    Also, Also, will lightmap group help in my case? E.g. by grouping objects and baking them separately?
     
    Last edited: Nov 5, 2019
  3. JoRangers

    JoRangers

    Joined:
    Nov 7, 2017
    Posts:
    26
    Hi guycalledfrank,

    My team encoutered an issue with bakery.

    We had a scene A with a bake A.
    Then we duplicated the scene A to create a scene B.

    So now we had :
    Scene A with bake A
    Scene B with bake A

    All worked well with the lightmaps until we modified an uv of an object inside the scene A.
    We generated lightmap again for the scene A to have a correct result.
    But in the scene B (with the same uv modification), the lightmap is broken.

    And now we don't know how to "copy" the lightmap from the scene A to the scene B without duplicate the scene.

    Have you a tip / solution / workflow for this case ?

    Currently our solution is to bake each scene but in our case it will create 6 times the same lightmap cause we have the same environment in 6 scenes.
    But this solution is an issue for the build size.

    Thank you for the help !
     
  4. dl290485

    dl290485

    Joined:
    Feb 4, 2018
    Posts:
    160
    @guycalledfrank I did something stupid trying to get to that Github thing. You didn't give a link or anything so I scrolled around and saw you send a link to someone else about getting an invitation. I found the page where you enter your asset store order receipt and a username.. but I didn't realise that was supposed to correspond to an already signed up account on github. I just wrote my name in. Now I figured I just sent my invitation to some random Github user, and it won't let me resend the invitation to an account I made there because my invoice ID is already linked to the rando.

    Sorry for the hassle but can you help me out with this.
     
  5. Jan_Hasse

    Jan_Hasse

    Joined:
    Sep 11, 2017
    Posts:
    21
    Hi Frank,
    today i have jsut a problem with finding the right Render- and Directional Mode.

    After reading the Wiki a few times, i think that Shadowmask Mode with SH Mode is the best looking Render you can achive right?
    But i have the problem, that my Gameobjects with normal maps just stay completly flat.

    When i bake with Shadowmask Mode with Bake Normal Maps, the Gameobjects seem to be nicely baked with normalmap Information.

    Whats wrong with my idea of using SH Mode?

    My scene has some Arealights for the indoor lighting, and an directionallight for the sun.
     
  6. Karan90

    Karan90

    Joined:
    Mar 19, 2019
    Posts:
    13
    Hello frank,

    I have been getting this error with bakery every time I try to bake a reflection probe. It doesnt bake the probe and this shows up in console "Can't copy emptyLightingData.asset". I have tried completely uninstalling bakery and installing it back again but still the same issue. It's on Unity 2019.1.2 karan.JPG
     
  7. mlhope

    mlhope

    Joined:
    May 23, 2013
    Posts:
    4
    I didn't realize it was on a per-model basis. I wonder if some of my meshes are not read/write? I will check.

    Thanks for the response!
     
  8. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    Sooo rendering lightmap groups still renders whole scene which leads to a crash.
    Is there a way to specifically bake only selected group?
     
  9. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    Found a way to debug it, crashes at 4807 @ ftBuildGraphics.cs on uvrLoad call:
    Code (CSharp):
    1. int uvIslands = uvrLoad(lmUVArrays2[i], lmUVArrays2[i].Length/2, lmIndexArrays2[i], lmIndexArrays2[i].Length);
    At:

    Code (CSharp):
    1.  // Generate LOD UVs
    2.                 if (ftRenderLightmap.giLodModeEnabled)
    3.                 {
    4.                     for(int s=0; s<sceneCount; s++)
    5.                     {
    6.                         if (storages[s] == null) continue;
    7.                         storages[s].lmGroupMinLOD = new int[groupList.Count];
    8.                         storages[s].lmGroupLODMatrix = new int[groupList.Count * groupList.Count];
    9.                     }
    10.                     for(int i=0; i<groupList.Count; i++)
    11.                     {
    12.                         var lmgroup = groupList[i];
    13.                         if (lmgroup.resolution < 128)
    14.                         {
    15.                             lmUVArrays2.Add(null);
    16.                             lmIndexArrays2.Add(null);
    17.                             lmUVArrays3.Add(null);
    18.                             continue;
    19.                         }
    20.                         if (lmgroup.mode == BakeryLightmapGroup.ftLMGroupMode.Vertex || lmgroup.containsTerrains)
    21.                         {
    22.                             lmUVArrays2.Add(null);
    23.                             lmIndexArrays2.Add(null);
    24.                             lmUVArrays3.Add(null);
    25.                             if (lmgroup.containsTerrains)
    26.                             {
    27.                                 int minLodResolutionTerrain = 128;
    28.                                 for(int s=0; s<sceneCount; s++)
    29.                                 {
    30.                                     if (storages[s] == null) continue;
    31.                                     int minLOD = (int)(Mathf.Log(lmgroup.resolution, 2.0f) - Mathf.Log(minLodResolutionTerrain, 2.0f)) - 1;
    32.                                     if (minLOD < 0) minLOD = 0;
    33.                                     storages[s].lmGroupMinLOD[lmgroup.id] = minLOD;
    34.                                 }
    35.                             }
    36.                             continue;
    37.                         }
    38.                         int id = lmgroup.id;
    39.                         lmUVArrays2.Add(lmUVArrays[i].ToArray());
    40.                         lmIndexArrays2.Add(lmIndexArrays[i].ToArray());
    41.  
    42.                         lmUVArrays3.Add(lmUVArrays[i].ToArray());
    43.                         int uvIslands = uvrLoad(lmUVArrays2[i], lmUVArrays2[i].Length/2, lmIndexArrays2[i], lmIndexArrays2[i].Length);
    44.                         if (uvIslands <= 0)
    45.                         {
    46.                             Debug.LogError("Can't generate LOD UVs for  " + lmgroup.name+" "+lmUVArrays2[i].Length+" "+lmIndexArrays2[i].Length+" "+lmgroup.containsTerrains);
    47.                             uvrUnload();
    48.                             continue;
    49.                         }
    50.                         int minLodResolution = Mathf.NextPowerOfTwo((int)Mathf.Ceil(Mathf.Sqrt((float)uvIslands)));
    51.                         minLodResolution = minLodResolution << 1;
    52.                         if (minLodResolution > lmgroup.resolution)
    53.                         {
    54.                             Debug.LogWarning("Not generating LOD UVs for " + lmgroup.name + ", because there are too many UV islands");
    55.                             uvrUnload();
    56.                             continue;
    57.                         }
    58.                         Debug.Log("Min LOD resolution for " + lmgroup.name + " is " + minLodResolution);
    59.                         for(int s=0; s<sceneCount; s++)
    60.                         {
    61.                             if (storages[s] == null) continue;
    62.                             int minLOD = (int)(Mathf.Log(lmgroup.resolution, 2.0f) - Mathf.Log(minLodResolution, 2.0f)) - 1;
    63.                             if (minLOD < 0) minLOD = 0;
    64.                             storages[s].lmGroupMinLOD[lmgroup.id] = minLOD;
    65.                         }
    66.  
    67.                         int uvrErrCode = uvrRepack(0, minLodResolution);
    68.                         if (uvrErrCode == -1)
    69.                         {
    70.                             Debug.LogError("Can't repack LOD UVs for " + lmgroup.name);
    71.                             uvrUnload();
    72.                             continue;
    73.                         }
    74.                         Debug.Log("Tries left: " + uvrErrCode);
    75.                         uvrUnload();
    76.                         var numLocalVerts = lmUVArrays2[i].Length / 2;
    77.                         for(int k=0; k<numLocalVerts; k++)
    78.                         {
    79.                             float u = lmUVArrays2[i][k * 2];
    80.                             u = Mathf.Clamp(u, 0, 0.99999f);
    81.                             u += id * 10;
    82.                             if (i >= 0 && (int)u > id*10)
    83.                             {
    84.                                 Debug.LogError("Float overflow");
    85.                             }
    86.                             lmUVArrays2[i][k * 2] = u;
    87.                         }
    88.                     }
    89.                 }
    Stack shows it rans out of memory basically:
    Code (CSharp):
    1. ========== OUTPUTTING STACK TRACE ==================
    2.  
    3. 0x00007FF9B0E19129 (KERNELBASE) RaiseException
    4. 0x00007FF9A3164722 (VCRUNTIME140) CxxThrowException
    5. 0x00007FF998EA66A7 (uvrepack) uvrRepack
    6. 0x00007FF998EA5C2D (uvrepack) uvrRepack
    7. 0x00007FF998EA3157 (uvrepack) uvrRepack
    8.   ERROR: SymGetSymFromAddr64, GetLastError: 'Попытка обращения к неверному адресу.' (Address: 00007FF998EA1333)
    9. 0x00007FF998EA1333 (uvrepack) (function-name not available)
    10. 0x00007FF998EA1CA0 (uvrepack) uvrLoad
    11. 0x00000209FDD80AF2 (Mono JIT Code) (wrapper managed-to-native) ftBuildGraphics:uvrLoad (single[],int,int[],int)
    12. 0x00000209FD7A2B0B (Mono JIT Code) [C:\Projects\D-Rifter\Assets\Editor\x64\Bakery\scripts\ftBuildGraphics.cs:4806] ftBuildGraphics/<ExportScene>d__143:MoveNext ()
    13. 0x00000209FDBE4170 (Mono JIT Code) [C:\Projects\D-Rifter\Assets\Editor\x64\Bakery\scripts\ftRenderLightmap.cs:3859] ftRenderLightmap/<RenderLightmapFunc>d__232:MoveNext ()
    14. 0x00000209FDB6F602 (Mono JIT Code) [C:\Projects\D-Rifter\Assets\Editor\x64\Bakery\scripts\ftRenderLightmap.cs:3325] ftRenderLightmap:RenderLightmapUpdate ()
    15. 0x00000209C285F0F7 (Mono JIT Code) (wrapper delegate-invoke) <Module>:invoke_void ()
    16. 0x00000209C28DF437 (Mono JIT Code) [C:\buildslave\unity\build\Editor\Mono\EditorApplication.cs:303] UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
    17. 0x00000209D1955675 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr)
    18. 0x00007FF969AAC010 (mono-2.0-bdwgc) [c:\build\output\unity-technologies\mono\mono\mini\mini-runtime.c:2809] mono_jit_runtime_invoke
    19. 0x00007FF969A32122 (mono-2.0-bdwgc) [c:\build\output\unity-technologies\mono\mono\metadata\object.c:2921] do_runtime_invoke
    20. 0x00007FF969A3B11F (mono-2.0-bdwgc) [c:\build\output\unity-technologies\mono\mono\metadata\object.c:2968] mono_runtime_invoke
    21. 0x00007FF784FD26AF (Unity) CallStaticMonoMethod
    22. 0x00007FF784FD229A (Unity) CallStaticMonoMethod
    23. 0x00007FF784FD2011 (Unity) CallStaticMonoMethod
    24. 0x00007FF782E2C3B6 (Unity) SceneTracker::Update
    25. 0x00007FF78305EDD0 (Unity) Application::TickTimer
    26. 0x00007FF7838F58C0 (Unity) MainMessageLoop
    27. 0x00007FF7838F82DF (Unity) WinMain
    28. 0x00007FF78659B652 (Unity) __scrt_common_main_seh
    29. 0x00007FF9B2A77974 (KERNEL32) BaseThreadInitThunk
    30. 0x00007FF9B45BA271 (ntdll) RtlUserThreadStart
    31.  
    32. ========== END OF STACKTRACE ===========
    33.  
     
    Last edited: Nov 6, 2019
  10. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    Interesting is that, Render Settings GILod Mode Enabled set to false in the storage (checked that with debug tools) , but it still comes as a true in debugger.


    Edit: Ah, it gets enabled due to VRAM optimizations. Well, that means I'm screwed, right?
     
  11. a_korsakov_loona

    a_korsakov_loona

    Joined:
    Feb 13, 2019
    Posts:
    1
    I have issue on MacOS after push Button "Render", but my co-worker have normal behavior on Win10. (My MacOS account is administrator)
    Can someone help me?

    Code (CSharp):
    1. DllNotFoundException: simpleProgressBar
    2. ftRenderLightmap.ProgressBarEnd (System.Boolean freeAreas) (at Assets/Editor/x64/Bakery/scripts/ftRenderLightmap.cs:859)
    3. ftRenderLightmap.TestSystemSpecs () (at Assets/Editor/x64/Bakery/scripts/ftRenderLightmap.cs:364)
    4. ftRenderLightmap.RenderButton () (at Assets/Editor/x64/Bakery/scripts/ftRenderLightmap.cs:790)
    5. ftRenderLightmap.OnGUI () (at Assets/Editor/x64/Bakery/scripts/ftRenderLightmap.cs:1580)
     
  12. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    Its Windows x64 + Nvidia plugin. There's no way it will work on MacOS.
     
  13. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    Also, @guycalledfrank , does disabled mesh renderer components still getting baked, or they're skipped upon processing?
    I've got a bunch of those, with Contribute GI still enabled.

    E.g. when gameobject is enabled, but mesh renderer is being disabled?

    Edit: They don't seems to be included.
    Edit2: Disabling VRAM optimization did the trick. Seems like it fits the VRAM in the end, approximation ended up not really accurate. But it didn't fit in the RAM with the optimizations enabled.

    Also, I wonder if its possible to somehow prevent lights from baking on lightmaps that are too far away?
    I've got a large scene that includes both interior sections and exterior. And interior lights are still attempted to be baked on the lightmaps of the outside which increase baking time by a lot.


    TL;DR: I need some kind of way to bake objects separately. Interior / exterior. Or something like that. Because baking even on GPU takes about 6h on not that high quality settings.
    (Plus side - it at least bakes)
     
    Last edited: Nov 7, 2019
    guycalledfrank likes this.
  14. HenriSweco

    HenriSweco

    Joined:
    Aug 8, 2016
    Posts:
    28
    Is there a reason the interior / exteriors aren't in separate scenes(can still be loaded at the same time)? There would be an easy toggle https://geom.io/bakery/wiki/index.php?title=Manual#Split_by_scene

    This is what you're looking for if splitting by scene isn't an option https://geom.io/bakery/wiki/index.php?title=Manual#Bakery_Lightmap_Group_Selector
     
    xVergilx likes this.
  15. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    I'm already using multi-scene setup, just got no idea if baking separately will work after loading scenes together.

    If it does work, I'll try that thanks.

    Baking via lightmap group (Render selected) still renders all scenes setup.
    So idk what's up with that.
     
  16. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    Holy cow, it actually worked! This reduces bake time dramatically!
    I no longer need to rebake everything, thank you again!
     
  17. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,671
    When Bakery performs UV padding adjustment or runs xatlas, results are saved into the assets (not into original FBX, but the representation Unity uses).
    On top of individual mesh UVs, there is a per-instance scale/offset that defines their position in the lightmap atlas: https://docs.unity3d.com/ScriptReference/Renderer-lightmapScaleOffset.html
    I'm not sure that Unity's FBX exporter takes it into account, but you can make a script to generate copies of desired meshes with scale/offset applied directly to UVs.

    Somehow I forgot what exactly I wanted to fix. So lightmap static objects with scale_in_lightmap=0 cast shadows on everything by design (just like if their scale was > 0). This is important to be able to have non-baked objects affecting the lightmap. If you want object to not cast any shadows/GI, disable shadow casting on the mesh renderer.

    You are either trying to generate too many lightmaps, or the scene is extremely high-poly. The suggestion is to reduce resolution or geometric complexity respectively.
    How much memory does your editor already take before baking?

    See this.

    Heh. Don't worry - just send me your invoice ID, and I'll remove it from the database. You'll be able to re-register again.

    Yep.

    Sure. You need Bakery shader to sample SH lighting, standard Unity shaders don't support that (see feature compatibility table).

    Seems to be working on 2019.2.9. Are you sure you have emptyLightingData.asset in the project? If so, which folder? Can you open ftRenderLightmap.cs, find this line:

    if (AssetDatabase.CopyAsset(bakeryRuntimePath + "emptyLightingData.asset",  outName))


    ... and before it, add another line:

    Debug.LogError("FROM: " + bakeryRuntimePath + "emptyLightingData.asset" + ", TO: " + outName);


    Then check what it prints before the error and send it here.

    Doesn't matter, as changes are applied using an asset postprocessor.

    "Render selected groups" should only render the groups which include currently selected game objects.
    If you didn't manually setup the groups (using the component), then objects are grouped pretty much randomly (I was planning to group them by proximity but didn't have time).
    If you have GI enabled (bounces > 0) and use Render Selected Groups, then you also need all other groups to be previously baked, otherwise it won't be able to look up lighting from those (and fail the bake).
    The requirements are rather obscure, so I even removed the button from "simple" settings (and will possibly remove it completely).

    This is related to GI VRAM optimization. It is possible it doesn't work well with Render Selected.
    BTW, Render Selected won't reduce VRAM usage (normal Render does sequential passes over all groups anyway).

    Using GI VRAM optimization isn't normally needed, unless the scene is absolutely enormous. Maybe check other tips here.

    It would help to see what kind of scene you are baking and the settings you use.

    MacOS is not supported, sorry:

    upload_2019-11-8_16-1-29.png

    Skipped in both cases.

    Lights are tested against LMGroup bounding boxes, but as previously mentioned... objects are grouped a bit randomly by default. However, if you use manually defined Lightmap Groups for different parts of the world, they'll only use the lights intersecting their bounds.
    Additionally, LMGroups have the bitmask property that corresponds to a similar one on the lights. This can be used to force set specific lights for specific areas without relying on bounds. Take a look at example_mixed_directional_mode, it uses the bitmask to only use 2 lights for each plane.

    Separating parts of the world into different scenes is also a great idea, but not always viable.
     
    xVergilx likes this.
  18. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    About 2.5 GB. Baking skyrocketed it to 14+ gb until the crash upon lodding.
    Outdoor part is quite large (about 1.5x1.5km) with terrain (0.1), lots of background meshes (0.1 lightmap scale) as well as some 1x meshes for higher details.

    I've also noticed that lightmap scale doesn't help in my case (prepare / baking time / VRAM / RAM is unaffected).
    Is there any difference by lowering scale? (Except result lightmap size ofc). This might be subjective though.

    In my case splitting environment scenes into two scenes (indoor / outdoor) did the trick.

    Now it only takes 20 mins to bake high res interior, and about 40 min low-res outdoor area.

    About LMGs - I haven't got any setup yet, so it should cut down light "bruteforce" areas as well.

    This one is nice as well. I'll try it. Thanks :)
     
    guycalledfrank likes this.
  19. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,671
    Is it with Terrain Optimization on or off? It is best to enable it for high-resolution heightmaps (>= 2048). In fact, 4x2048x2048 heightmaps with optimization OFF can be enough to make GTX 1080 go out of VRAM (but fine when it's enabled).

    Try more radical values, like 0.001. It is possible that you have large parts of terrain that can't be split into multiple lightmaps, but their area is more than 10x larger that what would fit into a maximum resolution atlas (e.g. min(4096, 40960 * 0.1) = still 4096)

    LM size directly affects VRAM usage.
     
    xVergilx likes this.
  20. dienat

    dienat

    Joined:
    May 27, 2016
    Posts:
    417
    What is the advantage of this asset compared to the gpu lightmapper unity has in unity 2019?
     
  21. Quatum1000

    Quatum1000

    Joined:
    Oct 5, 2014
    Posts:
    889
    Impossible with xNormal. It's not possible to take meshes into account and use separate UV2 for baking.
     
  22. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,671
    More control, more features, faster final bakes. Also I'm here to offer advice/fix stuff in a day. And it supports a wide range of Unity versions (including very old ones). Did I mention you can also offload baking to another PC via LAN?

    Ahh. OK, right. I'm doing the new release today or tomorrow, so the code is locked for now, but will add per-group output path after that.
     
    Last edited: Nov 9, 2019
    Quatum1000 likes this.
  23. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,347
    I have a big archiecture scene to bake but my GPU is to weak.
    Does anyone know a webservice where I could bake with Unity+Bakery?
     
  24. Quatum1000

    Quatum1000

    Joined:
    Oct 5, 2014
    Posts:
    889
    Untitled-1.jpg
     
    guycalledfrank likes this.
  25. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,671
    I think someone mentioned AWS in the thread...

    -----

    Meanwhile I'm looking into shadergraphs and the possibility of extending them with extra Bakery features.
    So far:
    - LWRP PBR graphs don't have the "override baked GI" option, so they can't be extended.
    - Managed to get vertex color, RNM and SH working in HDRP. Can someone try the attached package? There are 3 subgraph assets you can drag'n'drop into your graphs and attach to baked GI output. No lightmapped specular yet, but seems doable.
    - Impossible to add vertex-baked shadowmasks, as well as directional and SH data, because shadergraphs don't allow to run code at vertex level. I need to unpack vertex data in VS, them pass it down to PS, unpacking interpolated encoded data is useless.
    - Shadergraphs seem to be still a fresh/buggy tech. Ran into a few NullReferenceExceptions coming from the editor. Duplicating subgraph assets seems to generate broken copies. Creating subgraphs from grouped nodes seems to fail (sometimes?). Often custom code nodes got stuck, complaining about shader errors that were already fixed... had to recreate the node.
    Generally I think adding a whole minefield of potential bugs between the user and the shader doesn't seem like a right idea; I still think Unity needs to implement a nice, extensible API to manipulate their pipelines from regular code.
     

    Attached Files:

    keeponshading and pragmascript like this.
  26. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,671
    Last edited: Nov 10, 2019
  27. dl290485

    dl290485

    Joined:
    Feb 4, 2018
    Posts:
    160
    So I got in to the Github with the invitation. But I have no idea what I'm meant to do now. Firstly, I have no idea which file listed there I need. None are labeled with the error I'm trying to fix. Second; what do I even do with the file? Copy it to the directory where Bakery is an replace a file there?

    The error I have is "unity bakery object_exporterrain was destroyed mid-export". Seems to be due to using CTS for the terrain shader, or by using Landscape Builder to make the terrain, or both.
     
  28. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,671
    upload_2019-11-10_21-0-12.png
     
  29. spaceemotion

    spaceemotion

    Joined:
    Sep 29, 2015
    Posts:
    95
    @guycalledfrank Okay, so instead of via twitter I thought about sharing my experiments with LWRP here.

    We're using 2019.3 so that might be the issue why I am only getting the following image in my current test setup:

    Edit: I finally got it to work, i simply used the wrong combination of settings (atlas packed with vertex shaders):

    upload_2019-11-10_22-9-41.png

    upload_2019-11-10_21-51-13.png
    PS: This is actually the first time I've tried using Bakery, so I might be doing something wrong entirely. Cheers!
     
    Last edited: Nov 10, 2019
    guycalledfrank likes this.
  30. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,671
    Cool. Is the scene evenly lit from all sides? Can't see much directionality on the picture.

    Regarding incorrectly looking UI on 2019.3: for now I just hope it'll get fixed when it comes out of beta. AFAIK latest non-beta release is 2019.2.11 (where it looks fine).
     
  31. spaceemotion

    spaceemotion

    Joined:
    Sep 29, 2015
    Posts:
    95
    Yes, for some reason I can't get the scene to be black at all. Disabling all Lights simply makes everything evenly lit. Activating them only adds this "touch of a shadow". This is using the RNM variant (I tried looking through the wiki, what does it stand for?)
     
  32. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,671
    OK now I see that you have Directional Mode = None (unfortunately broken beta UI makes it harder to see). You need to bake in RNM mode to get any use of the RNM shader.

    If you don't know what RNM is... maybe don't use it? You don't need any special shaders for regular color/directional/shadowmask lightmaps.
     
  33. spaceemotion

    spaceemotion

    Joined:
    Sep 29, 2015
    Posts:
    95
    Alright, looked it up and found your twitter post about it.

    Using the spherical harmonics variant works wonderfully (skylight + directional + blue point light)!

    upload_2019-11-10_23-19-59.png
     
    keeponshading and guycalledfrank like this.
  34. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,671
    Much better! Will look even cooler after I add baked specular support to the subgraphs :)
     
    keeponshading and spaceemotion like this.
  35. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,671
    Who could've thought? Bakery v1.65 was submitted to the store!

    Changelog:

    - Skinned mesh renderers are now supported.
    - Updated denoiser to take advantage of RTX hardware. Use "Legacy denoiser" checkbox if you encounter any problems.
    - Added shader subgraphs for HDRP and LWRP (support for per-vertex, RNM and SH lightmaps).
    - Added "Samples Multiplier" option affecting quality of all lights and GI. Use it to quickly switch between draft/final quality.
    - New LMGroup assets are now always created in the active scene folder.
    - Added "Bakery Always Render" component to force baking objects even if their renderers are disabled. Useful for invisible shadow casters.
    - Added "Adjust sample positions" option to toggle default leak prevention algorithm.
    - Added "Flip normals" option to LMGroups.
    - UV padding for particular models can be now saved to an asset and locked (Utilities -> Save UV padding to asset).
    - Added C# events: OnFinishedFullRender, OnPreRenderProbe and OnFinishedProbes.
    - Fixed terrain exporting errors after any warning dialog box was shown.
    - Fixed Light Meshes with selfshadow = on sometimes adding black spots to lightmaps.
    - Fixed scene view being stuck in Checker Preview mode if it wasn't manually disabled.
    - Fixed incorrect packing of renderers from LMGroups using "override resolution".
    - Fixed Unity switching to directional lightmap mode when only color lightmaps are present.
    - Fixed incorrect float->string conversion in newer Unity versions when using normal offset option in LMGroups.
    - Fixed texture settings not being correctly applied when output path had different slashes.
    - Fixed SH lightmaps having color clipping/banding in dark corners.
    - Fixed Light Meshes being incorrectly culled in L1 light probe mode.



    upload_2019-11-11_17-30-39.png
     
    fuzzy3d, confy, osss and 2 others like this.
  36. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    Hi. In case you did not gave this information already to the HDRP team you could forward it to the thread
    Feedback Wanted: Scriptable Render Pipelines
    It s regulary watched and thats some valuable information for the HDRP team .
     
    guycalledfrank likes this.
  37. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937

    Epic update log.
    Will jump into tests if download is available in AS.

    FYI.
    There are the official
    https://github.com/Unity-Technologi...rojects/HDRP_Tests/Assets/GraphicTests/Scenes

    and under
    https://github.com/Unity-Technologi..._Tests/Assets/GraphicTests/Scenes/2x_Lighting

    and
    https://github.com/Unity-Technologi...sts/Assets/GraphicTests/Scenes/8x_ShaderGraph

    there are nice minimal example scenes for automated tests.
    Probably there is a fast way to fork and to add some simple bakery baked GI related minimal example scenes.

    I use them since some months and it was/is really useful for learning and testing own stuff.
     
    Last edited: Nov 11, 2019
    guycalledfrank likes this.
  38. Jan_Hasse

    Jan_Hasse

    Joined:
    Sep 11, 2017
    Posts:
    21
    Hey Frank, im already using the Bakery Specular shader on my Models.
    Im not sure why i dont get any depth by the normal map when using SH.
    When i change to "Baked Normal Maps" im getting the depth i like to have. :eek:
     
  39. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,671
    And it's available now!

    Do you have "Allow SH Lightmaps" checkbox enabled on the material?
     
  40. sewy

    sewy

    Joined:
    Oct 11, 2015
    Posts:
    150
    As this is one of the solution - will try it for sure, it is also a discrepancy with in-build lightmappers which are fine with that. How this setting for baked static could interfere dynamic lighting?
     
  41. peeka

    peeka

    Joined:
    Dec 3, 2014
    Posts:
    113
    Hello!, is addressable scene shadowmask loading issue fixed yet?
     
  42. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,671


    Sneak peek at what's coming next:
    https://twitter.com/guycalledfrank/status/1194384365448511488


    It was kinda working this way back in Unity 4 with Beast, and as I started developing Bakery a long time ago, it inherited some of these old workflows :D

    ... why should it interfere with dynamic lighting?

    Didn't take a look at addressables yet.
     
    ArchVizPRO and xVergilx like this.
  43. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    guycalledfrank likes this.
  44. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,671
    If anyone wants to test, here is an updated LWRP shadergraph package implementing lightmapped specular from dominant direction maps (not from RNM or SH for now).

    https://drive.google.com/open?id=1EhNeLMi6ansOAbPpa65vXMXlwkubfFET

    As there is no "override baked specular" option in either HDRP/LWRP, I have to hack it by writing to emission instead. I wonder if it's hard or okay for you to use?
     
  45. HeliosDoubleSix

    HeliosDoubleSix

    Joined:
    Jun 30, 2013
    Posts:
    148
    Awesome, I was just hoping for this!

    Cant wait to test ( is there a preview build somewhere? )

    Theres definitely interest here in getting that into a runtime, integrated with the rest of the camera view/shaders ( not for games so much but as use for say walking a client thru changes say in arch vis especially even if just in editor )

    I'm working with very heavy scenes and the 'Export scene' part really takes its toll, not sure if there are any low hanging fruit to cache/speed that up.

    ( just noticed it seems to run ies2tex many times even though they all spit out the same cookie.dds so perhaps that could cache better when many lights use the same IES? )

    This product has saved me so many times, I would actually be unable to use Unity anymore on some projects without it.


    Thanks, Alex
     
    Last edited: Nov 13, 2019
    guycalledfrank likes this.
  46. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,671
    Not yet - will push to github as soon as it's ready.

    That's possible but... rather impractical. Scene rebuild is not immediate and interiors can take a long time to converge from a noisy image...

    Preview has to go through the same export phase unfortunately. Can it be optimized? Certainly yes, although part of this is just Unity being slow at scene traversal/getting mesh data. Another part is my slow UV atlasing code :D I should do a thorough profiling session on that.

    Oops - yeah, will cache that

    Thanks! :)
     
  47. ViewportAU

    ViewportAU

    Joined:
    Mar 26, 2014
    Posts:
    26
    Hi, we have a little issue here. We are baking big houses, and we are getting small artifacts on corners and around small objects. I know it can be fixed by increasing Texel per unit or Scale in Lightmap on those objects, but the problem is we can not go to high because of bakery crash. (it has been tested in many different machine configurations). I know it can also be solved by modelling the mesh in a clever way where we can only increase texel resolution where is required, but this would be extremely time consuming and not practical at all. I wonder if you have a solution for this.
     

    Attached Files:

  48. noobynobody

    noobynobody

    Joined:
    May 9, 2019
    Posts:
    75
    Is "Automatic atlas packing" similar to Mesh Baker's texture atlasing or are they two different things?
     
  49. bansheesoft

    bansheesoft

    Joined:
    Oct 3, 2014
    Posts:
    62
    Love the product still!
    However, is there a method to revert to 1.6 I am having real issues with sub surface scattering (Crashes) and want to revert from 1.65 to 1.6. Of course the asset store does not allow this.

    Thanks!
     
    guycalledfrank likes this.
  50. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    562
    Is there any examples of what a lightmapped outdoor forest type scene with unity terrain would look like. Talking about moving trees in the wind etc. OR is bakery not a dynamic type solution for the more outdoor dynamic type environments and made for much more static type scenes? With unity deprecating enlighten and progressive no matter how much I try it still don't like it still looking around for eventually when unity 2020 comes out I'll have to move on from enlighten when that time comes.
     
    newguy123 likes this.