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

Ouch… thanks for reporting! Fixed it, can you update via the patcher and try it now?

Hmm… I think that’s what “High quality directions” should do. But also set “Compress Lightmaps” to “Force compress” in case you already have lightmaps from previous bakes. By default, Bakery will not change compression settings on existing files (that’s what “Compress but allow overriding asset” for), but “Force compress” will.

Yes, exactly. Full SH maps are not tracked, Unity doesn’t really recognize them as “lighting”. It’s better to measure it with the memory profiler :slight_smile:

1 Like

Hi! It should work, I’m pretty sure. Just make sure you force it to generate new lightmapping UVs (I’m not sure what to look for on the screenshot - is UI supposed to be like that?..)

Hi Frank

Unity 2021.3.24

My brain is a bit foggy from working all day… but please find a recap of the bugs. I also sent you a ZIP with a couple of movies showing what I pressed. :slight_smile:

  • The lighting data asset is not linked to the “real” lightingdata file, which is called (World1Level0_A_371857150_probes)

  • Lightmaps and lightingdata seem to lose connection with the scene. I have to rebake the whole scene again from scratch. None of the lightmaps remain baked with the mesh.

  • Can’t clear the bakery files. I sent you a movie.

9030253--1246360--upload_2023-5-22_22-13-56.png

9030253--1246363--upload_2023-5-22_22-14-9.png

These 2 red errors popped up one time. I haven’t seen it since a week ago. Not sure what it is about. Maybe it can help? :sweat_smile:

Thanks again for your help

Hi, we are using a custom shader on the Standard / built-in pipeline, RT Preview is not picking up the textures so everything is white.

How do we tell The Bakery RTPreview to see/ hook into our shader?

Additionally to use gradients instead of skybox with the Skylight, I’m assuming the only way is to use a custom gradient texture?

Thanks!

Hello, is it possible to make Surface Shaders that are compatible with Bakery Volumes? All I saw was a modified Standard Shader, but my game relies heavily on custom Surface Shaders

I’ve set the lightmaps to generate 4k maximum and minimum but its still creating loads of 1k maps?
Is this something that happens due to a setting somewhere or possibly a bug?

Answered your DM…
(post-2021 Unity does something weird with LightingData - some test project/package would help a lot).

Answered your (probably) e-mail…
Copying, just in case:

RTPreview "sees" everything exactly as the lightmapper, meaning that even in lightmaps the object will be bouncing white lighting (in this sense it's pretty useful for material debugging).
Bakery uses the Meta Pass of the material, if present; if it doesn't have it (e.g. an Unlit shader without the Meta Pass explicitly defined), it'll try to use standard texture names, e.g. _MainTex, _BaseMap, etc: https://geom.io/bakery/wiki/index.php?title=Manual#Albedo_and_emission
Amplify (especially if it's generating surface shaders) should automatically provide you with a correct Meta Pass, so I'm not sure why it doesn't work exactly. Note that if your object has "scale in lightmap = 0" or "receive GI = light probes" or is baked per-vertex, the albedo/emission will have only one unique color per vertex (might be related if the object is just a big cube with white color at corners).
I don't know the complexity of your shader, but it also might be possible that it's using e.g. some screen-space textures (screen color, screen depth), that are not mapped correctly in the Meta Pass?
You can send me the shader for testing (note that I don't have Amplify, but I can take a look at the final/resulting shader file).

Yes, but it’s easy to auto-generate, if you can make a gradient skybox in Unity with any existing skybox shader: https://geom.io/bakery/wiki/index.php?title=How_do_I#How_do_I_use_Skylight_with_a_procedural_sky_shader.3F

It’s tricky, because AFAIK Surface shaders don’t (?) allow overriding GI.
But you can set 0 to Occlusion to get rid of existing GI and output volumeGI * albedo to Emission instead.

To compute this volumeGI, you can take a look at Bakery.cginc, anything that’s under “BAKERY_VOLUME”.

I’ve attached an example surface shader for you :slight_smile:

Hmmm that shouldn’t happen :hushed:… asked you for a little test project via email to debug.

9045862–1249591–VolumeSurfaceShader.shader (4.85 KB)

1 Like

Hey Mr. F!

I just wondered if you ever investigated this? Being able to bake light probes with sector bakes would be such a huge gain for Bakery.

My scene has grown to a size where attempting a full bake just for light probes becomes a really huge task. I go through and strip out lightmap groups from game objects, and add higher-level lower-res groups to squish lots into one low-res lightmap. Then I go through and disable lots of objects that aren’t very important for probes. Once I finally get my scene to a state where “Exporting scene - preparing…” doesn’t hang forever, it bakes and I then have to go through and add all of my original high-res lightmap groups again, and bake each sector one by one again.

And then I spot an issue with one of the probes and need to do the whole process over again. It’s really painful and time-consuming.

It would be so awesome if one of the following were possible:

  1. The most ideal option. Have Sector bakes optionally bake light probes. This would be amazing and a game-changer for the workflow.

  2. Let Render Light Probes work with L1 light probes - ideally I would press this button and the full scene would render, but only light probes would be updated, no lightmaps would bake. In reality if I press this, I get the message “Scene has updated since last full bake, please full bake”.

Something like this would help me and @Enverex along with so many other users so much.

Cheers!

1 Like

When clearing out the cache some levels where added black artifact and need to re bake.

How do the lightmaps generated by Bakery get stored and loaded? Does it just let Unity handle that part as it normally would, so they are tied to the scene they were baked from and are always in memory as long as the scene is loaded?

I would like to create a streaming system where you wouldn’t need many additive scenes. Instead you would only need one and Addressables async loading would load everything as prefabs and they would get instantiated in a timesliced way to ensure there are no performance spikes.

I am hoping that i could stream the lightmaps as needed with the same system, rather than having them all loaded all the time. I hope that makes sense.
Is there some API I could use or am I out of luck?

Hello. Is there any reason why Terrain holes causes these artefacts? Terrain optimization is off, newest patch is applied
Also when I check “Hole filing” it fails to create atlases.
Thank you

Hello,

I’m trying to lightmap a large scene for an Oculus Quest game (standalone) and need some help/tips. To reduce the resulting texture size and lightmapping duration I’ve chosen low quality settings for baking:

  • Render mode: Full Lighting
  • Texels per unit: 6
  • Max resolution: 2048
  • Bounces: 5
  • Samples: 20
  • AO: off
  • Fix UV seams: on
  • …the rest use default values

Using this configuration I get results with quite a few artifacts. The issue is that they’re really rough/jagged. Worst-case, I want these artifacts to be blurry as in some cases they work with the style I’m going for. What settings could I play around with to reduce the jaggedness of such artifacts or to completely eliminate them?


Additionally, I’m currently not sure how to handle water in my scene. I want to cast static shadows on the water, however since the scene is large, I only included the playable area in GI. By doing so however, the water that is baked is really noticeable. What can I do the make the seam invisible (in this image I’m using Simple Lit Shader from URP)?

Update
Adjusting the Shadow Spread on Bakery Direct Light worked for me. 0.08 Shadow Spread with, 12 Texels Per Unit.

The seam Issue was amended by placing multiple lightmapped (lower res) water planes around the main plane in the play area.

1 Like

dont work in unity 2023(latest patch)

Hello, I’m having a problem with opening BakeryPreview. I click open preview (render in Scene View is unchecked) and it runs a few processes, but then instead of being a window I can see, it’s just a blank page that can’t be scene, it just sits in the background and doesn’t respond. I can use the Close Preview button, it works, but the same thing happens.

9055387--1251697--upload_2023-6-3_17-6-19.png

and then

9055387--1251700--upload_2023-6-3_17-6-40.png

This is the settings I’m trying to use:
9055387--1251703--upload_2023-6-3_17-7-6.png

Thanks,
Scott

Hello again :slight_smile:

I’m also having an issue getting Bakery to light up the same static objects as the built-in light mapper. Bakery looks like:


vs built in:

Any ideas what I could look into?

Hi, is there any guide on how to use compressed volumes? what I need to do to make the compressed volumes work? I have costume shaders so I am tweaking my shaders like attached image.
Its ok with uncompressed but when I tick the compress volumes in the bakery , nothing looks good according to volumes, any hint will be super appreciated, cheers \m/

I not sure why this happens, i baked the scene, all good, didn’t worked on other scenes, bake, clear cache a few times, then after a few days i see this black artifacts that wasn’t there.

I think that baking with object from other scenes ruin the bake, this is a very big bug.
Please help.

are eGPUs supported? I have a 3070 in a Razer Core X Chroma and the bake progress just sits at 0%. Seems like the process isn’t even starting…

Never mind, turns out I had terrain optimization enabled which is not supported, the message saying that was behind all windows for some reason.

But now my issue is that my 3070 eGPU is like 3 times slower than my Laptops 3050 Ti.
Is this due to limitations of Thunderbolt and eGPUs in general, or is it a problem with Bakery?
The same scene, same settings, RTX mapping on:
eGPU: ~30 seconds
dGPU: ~10 seconds
Does this sound right? I figured that an eGPU would be fast because it’s not real-time anyway, but I guess it is shuffling textures back and forth? idk, I’m about to return my eGPU setup lol

1 Like

Unrelated to my previous question, but Subtractive mode appears to crash Unity Editor on 2021.3.26 every time you try to bake.

Edit: might be related to this: Editor keeps crashing constantly as I set the rendering API to DirectX 12 as recommended and the problem went away.

1 Like

We love Bakery, generates great lighting fast!

Does anyone know if BakeryVolumes work with WebGL currently? We have a WebGL2.0 project, which should support 3d textures, but it doesn’t appear to be getting correct results (one asset is just lit from environment, the other some weird bights and darks depending on angle). If it is supported, is there anything we have to do to enable it / get it working? This is on Unity 2022.1.4f1 / URP 13.1.8