0
\$\begingroup\$

I have a problem with displaying images in my Canvas, as they're not displaying exactly like the imported image.

In the image below, the sprite on the left is how it looks when it's imported. The sprite on the right is how it looks in the canvas. Notice that some of the pixels have incorrect colours, like the lighter pink in the center of the staff's top is gone, the eyeball is a darker shade, some of the colouration under the hood is wrong, and other errors.

( The sprite is just a test I took from somewhere else, not what I intend to use as a final product. )

enter image description here

The project is 3D (going for a 2.5D look with billboard sprites) set to 384x224 resolution, orthographic camera size of 3.5, no anistropic textures, no anti-aliasing.

Is there some setting I missed somewhere to ensure that images display 100% exact like the source sprite when used in the Canvas?

EDIT Sprite in the Inspector (Seems to also not be correct)

EDIT Added entire inspector enter image description here

\$\endgroup\$

1 Answer 1

0
\$\begingroup\$

Likely scenarios that would make this happen: Wrong import settings, 3D lights affecting the supposedly 2D object, non-pixel perfect canvas.

I'd say, try checking the box that says Pixel Perfect on the canvas. That should fix it. If not, check your import settings, make sure there's no compression. If that's not the problem then it should be the lights affecting your 2D object (not sure if it's even possible) try removing all lighting from scene.

Report back with your findings, I'm curious to see what the problem is.

Edit: Problem is the compression.

Compression on Normal Quality: enter image description here Compression on High Quality: enter image description here Compression on None: enter image description here

\$\endgroup\$
14
  • \$\begingroup\$ The sprite import settings are: Pixels per Unit = 32 Generate Mip-maps = False Filter Mode = Point (no filter) Canvas is set to Pixel Perfect. I turned off all lights (just one, which was elsewhere in the scene and shouldn't have been reaching the image in the canvas) and nothing changed. I'm assuming there's a way to make sure UI is not being affected by world lighting? \$\endgroup\$ Dec 3, 2016 at 20:51
  • \$\begingroup\$ It should already be free of world lighting or any other lighting but that was just a last chance kinda thing. Can you post an image of the sprite in the inspector? (Click on the sprite in the assets and get a prnt scr) you can just add it to the question details. I'll try replicating your problem on a separate window now. \$\endgroup\$ Dec 3, 2016 at 20:55
  • \$\begingroup\$ I added the sprite inspector image to the question above. It looks wrong in the inspector, with the same problems as mentioned. But if I double-click the sprite in the Assets folder it's in, the image it displays in my external image viewer is correct (It's the image on the left above). \$\endgroup\$ Dec 3, 2016 at 21:08
  • \$\begingroup\$ I was trying to get a screenshot more along the lines of what I posted. Anyway, compare yours to mine if that helps. \$\endgroup\$ Dec 3, 2016 at 21:11
  • 1
    \$\begingroup\$ That fixed it! I totally did not notice those options underneath Override. So my version of unity doesn't have High, Normal, and None, but it did have a 16-bit option which removed the loss during the import. Thanks! \$\endgroup\$ Dec 3, 2016 at 22:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .