LODBias is effectively much lower in VR than desktop which makes LODGroups drop their LOD and cull far too early
complete
Merlin
LODGroups are massively helpful for optimizing worlds that have a large number of renderers and let you do fine-grained culling on each object based on the screen size of the object. https://docs.unity3d.com/Manual/class-LODGroup.html
I have a map that can have upwards of 20,000 renderers active at any given moment and without LODGroups this would not be very viable even with static batching and occlusion culling. The issue I’m running into is that due to how LODGroups calculate the LOD to render or cull, when the map is loaded in VR, objects visibly pop in because the culling distance is less than half of what it is in desktop.
LODGroups calculate the LOD to render by testing what percentage of the vertical field of view an object fills. This works okay if you have the field of view fixed to some known amount like in desktop mode where the vertical FoV of the camera is 60 degrees. This starts becoming an issue when you bring VR into the mix since VR headsets generally have a vertical FoV much higher than 60 degrees and can have varied FoV between headsets. For instance, my Index headset reports a 109.4 degree vertical field of view in Unity. This means that objects fill a much smaller area of the field of view at the same distance when viewed in VR, which means that the LODBias is effectively lower. Running the game on VRHigh which has a LODBias of 2.0 in VR with a Valve Index actually makes the effective LODBias fall to ~0.8 – so worse than the 1.0 set on VRLow and DesktopLow. If you happen to be running in VRLow or DesktopLow in VR then the effective bias becomes ~0.4.
To Illustrate, this is what I should see in my example scene in VR: https://i.imgur.com/nnQLTNu.png
This is what I actually see in both VRC and the Unity editor when playing in VR since the effective LODBias is lowered: https://i.imgur.com/M5gXIKc.png
There is a simple solution to have parity between desktop and VR, and that is to boost the LODBias quality setting at runtime to compensate for the difference in field of view between VR and desktop. Joejo gives the formula here https://forum.unity.com/threads/lodgroup-in-vr.455394/ to find the corrected LODBias given the desktop FoV (60 degrees in our case) and the VR headset FoV. I implemented it as a basic example component in this script https://gist.github.com/Merlin-san/429d6d64b39140a44fa411baf7e7d92a . This is obviously a basic implementation and depending on how your systems are setup this could probably just be thrown into some existing update loop or only applied once when a VR headset is connected.
I made an example project with some boxes to demonstrate the falloff: https://drive.google.com/file/d/1JnUlv2mPW_sJBWTOdwnL4gLLvZApOI2e/view?usp=sharing This project has the above bias fixer component which corrects the LODBias. If you want to see the broken LODBias in editor VR mode, disable the bias fixer component before starting play mode.
This world is the project uploaded to VRC (without the bias fix of course): https://vrchat.com/home/world/wrld_5883f41f-da3b-4770-bac7-6e4fa9b18348
Log In
Tupper - VRChat Head of Community
complete
Fixed as of 2019.3.1!
Tupper - VRChat Head of Community
This is fixed in 2019.3.1's Open Beta.
T
TCL
in progress
owlboy
The Pug has had an issue with this since last summer. I tuned for Oculus only to find out Vive users saw things disappearing much earlier.
T
TCL
tracked