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.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Texture Change When Importing

Discussion in 'General Graphics' started by Steelshot, Jun 23, 2016.

  1. Steelshot

    Steelshot

    Joined:
    Feb 24, 2015
    Posts:
    102
    http://imgur.com/a/wg0dl

    This is a really annoying bug for me, I drawn out a texture (bottom) then imported it
    into unity, then the top texture comes up. I'm creating a scary hospital game so it's
    frustrating me
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,248
    As crazy as it sounds Unity isn't doing anything weird, that's actually what your texture looks like. The default behavior for most image editors when an area is completely transparent is to fill it with flat white or odd splotches of color for better compression.

    You can hide this by checking "alpha is transparency", and it'll look pretty much like how you expect and for use with UI you'll probably be fine doing nothing else.

    If you start to notice a slight white fringing, especially if you're shrinking the texture down and setting the smaller mip maps, you'll have to separate the transparency into the alpha channel within your image editor and keep the color opaque. Depending on the image format you save the image as it might still end the with the same result as before though as most image editors will try to optimize for compression again. If you're using gimp I think there's a setting to disable this, if you're using Photoshop and PNG you have to switch to using the free SuperPNG plugin or using a different images format.
     
    theANMATOR2b likes this.
  3. Steelshot

    Steelshot

    Joined:
    Feb 24, 2015
    Posts:
    102
    Thank you for showing me this tip! Now I can continue on with the game :D