When building to Android the LOD bias and shadow distance are wrong. My test setup is one build using the same URP pipeline settings asset, and two different scenes;
1) One scene works perfectly using AR Foundation and ground placement; the shadows and LOD's are behaving identical to the editor.
2) In the other scene I'm using Vuforia with an image target and the shadows are rendered as if the user is very far away, while every LOD controller is culling the objects as if the camera is so far away that the object should be less than a few pixels on screen. I've made sure the scaling of the image target is correct in world scale, e.g. my standard playing card that is 5.5 cm wide is 0.055 units(meters) wide in unity.
I also made sure I am not use the virtual scene scale factor. This is always 1.
I tried debug logging this info in update on the Android build;
Debug.Log("Distance to camera: " + Vector3.Distance(transform.position, imageTargetTransform.position) + " meters"); Debug.Log("LOD bias: " + QualitySettings.lodBias + " max LOD allowed: " + QualitySettings.maximumLODLevel); Debug.Log("Shadow Distance: " + QualitySettings.shadowDistance + " in asset: " + universalRenderPipelineAsset.shadowDistance);
But the distance to the image target is correctly percieved, the LOD bias remains at default 1, and the shadow distance is also correct.
Added screenshots to showcase
Added screenshots to showcase the issue. The red cube has LOD group, while the green has non.
And as you can see the shadows are also completely trash.
More info and steps to
More info and steps to reproduce;
1) Create a new scene with nothing but a camera and a directional light, then add whatever content with LOD in view of the camera.
- Build and observe the LOD Group rendering the correct LOD.
Experiencing something
Hey both,
Hey both,
First of all, I'm sorry for the delay in response.
TheMunk, thanks for providing reproducible steps. I'll validate the issue later today and come back to you as soon as possible.
Same issue here with 2021.2.1
Same issue here with 2021.2.1. Will try TheMunk's fix. Been on this for a long time. Please let us know if 10.3.2 fixes it.
pscheper wrote:
[quote=pscheper]
Hey both,
First of all, I'm sorry for the delay in response.
TheMunk, thanks for providing reproducible steps. I'll validate the issue later today and come back to you as soon as possible.
No worries! Will report back
No worries! Will report back as soon as possible.
Have a good weekend!
Kind regards,
Patrick Scheper
Technical Community Manager
I validated the issue and
I validated the issue and also on my Google Pixel 3 XL the FOV is set to 179. The issue persisted in v10.3.2. I've raised the issue to our R&D and report back as soon as possible.
Kind regards,
Patrick Scheper
Technical Community Manager
Hi everyone,
Hi everyone,
Sorry that it took a short while, but thanks to your feedback over the past months we've been able to solve the problem with our latest release of Vuforia Engine (v10.4.4).
Kind regards,
Patrick Scheper