Adventure Game Studio

Community => General Discussion => Topic started by: on Thu 18/11/2004 12:32:36

Title: Sprites in AGS
Post by: on Thu 18/11/2004 12:32:36
I would like to craeate my own EGO with sprites which i have made. Bud if I create an sprite in Photoshop and save it as .TGA  with transparent background, there is an awfull WHITE line around my body.
If i put my EGO on black background, there is some BLACK line around. How can i do a realistic sprite of a body?
Thanks to all
Title: Re: Sprites in AGS
Post by: Ishmael on Thu 18/11/2004 13:11:36
AGS cannot normally handle semi-transparent bits in sprites, so you'll need to make hard edges for the sprites...

Thus my ignorance about the 32-bit possibilities, I cannot say if you can do it with alpha channel thingys, because I don't know what this alpha channel thing is... but someone knows, and will tell you (and me)...
Title: Re: Sprites in AGS
Post by: Pumaman on Thu 18/11/2004 19:23:33
This is usually due to programs like Photoshop anti-aliasing the image before saving it, and thus leaving a border when the background is made transparent.

Disabling anti-aliasing in photoshop should fix it -- I'm not sure where the option is, but I'm sure someone else can help if you can't find it.
Title: Re: Sprites in AGS
Post by: on Thu 18/11/2004 20:09:50
Yes good Idea...I heard about anti-aliasing in background manuals...I'll look for it. Thanks
Title: Re: Sprites in AGS
Post by: Fritos on Fri 19/11/2004 16:09:25
When you design your sprites in Photoshop, you need to keep in account that the alpha channel in what will make your sprites anti-aliased. Just make sure that when you design your sprite that the colors spill over the alpha channel, so it picks up the colors from your sprite to anti-alias instead of picking up the background color of your layers (i.e. why you get a black/white ring).

(http://www.2dadventure.com/ags/Photoshop.gif)

Here's a Zipped Targa file to load into Photoshop, so you can get a better idea. Just look at the alpha channel (The tab named "Channel", next to your layers tab) to see that the anti-aliased area is actually smaller than the sprite area.

http://www.2dadventure.com/ags/Example.zip

Hope this makes since.
Title: Re: Sprites in AGS
Post by: on Fri 19/11/2004 20:55:19
Erm: maybe I am stupid
I tried your zipped file and looked to channels..I didn't find any Alpha Channel so I tried to do It.
But if i put an Alpha channel on this Example.tga it become fully BLACK! I tried to change settings of this channel by double clicking, but no changes:(
Title: Re: Sprites in AGS
Post by: Fritos on Fri 19/11/2004 22:44:52
What version of Photoshop do you have?
Title: Re: Sprites in AGS
Post by: on Sat 20/11/2004 16:26:43
Adobe Photoshop 7
Title: Re: Sprites in AGS
Post by: Fritos on Sat 20/11/2004 23:21:24
This is where your alpha channel is.

(http://www.2dadventure.com/ags/Channel.gif)
Title: Re: Sprites in AGS
Post by: on Sun 21/11/2004 12:37:41
I created an alpha channel but it is already BLACK!  http://juste-milieu.czweb.org/ALPHA.jpg
I looked to a manual of Photoshop and they write here, that i can create this alpha with black and white drawing...So i did it but now I dont know what next:( I tried ctrl+J but its still ugly
Thanks
Title: Re: Sprites in AGS
Post by: Janik on Mon 22/11/2004 04:26:25
Sometimes what appears to be black is slightly not-black (like RGB 0,1,0) because of various operations and anti-aliasing... You can maybe try using the magic wand with a tolerance = 0 to grab all the black background; if you see there is some next to the sprite that is not selected, then it is not quite black there.