When working with a video projected onto a sphere (clamped, intended for use as a skyscape), the larger we make the sphere, the more distorted its shape becomes: if the sphere is 100x100x100u for example, it projects like it's dimensions are 1x100x100 (a giant, flat disc with a small <.5u gap in the middle). This is also evident with a smaller sphere (like 2x2x2), but less distortion is evident; it appears the distortion is proportional to the scale in some way. This also feels like an SKD or native player bug (?); we have this working without issues on Lumin (ML1), and other android releases using identical conventions. Thank you for your help!!
Unity Editor version: 2022.2.0a14.2006
ML2 OS version: ML2 OS Release B3E.220619.07-R.124 (user)
Magic Leap Lumin OS ML2 Sprint 13 Bravo
MLSDK version: 0.53.1
Error messages from logs (syntax-highlighting is supported via Markdown): N/A
Can you provide more information about your implementation? Is the projection using a shader? Can you some sample code so that we can test this on our end?
In the simplest case, we are using a standard (default Unity) Sphere mesh for the Mesh Filter on the Media Player GO. The Mesh Renderer is attached to a material that uses a Skybox/Panoramic shader attached to a 2D Texture: 3072x1536, No anti-aliasing, Enable Compatible Format On, R8G8B8A8_UNORM, Depth Stencil None, Enable Mip Maps Off, Dynamic Scaling Off, WrapMode Clamp, Filter Mode Bilinear, Anso Level 0. We do reverse normals, but it has been eliminated as a factor here. The video evident and rendering on the resulting mesh. This works well with other Android devices and ML1 on Lumin. the sphere is somehat distorted at a small scale, where the distortion appears to be proportional to scale (a small sphere looks like a football, a large one looks like a giant (multi-story) pancake with a tiny gap in the middle.
Another way to ask this would be: what is the preferred setup to project video to a clamped sphere (or for skybox, ultimately)? With that, I think we can figure out the rest.
What is the best way to share files on this matter with you?
Thank you for the clarification. Is the MLMediaPlayerBehavior script attached as a parent or directly on the object that displays the video? I see the Media player script changes the transforms scale when the player initializes.
MLMediaPlayerBehavior.cs line 238
Hi Krystian, this helped. We see now how the scaling is handled differently on instantiation and are adding conditions to resize (or not), according to the mesh type. That is what was causing the issue. Very much appreciated.
Please consider this issue resolved (with local changes).