Giter VIP home page Giter VIP logo

Comments (22)

kircher1 avatar kircher1 commented on May 17, 2024 4

0.7.0 is available! This version brings what was needed for better Android/iOS support as it helps reduce overall memory usage on mobile platforms and as part of that, it will address the map getting stuck as we were most recently discussing.

I'm also closing this issue out now. If other bugs arise, we can track them specifically.

from mapssdk-unity.

kircher1 avatar kircher1 commented on May 17, 2024 3

Sorry for the delay. I just wanted to let you know that we haven't forgot and fixing this issue is on the top of our list right now. The next update is coming ASAP and it will have more significant improvements to actually support compressed texture formats on Android/iOS.

from mapssdk-unity.

kircher1 avatar kircher1 commented on May 17, 2024 2

Thanks @JustinFincher for the additional info. I was able to narrow down the issue based on the log.

This is caused by a regression in 0.5.1 with respect to decoding DXT1 textures to RGB on Android/iOS. The last working build as you noted is 0.5.0.

We'll get a fix out for this next week. Thanks again.

from mapssdk-unity.

kircher1 avatar kircher1 commented on May 17, 2024 1

Hi @megasus, disabling the 3D models can be done by selecting the "Elevated" option for the Map Terrain Type.

image

from mapssdk-unity.

SiriusA7 avatar SiriusA7 commented on May 17, 2024 1

We are actually having the same exact issue as @anton-kryvenko on Android.
Specifically on the Oculus Quest. And I get the same error in the log regarding DXT1.

Not sure what to do to address the issue, but it is also a blocking issue for us preventing us from fully utilizing Bing maps.

from mapssdk-unity.

kircher1 avatar kircher1 commented on May 17, 2024 1

0.5.1 is out now. On iOS the DXT1 textures will be decoded to RGB. Let me know if there are any issues.

from mapssdk-unity.

JustinFincher avatar JustinFincher commented on May 17, 2024 1

I got the following logs using SDK 0.6.1 and Unity 2019.3.10f1 on Android, and the map was stuck in green without any building showing up:

2020-04-19 03:28:22.135 691-1862/? D/Unity: Unable to lookup library path for 'advapi32', native render plugin support disabled.
2020-04-19 03:28:22.137 691-1862/? E/Unity: Unable to find advapi32
2020-04-19 03:28:24.311 691-1113/? V/FA: Inactivity, disconnecting from the service
2020-04-19 03:28:25.113 691-1842/? E/Unity: System.ArgumentException: decompressedData does not have enough space to store decoded texture. 
      at #=zydWq9AuLNCnf4faT3sucpPaqLAdw5qZjl2bFPwI=.#=zPTnxN1uk7ZX2 (System.UInt32 #=z3QvCtj$tf8WE, System.UInt32 #=zNgm2JklxHd2a, System.Byte* #=ziiM7VVQ=, System.UInt32 #=zCKEB1eQ1K0PYbb68iw==, System.Byte* #=z$Z4Eo687WoReoTocpytfYrs=, System.UInt32 #=zuuhBhtbyxRQMGvino5OKHGFWDGB2, System.UInt32 #=zRJOvrSm_hJjF93j72lOUgxHlG4Sh) [0x00000] in <00000000000000000000000000000000>:0 
      at #=zd592D3ZnHgPrgUQTF0RAEw4u_e76uB_nJA==.#=zpNxh736g2uQ2 (#=zSNYgvNovz5dr_dnKorXedDUm3be6$PlkTQ== #=zilJums8=, Microsoft.Geospatial.TileId #=zEaRoVpM=, System.Boolean #=zKL8FfejElrRg, #=zWejMlryD7Uu_UW5IQhfRTFzhPmkADq4bCR74spY= #=zLULj4LdwqV8kv8uowUvi6jY=, System.Threading.CancellationToken #=zFM_UzSk=) [0x00000] in <00000000000000000000000000000000>:0 
      at UnityEngine.ImageConversion.LoadImage (UnityEngine.Texture2D tex, System.Byte[] data) [0x00000] in <00000000000000000000000000000000>:0 
      at System.Threading.ContextCallback.Invoke
2020-04-19 03:28:25.143 691-1926/? E/Unity: System.ArgumentException: decompressedData does not have enough space to store decoded texture. 
      at #=zydWq9AuLNCnf4faT3sucpPaqLAdw5qZjl2bFPwI=.#=zPTnxN1uk7ZX2 (System.UInt32 #=z3QvCtj$tf8WE, System.UInt32 #=zNgm2JklxHd2a, System.Byte* #=ziiM7VVQ=, System.UInt32 #=zCKEB1eQ1K0PYbb68iw==, System.Byte* #=z$Z4Eo687WoReoTocpytfYrs=, System.UInt32 #=zuuhBhtbyxRQMGvino5OKHGFWDGB2, System.UInt32 #=zRJOvrSm_hJjF93j72lOUgxHlG4Sh) [0x00000] in <00000000000000000000000000000000>:0 
      at #=zd592D3ZnHgPrgUQTF0RAEw4u_e76uB_nJA==.#=zpNxh736g2uQ2 (#=zSNYgvNovz5dr_dnKorXedDUm3be6$PlkTQ== #=zilJums8=, Microsoft.Geospatial.TileId #=zEaRoVpM=, System.Boolean #=zKL8FfejElrRg, #=zWejMlryD7Uu_UW5IQhfRTFzhPmkADq4bCR74spY= #=zLULj4LdwqV8kv8uowUvi6jY=, System.Threading.CancellationToken #=zFM_UzSk=) [0x00000] in <00000000000000000000000000000000>:0 
      at UnityEngine.ImageConversion.LoadImage (UnityEngine.Texture2D tex, System.Byte[] data) [0x00000] in <00000000000000000000000000000000>:0 
      at System.Threading.ContextCallback.Invoke

For the record, this happened after upgrading from 0.5.0 to 0.6.1

from mapssdk-unity.

JustinFincher avatar JustinFincher commented on May 17, 2024 1

Hi @kircher1 , recently I was closely monitoring the NuGet webpage for a fix, but the newest version is still 0.6.1, is there any update to this issue? I do not mean to pressure on a release, just a reminder in case you forgot to push a fix, thanks! :-P

from mapssdk-unity.

kircher1 avatar kircher1 commented on May 17, 2024

Hello! Currently, the SDK will "work" on these platforms, but the performance may suffer due to high memory usage. This may be enough to unblock you in the short term, depending on the scenario. If views are more or less static, this should be OK. If you are using the map in a very interactive way, panning and zooming to different locations, it's possible you'll hit an out of memory condition.

To performantly support Android / iOS, we are tackling some things in the internal code-base to reduce memory overhead and optimize data formats for these platforms. We'll definitely share an update when those changes have made it into the SDK. There's no specific ETA to share now, but we are looking into it!

Thanks again for the feedback.

from mapssdk-unity.

martdob avatar martdob commented on May 17, 2024

I tried to deploy the all samples to Android. Everything works beside the Maps. Instead of the 3D map, I get only a pink flat plane. Other elements like UI, etc. are working. There seems to be an issue with the shader.

from mapssdk-unity.

kircher1 avatar kircher1 commented on May 17, 2024

The device hardware will need to support geometry shading. I suspect if you are seeing the pink geometry, it's due to a lack of geometry shader support. This can be verified by researching the graphics API capabilities supported by the specific GPU model in the phone.

If the device does not support geometry shaders, the rendering technique the uses them can be disbled via the MapRenderer component: 'Render Settings' -> Uncheck 'Render Clipping Volume Wall'.

If the device does support geometry shaders, ensure the Unity project's Android player settings allow for using Vulkan/OpenGL ES 3 (i.e., isn't restricted to OpenGL ES 2).

from mapssdk-unity.

anton-kryvenko avatar anton-kryvenko commented on May 17, 2024

Tried to use the SDK on iOS. Here are some findings:

  • First of all it's super easy to set up and run. Managed to get it built and run on iPhone with no problems.
  • Performance was rather good on iPhone 6S in a CityTourExample
  • The only issue that I experienced, and it's a blocker for us, is that all hi-res 3d models appear to be black.

Did some investigation to localize what could be the problem and here are the conclusions:

  • it's not graphics API specific, happens with both OpenGLES3 and Metal
  • it's not a lighting problem, as it appears to happen even with Unlit materials
  • it's not a material or shader issue, because it happens with all materials even the simplest ones.
  • and it's not that the texture is not assigned to material, because if I try using some default texture it still gets overwritten with the black texture.
  • it happens only to hi-res 3d models, flat or elevated terrain is textured correctly.
  • and lastly there are warnings in XCode console about inability to decompress textures in DTX1 format.

So, my assumption is that the hi-res 3d models use textures with DXT compression and they can't be properly decompressed on the iPhone and they end up to be empty (black). Could you, please, confirm that's the issue? And also, maybe I'm missing it, but is there a way to adjust configuration to use textures in different format? As it seems to be the only blocking issue.

Just for reference, was using Unity 2018.4.9f1 with XCode 10.1 and the Maps SDK version 0.3.0.
Thanks in advance.

from mapssdk-unity.

kircher1 avatar kircher1 commented on May 17, 2024

Thanks for the analysis @anton-kryvenko! Indeed, the high res 3D models do use DXT1 textures. On Android, Unity automatically decodes these textures to raw RGB without issue. The SDK has been relying on this, and while not great from a memory usage perspective, at least it appears correct visually.

It seems though that based on the xcode logs that you are seeing that the implicit DXT1 -> RGB decoding Unity does is failing on iOS... I'm surprised that it works on Android but not iOS, so maybe there is some Unity bug here? Or maybe it's simply not supported for iOS? The exact error message may be more explanatory if you are able to share that.

Given this though, there is no workaround available since the SDK currently doesn't offer any way to change the texture format used, so for now this will be a blocking issue for iOS.

Longer-term we are working to get support for more optimized texture formats for Android/iOS to avoid having to decode textures to RGB. In the shorter-term, we may be able to replicate the DXT1 -> RGB conversion in the internal bits of the SDK. Stay tuned!

from mapssdk-unity.

anton-kryvenko avatar anton-kryvenko commented on May 17, 2024

The call-stack and the warning message is as follows. Part of class and method names are obfuscated, but it looks like it related to content loading in MapRenderer which ends up creating a texture. And that's when it fails.

WARNING: RGB Compressed DXT1 UNorm format is not supported, decompressing texture
WARNING: RGB Compressed DXT1 UNorm format is not supported, decompressing texture
'DXT1' is not supported on this platform. Decompressing texture. Use 'SystemInfo.SupportsTextureFormat' C# API to check format support.
UnityEngine.Texture:ValidateFormat(TextureFormat)
UnityEngine.Texture2D:.ctor(Int32, Int32, TextureFormat, Boolean, Boolean, IntPtr)
#=zsiL12bhoSgCvOKI2CXiP_9Fp5jBQJBty2xBjJ0lh_HUR:#=zBMtVcgE=(String, Byte[], Int32, Int32, Int32, TextureFormat, Boolean, HideFlags, Int32, Boolean)
#=zsiL12bhoSgCvOKI2CXiP_9Fp5jBQJBty2xBjJ0lh_HUR:#=zBMtVcgE=(#=zl_8GS02cWp40uGqRaKvcyD86bY50PwnpWg==, HideFlags, Int32, Boolean)
#=zN82jmxGKIQb79pyPkoVK9ananPTzbT_jbL27S3f5DDI1:#=zUZC8exBQyR8J(#=zNlFQnJHMvmxuduYSyHR1gxFJIsk9ewP12yGotDgb$NnZmx1XdA==, Boolean, Boolean, Int32, HideFlags, Mesh&, #=z$0cmm9QAPdQ4my0jNdWVwXSfb0F$MgOHMcuTs6JxlKXV&, Texture2D&, Int64&)
#=zIZCYvroCRHs$KhNDLMXv$D3VmaQu:#=zjjOp1mM=(Tuple5, #=z3TG4qh7a8i_aJwFg6bRF3AaAszqv2ZaQ7s5rg_Mn$9VwaoCCSQ==&, Int64&) #=zWU_J1s81_HZvT1_eImlSIq9XLrzL2:#=zztHXNqutLdBZ()
#=zj7I4aag$BKOJAG_1T_oJEZo=:#=zjjOp1mM=()
Microsoft.Maps.Unity.MapRenderer:#=zspnRnQc=()
Microsoft.Maps.Unity.MapRenderer:Update()

from mapssdk-unity.

megasus avatar megasus commented on May 17, 2024

I'm experiencing the same issue on ios, Android works fine. A simple option to turn off 3D buildings would already help us out alot.

from mapssdk-unity.

anton-kryvenko avatar anton-kryvenko commented on May 17, 2024

Hi, it looks like iOS support is still not there. I'm curious if it's possible to workaround it, at least for now, by tweaking textures download routine to decode DXT textures into something compatible with the end-platform. It would be a bit slower this way, but definitely better than nothing.

Just in case, here are some custom solutions for DXT decoding, I've looked up:
https://gist.github.com/soeminnminn/e9c4c99867743a717f5b
https://github.com/mafaca/Dxt
https://github.com/andburn/dds-reader
https://www.matejtomcik.com/Public/KnowHow/DXTDecompression/

If Unity's built in conversion fails, maybe it's an option to use the custom function.

from mapssdk-unity.

martdob avatar martdob commented on May 17, 2024

Light
I had the same issue like @anton-kryvenko on Android. However, I found a workaround which works for me. I switched from "Linear" Color Space to "Gamma" Color Space and now I can see the 3D models on Android. Even on Oculus Quest.

from mapssdk-unity.

kircher1 avatar kircher1 commented on May 17, 2024

I will also look into the color space setting; I didn't realize that could be related. @martdob, which version of Unity are you using?

In the short term, we can look at internally decoding textures to RGB on iOS (and Android if needed). This is something that can be done in the next release, 0.5.1. This is non-ideal however from a memory usage standpoint; In an upcoming release we plan on having the ability to load platform-specific compressed textures for Android/iOS (ETC1/PVRTC).

from mapssdk-unity.

martdob avatar martdob commented on May 17, 2024

I will also look into the color space setting; I didn't realize that could be related. @martdob, which version of Unity are you using? <

I have been using Unity3D 2019.1 / 2019.2 / 2019.3 and the Bing Maps project was working with gamma color space.

Thanks for the 0.5.1 update.

from mapssdk-unity.

Ristophonics avatar Ristophonics commented on May 17, 2024

Hey All,
Using Unity 2019.3 and the new XR Interaction Toolkit(Preview) Package I am finding the same shader issue of not seeing the 3D buildings. I am using Gamma and GLES3. Target platform is the Oculus Quest. I am using the XR Rig as well.
1586800231357 1

1586800231912 1

from mapssdk-unity.

Ristophonics avatar Ristophonics commented on May 17, 2024

@martdob I saw your reply to switch back to Linear color space, thank you! I tried that to no avail. I have gone through permutations and combinations of just about every applicable setting but still cannot get the 3D buildings to render using the XR SDK. It works fairly easily using the depreciated XR system with MRTK. Anyone have a good idea why the new XR SDK is not working in this regard? All other functions work fine. 🙇

from mapssdk-unity.

wchacn avatar wchacn commented on May 17, 2024

Hi, we tried to build the our own app based on the SDK with Unity 2020.2.6f1. Works flawlessly for UWP and Android, however, when building for iOS, Xcode throws some semantic errors:

Screenshot 2021-03-15 at 14 43 09

Any idea what could be the underlying issue here?

Thanks a lot!

from mapssdk-unity.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.