Problem with texturing

Hi guys!

I got a little problem with the texturing. I applied a texture with alpha background in PNG format to a cube but there is this line on the edge of the cube. I checked if the image is properly transparent and it looks fine without any edge when I use picture viewer. Here’s the screenshot how it looks like in Unity.

http://postimage.org/image/e1cwonosn/

Tried to use plane instead of cube but it is not possible to apply Rigidbody to plane. Tried making it as a very thin box but still no difference. Looked for similar questions and someone said to change the Wrap Mode to “Clamp” instead of “Repeat” but it didn’t change anything. I don’t know what else to do, thanks in advance! =)

try changing the tile or offset idk if that will work though

2 Answers

2

Fixed the problem. Apparently it’s something to do with the shader. Previously, I used Transparent → Diffuse and I changed it to Transparent → Cutout → Diffuse and that fixed the problem with the edge, plus the texture looks much sharper xD
Thanks for the tips! =)

Set your texture's wrap mode (at the top of the inspector) to Clamp, not repeat.

If you look at your picture, you'll see see that the white edge on the left match the bone part on the right, and that the white edge on the right match the meaty part on the left. That's because the texture is tiling (and resized or mipmap, not sure for that, but nevermind).

(Edit) Ok, So i read the rest of the question, and now I filly silly. Other solution : I remember a post about the same issue. Try changing the color of the transparent part to black. Maybe in photoshop you don't have a color there, but when you save it to png, photoshop fill it with white. So you need to set the color to (0,0,0,0) for those areas. Finding that post would be much better than my poor explaination !

Apparently my edit don't want to work, so comment : (Edit) Ok, So i read the rest of the question, and now I filly silly. Other solution : I remember a post about the same issue. Try changing the color of the transparent part to black. Maybe in photoshop you don't have a color there, but when you save it to png, photoshop fill it with white. So you need to set the color to (0,0,0,0) for those areas. Finding that post would be much better than my poor explaination !