Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

I'm a bit confused about "Skinned Mesh Renderer"

Discussion in 'Editor & General Support' started by WhosTheBoss, Feb 14, 2016.

  1. WhosTheBoss

    WhosTheBoss

    Joined:
    Jan 8, 2013
    Posts:
    54
    In my scene, i have a plane. This plane contains "Mesh Collider" , "Skinned Mesh Renderer" and "Cloth" components. Whenever this scene loads, my app immediately crashes and Xcode reports the following:

    /BuildRoot/Library/Caches/com.apple.xbs/Sources/Metal/Metal-55.2.6.1/Framework/MTLRenderPipeline.mm:992: failed assertion `sampleCount (8) is not supported by device.'"

    However, if i disable the "Skinned Mesh Renderer", the scene loads perfectly fine. Does anyone have the slightest clue of what is going on? Thanks.

    Unity 5.3.2 f1 Personal
    Xcode 7.2.1
    Building for iOS8 or greater.
     
  2. WhosTheBoss

    WhosTheBoss

    Joined:
    Jan 8, 2013
    Posts:
    54
    It appears that in the iOS build settings. I had to disable "Auto Graphics API". In the list of API's to select, i picked "OpenGLES2" and it works.
    If i pick "Metal" it crashes.
     
  3. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    4,872
    Can you submit a bug report for this please?
     
  4. Suguma

    Suguma

    Joined:
    May 29, 2015
    Posts:
    26
    iOS 9.2 runs slow on OpenGLES2. We switched to Auto so it would choose Metal for these devices. It runs smoothly on iPad, but crashes on iPhone 6+.
    I'm using Unity 5.3.2p2
     
  5. fcloss

    fcloss

    Joined:
    Dec 1, 2011
    Posts:
    154
    Same here @karl.jones . It seems to happen with every device that had other problems before:

    1- Blank screen: http://forum.unity3d.com/threads/blackscreen-on-iphone6s-plus.361201/
    2- Then fixed the blank but hangs on splash (5.3.2p1): http://forum.unity3d.com/threads/stuck-at-splash-screen.382601/
    3- Fixed hang (5.3.2p2) but needs to remove Metal
    4- GL ES Performance decreased a lot in iOs 9.2.1
    5- Now it crashes due to a problem with Metal (sampleCount(8) not supported...)

    These devices are iPhone 6 - iPad Mini 3 - iPad Pro

    Hopefully you can give us a feedback. Unfortunately removing Metal is no longer a good enough or acceptable solution for iOs 9.2.1 due to extreme lagging.

    Thanks

    Regards
     
  6. WhosTheBoss

    WhosTheBoss

    Joined:
    Jan 8, 2013
    Posts:
    54
    Sure i can submit one as soon as i get a chance.

    - As far as Unity is concerned, everything works fine. My project compiles well on Unity with no issues.
    - In Xcode, my project also runs with no issues.
    - While playing the game on my iPhone6 (iOS9.2) as soon as i go to the scene that contains the "Skinned Mesh Renderer", my app freezes and Xcode logs the aforementioned error message.

    So my work around for this is to disable "Auto Graphics API". In my list of APIs, i listed them in this order:
    OpenGLES2 then-> OpenGLES3 then-> Metal.

    I noticed that i either have to choose only OpenGLES2 -OR- Put OpenGLES2 on top of the list. If OpenGLES3 or Metal was chosen first, then the App crashes.
     
  7. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    26,910
    That's how you get feedback, it will come with the report, hopefully.
     
    karl_jones likes this.
  8. fcloss

    fcloss

    Joined:
    Dec 1, 2011
    Posts:
    154
    I believe there is a misunderstanding on feedback word usage. When i asked for it, i meant if you guys had any idea or suggestion on what may cause it or how i could investigate it on my project.

    I wasn't expecting a magic fix, but maybe you would have something to add, besides the bug report and more investigation on my side (like creating an empty project and add thing till the problem happens again). That was basically it. At least, i believed you could give me a simple feedback like: it is not happening in any of our tests with iPhone 6 and Metal, probably something in your project, shaders, etc. What would save a lot of time for me not to create an empty project, test it, then add objects from the project, etc. This would be very helpful, simple and would save time. In a first moment on my side and maybe later for you, if found out that it was a particular issue or usage of something on my project.

    Anyway i will create an empty project and start investigating it. When i reproduce the issue, i submit the report. Maybe until there, WhosTheBoss might have submitted his. In my case there is not SkinnedMeshRenderer but custom shaders and a lot of Render Texture.
     
  9. fcloss

    fcloss

    Joined:
    Dec 1, 2011
    Posts:
    154
    @hippodev and @karl.jones As i was suspecting due to the message being samplecount(8), the crash was related to RenderTexture antialias. There was a small rendered texture that had antialias 8. Reducing it fixed the crash. But now i am back to the older problem, the 2D UI is ok, but the rest is black when Graphics API is set to Auto and on iPhone 6 (iPad 4th, iPhone 5, etc are ok).
     
  10. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    4,872
    Ok submit a bug report with a sample project and this info, post the number here and we can get it looked into.
     
  11. fcloss

    fcloss

    Joined:
    Dec 1, 2011
    Posts:
    154
    Yes. I am trying to find a minimum project with the issue. It does not happen with an empty project.

    But i found a very bizarre scenario: if my camera has the MainCamera tag, it will be black, if i remove the tag, it will show as should. But i have so many scripts that has references to the Camera.main.

    I will have to go much deeper to find if there is a plugin that maybe messing with the camera, the weirdest thing is that it only happens with Metal.

    Any way, the good thing today was to findout that the crash mentioned on this post is due to anti-alias limit on device. It seems that Unity shall check if the Anti-Alias sample count set dynamically is supported or not by the device, keeping it inside the limits.

    Thanks for the support and hope i can find a way to make it work with Metal.

    Regards,
    Fernando
     
  12. Bentoon

    Bentoon

    Joined:
    Apr 26, 2013
    Posts:
    87
    Same thing here.
    fcloss's Main camera Trick doesn't work nor does whotheBoss's OpneGLES2.
    It seems everybody is stripping down their individual project by trial and error... Strange
     
  13. Bentoon

    Bentoon

    Joined:
    Apr 26, 2013
    Posts:
    87
    Agreed, removing Metal brings on Sea Sickness

     
  14. gearsion

    gearsion

    Joined:
    May 6, 2014
    Posts:
    1
    I've got that error when doing Blit to RenderTexture with anti-aliasing parameter set to 8. Lowering anti-aliasing to 1 solved that issue for me.
     
  15. fcloss

    fcloss

    Joined:
    Dec 1, 2011
    Posts:
    154
    @karl.jones can you suggest me someone from Unity Osx? I am in the worst situation ever, apple is rejecting (latest unity versions) because the unity player opens the sharedassets0 file to read/write instead of only read. I've posted on osx forum but it is pretty low crowded so no answers. This is so critical, can you help suggesting someone from Unity?

    The post is this one: http://forum.unity3d.com/threads/ur...-opening-read-write-file-on-osx-build.396375/

    Thanks a lot and sorry for asking it here, but it is an emergence for me.
     
unityunity