#117931 - JJGamer123456 - Thu Feb 08, 2007 8:46 pm
I'm having some problems displaying sprites on GBA without that white stuff around it. Is there a way to change that on photoshop?
#117933 - gauauu - Thu Feb 08, 2007 8:57 pm
You need to make sure that whatever tool you are using to turn the graphic into gba format puts the color you want to be transparent as the first color in the palette.
In photoshop, one way to do it would be to make sure that you are using indexed colors, DON'T use photoshop's transparency, and then use it's palette manager to make sure that the color you WANT to be transparent is the first in the list.
Cearn's Usenti and Wingit are very good for dealing with palettes and exporting things properly into gba format...I highly recommend them for once your basic graphic editing is done.
#117941 - sgeos - Thu Feb 08, 2007 9:41 pm
The gimp can also be used. You'll probably want to make your own preset palettes. When converting to indexed mode, uncheck 'remove unused colors' to preserve the palette order. Dithering probably wants to be turned off as well.
-Brendan
#117953 - keldon - Thu Feb 08, 2007 10:34 pm
Why take off dithering?
#117958 - wintermute - Thu Feb 08, 2007 10:44 pm
keldon wrote: |
Why take off dithering? |
Usually looks horrible and increases tile counts.
_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog
#117986 - keldon - Fri Feb 09, 2007 12:00 am
Only when done wrong! Having said that if it doesn't need dithering then there is no need to use it.
#117993 - sgeos - Fri Feb 09, 2007 12:38 am
I've experimented with dithering and have not found a situation where it looks better on the GBA, even when using 240 color images. If you are hand doing pixels and have complete control of palette, I could see getting dithering to work for you. The auto dithering generally makes things look grainy.
-Brendan
#118073 - JJGamer123456 - Fri Feb 09, 2007 9:04 pm
What I did before was that I made my picture in Paint(256 colors) and open it on photoshop. When I opened it, it is already at indexed color mode.
Do I go to Image->Mode->Color table and on the first block put the color I want to be tranparent then click OK? Does it work?
#118074 - gauauu - Fri Feb 09, 2007 9:07 pm
In a happy, simple world, yes, that should work. I've heard horror stories about photoshop messing up the order of palette entries, though, so I make no promises. And again, it could also depend on the tool you are using to convert the image to gba format...it needs to preserve the palette order.
#118075 - JJGamer123456 - Fri Feb 09, 2007 9:13 pm
I was using pcx2sprites to change my image to gba format. Is there a better way
Also are there some better tools to make sprites that when I convert the image, it doesn't display that white stuff around it when I put it on a GBA.
#118076 - gauauu - Fri Feb 09, 2007 9:40 pm
I haven't used pcx2sprites, but it should work ok. Like I said above, I prefer using Usenti and Git.
#118366 - JJGamer123456 - Mon Feb 12, 2007 9:04 pm
For example, I have an arrow sprite that has only two colors, White and Black. and the white is the border around black arrow, then white is the color that needs to be first?
#118368 - tepples - Mon Feb 12, 2007 9:16 pm
If your sprite has two non-transparent colors, then you need three colors in the palette. The first color in the palette is used where things behind the sprite should show through; it is often set to hot pink #FF00FF to stand out from the rest of the sprite. Your sprite cel data could look something like this:
Code: |
const u32 arrowCel[8] = {
0x00011000,
0x00122100,
0x01222210,
0x12222221,
0x11122111,
0x00122100,
0x00122100,
0x00111100
};
const u16 arrowPalette[3] = {
RGB5(31, 0,31), // color 0 for areas that should not be drawn;
// this value is not used
RGB5(31,31,31), // color 1 = white for border
RGB5( 0, 0, 0) // color 2 = black for interior of arrow
};
|
I don't necessarily know how to use specific features of someone else's PC-side software to ensure that the areas around your sprite cel are interpreted as color 0; I just know that the end result on the GBA should look like the above.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#118370 - JJGamer123456 - Mon Feb 12, 2007 9:32 pm
Sorry, I meant that I want to get rid of the white border.
Here is the sprite
[url=http://inselpix.com/view.php?id=4303988989Copy of Arrow.bmp][img=http://inselpix.com/view.php?id=4303988989Copy of Arrow.bmp][/url]
#118371 - tepples - Mon Feb 12, 2007 9:36 pm
In that image, white should be color 0, and black can be any other color. Some tools might pick up on this automatically if you make the background hot pink (R=255, G=0, B=255).
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#118374 - gauauu - Mon Feb 12, 2007 10:11 pm
To expand on the hot-pink thing....that color is the standard to use for transparent. I highly recommend that for your future game-related graphics work, you use hot pink (#FF00FF) as your transparent. Life is way easier that way.....
#118394 - sgeos - Tue Feb 13, 2007 1:09 am
Unless you need hot pink...
-Brendan
#118396 - tepples - Tue Feb 13, 2007 1:23 am
Players generally can't tell the difference between transparent hot pink and #FF11FF hot pink.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#118410 - sgeos - Tue Feb 13, 2007 5:04 am
Neither can I when I'm mucking with the graphics.
-Brendan
#118412 - tepples - Tue Feb 13, 2007 5:54 am
I can: The hot pink that's color 0 is generally contiguous with the edges of the sprite cel. The hot pink that is not color 0 is contiguous with the lighter part of the tunic area of the character. For characters with a lot of pink on them, you might want to use sky blue #99CCFF as color 0 while drawing them.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#118413 - sgeos - Tue Feb 13, 2007 6:08 am
It can be dealt with, but I've found that it can be a bit of a hastle to use 0xFF00FF for transparency when the graphics use a similar color. I'd rather hard code transparency to color index 0.
-Brendan
#118414 - tepples - Tue Feb 13, 2007 6:25 am
sgeos wrote: |
I'd rather hard code transparency to color index 0. |
So would I, but can all popular paint programs specify a color index 0 when converting an RGB sprite sheet to indexed color?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#118415 - sgeos - Tue Feb 13, 2007 6:46 am
No, but it doesn't matter if all popular paint can that. As long as the paint program you are using can, you are set. Graphics gale is good indexed images. The gimp can be made to work with them, but you are probably better off with hot pink and a fixed palette when using the gimp. (You could save the palette, swap transparency into index 0 and then reindex the image. A bit of a hassle.)
-Brendan
#118477 - JJGamer123456 - Tue Feb 13, 2007 8:45 pm
can you show me another example. I'm using devkitadv by the way
#118489 - HyperHacker - Tue Feb 13, 2007 11:11 pm
I simply draw my graphics with the transparent colour being something easier on the eyes, then fill it with hot pink before exporting. In an editor supporting layers you can just have a layer below your image filled with your transparent colour and turn it on to export.
_________________
I'm a PSP hacker now, but I still <3 DS.