• Advertisement

Archived

This topic is now archived and is closed to further replies.

blue screening help

This topic is 6000 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

I have some images that have a blue background (which I want to mask out). I''m wondering what is the best way to create a corresponding alpha byte from the RGB data that I have ?? _________________________________________
Leon Hui @ Credo Interactive
Bringing Characters to Digital Media
www.lifeforms.com

ICQ#: 1750265
Current ICQ status:

SMS: (Send an SMS message to my ICQ): +27831421750265
More ways to contact me: http://wwp.icq.com/1750265
_________________________________________

Share this post


Link to post
Share on other sites
Advertisement
I`ve done this before (actually, I used purple screening, but the ideas the same). All I did was set the alpha to 0xFF where the colour was bright purple when loading the images. The problem with it is that you dont get smooth alpha blending - just a sharp edged mask.

Are the images being loaded into your own program (as texture maps say) or do you just want the images saved out with the blue bg alpha`d out?

Share this post


Link to post
Share on other sites
The images are being loaded into my own program, so I have access to the RGB bytes.

I''ve tried color matching as in if the pixel matches a certain color, I''d alpha that out, but it doesn''t seem to work 100%, especially if the images were anti aliased before. Is there a process to get the best results? I''ve tried comparing to just one channel (ie RED) but this doesn''t work for all cases.




quote:
Original post by Krunk
I`ve done this before (actually, I used purple screening, but the ideas the same). All I did was set the alpha to 0xFF where the colour was bright purple when loading the images. The problem with it is that you dont get smooth alpha blending - just a sharp edged mask.

Are the images being loaded into your own program (as texture maps say) or do you just want the images saved out with the blue bg alpha`d out?




_________________________________________
Leon Hui @ Credo Interactive
Bringing Characters to Digital Media
www.lifeforms.com

ICQ#: 1750265
Current ICQ status:

SMS: (Send an SMS message to my ICQ): +27831421750265
More ways to contact me: http://wwp.icq.com/1750265
_________________________________________

Share this post


Link to post
Share on other sites
I used a small range for the colour match - something like 3 levels either way of the colour I was matching on. That caught the few places where my backdrop wasn`t 100% purple (0xFF01FF say). The real problem, though, is when the images have been antialiased onto the background. Then you get a fringe around your image that is "polluted" with excess blue.

I`m afraid I dont know an easy way to solve that if the image itself has any blue in it already. You need some way of finding out how much blue was already there and how much was added in. Sadly you aren`t going to get that from a one byte blue channel, so you need to find another source for that information.

Off the top of my head, I can think of two sources - versions of the image before the antialias or the "kernel" that the antialias filter uses. If you have either of these, in the worst case you can undo the antialias, put the images onto a transparent background.

Share this post


Link to post
Share on other sites

  • Advertisement