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
1
Question by Frederico Zveiter · Apr 19, 2011 at 07:50 PM · texturealphatransparentgimp

How do I Import Alpha Textures... with GIMP.

Hi Folks,

Can anyone teach me how to do the steps involved in the FAQ "How do I Import Alpha Textures?" (http://unity3d.com/support/documentation/Manual/HOWTO-alphamaps.html) but with GIMP or directly exporting PNGs from Inkscape?

Thanks everybody! Fred

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

2 Replies

· Add your reply
  • Sort: 
avatar image
5

Answer by Frederico Zveiter · Apr 19, 2011 at 11:47 PM

Forget it!

I just found that, using GIMP, there is no need to create an explicit alpha channel. Simply open the problematic "white around edges" PNG and re-save it unchecking the option "save color values from transparent pixels".

When you import it into Unity and apply it in a material with shader "Transparent/Diffuse" it works perfectly.

I also think that this solution is much simpler and more practical than the solution with Photoshop. Since GIMP is a free multiplatform tool, I recommend it to everyone who has this problem.

Best wishes!

Comment
Add comment · Show 1 · 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
avatar image TheOz · Feb 04, 2012 at 02:05 PM 0
Share

It is very important to remember to applay an appropriate shader that supports an alpha channel. I missed this step when trying to figure out why my images was not showing its alpha channel. I have also found that the "unlit/transparent Cutout works" well as a shader selection.

The Oz

avatar image
1

Answer by WhendricSo · May 29, 2012 at 08:13 PM

I had some issues getting this to work, but I eventually found a solution. Hopefully, this will clear up a bit of confusion for others with creating alpha map textures with GIMP for Unity.

To do this in GIMP, you need to

  1. make three copies of your image layer.

  2. Then, on the middle layer, right click on the layer and remove the alpha channel, then add it back in, making sure your background color (in the color picker) is white.

  3. On this layer, use the "Generic -> Erode" filter on it numerous times, 10-20 times should do it. If any areas of your image are still white, paint them with a neutral tone from your image.

  4. Hide the bottom layer, which should still be the same as the original image with alpha and everything.

  5. Merge visible layers

  6. Right click the hidden layer and select "alpha to selection"

  7. Return to the layer you eroded, invert selection, then delete

  8. Delete the bottom layer so there is only one layer (this is very important because otherwise GIMP won't save the transparent pixels properly)

  9. Save you PNG file with "save colors from transparent pixels" checked and "save background color" unchecked

This will create perfectly seamless PNG textures with GIMP, with no graphical artifacts even when mipmaps are drawn (which is how Unity optimizes distance drawing of textures).

Hopefully this will make your grass, plants, icons, etc look great and most of all professional in Unity!

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

2 People are following this question.

avatar image avatar image

Related Questions

Transparent texture contains other color 1 Answer

unity png color bleeding 1 Answer

Tree leaves are only one sided 0 Answers

How to get rid of dark line on the edge of transparent pixels? 2 Answers

Edges on Transparent GUI - Still not working 1 Answer


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