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. liudian208

    liudian208

    Joined:
    Aug 30, 2018
    Posts:
    59
    optional only, you can bake using any shader with metapass
     
    guycalledfrank likes this.
  2. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,667
    I'm still far away from my PC at the moment (2 days left), but as far as I remember the maximum value is 64. I noticed Unity BC6H compressor producing odd results with brighter values.

    Float color buffer: 2 options.

    a) Create an ARGBFloat render target, blit the lightmap texture into it (better if compression is set to None). Create an ARGBFloat Texture2D, call ReadPixels to get RT contents into it, then GetRawTextureData to obtain the buffer.

    b) If you didn't clear Bakery temp folder after the last bake, it will contain the original lightmap, unclamped, raw 16 bit; maximum value is what half-floats can store; the lightmap will have the same name, but .lz4 extension.
    There is a shortcut to get a float buffer directly from these files (I use it for probes and vertex colors): halffloat2vb function. Find this line in ftRenderLightmap.cs for usage example:

    errCodes[0] = halffloat2vb(scenePath + "\\probes_final_L0" + (compressedOutput ? ".lz4" : ".dds"), pointer, 2);


    Last option (2) tells it the results should be read as float4 per pixel.

    No visible errors? Anything special about alpha maps in your scene (or their count)?

    Light components are necessary, but shaders are optional. There is a "shader compatibility" table in the manual that shows additional features supported by Bakery shaders.


    There are 2 ways to deal with emission, check example_lights scene. You can just use regular texture emission with no additional components, or you can use the Light Mesh component. The difference? There is in fact a chapter in the manual that lists all differences. A balance between precision/performance. A very massive light (e.g. a ceiling, a lava pool) or lots of small dim LEDs are good candidates for regular material emission. A small/midsized bright light with high quality area shadows (even far away from the source) is a good candidate for Light Mesh.


    Adding components to existing game objects is enough, and you'll be able to quickly copy settings from Unity lights.

    There is a "bitmask" instead, although instead of object-light filtering it does LightmapGroup-light filtering (check the docs on what is a lightmap group).

    None. Although, I have to admit, I haven't yet tested it on the latest LWRP version (they release updates too quickly :D). But if my example scenes bake (after you let Unity convert their materials to LWRP), then it's fine (so do check).

    What problem do you encounter?
     
    liudian208 likes this.
  3. HSA_Architektura

    HSA_Architektura

    Joined:
    Apr 23, 2019
    Posts:
    6
    Hello guys,

    I'm rendering a house model imported through Sketchup from Archicad and .fbx placed into the scene,
    most of the rendering looks fine, but there's few bad leaks and weird artifacts on the model, as shown on pictures.
    bkr1.jpg bkr2.jpg
    For small things like a dark dot on the facade I just edit lightmap files in Photoshop and it works fine, but sometimes it's just impossible to find corresponding region in Photoshop or number of those errors is overwhelming.

    What could be the reason for those?
     
  4. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,667
    Either overlapping polygons or bad lightmap UVs. Maybe broken normals.
     
    HSA_Architektura likes this.
  5. HSA_Architektura

    HSA_Architektura

    Joined:
    Apr 23, 2019
    Posts:
    6
    I'm at the dead end I'm trying to export model as all different formats I can think about, but always effect has some errors.
    I've tried to import model as .fbx .obj COLLADA, LumionCOLLADA (this one gives me huge differance in rendering time, comparing at least 30minutes in other formats, and 3mins in .dea), 3ds and errors are always different, even if I resave the same model it generates the same kind of weird artifacts, but almost always the output is different, always some shadow appears, but in a different place of the model.

    Is there any good way to analyze model to rule out options to focus on fixing the real issue?
    I need to automate workflow of exporting models from Archicad without fixing each and every model manually, I tried to export from Archicad as BREPs, but it also didn't work properly, I'm wondering what type of geometry export would be optimal for Bakery to work properly? There are file formats and export options in Archicad for multiple rendering softwares so I'm almost certain that there is some workaround that will give us desired effect, maybe fact that archicad has build-in rendering engine of Cinema4d for internal rendering, therefore probably models are optimized for this renderer.
     
  6. HenriSweco

    HenriSweco

    Joined:
    Aug 8, 2016
    Posts:
    28
    Are you trying to generate lightmap UVs in Unity with the checkbox? That can simply be the issue. Even automatically generated lightmap UVs in other programs are better than Unity. But it seems you're also misunderstanding some of the differences between lightmap baking(and 'video game rendering' in general) and 'traditional' rendering. Archicads built in render engine is CineRender not Cinema4D(but it is the same as the built in one in Cinema4D), Cinema4D is the modeling software that can use many different rendering engines(Vray, Octane, etc), and many users opt for them instead of the built-in one.

    Cinema4D and Archicad can manipulate much more complicated models than what would be reasonable to expect out of Unity for real-time performance, it's not 'optimized' for anything especially, but definitely not inherently real-time.

    Archicad in no format will export proper UVs for lightmaps. At least not without a third party plugin. Lumion(which you seem to have) might. But I think Lumion is not a baked solution but uses real-time lights instead, so it has no need to have lightmap UVs either.
     
    guycalledfrank likes this.
  7. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    437
    you can look in the Unity's scene view for the tab called "shaded" and select UV chats to start to analyze the issue... I would suggest you use FBX binary format and import it into blender to rework the UVs as needed .. a few tips for optimal settings can also be found in the baker documentation under the "best practices" section
     
    guycalledfrank likes this.
  8. bhall_ww

    bhall_ww

    Joined:
    Feb 24, 2019
    Posts:
    1
    Hi there,

    Been trying to figure out how to reconcile using Bakery with the Terrain system. We've gone thru the documentation and the forums and we keep getting stuck at 0% while it's sampling points. Not sure what we might be doing wrong. Thanks for the help.

    Brian
     
  9. ViperTechnologies

    ViperTechnologies

    Joined:
    Apr 28, 2017
    Posts:
    42
    Hi there,
    I am having a huge problem for not a huge scene!
    I am using Bakery latest version
    Unity 2018.3.13
    My system config is :
    Cpu : i-9 9900K
    GPU: RTX 2080 (MSI DUKE)
    SSD: M.2 SSD EVO 970 Plus
    Ram : 32 GB 3800 MHZ

    here is the scenario I cant increase the texels from 10 although it is not a big scene compare to what ppl share in here!
    render took hours!
    i have to reduce everything to get a bake but finally, Unity crashes!
    or i face with this when i want to apply my desired setting which is not to high.

    here is the screenshot :
    WhatsApp Image 2019-04-23 at 10.13.38.jpeg
    any helps will be strongly appreciated!
     
  10. liudian208

    liudian208

    Joined:
    Aug 30, 2018
    Posts:
    59
     
    guycalledfrank likes this.
  11. BenWoodford

    BenWoodford

    Joined:
    Sep 29, 2013
    Posts:
    116
    Yes! Going to try it out now. This will be fantastic not only with the Quadro backpacks we have but also I just picked up a 15" Razer Blade with an RTX 2060 in - is the RTX performance improvement enough to make a mobile 2060 better than a desktop 1080 do you know?

    I like the "yes" on distributed rendering. This has me very excited.

    EDIT: Oh, no, I'm not going to test it yet sorry. Can you add me to the repo? https://github.com/benwoodford
     
  12. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,667
    You can send me the model (or its part), and I'll check it. Usually these problems are easy to locate/fix.

    I usually do the following:
    - Check the UVs via my UV visualizing shader (posted it somewhere in the thread...). New Unity versions have their own UV visualization as Dawie says.
    - Check if the model is lit and textured correctly with standard realtime lights. Bugged normals/overlapped polygons will be visible, if there are any.
    - Perform a deeper check in 3dsmax, if needed.

    Please check if there are any errors in Unity console.

    Do you have any screenshots of the scene to get an idea of its scale? Even if the scene is not big, depending on the amount of lightmapped faces, it can have big complexity. E.g. a building with only outer walls will take less time and space than a building with detailed interiors.
    How many lightmaps are generated? How are they distributed over objects? Maybe you don't really need 10 texels per unit for some distant object, but want even more for detailed objects? How many triangles are in the scene?
    At which point the crash happens? At the start, in the middle of the bake, or after "finished"?

    I think it's "yet", not "yes" :D Not there yet.

    I'm not sure, but it's possible. Give it a try :)

    Done!

    https://github.com/guycalledfrank/bakery-csharp

    https://github.com/guycalledfrank/bakery-compiled
     
  13. ViperTechnologies

    ViperTechnologies

    Joined:
    Apr 28, 2017
    Posts:
    42
    here is the screenshot of the scene :

    WhatsApp Image 2019-04-24 at 18.58.54.jpeg

    WhatsApp Image 2019-04-24 at 18.58.55.jpeg
    okay here are the details :
    when i enable RTX On :
    bkr err.PNG

    bkr err2.PNG

    bkr err3.PNG
    Running ftraceRTX lodselect "C:\Users\Viper\AppData\Local\Temp\frender" "lodselect" 2 0 210
    UnityEngine.Debug:Log(Object)
    <RenderLightmapFunc>c__Iterator4:MoveNext() (at Assets/Editor/x64/Bakery/scripts/ftRenderLightmap.cs:4305)
    ftRenderLightmap:RenderLightmapUpdate() (at Assets/Editor/x64/Bakery/scripts/ftRenderLightmap.cs:2993)
    UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

    88K polygons
    164K triangles
    103 lightmaps
    no matter what configuration i set ... it fails :(
     
  14. BenWoodford

    BenWoodford

    Joined:
    Sep 29, 2013
    Posts:
    116
  15. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,667
    These are known errors. Get a patch from github, it should fix that.
    In any case, 103 lightmaps seem too much, and the best thing to do right now is to reduce their count (this scene doesn't look like it should have more than 10). Do you use metric dimensions (1 unit = 1 meter)? Can you make a screenshot of some room with Checker Preview on?
     
  16. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,667
    If you bake with "combine with enlighten" checkbox, it won't kill it.

    Enlighten "realtime GI" only affects static lightmapped objects (and probes). The "realtime" bit only means you can change lighting conditions at runtime.
     
  17. Barritico

    Barritico

    Joined:
    Jun 9, 2017
    Posts:
    374
    Excuse me early for my question.
    It's more because of frustration.

    My games are focused on large areas of land where off-road racing is held. These are all my lighting needs.

    I have not managed to find any optimal configuration. Even, some of them, throw errors.

    Is there any "basic" configuration for these needs?

    Thanks to all the users and authors.
     
    guycalledfrank likes this.
  18. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,667
    Which errors exactly?
    For large open outdoors my suggestion is:
    - Use lower resolution, like 1 or even less (0.5, 0.25...) texels per unit. Increase "scale in lightmap" for important objects if needed.
    - Use Skylight with 16 samples instead of default 32.
    - You can get away with 2-3 GI bounces instead of default 5.
    - If baking performance is suspiciously slow, try disabling Terrain Optimization in experimental settings (usually it should bake faster WITH it, but I heard of some edge cases)
     
  19. ViperTechnologies

    ViperTechnologies

    Joined:
    Apr 28, 2017
    Posts:
    42
    Here is the checker preview
    bkr err4.PNG

    The Modeling is done in blender and it is in metric.
    How can i access the patches ?!
    please help me i am going to deliver this to a client :(.
     
  20. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,667
    Oddly irregular. Do you use "scale in lightmap" option with different values on these objects?
    AFAIK, Blender has decent auto UV generation. If you want to finish it quickly, I suggest generating one big UV layout for the whole scene directly in Blender (disabling "generate lightmap UVs" on the asset), then putting a Lightmap Group with "original UVs" mode on the root object. You will get 1 big lightmap for the whole scene with unchanged Blender UVs.

    You won't need if you get lightmap count under control. In any case, just PM me your invoice number + github username, and I'll add you to repo.
     
    ViperTechnologies likes this.
  21. ViperTechnologies

    ViperTechnologies

    Joined:
    Apr 28, 2017
    Posts:
    42
    thanks so much! we had a successful bake! it took nearly 8819.49 seconds with 4K resolution.
    scene view is fair enough :)
    bkd1.PNG
    bkd2.PNG

    i donno if there is a way that i can improve this further or not.
     
    guycalledfrank likes this.
  22. BenWoodford

    BenWoodford

    Joined:
    Sep 29, 2013
    Posts:
    116
    Ahhh, TIL
     
  23. BenWoodford

    BenWoodford

    Joined:
    Sep 29, 2013
    Posts:
    116
    Sadly, this is what I'm getting when trying to do a remote bake.

    Server: ftrace error: Can't decompress UVGBuffer position (5091)


    I assume I've set this up right: update Bakery from the C# github repo, update Editor\x64\Bakery with the compiled repo files, copy that Bakery folder to the rendering PC, run.

    It's erroring out after running
    Task 10 of 1538: ftrace fixpo12


    Doesn't appear to happen on a local bake

    On a sidenote, just tried a local bake and all the lighting seems to have radically blown up and anything at a distance is just black. This is using HDRP in 2019.1 so I don't know if that's related, using Full Lighting mode.
     
    Last edited: Apr 25, 2019
    guycalledfrank likes this.
  24. Hipfire_Kim

    Hipfire_Kim

    Joined:
    Oct 17, 2017
    Posts:
    4
    Hiya! I'm having trouble putting the awesomely beautifully baked prefabs into the scene. Unity freezes completely for minutes, sometimes even 10 when clicking on a baked prefab. Currently the lightmap folder for the most freezing prefab is 69mb, so its not a massive bake either. Could you help on this please? I tried finding posts about this already but couldn't. Maybe I suck at looking.

    As of current I'm unable to put the prefab into the scene, which is kind of a blocker.
     
  25. KospY

    KospY

    Joined:
    May 12, 2014
    Posts:
    153
    Does anyone found a way to use bakery in Subtractive mode without issues?
    I managed to make it work somehow by setting Bakery in full lightning mode and using a script posted here (from adslitw) to force direct lights to use subtractive, however all dynamic objects get wrong lightning.
    I think it's because direct lightning are added to the lightning of light probes, so objects placed in dark zone get lid by direct light instead of only using light probes. It doesn't happen when I use the native Unity lightmapper.

    That would be great if Bakery support subtractive out of the box, without it this asset is kindly useless for me.
    Subtractive perform nicely (direct and indirect light are baked), and allows shadows and reflection to work on dynamic objects. It's pretty good for mobile and VR, I'm surprised of the lack of discussion about it on this forum?
     
    guycalledfrank likes this.
  26. TokyoWarfareProject

    TokyoWarfareProject

    Joined:
    Jun 20, 2018
    Posts:
    814
    this light does not bake in full lighting but yes does bake with shadow mask
     

    Attached Files:

  27. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,667
    Interesting. So yeah, the remote bake is not tested well enough at the moment, and it's great someone is finally giving it a try :)
    Does it happen only with this one scene or all scenes?
    It would be also interesting to see full server log. Try:
    - Go to the folder where ftServer.exe resides
    - Shift right-click empty space
    - Click "Open command line window here"
    - Type:
    ftServer >> server.log

    - Hit enter
    - Try baking
    - After the error, close command line window and send me this server.log

    Can you check if for some reason lightmap assets have "Type" set to "Texture" instead of "Lightmap"?

    2019 is not officially supported yet. Last version I tested it on is 2018.3.8.

    Wow. Can you check it with Profiler? Open Unity Profiler and click "Profile Editor". Then drag the prefab and see what's recorded. Are you sure these prefabs aren't slow to instantiate on their own?

    Will do. Hopefully will be there with the next release.
    In my experience it didn't behave nicely though, often producing weird shadow color/incorrect shadow contrast.

    It should o_O It doesn't look like there is anything wrong with the light. What is even being baked in full lighting then? Screenshot looks like there are no lightmaps at all.
     
  28. brianmagno_unity

    brianmagno_unity

    Joined:
    Apr 26, 2019
    Posts:
    1
  29. HenriSweco

    HenriSweco

    Joined:
    Aug 8, 2016
    Posts:
    28

    From the documentation
     
    guycalledfrank likes this.
  30. cptSwing

    cptSwing

    Joined:
    Jul 2, 2015
    Posts:
    8
    Looking absolutely lovely, and head and shoulders above the broken Unity lightbaking system. Buying instantly once there's anything even resembling a beta version that works on AMD cards as well ... :)
     
    guycalledfrank likes this.
  31. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,667
    Yeah, RT GI is disabled to prevent potential conflicts (like same lights being baked by both and added together). If you know what you're doing, you can bake with the Enlighten checkbox mentioned by HenriSweco.
    Finally you can just hack it by removing the RT GI disabling line from ftLightmaps.cs (search for "Lightmapping.realtimeGI = storage.usesRealtimeGI", set to true instead).
     
  32. KennethC70

    KennethC70

    Joined:
    Apr 6, 2019
    Posts:
    6
    Hi there. When will Bakery support Unity 2019.1 ? Has anyone had success in using Bakery in Unity 2019.1?

    Or is Unity 2018.3 the only way...
     
  33. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,667
    Next release. Probably mid-May. In the meantime, please report any problems you encounter on 2019.1, so I know where to look.
     
  34. KennethC70

    KennethC70

    Joined:
    Apr 6, 2019
    Posts:
    6
    Thanks for the quick reply.

    Does it at least work with LWRP or HDRP in unity 2018.3 for sure?

    I need postprocessing stack so need to be using hdrp or at least lwrp.

    Since there is no trial verion of Bakery I want to be sure it supports lwrp or hdrp before I purchase Bakery. Please let me know asap.


    Thank you
     
  35. CodeStarrk

    CodeStarrk

    Joined:
    Jan 5, 2017
    Posts:
    37
    upload_2019-4-29_2-4-44.png
    Please help
    I don't understand why I am still getting these weird shadows, what am I doing wrong? If you need more info please ask I can provide, I'm pulling my hair out.. (it is a huge scene by the way so baking time took long (RTX 2060 laptop))
     
  36. BenWoodford

    BenWoodford

    Joined:
    Sep 29, 2013
    Posts:
    116
    I'll give those tips a try. Unfortunately due to a mix of things we need to be on 2019.1: HDRP in 2018.3 doesn't support VR for one. Awkwardly the lighting on the Unity GPU mapper is woefully incorrect sometimes, but the CPU mapper wants to take a good 24 hours to build what is currently only half the scene. It's all a bit of a messy mix of issues coming together so I'm hoping despite it not being supported we can get it working enough for our needs. Gotta work out this lighting blow-out feature first. I'd post screenshots but things are getting a bit sensitive there, got an email I can contact you on to work this out in private?

    Gonna take this one step at a time, first step is working out what's going on with the lighting, then I'll add the remote rendering back into the mix.

    Sidenote: any chance you could setup the Mesh lights to support matching the HDRP shaped lighting? There's Tube and Rectangle, assuming the area lights just copy settings and don't actually use the mesh itself then it would just be a matter of reading the shape data of those lighting types.

    Second sidenote: Are you able to make the progress bar not be "Always on top"? It's rather annoying constantly having it in the foreground, not sure if it's something Unity is enforcing though...

    EDIT: Just did a bake, unfortunately no dice, everything's blown up. The maps were indeed "Texture" instead of "Lightmap" but that didn't fix anything. I wonder, if I'm using HDRP do I need to use Physical Falloff?

    https://i.imgur.com/zCohGhR.png - result
    https://i.imgur.com/wcuKUye.png - one of the lights, albeit I only just enabled Physical Falloff. Notably it's not matching Lux, but the Candela equivalent is 320. Perhaps this is why I'm having this problem? What would be the closest equivalent value to an 80 Lux in Bakery?

    The maps are over-satured in their texture form too, so it's not just something happening when showing them in the scene
     
    Last edited: Apr 29, 2019
  37. Hipfire_Kim

    Hipfire_Kim

    Joined:
    Oct 17, 2017
    Posts:
    4
    "Wow. Can you check it with Profiler? Open Unity Profiler and click "Profile Editor". Then drag the prefab and see what's recorded. Are you sure these prefabs aren't slow to instantiate on their own?"

    tickGIInEditor.UpdateSceneStatic() takes 99.9% of resources
     

    Attached Files:

    guycalledfrank likes this.
  38. DavidJares

    DavidJares

    Joined:
    Dec 18, 2016
    Posts:
    50
    Hi. I have a problem ( Unity 2018.3.6f1) . After starting using Bakery, whenever I work in a scene without Baking , I have only grey scene view shading. ( Game view and Play mode is Fine ). It is like if it was broken ( but I guess/ hope its not ).How can I get my scene-view-shading correct agaain ? here is a picture of the problem : https://pasteboard.co/IcpXc3d.png
     
  39. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    437

    Hey david I don't use 2018 myself however can I suggest you try check the box for "Mixed Lighting" … also adding the directional light into the "Sun Source"
     
  40. Loards

    Loards

    Joined:
    May 2, 2013
    Posts:
    112
    Hi! i know that unity 2019.1 is not supported yet, but the "checker preview" is not working there.

    also, can i get added to the repo to get the fixes? Thanks!
     
    guycalledfrank likes this.
  41. DavidJares

    DavidJares

    Joined:
    Dec 18, 2016
    Posts:
    50
    @Dawie3565 thanks for your reply. Sadly Both does not help. Evene in a fresh Scene, every model that I drag into the scene looks in greytones. Only in a new project It works fine again.
     
  42. DavidJares

    DavidJares

    Joined:
    Dec 18, 2016
    Posts:
    50
    Now I tried removing bakery from my Project and it did help, as everything works again as it should.
     
  43. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    437

    Perhaps try the example_sponza scene in the bakery folders ?
     
  44. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    437
    using Easy Decal v1.6.8
    for some reason when trying to bake decals using easy decal latest version it is getting mushed and blobbed to unusable … any one use easy decal and have a method to deal with this or could some one suggest a decal tool that works with baked lightmaps
     
  45. Softelectro

    Softelectro

    Joined:
    Oct 9, 2013
    Posts:
    24
    To improve the rendering quality of sharp objects without increasing the number of texels, we separate UV at sharp.
    It works well with Unity renderers, but with Bakery, empty UV parts are filled with dark colors and there is not enough margin which creates black spots.
    Do you have a solution to correct this effect?

    Mesh of the object : Rendu-Wireframe UV joint.png

    UV Join : Rendu UV joint.png Lightmap Joint.png
    UV Separate : Rendu UV Dejoint.png Lightmap Dejoint.png
     
  46. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,667
    Last time I tried it did. But given HDRP is being updated very frequently, I'm not 100% sure.
    LWRP is more stable and must work.

    They don't look weird to me, just:
    - Low resolution
    - High contrast
    - Very sharp

    You can:
    - Make them blurrier (increase Shadow Spread on the light)
    - Or increase resolution
    - Or reduce contrast

    HDRP is still "preview" and changing rapidly, so I'm not sure if it's the right moment to work on this. Design-wise it's also a mess (unlike LWRP).

    Yes. The one thing I always wanted to change and always forget.
    Actually fixed it right now. Also made the taskbar button show progress:

    upload_2019-4-30_15-19-44.png

    Yes.

    I'm not sure the last time I used HDRP it even had these options. Will check.

    This is not Bakery code though. I'm not sure what to expect but can you try following?
    - Open ftLightmaps.cs
    - Find Lightmapping.bakedGI = true;
    - Set it to false. Save. Try dragging prefabs again.
    I feel like there is some weird unrelated logic being executed by Unity when bakedGI is set to true, and it still kinda works even if it's false.

    Not sure if related, but can you try enabling and then disabling Checker Preview in Bakery window (advanced settings)?

    Thanks for reporting! Will test the checker.

    Sure, send me your github username.

    Hmm how does it look?

    Do you mean custom lightmap UVs? It might be that there is simply no enough padding. Does it look good with automatically generated UVs?
     
    BenWoodford likes this.
  47. CodeStarrk

    CodeStarrk

    Joined:
    Jan 5, 2017
    Posts:
    37

    Thank you for the reply,

    I tried increasing the resolution in bakery but it still stays the same. Where can I find the other two options? (Shadow spread and contrast)

    Thanks
     
  48. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,667
    The resolution is mostly governed by Texels Per Unit (in case you were changing something else).
    Shadow spread is on the light component.
    By "contrast" I simply mean the difference between light and shadow brightness.
     
  49. Aki-DAI

    Aki-DAI

    Joined:
    Jul 30, 2015
    Posts:
    5
    First of all thanks a lot for making this powerful tool, which has made a progress which used to be tedius and painful become much affordable now.

    Secondly, may I ask am I the first people who met with question on baking lightmap with SpeedTrees' LODs?

    Just populate some free tree on a terrain made by Gaia of aroud 2048*2048 then tried to bake a lightmap with Bakery (I saw there is a checkbox for terrain optimization in Bakery's panel then I supposed it also works for unity terrains), then got 999+ error Bakery_Errors.jpg

    And this is my render settings...not very complicated because this is just a terrain for testing, and I want its indirect (AO) baked only, real-time shadows will be casted via a sun light in this scene:
    Bakery_BakingSettings.jpg

    Any idea on this?

    Thanks in advance!
     
    guycalledfrank likes this.
  50. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    437
    Secondly, may I ask am I the first people who met with question on baking lightmap with SpeedTrees' LODs?

    Just populate some free tree on a terrain made by Gaia of aroud 2048*2048 then tried to bake a lightmap with Bakery (I saw there is a checkbox for terrain optimization in Bakery's panel then I supposed it also works for unity terrains), then got 999+ error


    Hi Aki
    I also had the same issue before and found that many speed tree assets have incorrect UV's "out of bounds" .. this is not Gaia or bakery and mainly a speedtree issue … its been reported to Gaia already but even they have little control to fix it as it's responsible speedtree DEV is Unity..

    I ended up using non-speed tree assets in my project .. for the LOD subject in my case I baked LOD0 and used light probes for LOD1+ to reduce qty. lightmaps and memory size.. I like to use amplify imposters for LOD1+ this is just my preference .. hope this helps .. perhaps some others also may have recommendations for optimized LODs and baking ?...

    if you try harder than I did, you may find a few speedtree assets that do work correctly ?.. its not very forgiving trying to fix speedtree .spm formats as they may use material property blocks for the wind data
     
    Last edited: Apr 30, 2019
    guycalledfrank likes this.