Search Unity

Materials Turn Black On Scaling

Discussion in 'AR/VR (XR) Discussion' started by maherahmedraza, Sep 29, 2019.

  1. maherahmedraza

    maherahmedraza

    Joined:
    Jun 28, 2017
    Posts:
    15
    I am using ARCore 1.12. I wanted to show building or a house in AR. The scale of the the house is so huge so I am scaling it when I instantiate it to fit the screen using mesh.bound. But the model is appearing black when it instantiate. As you can see the images down below I can just create this in Unity Editor. You can see the scale on which it turns black. But some model does not show this behavior. I want to know if this problem is related to the scale factor of the model?Or it is some other thing? I have been stuck for the past two weeks and couldn't find the solution. black.PNG white.PNG

    Here is the video which describe the problem clearly.
    https://drive.google.com/open?id=1BIE6yGmC5lHUF408Ldb8ZwkhnW2Awrs_
     
    Last edited: Oct 27, 2019
  2. maherahmedraza

    maherahmedraza

    Joined:
    Jun 28, 2017
    Posts:
    15
    Is it related because of the scale difference when exported from the 3d modeling software?
     
  3. Incode

    Incode

    Joined:
    Apr 5, 2015
    Posts:
    78
    You can adjust the scale of imported models on the model file itself (FBX, OBJ, etc.) by setting the Scale Factor. Having a scale that small could have adverse effects.

    You may also want to check if you have a material on the object, and whether there is any lighting in the scene.
     
  4. maherahmedraza

    maherahmedraza

    Joined:
    Jun 28, 2017
    Posts:
    15
    Yes, By decreasing the scale factor of the model does improve the viewing on different scales but it also decreasing the original real world size of the model too. I have also find out that when in the editor when the model turns black then I changed the shader from Standard to Unlit->Color and the color appears.
     
  5. maherahmedraza

    maherahmedraza

    Joined:
    Jun 28, 2017
    Posts:
    15
    Can you suggest some other solutions?