Lightmapping multi mesh model with static and dynamic parts

I have a model of a building which has parts of the walls separated into multiple meshes. This is so i can have parts that are ‘destructible’, these parts are set to be dynamic so they can be animated to fall off the building. The main mesh is set to static as it will not move.

My problem is that light batching is making the static and dynamic parts obvious even though they share the same material and texture they look different colors.


These buildings are all the same gameObjects with parts disabled to show destruction.

Any advice on how to rectify this would be much appreciated.

When you set an object to static, it automatically also makes it lightmap static, which means that all the lighting calculations are done beforehand and the lights on the object will remain the same.
To fix this, you have 2 possibilities:

  1. After clicking on the drop down arrow next to the static checkbox on the dynamic part, check lightmap static (nothing else)
  2. After clicking on the drop down arrow next to the static checkbox on the static part, uncheck lightmap static (keep everything else)

You should try one of these ways to make your objects have the same lighting.

After playing about with some lightmapping settings this issue has been resolved.

This was fixed by changing my lightmap resolution from 15 to 22 texels per unit.


This has made the color difference only minor, and increasing the resolution more would no doubt make these exact, but once it has been post-processed it is no longer visible so will leave at this resolution.