Rotating Lightmap Static Objects?

This may be a dumb question, but for our AR app we are having the spawned object rotate to look at the user the frame after its placed. That part works great! However, our lightmaps only line up correctly when its facing the direction it was facing when it was baked. Is this normal behavior? Or is there a way for the baked lightmaps to essentially “Stick” to the object and rotate with it? First picture is the room displayed at its baked rotation, second is a 180 degree rotation around the Y axis.

Baked lighting is baked into the UVs, so it should rotate with the object. So your room must be getting its primary lighting in realtime. What kind of lights are illuminating your scene and what is their mode?

Currently are using 4 point lights in the scene that are all set to baked. We’ve turned off realtime global illumination and removed that dang directional light that comes stock thinking that was what was up. I’m going through to see if I can find another realtime light, but don’t see one.

We do also have a reflection probe in there, but not sure that would cause this?

Deleted my “Found It” comment. Non Directional ignores normal maps which we do not want lol. back to digging.

Geometry in AR should never be rotated and should instead remain in the same world space position. To mitigate the issue you are having, make sure that you have parented your scene geometry underneath your AR camera object.

Probably a bit late, but I found a solution! So for the others who find this; In the Lightmapping settings, change the Directional mode from “Directional” to “Non-Directional”. All the best.

8 Likes

Thank you, this works! You have saved me at the cusp of a deadline!

1 Like

THANK YOU. Omg I was going insane from this.

4 years later, you’re still saving lives. Thank you! :blush: