Can anyone tell me how I can fix an annoyance I am having with Unity right now? When I use a photoshop file with transparency, often I get a white outline around the transparency borders. I know the issue is that when Unity converts the file, it creates the color texture where all of the transparent areas are rendered white and then it renders a transparency mask. The white outline is caused by that white area bleeding into the final masked picture. I just don’t see anywhere in unity where I can specify what I want the transparent color to be so I can match it to what I need. How have you guys fixed this?
You can see what I am talking about in my screenshot below.
Thanks for the responses guys. I can do the alpha channels thing, I was just hoping there was possibly an easier, more streamlined, way to handle this with Unity.
Okay, so what I gather from this issue and experiences with importing 3DS Max files is that it relies on the software that it was created in (in this case Photoshop) to convert the file to what unity needs (like a JPEG or whatever unity works with). And since it happens in that program, Unity has no way of manipulating certain parameters such as what the “transparent” color is rendered as. So in order to get around that I have to manually create the alpha mask. How close am I on that?
Nope. Then you’d have to own Photoshop to use Photoshop files in Unity, which is not the case; it has a native importer. (Also certainly not JPEG…lossy compression = bad for source files. It’s just uncompressed image data.)
Actually you can set the matte color to be something other than white; e.g. in Photoshop you can export for web and save as a PNG, where you get to choose the matte color. However, then you have the annoyance of exporting instead of just saving the file. Also, it’s usually better to have direct control over the alpha channel anyway, since having a single matte color is often not enough.
Interesting. I did have issues importing 3DS files without 3DS Max installed on my system. It could have been an anomaly or maybe only 3DS files need 3DS Max to convert to an OBJ file. Anyway I guess I will stick with the slightly laborious alpha chanel. I’d prefer to keep the raw files and no duplicate exported files to keep my project as neat as possible.
You should think about it more in terms of layers. When you have no background, then whatever else you have is blended in to the checkerboard pattern using a mask (alpha channel). The pixels themselves are not a mix of the foreground and background. In some applications, layering will carry over, and you won’t have to worry about fringes. Unity is not one of these; Unity has to use a flattened RGB image, along with an alpha channel, if necessary. When flattening,the pixels actually do get mixed with the background, even though Photoshop doesn’t tell you what that background is. Why this happens, I have no idea; it seems stupid that it wouldn’t keep the actual colors, but that’s the way things are, for the time being.
@Jessy
Hopefully we get some improvements in Unity or Photoshop (whoever is responsible for this import madness) to better render the RGB image. I don’t see it in my build of 3.0 though so likely that wont happen any time soon.
@Eric
That makes sense then. I have heard the .max file format is not known to anyone but Autodesk therefore the only application that can convert it to any other file would be Max. Thanks, thats good info to know.
It’s certainly not UT; it might be Adobe. The only thing I can think of for why this is the way things work, is that if you don’t use the alpha channel of the image, it will still look like the right shape, instead of having a blocky outline. But I have no idea of the scope of what all RGBA images are used for. Maybe this was more important in ye olden days?
From what I understand .max files store data for max to create the object procedurally so often the final object isn’t entirely stored in the file.
I once had a utility that could read the meshes without max but only if the object was static and saved with the stack collapsed to a mesh with no modifiers.
You should not. Instead, sama.van, you should learn how to actually use alpha channels. Your methods are ridiculously overcomplicated and time-consuming.
There’s no reason not to use a .psd; if you don’t, you’re wasting time. It doesn’t matter how many models you have; you’d have time to make more models if you learned how to do it properly.