- Home /
2d PNG on Plane Texture padding
I have read many articles, tutorials and answers regarding texture padding, and followed them, to no avail. :(! So I am going to try and be as detailed as I with what i am aiming to achieve, what happens when i try certain things.
I am developing a 2d side scrolling game (as my first unity c# project, moving from flash as3) and i am using a wall of planes, each with a different texture applied, to build up the scenery. like so....
as you can see in this image, there are 5 planes, (3 fully visible and 2 just the edge is visible) each with the next texture added. this is editor view which is why you can see the tris and verts of the planes... which works great..... but...
What happens when i just export the PNG as standard (before I learned about texture padding and alpha channels)
There is a horrible line between the planes, even though the scaleX of each plane is 8 and the positioning is exactly 8 units apart, also the nasty line of colours at the top of the texture (as you would expect (well, now i do))
I then read this article
http://docs.unity3d.com/Documentation/Manual/HOWTO-alphamaps.html
And followed the instructions. I ran the batch which put the same hideous border around my image as in the tutorial, create the alpha channel as explained, which put a redish overly ontop of the image within photoshop. None the less, i exported the png and then added it into my Unity project. This was the result
According to that article Unity should ignore the transparency it reads from the png layers and use the alpha channel to filter out the bleed, and use the bleed to do some clever, funky funk with it. But it doesnt.
The reason i posted this question is because i obvioulsy want to find out where im going wrong, or whether i am looking at the correct thing, as I am not applyingthe texture to a 3d object, as such.
Any help would be greatly appreciated as I have been ignoring the problem for a while, then go back to it and repeat, aas i felt i wasn't getting anywhere with what ever i wanted!
Perfect Solution: Any third party software (preferably free, or cheap and not an extension of Maya or 3D Studio Max) that I can input a standard PNG exported from photoshop and it does some magic to sort the alpha channels so unity doesnt cry and put horrible lines around the edges! (I have also tried to use Eric Chadwicks photoshop action, again, to no avail!) http://www.ericchadwick.com/examples/files/uv_edge_filter.zip
SORRY FOR THE LONG POST :D
Answer by rory.pickering · Dec 11, 2012 at 10:44 AM
I managed to get it working using this plugin
http://u3d.as/content/titov-mykhaylo/png-to-tga-converter/2WR
and having the texture type to 'GUI'
now I get pixel perfect graphics, with no horrible lines anywhere!
Your answer
Follow this Question
Related Questions
Aligning planes thin gap? c# 0 Answers
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Renderer on object disabled after level reload 1 Answer
Limiting player view dependent on position and obstacles 0 Answers