Jump to content
  • Advertisement
Sign in to follow this  
Leoncoeur

Pink lines in blended textures.

This topic is 4585 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi. I've made a function for adding alpha channels for my bitmap textures that seems to work fine, the pink background on the texture is removed and becomes transparent. But it leaves a small line of pink about one pixel out from the texture. like this I reckon that it has something to do with mipmapping but I can't seem to solve the problem.

Share this post


Link to post
Share on other sites
Advertisement
Hey bud,

This will be because the pink colour you are seeing here is not the exact correct colour for it to become transparent, due to is becoming blended with colours for smoothing with the pictures.

Hope that helps,

Dave

Share this post


Link to post
Share on other sites
just a wild guess :

since your original bitmaps have a pink background you might get "slightly but not complete pink"-lines around your object due to antialiasing in your image manipulation programm.

check your source image (zoom in) to see if these lines are already there. if yes remove them. if not i don't have the slightest idea what may cause them ^^

Share this post


Link to post
Share on other sites
There are two possibilities

1. you might have blended the edged with the pink in your image editor, check in your images that all pinkish pixels are truly pink and not blended.

2. Mipmapping blends the edges with pink, to fix this you can change the color to black at the same time you build your alpha maps.

Now i do suggest that you do tut33 so you can use true 32bit textures.

Share this post


Link to post
Share on other sites
yeah.... I know... but the textures is .bmp and the images of the textures i put on the web are .jpg for my convinience... ;P

Share this post


Link to post
Share on other sites
Quote:
Original post by Leoncoeur
yeah.... I know... but the textures is .bmp and the images of the textures i put on the web are .jpg for my convinience... ;P

Is the texture filtering (smoothing) causing the pink to leak into the non-invisible sections? Try setting your filtering to NEAREST and see if it goes away.

If that is the problem then you can either:
1. Use a proper RGBA image rather than pink+preprocess.
2. Change your preprocessing. What I've done which works is when setting the alpha for a pink pixel you set the colour to the avarage of all adjacent non-pink pixels.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!