Problem with bleeding colors in pictures

Started by alkis21, Wed 26/04/2006 10:11:20

Previous topic - Next topic

alkis21

Sorry if this is more a drawing problem than a scripting one, I couldn't find the appropriate forum section to post this.
What was much easier in my previous 256 colors game (where I pretty much drew every sprite pixel by pixel) seems very difficult now that I'm going for a 32-bit one.
My problem is that I can't get the "invisible" color right, as whenever I try to create something, there is a fine line bleeding around the object that is very slightly different, but different than the invisible color.
Let me give you a simple example, because I doubt I'm making sense: Say I want to create a GUI button (I use Paintshop Pro). I draw it over a (255,0,255) background, and the result is something like this:



The problem with the above image (which you will see if you open it with an image editor), is that there is a fine line or two around the button with various pixels of colors such as (219,0,227) or (251,3,250) (and I'm not talking about the shadow, but about colors that do look like purple in the naked eye).
If I import this image into AGS, those pixels will be shown, creating a poor result.
Although the above image is easy to fix (by either drawing a fine line of the correct color around the object or using the color replacer to change the few additional colors), it becomes a nightmare if the image is a character I exported from Poser (below is an example from the Poser 6.0 demo):



Is there an easy way around this problem I'm not aware of?

Gilbert

If you're using 32-bit mode, one much easier method is to create the images with Alpha channel, that way you don't need to care about the transparent colour.
Otherwise you may try disabling AA settings for the drawing tools (if there's one).

alkis21

Quote from: Gilbot V7000a on Wed 26/04/2006 10:18:41
If you're using 32-bit mode, one much easier method is to create the images with Alpha channel, that way you don't need to care about the transparent colour.
Otherwise you may try disabling AA settings for the drawing tools (if there's one).

Alpha channel? AA settings? Sorry, I'm completely artistically challenged  :-[, can you please be more specific?


Ashen

This is really a Graphics Program question, not an AGS one, so I'm going to shift it to General Discussion.

This is an issue I'm sure (if only because I've moved a few of the thread out of Beginners Tech myself) has been raised a bunch of times before. I'd suggest a forum search, but I just tried a couple and could find any of the threads I was thinking of. Which isn't to say you won't find something usefull  - I know the answer's around somewhere.
I know what you're thinking ... Don't think that.

BOYD1981

the first thing that strikes me about that first picture is that it's saved as jpg so you're going to get all kinds of distortion around the edges of graphics.
although ofcourse you may have just saved that image as jpg for the sake of posting it and may not be saving as jpg and then converting to pcx to use in AGS...

Limey Lizard, Waste Wizard!
01101101011000010110010001100101001000000111100101101111011101010010000001101100011011110110111101101011

alkis21

I agree with the relocation of the topic, thanks.

Quote from: Ashen on Wed 26/04/2006 14:52:29
This is an issue I'm sure (if only because I've moved a few of the thread out of Beginners Tech myself) has been raised a bunch of times before. I'd suggest a forum search, but I just tried a couple and could find any of the threads I was thinking of. Which isn't to say you won't find something usefull  - I know the answer's around somewhere.

Believe me, I do my research before asking a question in the forum. First I spend hours trying to solve all problems myself (it's part of the fun), and if I can't I try to search old posts. Although my post count is low, I've been lurking AGS for more than two years. I've read most technical posts, even those that didn't seem to be of my immediate interest. I hate wasting people's time with silly questions, and that is why I managed to create a full length game with only one question asked.
What I'm trying to say is, although I'm sure I'm not the first guy who asked this question, my seach revealed nothing I could use.

Quote from: BOYD1981 on Wed 26/04/2006 15:56:30
the first thing that strikes me about that first picture is that it's saved as jpg so you're going to get all kinds of distortion around the edges of graphics.
although ofcourse you may have just saved that image as jpg for the sake of posting it and may not be saving as jpg and then converting to pcx to use in AGS...

Indeed, I only saved the example as jpg to post it. The image format is not an issue anyway, as the problematic pixels are there before I even save the image.

I can't say the Wikki definitions helped me understand what I am supposed to do. :( Thanks anyway.

SSH

Most graphics programs that do anti-aliasing, like PSP and Photoshop havea  setting to turn it off. Or, ou can save as a PNG with alpha channel, and so if you import into 32-bit-mode AGS, it will preserve the semi-transparent pixels at the edges properly and you lose the halo. If Poser can export without a BG colour with an alpha channel you can do this, or maybe you can turn of the anti-aliasing, however, this will probably apply to ALL the image, not just the outside edge.
12

MrColossal

"This must be a good time to live in, since Eric bothers to stay here at all"-CJ also: ACHTUNG FRANZ!

BOYD1981

paintshop pro won't apply an anti-alias effect to the Paint Brush tool until the size is set to 4.
there's no real option to turn it off on the paint brush tool but if you set the hardness to 100 it won't apply any.
i think the line and shape tools have anti-alias turned on by default but the option to turn it off is right there in front of you (as long as you have the tool options menu on).

Limey Lizard, Waste Wizard!
01101101011000010110010001100101001000000111100101101111011101010010000001101100011011110110111101101011

alkis21

I think I got it guys!
Basically, what I did was this:

-Disable the Anti-Aliasing option in Poser before rendering the image
-Export the Poser image as .PNG
-Import the image directly to AGS

I then get this wonderful message, which I didn't know it existed:



I click on 'Yes' and everything works beautifully...
Once again, thank you all. I would have never guessed the AA option was causing the problem if it weren't for you.

Gilbert

#11
Well, actually if you choosed to use alpha blended sprites you don't really need to disable AA.

alkis21

Quote from: Gilbot V7000a on Fri 28/04/2006 01:43:32
Well, actually if you choosed to use alpha blended sprites you don't really need to disable AA.

*scratches head* Ok, uh, I'll keep experimenting.

SMF spam blocked by CleanTalk