Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by rory.pickering · Dec 06, 2012 at 03:23 PM · c#renderingtextures

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....

plane-back-buildup

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)

planes-up-close

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

planes-up-close-2

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

planes-up-close.jpg (62.5 kB)
plane-back-buildup.jpg (75.7 kB)
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

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!

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

9 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

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


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges