Runtime LOD Group distance

I am working on a project that will run on desktop and Oculus Rift. I have a bunch of objects, with LOD Group components attached. These are set to cull at say 10%. On the regular desktop version this is acceptable and works pretty well. But on the Oculus version it is culling too early, or rather, the percentage at which it culls needs adjusting.

I can’t seem to find a way to change the percentage values of when each LOD level kicks in via script. The LODGroup component only shows the number of LOD levels, but doesn’t seem to allow for accessing and adjusting them. So far the only way I can see to do it is to use the SetLODs method, which I would rather avoid as I have quite a lot of different LODs/LOD groups already set up in the editor, and using SetLODs would mean creating all the separate LODs again in code, which seems overkill when I just need to adjust a single value.

1 Like

bump…

on sameboat :frowning:

This is a little late but maybe will help someone. Do this at runtime if using the Rift:

QualitySettings.lodBias = QualitySettings.lodBias * 3.8f;

This works about right for me for the DK2 after setting up the LODs the way I like them on screen in the editor. I have no idea how this should change for CV1. I have not been able to get any answers about what LOD means in terms of the rift screen (resolution/optics and so on). If anyone knows please share!

2 Likes

Well how is this for late? You saved me from a pit of despair your numbers are a little off for the oculus go, but this is sorely needed I imagine, for ANY rift.

THANK YOU!!!

ps its also in settings under Quality