Importing images to look clean

Started by LinkMaestro, Wed 13/08/2008 15:25:40

Previous topic - Next topic

LinkMaestro

Alright, here's my issue, folks.  I'm making the sprites for my game in photoshop.  When I go to import them into the game, there is white residue all around them.  Evidently, the very faint colors are not supported. I made my game 32-bit, hoping a bigger pallett would help, but it doesn't change anything.  Is there something I can do to allow the photos to be imported, without having to go and get rid of all the faint colors? I feel like it's limiting the graphic by doing that and therefor downplaying what I'm trying to achieve with the game. Any pointers?

And I've tried saving as a .bmp file too. No change.

Akatosh

Use your drawing application to save the image as 32-bit png and check the little box that says "alpha channel". Import it into AGS via the import from file funtion, and answer the popup message with "Yes". Problem solved.

LinkMaestro

Hmm, it's not letting me select the alpha option, nor save it as 32-bit.   Those options are all grayed out. 

Damn these programs.

Khris

To explain a bit:
Drawing in PS using the brush tool will create smooth edges, so e.g. on a white background, red pixels will be surrounded by all kinds of light red and light light red pixels.
If you import the sprite into AGS, only the "true" white of the background becomes transparent, leaving you with those horrible white, jagged edges.
To avoid this, you indeed need to set AGS to 32-bit mode, not to recognize the faint colors but to support the image's alpha channel, a layer holding no color but transparency values for every pixel.

I've just tried to create a 32bit PNG with PS7 but failed miserably.

LinkMaestro

Alright, but that doesn't really explain to me how to save these .png files.  Plus, I did set the program to 32-bit and it didn't change anything. Is there another setting i'm missing?

btw, I'm using PS 6.

Khris

Like explained, it's sufficient to set AGS to 32bit mode, then import proper 32bit PNG files containing an alpha channel.
Questions about creating alpha channel PNGs don't belong in this forum.

naltimari

Quote from: KhrisMUC on Wed 13/08/2008 16:51:47
Like explained, it's sufficient to set AGS to 32bit mode, then import proper 32bit PNG files containing an alpha channel.
Questions about creating alpha channel PNGs don't belong in this forum.

I think I know what is happening. I've been through this problem once, maybe you're going through the same situation.

The fact is that PS has three color modes: 8-bit, 16-bit and 32-bit. These color modes represent how many bits are used in EACH individual color component (R,G,B). So, in PS's '32bit color mode', the image has in fact 96bits (32bits x 3channels).

This is DIFFERENT than what is called '32-bit PNG'. In PNG, 8bits are used for each component (R,G,B and A, for alpha), so 8bits x 4channels= 32bits.

Thus, to save a '32bit PNG' that is compatible with AGS, you must use '8bit color mode' in PS, and then you can save the file as a 32bit PNG. As long as your image has a transparent layer (i mean, if it contains any layer that is not a 'background' layer), the see-trough parts of the image will be transferred to the PNG file. You don't need to ask PS to do this, it will do it automatically.

It's a bit misleading, but that's the current scenario.

LinkMaestro

My PS is set to 8bit...I'm not sure what's going on. I'm hoping my roomate can figure this out for me when he gets home from work.

I can save as a .png, but the save options are grayed out...so i can't choose alpha channels.

naltimari

Quote from: LinkMaestro on Wed 13/08/2008 18:59:43
I can save as a .png, but the save options are grayed out...so i can't choose alpha channels.

You _don't need_ to choose alpha channels manually, that's why it's greyed out. Like I said, PS will set an alpha channel for you automatically, based on the transparency of your layers.

It seems your problem has more to do with your PS skills than with AGS usage.

LinkMaestro

Haha, well that's certainly an understatement. I guess I'm just going to have to tinker around with this for a while until I get more familiar with it.  I can make pretty damn good art..but I'll be damned if I'm any good with file types and all that jazz.

Thanks for the help.

naltimari

Quote from: LinkMaestro on Wed 13/08/2008 19:26:17
I guess I'm just going to have to tinker around with this for a while until I get more familiar with it.  I can make pretty damn good art..but I'll be damned if I'm any good with file types and all that jazz.

That's for sure. But if you have the art skills, that's more important.

I've setup a little 'pack' for you, with a PSD file, the PNG that was exported, and the AGS game in which I imported the PNG into a character. You can walk him around and see that the drop-shadow is semi-transparent, and the edges are soft. Here's the link.

Hope it helps.

fly

try to save it in 24-bit bitmap like in paint, think that'll do
Anyone that is willing to explain to me some things please send me a pm, thx

Khris

Not at all. BMPs don't support alpha channels and are a no-no to use in general.

fly

ok, sorry then...i must write one off topic question..can anyone tell me how to convert photo (from camera) so that it looks like cartoon?  I mean, which filters should I use in PS?
Anyone that is willing to explain to me some things please send me a pm, thx

Khris


fly

Quote from: KhrisMUC on Thu 14/08/2008 08:40:01
Just google for tutorials...
found one....looks good  but I remember one program where you just click on a button and it automatically makes photo look like cartoon..think that it is in Kodak camera software
Anyone that is willing to explain to me some things please send me a pm, thx

DazJ

Isn't this a simple case of turning off anti-alias before selecting and deleting the background to make it transparent?

LinkMaestro

Quote from: naltimari on Wed 13/08/2008 20:07:41
Quote from: LinkMaestro on Wed 13/08/2008 19:26:17
I guess I'm just going to have to tinker around with this for a while until I get more familiar with it.  I can make pretty damn good art..but I'll be damned if I'm any good with file types and all that jazz.

That's for sure. But if you have the art skills, that's more important.

I've setup a little 'pack' for you, with a PSD file, the PNG that was exported, and the AGS game in which I imported the PNG into a character. You can walk him around and see that the drop-shadow is semi-transparent, and the edges are soft. Here's the link.

Hope it helps.

You evidently were running a different version of ASG when you made it, as ASG told me the game could not be opened. BUT, I did try to import the blob and the same thing happened...the colors were all screwed up. I had the game set to 32-bit and even tried using hardware acceleration. Didn't help.

I may need to hang myself out of the sheer frustration of this scenario.

Trent R

#18
Have you tried using the 'Export Transparent Image' from the Help pull down?
Alternatively, you could try uploading your psd so that we can work with it personally?

~Trent R
~Sirus Squire
To give back to the AGS community, I can get you free, full versions of commercial software. Recently, Paint Shop Pro X, and eXPert PDF Pro 6. Please PM me for details.


Current Project: The Wanderer
On Hold: Hero of the Rune

The Almighty Metroid

Ya im REALLY sorry but i need help  :-\
I need help with walk-behind I cant get my charator to walk behind it! he just walks OVER it... HELP?  ???
Who is more foolish? The fool, or the fool that follows him?

SMF spam blocked by CleanTalk