How do I deal with large dynamic objects looking so out of place with baked lighting?

Hi,

I have a challenge which I’m not quite sure how to solve so I’d like to pick the community’s brains on this.

I have a scene where my static objects look great when I bake the indirect lighting.

However I have a moving door that I’d really like it to be baked too but because it moves I can’t set it to static/contribute GI. I tried using lightprobes but the entire door changes its color which looks very bad and out of place:

It becomes specially bad when I move the door, it interpolates the color of the lightprobes that are on top of the emissive material, so the whole door takes the color of the emissive color:

So I was wondering if I could bake the lighting of this door when it’s closed and animate open the door even if it’s marked static. This works but it obviously creates a problem with the shadow/ambient occlusion that gets baked on the ground:

So how do people usually solve this problem?

One idea I had was to open the door and tell the scene to rebake only the ground so that it removes this shadow, but I couldn’t find any option to do this.

If this is not possible, are there any other better ideas to deal with this problem so that my dynamic objects don’t look so out of place?

Keep in mind that I need to do this for mobile using URP. I believe Light Probe Proxy Volume component is not yet supported.

Should I bake outside of Unity?

Any help is appreciated, thanks!

Hi @Reshima ,

This is a tricky one. As you point out LPPVs are really intended to help solve this problem and as mentioned, this feature is not yet available in URP.

However, I do think you can get away with using Light Probes, although not entirely ideal as they are not well suited to large planar surfaces.

In your example above the main reason the door appears poorly matched to the environment is because of the lack of AO, which is evident on other lightmapped surfaces. To fix this, I would consider unwrapping the door and baking ambient occlusion for this piece externally, and then piping this texture into the Occlusion slot of the Unity material.

Either this, or if your budget allows, try not using AO in the lightmapper, and instead use a screen-space technique to integrate both the static and dynamic elements of the Scene.

Move Light Probes away from the emissives and into the centre of the corridor in order to prevent the interpolation from picking up those hot intensities when the doors are moved.

If you feel the quality is still not good enough, I would go ahead and lightmap the door. Ensure that cast shadows is disabled and that the door’s material is marked double-sided in order to prevent texel invalidity in the areas underneath the door panel. Adding some “trim” geometry to suggest a door jamb will also help mask any lighting inconsistencies.

Hope that helps!

1 Like

You can open the lightmap in photoshop / affinity photo / whatever and remove the black patch.

Just do it when you are really done with light maps on this scene so you don’t have to keep redoing it if you’re still baking light maps often.