Unity Darkening my Sprites

So, I have a problem with the sprites I’ve imported into Unity. After they’ve been imported, Unity darkens all the colors in my sprites, making them all turn into darker variants of themselves. I’ve messed around with the import settings, and clicked every box I can find and test each one out, but none of them fix the issue. I wonder if there’s some combination of them I have to select, or maybe it’s a setting somewhere else in the engine. Here’s an image to show what the sprites look like


I could probably live with the vanilla cake block looking as it does, but the chocolate one is just plain black. I would deeply appreciate any help you guys could give me, thanks.

Hi William,

First of all, check the import settings of the images in Unity. Did you set the texture type to “Sprite (2D & UI)”?

Also make sure that you did not assign any colour profile to the images in your image editor. The colour mode must be RGB, not CMYK.

Yeah. The it was on Sprite (2D & UI). And from what I could see without color profiles and on RGB. Here’s a picture of all the other import settings.

You didn’t use an alpha channel, did you?

I’m asking because I’m wondering whether you used transparency for the brown part. If the masking on the alpha channel incorrect, you get this result.

Does your other cake look as intended? In your first screenshot, the value of the yellow in Unity seems to be lower than the yellow in Gimp(?).

Another idea: What shader do you use? And what component? See the Inspector of the “cake” game object in your Hierarchy

No, I didn’t use transparency for the brown part. I tried completely removing the alpha channel just in case, but the only thing that changed was make the space to the left and right of the candles the background color at the moment, black. And I only have all the default components and shader on. Plus a Rigid Body and a custom Script. But they’re also dark when I just drag them onto the scene as is. And yeah, the all the other sprites are also darkened as well. But now that you mention it, I think the ones I made in a free browser editor aren’t affected, just the ones from GIMP. I’ll try copying into the other one and exporting it from there and see if that gives a different result.

GIMP is more powerful than those free browser editors. It might well be that you are dealing with a wrong colour profile or something “fancy” in GIMP. If you cannot figure the problem out yourself, zip your png, upload it somewhere and send me the link. I could try to figure out what the problem might be. I use Photoshop, though. AndI’ll be back in a couple of hours cause it’s already 2 am here. :slight_smile:

Ok, thanks! and sorry for keeping you up so late over there. :sweat_smile:

Yup, that’s it all right. I exported it from this editor called “Piskel” and it worked fine. I’m not very comfortable with GIMP yet so it’d make since for it to be some sort of setting that’s on by default I don’t know about, and it only seems to be applied in Unity and not Windows photo viewer. I’ll probably buy the course once I finish the two sections while they’re free. Here’s the mediafire link to a folder with both the PNG and GIMP file. Don’t feel rushed to find out what’s up with the pictures, I can keep working on the game with them as is for now.
https://www.mediafire.com/file/al4sljzik1n58vp/ChocolateBlock.zip/file

Thank you. I imported your png into PS. Apparently, GIMP embedded its own colour profile. See the screenshot below. (My version of PS is German.)

image

The sRGB colour profile gave the same results, so I removed the colour profile. Then it worked. :slight_smile:

Proof:

image

And the import settings of the png with no colour profile:


Here is the new png in case you cannot figure out how to remove a colour profile in GIMP:

ChocolateBlock.zip (402 Bytes)

Thanks! I unchecked the “save color profile” box when exporting the image, and that worked! Again, thank you so much for helping me with this!
Screenshot(71)
It looks so much better!!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.