Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Skinned mesh rendering black - seems like limit on # of materials?

Discussion in 'VR' started by Harrison_Hough, Jun 7, 2016.

  1. Harrison_Hough

    Harrison_Hough

    Joined:
    Dec 3, 2015
    Posts:
    43
    Hey guys,

    As the title suggests I am having a problem with the rendering of a skinned game character. Parts render as black. It seems like theres a limit on number of materials. This is in the hololens Emulator not the actual headset. (headset hasn't arrived yet).

    I tried changing from unity standard shaders to mobile diffuse ones but it made no difference. The character uses 7 different materials but only some of them are rendering. If i assign 1 material for everything then it all renders fine. I have also tried adjusting the quality settings to fantastic but it didnt do anything.

    To solve this I will likely just merge the textures into one map so i can use less materials .
    BUT I'm just curious if anybody knows wether its a hard limit on number of materials or whether theres something I can do to allow more. I can't seem to find anything about it in the documentation.

    Below are pictures of what I am talking about.

    2-Materials.PNG 7-Materials.PNG
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,089
    Are there any errors in the console? Does it render correctly in the editor?
     
  3. Harrison_Hough

    Harrison_Hough

    Joined:
    Dec 3, 2015
    Posts:
    43
    Yes it renders perfectly in the Unity editor no errors in the console.

    It only happens when I am running it in visual studio after building for the windows store and running it with the Hololens Emulator.
     
  4. Harrison_Hough

    Harrison_Hough

    Joined:
    Dec 3, 2015
    Posts:
    43
    I did some more tests and instead of 6 different textured materials i used 6 untextured ones and that rendered correctly.

    The textures I am using for the character are 8K each (normals and diffuse). So could it be that the textures are too high res or something?
     
  5. Harrison_Hough

    Harrison_Hough

    Joined:
    Dec 3, 2015
    Posts:
    43
    So I set the 12 or so textures to 2k instead of 8K and it renders now.
    Looks like to increase performance it limits how many/high res the textures are??
     
  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,089
    Could you try running it on local machine instead of emulator? I wonder if it reproduces there too - it might have something to do with the emulator. If it reproduces when the VS project is run on your local machine too, we'd like a bug report.
     
  7. Harrison_Hough

    Harrison_Hough

    Joined:
    Dec 3, 2015
    Posts:
    43
    So I couldnt get it to run in VS on local machine it comes up with a "needs to be deployed" error and also a "registration of the app failed" error. It only runs in VS with the emulator.

    So did you mean a Unity bug report?
     
  8. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,089
    Yeah. Unity bug report.
     
  9. Harrison_Hough

    Harrison_Hough

    Joined:
    Dec 3, 2015
    Posts:
    43
    Okay so I am submitting a Unity bug report now with the same title as this thread.
    I also built the solution for PC (not windows store) and ran it just to check and the shaders run perfectly like that with 8K textures.