- Home /
LOD Bounds not recalculating properly, too small regardless of scale.
I am setting up LOD groups for my progect and ether I have found a bug or I am not understanding the documentation correctly.
All my LOD groups are being culled when I had a close look it is due to the bounds being very, VERY small. I set up a test scene using only cube primitives and while the initial bounds on a mesh are correct and scale when the object is scaled.
The moment I click recalculate bounds the bounds reset to a very small box, no matter what kind of object or mesh I use. I thought this was a issue with the models I was using but the same happens with unity's cube primitives.
Here is the cube before recalculation https://www.dropbox.com/s/8i4851hn0qa9i2z/Screenshot%202014-09-03%2009.45.14.png?dl=0
And here is it after https://www.dropbox.com/s/t7qxiohdmh434gs/Screenshot%202014-09-03%2009.45.19.png?dl=0
From what I can understand it seems that the recalculated bounds are for the mesh if it was scaled at 1,1,1 if this is the intended functionality then setting up LOD groups for me is going to be a nightmare.
So I guess my question is "Is this bounds scaling behaviour normal, if so how do I work around it?"
Answer by aimozs · May 22, 2016 at 08:22 AM
You might have found the answer already, but in case you didnt, to recalculate bounds, you should put some mesh renderer as part of the LOD0, and only based on those elements, the bounds are going to be recalculated..
Answer by GXMark · Apr 02, 2020 at 01:39 AM
The answer to your question is that LODGroup does non uniform bounds calculation correctly only if you follow the parent / child relationship. For example keep parent scale 1,1,1 and then scale your child objects lod0,1,2 respectively. Soon as you do this, unity automatically detects that a bounds calculation is needed and enables the button on LODGroup. Note, that setting the parent LODGroup to scale (n,n,n) where n != 1 will also compute the correct bounds.
You can't do non-uniform scaling if your mesh renderer is on the same game object as your LODGroup.
Hope it helps