I have filed a bug report with a sample project, but would appreciate some feedback on whether this is an inherent limitation in Unity with the Beast system, or something that can be addressed in a future release as either a bug fix or feature.
I have created a system for dynamically changing the time of day, including swapping lightmaps, skyboxes, and realtime lighting settings.
However, I’ve discovered that the ambient occlusion on terrain trees does NOT update when the lightmap is swapped. The lighting on the terrain, including detail influence, does change. But AO on trees, including both meshes and billboards, stays with the last baked lightmap. Doing a Refresh Prototypes call on the TerrainData is not enough to recalculate the AO. I observed this during the beta process, but did not fully confirm it until my lightmap switching sysetm was in place. (You can also see this in the editor if you change the real time lighting settings but don’t bake the lightmap – you have to bake the lightmap to get the AO to update.)
This, of course, prevents us from dynamically changing the lighting within a scene.
So what I would like to know is whether this is considered a bug that can be fixed, or something we’re going to have to live with indefinitely and figure out how to change scenes or terrains every time the time of day is changed.
Is the baked AO inside the terrain data if we save a separate terrain instance for each time of day along with lightmaps, etc.?
Or is there some other, even undocumented, API for forcing the AO to recalculate?
Thanks,
Steve