Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Objects rendered completely white at some angles and positions

Discussion in 'General Graphics' started by agstanescu, Sep 8, 2015.

  1. agstanescu

    agstanescu

    Joined:
    Jan 31, 2013
    Posts:
    13
    I have a very weird behavior on mobile devices, where objects at some angles are rendered as white.
    I only have a directional light in the scene, and disabling it removes the white problem.

    The material is just using the Standard Shader with an Albedo texture. The buildings are imported from an FBX, but I also added 2 plain cubes for testing.
    The cube on the right has the exact same material as the buildings.
    The cube on the left has a completely new material: still Standard Shader, same albedo texture, but different metallic and smoothness parameters.

    The ground uses the legacy standard shader. If I use the Unity 5's standard shader then the white problem appears on the ground as well.

    I am using Unity 5.

    It does not happen in the editor preview or when I hit Play.

    Any ideas on what I could investigate next?


    PS: Please ignore the low quality of textures. I was playing with the quality settings in all combinations.
     

    Attached Files:

  2. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    What are your light settings?
    Can you upload an image of the inspector with your light selected?
    An image of the any of the misbehaving shaders would be helpful also.
     
  3. agstanescu

    agstanescu

    Joined:
    Jan 31, 2013
    Posts:
    13
    Attached
     

    Attached Files:

  4. agstanescu

    agstanescu

    Joined:
    Jan 31, 2013
    Posts:
    13
    I kept playing with all kinds of settings and discovered very weird behavior.
    For example, the white that is seen in the original screenshot is due to the light color. If I change the light to a pure red (255, 0, 0) then the "white" part will be red. However, if I just add a little more color on another channel (e.g. light color 255, 10, 0) then the "white" part will turn full yellow. It's as if it maximizes the channel colors.

    What seems to "fix" it is making the object smaller. In my original scene the object is about 1000 in size. Scaling it to a lower value does not exhibit the same problems.

    Could the shader have some maximum value after which some computation turn bad? Can a value of 1000 overflow a datatype used in the mobile version of the Standard Shader?
     
  5. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Hmmm.. I'm going to defer to another dev who has more knowledge than I do with lighting.
    Hopefully those images you provided and the info you provided will give a clue to what is happening.

    May want to try a new light. Just delete and create a new one. o_O
     
  6. agstanescu

    agstanescu

    Joined:
    Jan 31, 2013
    Posts:
    13
    Thanks. I tried with a new directional light, same result.
    I also tried with a very big spot light and the problem did not appear.

    If needed, I can try and make a test project.