- Home /
Scaling an occlusion culled mesh
I have a mesh of a floor of a building which has furniture and stuff in it. I also have Occlusion culling working on it. To get the occlusion culling system to work I had to tick the 'static' check box of the parent mesh (and to all children recursively as well). Anyway, all this works fine.
But now I need to scale up and down the whole mesh with pinch gesture. I managed to get all the gestures working, but the mesh doesn't scale. Which is logical given that I marked them as static which means they can't move, rotate or scale. So I tried taking 'static' off of the meshes and running. Then it works fine and also scales. But sometimes, you see meshes popping up hear and there.
I thought if I include the Occlution culling view area in the mesh hierarchy so that when I scale the mesh the Occlution culling view area also gets scaled, it should work. But as I said there are some meshes popping up sometimes.
So my question is that is there any workaround for this issue. Or should I just give up either scaling or Occlusion culling? because they both can't work together.
Answer by ThermalFusion · Aug 01, 2012 at 01:47 PM
As far as I know, you can not use dynamic objects as occluders, as this occlusion is baked down during the occlusion process. It only works the other way around.
So does that mean I can't scale objects that are used for occlusion culling?.
It works (scales) if I keep the 'static' flag on, then bake the occlusion culling and then take 'static' off. But then I have some of the meshes with abnormal behaviour like popping in and out of the camera frustrum.
As far as I know the occlusion data is baked, and only changes if you bake again. Think of it as if it takes a copy of all meshes when you bake, it will only update when you bake again.
You just confirmed my fears. I guess it make sense. This means I need to abandon Occlusion Culling, if I want to have scaling.... :(