Baking lighting for two objects that occupy the same space

I have a perhaps odd/unique use case. I have some “breakable” objects in my game, such as a wall that can break to expose the insides of the wall. Here’s the wall when it’s broken, and you can see the chunks left behind:

Before the wall breaks, it’s just a single object, basically a cube. After it breaks, that cube is swapped out for the more complex model. This is for performance reasons: Until the wall is broken, it’s better not to have the complex object rendering unnecessarily.

The problem I’m having is that I want both the Whole and Broken models to have baked lighting on them, otherwise it looks really weird to swap one object for the other. If both models are rendered while I bake, then the Whole version blocks light from getting into the broken parts.

Is there some way to have two renderers receive baked lighting, but without affecting one another? I thought I could set the LightmapParameters for the Whole object to use “Transparent”, but it seems that only works for Realtime GI, not baked lighting.

You could try baking your destroyed wall objects in a separate scene and then additively load them when needed. Take a look at our additive lighting examples asset on how to do this - Additive Loading Lighting Examples | Tutorials | Unity Asset Store

1 Like

Thanks. But if I bake the lighting in a separate scene, wouldn’t that separate scene need all the same lighting setup as the original scene? So, this is a possible solution, but it would require duplicating either the entire scene, or duplicating the portion of the scene that would have an impact on the baked lighting?