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

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    i leave this here as an potential idea for animated precalculated Bakery Lightprobe Texture 3D's fitting to an animated Skybox day night cycle..... generated from a real HDR Timelapse or created via skybox creator asset

    https://forum.unity.com/threads/rel...ation-urp-hdrp-supported.823224/#post-6133880

    Do you think lerping between lots of Lightprobe Texture 3D s is doable. 50 or more for day night cycle......
     
    Last edited: Jul 26, 2020
  2. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,869
    Hey Frank, I have noticed Bakery keeps generating its lightmaps without mipmaps.
    This is an issue for VR because of texture "shimering" in the distance and performance too.
    Can you point me to the place in your code where you actually create the lightmap textures so I can force the mipmap generation?
    The problem is: I need to automate the process since I'm postprocessing heavily the textures on import via script but there seems to be a bug in Unity where, even if I set the texture properties to generate mipmaps, if the texture was created without mipmaps, it doesn't actually generate them unless I manually reimport the textures in the editor by hand.
     
    Last edited: Jul 27, 2020
  3. ProceduralCatMaker

    ProceduralCatMaker

    Joined:
    Mar 9, 2020
    Posts:
    108
    Hi, great module, thanks for it.
    Just wanted to signal a strange behaviour in installing Bakery on a complex project including ArchwizPro 6 model. In Importing the Archvix scripts flags were not on and was impossible to set them. As a result several compilation errors related to missing references and no Bakery tab in the editor,
    I have done a copy of the scripts from another project to get it working.
    I believe that ArchvizPro model already contains these scripts and so your installation disables importing them in the same project, but references are not set to the preexisting version.
    Is this OK and is there some setting that can be done to avoid this hack?
    thanks
     
  4. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,347
    (New) AssetStore doesn´t show bakery:

    upload_2020-7-28_13-53-49.png
     
  5. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,409
    Screen Shot 2020-07-28 at 8.07.56 AM.png
     
  6. fzr6

    fzr6

    Joined:
    Nov 19, 2016
    Posts:
    2
    Hi Frank ( @guycalledfrank ),

    I have an CUDA error when I try to bake lights with my GTX 1660 SUPER. Drivers are up to date, and I use the latest version of Bakery available on the asset store.

    edit : Using Unity 2018.4.24f1

    BakeryError.png
    This is my personnal computer, I have no problems with my work PC equipped with a GTX 970

    I join the log to this message.

    edit: It used to work several monthes ago, on previous versions of Bakery and previous drivers, but it is not an available solution for me to downgrade Bakery neither my GPU drivers.
     

    Attached Files:

    Last edited: Jul 28, 2020
  7. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,347
    After many months I have again quickly tested Bakery against Unitys GPU baker on current Unity 2020.1.0f1 (introducing RussianRoulette).

    After increasing Unitys samples in order to get almost identical image results I have determined that Unity bakes a bit faster now (Unity 68 seconds vs Bakery 71 seconds).

    Personally I still prefer bakery, only because it allows 5 bounces which noticeably gives more realistic lightmaps for interieur archviz.

    I just read that Unity will unlock bounces in 2020.2......

    MrF, really love your product, but maybe it´s time to investigate (maybe implement your progressive stuff into bakery?...)
     
    Last edited: Jul 28, 2020
    guycalledfrank and atomicjoe like this.
  8. css123456

    css123456

    Joined:
    Jul 29, 2020
    Posts:
    1
    Hello,
    We are struggled in two problems when using Bakery1.71:

    1. ftrace error
    upload_2020-7-29_18-40-23.png upload_2020-7-29_18-40-33.png

    Hello, if baking lights contain spotlight or pointlight. (Directional light and area light work well)
    It will show ftrace.exe has stopped and give error message as above images.
    1st time we got Unknown error(255).
    After updated GPU's driver, we got denoiser error: Unknown error (1)

    Here are the settings
    upload_2020-7-29_18-40-52.png

    How can we solve this problem?
    Thanks.
     
  9. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,666
    50 might be too much. Still doable, if the scene is small and you just swap different A and B textures, shader still does one lerp. Video memory is your limit.

    Interesting fact: I'm consulting a guy who is currently integrating volumes into their HDRP project. They hooked it to shader graphs and actually used lightmap-style SH specular for them. And it looks kinda neat! I guess I'll provide a similar built-in graph in the next release.

    By design. Mipmapping lightmaps is a bad idea (see my writeup). I found shimmering is usually better than leaks (especially bright leaks in dark corners... ugh). Often lightmap resolution is also not super high, so shimmering is not visible. When it is actually high... yeah, it becomes a problem. For really distant objects it's a good idea to LOD the whole geometry chunk together with lightmap. That's what The Witness does (and they spent a long time dealing with lightmaps).

    Check ftTextureProcessor.cs. This is where all asset settings are set.

    I did use Bakery with one ArchVizPro project before. Can you elaborate which flags/errors do you mean?

    Weird. Are you sure you are using the latest Bakery version? Is this error reproduced every time you bake this scene? But only on 1660, and not 970? Sounds driver-bug-ish. But maybe not. If you can send me any project/unitypackage where the bug is reproducible, I'll try to pinpoint the potential cause.

    upload_2020-8-1_15-10-31.png

    What scene were you testing and what was your lighting setup? RTX mode y/n? :)
    Unity can cut some corners during the scene export quite a bit, as they have all data ready on the engine side; I only have C# API access, and the lightmapper is in another executable, so my exporting process is clumsier.
    Bakery also has some light switching overhead which was removed for point lights with the new "batch point lights" option, but can still be a problem when you have e.g. lots of area lights (will fix).
    I feel like Bakery's light/GI loop is faster though; but Unity were optimizing theirs recently...

    Weird, I don't even have an error code like that. Are you sure you downloaded the files correctly? Is there anything in .ftracelog.txt? (last line?)

    Can you also show the last line from .denoiserlog.txt?
     
    Mark_01 likes this.
  10. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,869
    You're not wrong in general, but there are times when it's really needed like in VR or when you want your lightmaps to be loaded asynchronously per mipmap Unreal Engine style (now Unity supports this too). So forcing it on the user is not that great of an idea. A better general solution would be to enable lightmap's mipmaps and force a mipmap bias so it always shows the highest resolution mip when it's loaded and available. This way you can use the Texture Streaming feature in the player settings and still avoid lightmap leaks.
    I'm pretty happy modifying the source myself to fit my needs, but having a checkbox to disable it in the interface would be really nice, like exposing the L2 coefficients multiplier in the bakery gui to fix lightprobes lighting overshoot instead of having to modify the source everytime :p

    On another topic, I have checked your game WIP and it seems exactly the kind of game that I love!
    Are you still working on it?
    Any news in english? I'm not fluent in Russian lol
     
    Last edited: Aug 1, 2020
    guycalledfrank and Akshara like this.
  11. tysuu

    tysuu

    Joined:
    May 3, 2017
    Posts:
    4
    I met same issue last weekend. After change "mesh compression" to none. And upgrade ver 1.71 , recreate scene. everthing gonna fine. Hope u find out ur problem.
     
    guycalledfrank likes this.
  12. PolygonFormation

    PolygonFormation

    Joined:
    Apr 1, 2009
    Posts:
    68
    Hey Frank,

    I have an editor scripting question on Bakery Lightmap Group Selector
    I have many objects in my scene that I need to assign one group for each, but I would like to automate it.

    I write :

    Code (CSharp):
    1.  
    2. BakeryLightmapGroupSelector blgs = t.GetComponent<BakeryLightmapGroupSelector>();
    3. if (!blgs)
    4.     blgs = t.gameObject.AddComponent<BakeryLightmapGroupSelector>();
    5.  
    Now I'd like to play with my blgs reference and create a Group, tweak resolution, directional mode etc... but I can't find that. Am i doing wrong or do I have to click "Create New" on each object ?

    Keep up the good work !
    Thanks

    Marc
     
    guycalledfrank likes this.
  13. Monil

    Monil

    Joined:
    Apr 24, 2012
    Posts:
    102
    Hi,

    have you tried with
    Code (CSharp):
    1.  
    2. if (t.GetComponent<BakeryLightmapGroupSelector>() == null)
    3.    t.gameObject.AddComponent<BakeryLightmapGroupSelector>();
    4. BakeryLightmapGroupSelector blgs = t.GetComponent<BakeryLightmapGroupSelector>();
    5.  
     
  14. PolygonFormation

    PolygonFormation

    Joined:
    Apr 1, 2009
    Posts:
    68
    My reference is working fine, like I guess your example too.
    I was more asking about the proper way to access what's exposed to the inspector for that component. (Create Group etc..) that I can't find in script.

    Thanks
     
  15. Monil

    Monil

    Joined:
    Apr 24, 2012
    Posts:
    102
    I misunderstood
    have you tried with Assets\Editor\x64\Bakery\scripts\ftLMGroupSelectorInspector.cs ?
     
    guycalledfrank likes this.
  16. PolygonFormation

    PolygonFormation

    Joined:
    Apr 1, 2009
    Posts:
    68
    I'll take a look. I guess I need to create these ScriptableObject myself and bind them.
    But maybe I can use what's already done in there.
    Thanks
     
  17. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,633
    I tried bakery a few years ago, it constantly failed, I cant remember the errors right now. Have a lot of bugs been fixed in the last few years or are people still suffering from errors? Also I remember it needed a script added to every light, is there yet a wizard that can do this for you? Or would it make sense to write one myself that just adds the relevant bakery script to relevant objects?
     
  18. Allan-MacDonald

    Allan-MacDonald

    Joined:
    Sep 21, 2015
    Posts:
    112
    Hey there. I'm just beginning to dig into baking light maps in general. I don't have much experience, but have been tinkering with Bakery this evening and can't quite get the behavior that I am looking for. Our game is a basic diffuse lighting for mobile, nothing too fancy. All I need is to bake all the environment's static objects, and then leave a few items to be dynamic and have the shadows blend nicely. From the sounds of it, Indirect and Shadowmask is what I need. But I can't figure out how to get the dynamic shadows to cast off my characters at the same time as I have the baked shadows visible. When I zoom in it switches to dynamic shadows, and when I zoom out it switches to baked. But in each situation one of the sets has no shadows, they don't both display at the same time. When I zoom out the Baked Shadows display but then the dynamic ones turn off, and vice-versa. I've read the Documentation, I don't remember reading anything about this if it is a feature, or maybe I just misunderstood what the Indirect + Shadowmask does. Anyone have any tips on this? Thanks
     
  19. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,869
    That's because you have set the lightmaps as Distance Shadowmask instead of Shadowmask. Go to the lighting window and set it to Shadowmask only (not Distance)
    read the docs about it here:
    https://docs.unity3d.com/Manual/LightMode-Mixed-Shadowmask.html
     
    guycalledfrank likes this.
  20. Allan-MacDonald

    Allan-MacDonald

    Joined:
    Sep 21, 2015
    Posts:
    112
    @atomicjoe @guycalledfrank - Thanks for the speedy reply. I read through that doc, and I do have all the settings configured correctly afaik. Is there anything else that I could be missing? The Shadow Distance option in the Quality Settings still dictates the point at which I switch from Baked to Dynamic, I still don't get both at once. I have my static objects in scene flagged as static+everything, the few dynamic object I have are not flagged as static. In their mesh renderer they have have receive shadows and cast shadows on. Is there any other settings in Lighting/Scene, or per-object Mesh Renderers that I need to look at? Cheers
     
  21. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,666
    I really dislike this idea for reasons mentioned. Why would anyone like to stare at low-res leaky lightmaps?

    Given both of these are more like advanced sub-optimal hacks... I'm not sure.
    Anyway, I've added a file named ftAdditionalConfig.cs. It now contains mipmapping and probe/volume convolution settings. You can tweak them as you want. If you're updating Bakery, you'll only need to leave/merge this file, which should be easier than merging various huge files. Not sure about fitting these in UI, it's already too packed :D

    Did you play the demo? :D
    Yeah, I'm supposed to be still working on it. For some reason I tend to work more on the tech side though. Argh. I have to work more on the game itself.
    Twitter (fadedthegame) contains any progress worth mentioning in English.

    CUDA error caused by mesh compression? Really weird. Which value were you using previously?
    I noticed that lightmaps on some triangles may collapse/get dark if mesh compression is set to high (8 bits for UV is bad) though.

    UI logic is in ftLMGroupSelectorInspector.cs. "Create new" does this:

                        BakeryLightmapGroup newGroup = ScriptableObject.CreateInstance<BakeryLightmapGroup>();
    newGroup.resolution = newRes;
    newGroup.bitmask = newMask;
    newGroup.mode = newMode;
    newGroup.renderDirMode = newDirMode;

    AssetDatabase.CreateAsset(newGroup, fname + ".asset");
    AssetDatabase.SaveAssets();


    And then assigns it to groupSelector.lmgroupAsset

    Some projects/use cases are not very Bakery-friendly. Some are a perfect fit. Depends on the case, but I hope most users are alright.

    No wizard yet. Wrote a little guide a few days ago: https://geom.io/bakery/wiki/index.p...I_quickly_port_my_existing_scene_to_Bakery.3F
    Shouldn't take long.

    Make sure that:
    - Render mode is set to Shadowmask in the main window
    - Distance Shadowmask checkbox is unchecked
    - You have a Bakery Direct Light on your main light.
    - Baked Contribution is set to Indirect and Shadowmask on the Direct Light.

    After you bake the scene it should work as you described (baked shadows from static objects, realtime shadows from dynamic ones)
     
    Mark_01, trojant and atomicjoe like this.
  22. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,869
    Because it's better than the game stalling waiting for the textures to fully load! :p
    I mean, it's meant to be useful for geometry that is loading asynchronously as you go towards it, hence far away.
    If you have played any game built with Unreal Engine in the last 10 years, you have witnessed it.
    Also, as I said before, no mipmaping makes REALLY BAD aliasing on VR. It's much better to use mipmaps and a combination of anisotropic filtering and texture bias to avoid both aliasing and light leaks.
    Aliasing is not a big problem on regular desktop or consoles games, but it's really really bad on VR.
    Every build target has it's requeriments. You have to be flexible.
    The same goes for stalling the render waiting for textures to load: on VR you won't be published if the framerate isn't rock solid at least at 72fps. Meanwhile on consoles you can go as low as 30fps and you're good.
    Well, what else can we do to avoid lightprobe "ringing" or "overshooting"?

    (really, thank you. :p )

    I did! But it's ANCIENT! (from 2016 I think?)
    I really like the Immersive-Sim style you go after.
    I would like to play another demo with the updated graphics you showed on twitter though!
    Seems like an awesome tech demo for Bakery!
    Yeah... me too... even though I can't really afford it anymore, but I still manage to spend days refining my shaders and optimizing them instead...
     
    guycalledfrank likes this.
  23. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,666
    Yeah, and IMHO it sucked :D

    OK, valid case.
    Here is what you can do:
    - Set ftAdditionalConfig.cs -> mipmapLightmaps = true
    - Bake.

    If it leaks and if you use "Adjust UV padding":
    - Set Advanced settings -> Scale per map type -> some lower value (start with 1/2).
    - Rebake
    - Set lightmap asset resolution to maximum (either manually or via script).

    Lowest of "Scale per map type" values affects UV padding independently of resolution; i.e. you will get 2x larger holes between charts with 1/2. Lightmaps are still baked in full resolution and only downsized via asset settings. If you un-downsize them, you will get a lightmap which is more resistant to leaking during mip-mapping (in case of 1/2, both mip0 and mip1 must be free of leaking).

    The only reasonable solution I know is Geomerics-style SH sampling via shader modification. This is what Bakery does with "non-linear probe SH" option. Every other solution trades ringing for blurring.

    Yeah, latest demo is quite old.

    Same! :D
    I promise this year there will be something playable.
     
    atomicjoe likes this.
  24. andres321x

    andres321x

    Joined:
    Jun 2, 2017
    Posts:
    2
    Hey there, I bought this asset two days ago , I had tested with small scenes and the results are so good! But I'm having some trouble with a bigger scene, the problem is when bakery is in exporting scene - finishing objects... This Microsoft Visual C++ error appears and then Unity Closes, would be good to know if you can tell me whats it's the problem I tried multiple times changing some values, but withouth sucess.
    picture.PNG
     
    sendspace likes this.
  25. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,666
    Possibly going out of RAM during scene export or xatlas bug. Check if there are:
    - Many high resolution terrains (enable Terrain Optimization in this case)
    - "Painted" trees/foliage using terrain tools. Disable them as they can take millions of tris ("Export terrain trees" option)
    - Texels per unit is just too high. If you enable Checker Preview, it will print atlas count to console. Should be < 100.
    - xatlas bugged? Try setting Atlas Packer to Default.
     
    andres321x likes this.
  26. TokyoWarfareProject

    TokyoWarfareProject

    Joined:
    Jun 20, 2018
    Posts:
    814
    whatsup, I updated to 2020.1, noticed on rebaking that in shadowmask the hardshadows aint baked, so shadows appear only within the realtime radiuis. The indirect is correctly baked tho.
     
  27. andres321x

    andres321x

    Joined:
    Jun 2, 2017
    Posts:
    2
    Ok, first of all thanks for the quick answer.

    I tried all of your recommendations and I was able to start the bake, I'm baking in full lighting mode. But I see that the progress bar stuck at 58% where says "Rendering GI bounce 0 for ..." And it's not making any progress just is stuck there I waited for 1 hour and nothing, so I think it's not doing anything.

    What could be happening?
     

    Attached Files:

  28. FelixLightshape

    FelixLightshape

    Joined:
    Nov 25, 2019
    Posts:
    9
    I'd like to have two different lightmaps of my scene (day and night) and change between them at runtime, without major loading times in-between. Is this possible using Lightmapped Prefabs? I tried having a day and night prefab, with their lights as children but it just results in both prefabs being influenced by all lights and turning out the same. I tried both having them in the scene at the same time and only having one and building them separately (Where the second one would just overwrite the first bake). Any suggestion on how I could achieve this?
     
  29. dgoodman-icf

    dgoodman-icf

    Joined:
    Jan 7, 2019
    Posts:
    36
    I'm afraid I don't understand the workflow in the main render window. After getting the scene ready to bake, I clicked Render. After about 30 minutes it finished. Then I clicked on Render Light Probes. I got a warning and clicked Continue Anyway. Then I got a message that said the scene had changed and to use Render instead - which I had just done. Not sue what the heck to do here so any help would be greatly appreciated.
     
  30. Monil

    Monil

    Joined:
    Apr 24, 2012
    Posts:
    102
    Hi,

    It also gave me this problem in unity 2020.1 with legacy lightprobes, for now I use L1 which is calculated in the rendering
     
  31. dgoodman-icf

    dgoodman-icf

    Joined:
    Jan 7, 2019
    Posts:
    36
    Oh well. Ha. Thanks I'll try that. :)
     
  32. swantonb

    swantonb

    Joined:
    Apr 10, 2018
    Posts:
    172
    Hello! I want to find out the best approach using lightmapped prefabs because my pc cant handle baking all my scene at once since i only have 8 gb of vram, probably less usable. So, my approach right now is to:

    -copy the sun (directional light) from the complete scene into every prefab i want to bake, bake the prefab, then disable the sun in it. And then leave the scene sun on mixed so it lights and gives shadows to my player. I dont know how professional this is and i want to find out what your approaches are regarding lightmapped prefabs and a big scene. Maybe i should use another approach when using lightmapped prefabs? Like baking shadowmask or indirect? I am using substractive. Please share your baking big scenes with bakery tips and secrets cheers!
     
  33. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,666
    Can't reproduce. Shadowmasks seem to work correctly in 2020.1.2, at any distance (tried rebaking, but can't see any difference). Make sure the "distance shadowmask" checkbox is disabled:

    upload_2020-8-14_17-49-7.png

    Try disabling Terrain optimization. If there are no terrains then... I don't know. Any debuggable package/project will help.
    Do you have any super highres terrains?
    Also make sure that you simply didn't set GI samples to something very high (> 64).

    Yes, just bake them separately in two different scenes. Then you can drop both to your main scene and switch on/off.

    If your light probe mode is set to L1 (which is default in 1.71 I think), you don't even need to click "Render light probes" anymore. I should make it more clear in the UI...
    Light probes are already rendered.

    That's actually quite a lot. Possibly your settings are not optimal for your scene or the scene is just too big (open world scenes are not a good fit for lightmapping in general; don't forget that your players will have to fit all these lightmaps in their VRAM too).

    TBH, I don't have any workflow for that. I either keep all scenes bakeable in one piece or bake in separate scenes (not prefabs) and load them together. Prefabs were more like a solution for repetitive objects sharing identical lighting, but not the best way to split scenes.
     
    dgoodman-icf likes this.
  34. swantonb

    swantonb

    Joined:
    Apr 10, 2018
    Posts:
    172
    Oh i understand. Well my scene is not very big. I want to bake this underground from asset store:


    Keeping into account its all interiors i will need at least 40 texels and more samples. And since there are prefabs that are repeating thats why i thought baking prefabs will decrease the cost of processing.

    Wait, can you bake a big scene in 3 smaller scenes and then load them together? How? I was thinking of that scene streaming too but i couldnt find information on how to do that.
     
  35. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,666
    OK, looks like a reasonable scene. It feels like you should be able to bake it in one go with 8 gb, even with 40 texels. Hmmm... do you just go out of memory during the bake? Are you sure you don't have any other graphics-intensive software running in background? Is the scene metric (1 unit = 1 meter)? If you enable Checker Preview, how does it look and what does it print to console?

    Yeah you can optimize some repeating prefabs this way, if you are sure their lighting is also very similar across instances... but I'm not sure it'll work well here. Any pair of prefabs I see in this video, the instances are lit differently:

    upload_2020-8-15_11-34-9.png

    a) You can keep them separate, but load together. In editor just drag'n'drop a scene into your Hierarchy:

    upload_2020-8-15_11-36-12.png

    In a build you can use Application.LoadLevelAdditive (or SceneManager.LoadScene) to do the same.

    b) You can merge two scenes in one by dragging one scene asset into another and choosing "merge into new" (it will need you to have some version control software installed though).
     
  36. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,869
    Frank, I have a stupid idea to avoid out of memory on bakery and allow better quality renders:

    You could just render the scene multiple times one after the other with a low sample count and then add all the resulting lightmaps of each render into a final lightmap.
    It's silly but it should work since the samples are randomized on each render. You should run the denoiser only on the final lightmap though.
    It's similar to how astronomy photographs are made: stacking images and averaging.
    This would give Bakery the ability to render VERY high quality lightmaps without going out of memory and it's super easy to implement :)
     
  37. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,666
    Problem is, sample count does not significantly impacts VRAM. The biggest problem right now is how lighting is cached on the scene. When rays reflect light, they use cached information containing previously reflected light. Basically it means that during GI you need to have all scene lightmaps present in VRAM at once, uncompressed (half-float RGB).
    ... actually I think I have a good idea for a solution right now...
     
    Last edited: Aug 15, 2020
    Mark_01 and atomicjoe like this.
  38. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,869
     
    swantonb likes this.
  39. Misaki_eKU

    Misaki_eKU

    Joined:
    May 3, 2018
    Posts:
    91
    is this working on HDRP?
     
  40. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    2,663
    guycalledfrank likes this.
  41. TokyoWarfareProject

    TokyoWarfareProject

    Joined:
    Jun 20, 2018
    Posts:
    814
    my bad, accidentally at some point I changed the "baked contribution" of the directional lights bakery component, to just indirect. DAAAAAAAAAAANG! I'm rebaking now, but I'm sure that will fix, I changed so much params... it would be nice to have several presets per scene so we can do tweaks but not lose params.
     
    guycalledfrank likes this.
  42. swantonb

    swantonb

    Joined:
    Apr 10, 2018
    Posts:
    172

    https://gyazo.com/dd5560b17e363caa513ec7b8dc1fb8b8

    https://gyazo.com/3f43257a6103874be787122bfbc83657

    https://gyazo.com/d2773b8fc8fa1c42e2e34b6cf533bbdc

    Im not sure if 1 meter = 1 unit but it is not definitely higher. In worst case its lower so that wouldnt mean extra rendering right?

    Thanks for your reply about scene streaming too, i found a video on Unity about this additive stuff, i still didnt get it to work but hopefully i will, that might save me from the memory problem but still, maybe im doing something wrong if you say i should be able to bake it in one go.

    Also looking forward for this :D, maybe that will help me too :D.
     
  43. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,666
  44. TokyoWarfareProject

    TokyoWarfareProject

    Joined:
    Jun 20, 2018
    Posts:
    814
    hello again, I'm having a weird issue with a building, one building is turned black after lkight bake
    upload_2020-8-16_13-33-20.png

    I thought, ok this mkay be is uv2, so I've a uv2 redo script, did not fix after rebake, I did reimport making usre generate uv2 was on.

    I've rebaked with and without uv processing and with and without rtx modes. same issue.
    upload_2020-8-16_13-34-59.png

    edit. looks like a clear uv2 issue...
    upload_2020-8-16_17-5-23.png
     
    Last edited: Aug 16, 2020
  45. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,666
    Yes, UV issue. Check the console for any error/warning messages regarding UVs. If "adjust UV padding" is enabled, sometimes highly detailed models fail to get re-unwrapped due to 16-bit index limit. If it's the case, there will be instructions in the error message text (at least in the latest version! I think it was added in v1.7).
     
  46. TokyoWarfareProject

    TokyoWarfareProject

    Joined:
    Jun 20, 2018
    Posts:
    814
    I think I saw nothing in console , what I did in the end was to export that building individually after having unwrapped an uv2 channel in max and that did the trick. I've another building with similar issue in another scene, there my uv2 script seems to fix it but after each bake I've to re-run the uv2 generation on that glitchy building :\
     
  47. swantonb

    swantonb

    Joined:
    Apr 10, 2018
    Posts:
    172
    damn man, i never knew what that thing was for allthough im a chess fan LOL. It seems with correct texel form the underground bakes with 400 mb of vram... Thanks, love

    Ok not so low, after adjusting it a bit more and adding ambient occlusion it takes about 5 gb. But the lightmap count is still high though.

    Bro what is this:
    https://gyazo.com/cd919351c52343bf765113c1fad9bc02
    I cleared my cache folder

    edit: if anyone gets this error too it might be because you may have accidentaly saved the temp scene from bakery with some game objects in it :-?
     
    Last edited: Aug 17, 2020
    guycalledfrank likes this.
  48. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,869
    Do you mean that Bakery doesn't support unwrapping meshes with more than 65000 vertices? o_O
    That could be a problem.
     
  49. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,666
    These come from Unity (lighting data asset generation), not my code. Looks like there is not enough space on E.

    Bakery itself has no problem with 32-bit indices. The problem is that if you call Unwrapping.GenerateSecondaryUVSet on a 16-bit asset it MAY sometimes result in too many indices (not fitting back to 16 bits) due to vertex splits (UV chart edge vertices are duplicated). Unity will just simply fail then, it won't rebuild the index buffer in 32 bits.
    Citing my error message:

    Unity failed to unwrap mesh. Options:
    a) Use 32-bit indices and Unity >= 2018.4.
    b) Split it into multiple chunks.
    c) Disable 'Adjust UV Padding'


    If you choose "a", your mesh is 32-bit and it's unlikely it will ever go over the vert limit, no matter how you re-split the charts.
    If you choose "b": less chance of going over the 16-bit limit.
    If you choose "c": Bakery just won't reunwrap.
     
  50. Wim-Wouters

    Wim-Wouters

    Joined:
    Sep 26, 2012
    Posts:
    36
    Hi Frank,
    First of all, very impressed by the quality and results of your tool!

    I'm trying to bake a multi-scene environment in unity 2019.4.6 LTS. The render works perfectly, but the "split by scene" option does not seem to work correctly (or I'm doing something wrong).
    • Not all scenes generate dedicated shadowmaps
    • Some Assets in the individual scenes use other shadowmaps
    • All scenes reference all shadowmaps in "Baked lightmaps" overview, this results in all shadowmaps being compiled in individual scene assetbundles.
    Is this a known issue? Any suggestions on how to fix this?
    Thank you & kind regard,
    Wim