saving a baked reflection probe without baking the whole scene?

I have a scene that I don’t want to bake. There are no baked lights. I have a reflection probe that I want to bake. So I clicked the bake button on the reflection probe.

Now what? It doesn’t seem to save anywhere. I ended up baking the scene just to have to save the reflection probe baking. It took over 3 hours to bake a scene that had 0 baked lights in it.

After some research, I set all of my realtime lights to 0 indirect bounces (or whatever it’s called), so they won’t be used for baked lights (which seems really weird to me). The baking then only took several seconds, but I ended up with six 2048x2048 pure black lightmaps. Why??

So, I reduced my lightmap detail to 0 with a max texture size of 32, and ended up with one very small texture, which is acceptable but still stupid. Am I doing something wrong here, or is this just one of those dumb Unity things?

That means you have Realtime Global Illumination and/or Baked Global Illumination turned on in the lighting settings. Turn those both off.

3 Likes

Thanks, I’ll check that out. But it doesn’t really answer my original question. Is it even possible to save an individually baked reflection probe? That’s all I wanted to do.

They’re saved as ReflectionProbe-#.exr files in a subfolder in the same location as the scene with the same folder name as the scene.

Otherwise I think it can be grabbed with a c# script and saved.

Yes, but only if you bake the whole scene, which is what the original post is describing as part of the problem. How do you save the baked reflection map if you just click Bake on the reflection map without baking the whole scene?

You don’t. You use a custom script and RenderToCubemap() to render the cubemap manually.

Then you need to copy the individual cubemap faces into a Texture2D, and save that from the script.

Thanks for the workaround, but it’s very strange to have to write a script to do that when there’s a Bake button on the reflection probe component. Why doesn’t it just save it?

A reflection probe is a capture of the scene from a specific position in space. But it needs to match what the scene looks like for the reflection to be convincing. If the scene is using baked lighting, you need the lighting to be fully baked before you capture the reflection probe else it won’t match what’s in the scene.

1 Like