Antialiasing problem

Started by Spiro, Sun 30/10/2005 15:55:31

Previous topic - Next topic

Spiro

Hi people,

i have problem with character drawings. I wanted to use some antialiasing on borders, but antialiasing looks good only if you know foreground and background color. So, if foreground is black and background is white, you put some grey on borders and this looks good.
But what about character sprites? He can move on various backgrounds so if something looks good on white background, on green one will have some ugly white dots. So i'm stuck now.

Can somebody enlighten me about this?

Darth Mandarb

If you want to anti-alias your characters (in AGS) you need to use Alpha channels and the game must be (correct me if I'm wrong here) in 32-bit color mode.

By using alpha channels it'll blend the edges of the character to any colors in the background.

Paper Carnival

No you aren't wrong, but I want to add that you have to draw them on a transparent background and save them as png.

Evil

It really depends on the game. If your character is only 50 pixels high, anti-alias the inside only and leave the out side solid. If you get to 90+ pixels high, you can go with the transparency. But it all really depends on the style of the game.

Mordalles

man, anti-aliasing is evil! i know exactly what youre talking about those white pixels. at first i had no how to turn it off, so i had to go and take out the white pixels around the edges manually for every frame! for the whole mordy game!

i only learned how to turn it off after the game was finished!  >:(

creator of Duty and Beyond

He-Man

Wow. I didn't knew you could do that in AGS.
I've just played around a little with AGS and photoshop and I can see this becoming very useful.
Maybe I can finally make that stop-motion-clay game I've always dreamed about.

Spiro

Quote from: Mordalles on Mon 31/10/2005 20:47:08
man, anti-aliasing is evil!
i only learned how to turn it off after the game was finished!  >:(

To have complete topic we should post solution for this problem.
In photoshop 4 there is option to turn off antialiasing for line tool.
In Photoshop 8 this option is missing. But, you can draw a line with pen tool: while holding <shift> key click on two places and they will be connected with no antialiased line.

Paper Carnival

Quote from: He-Man on Mon 31/10/2005 22:01:19
Wow. I didn't knew you could do that in AGS.
I've just played around a little with AGS and photoshop and I can see this becoming very useful.
Maybe I can finally make that stop-motion-clay game I've always dreamed about.

Yes you can do that, but keep in mind that it's slow. I don't remember the minimum requirements, maybe the manual has them.

TheSaint

if darth doesnt mind i can post his pm/mail to me with antialliasing correction instructions.

Darth Mandarb

Quote from: TheSaint on Wed 02/11/2005 21:53:22if darth doesnt mind i can post his pm/mail to me with antialliasing correction instructions.

I don't mind at all!

TheSaint

here it is
Quote from: Darth Mandarb
This mini-tutorial is based on a fact; that you created this image in layers.  If not, it's a whole other head-ache!!

In Photoshop (before resizing)
1) merge all of the character layers together so you have 1 layer floating over the background.
2) select everything in that layer (click the layer while holding ctrl)
3) go into your channels window and create a new alpha channel
4) Save as a 32-bit PNG file or a TARGA (.tga) file and maintain the alpha channel
5) Import them into AGS

From the AGS help file:

Alpha blended sprites

AGS supports alpha blended sprites if your game is 32-bit colour. In this case, you need to import a PNG or TGA image with an alpha channel (you cannot paste alpha-blended images from the clipboard).

When you do so, AGS will prompt you asking whether you want to use the image's alpha channel or not. If you select Yes, then the sprite will be drawn alpha blended in the game if it is used for a character, object, mouse cursor or GUI.

Note that if you use alpha blending, any overall transparency that you set (such as SetCharacterTransparency, SetObjectTransparency, SetGUITransparency) will be ignored.

NOTE: Currently, alpha blended sprites cannot be antialiased, so if you have the Anti Alias Sprites option turned on in Setup, it will not be applied to alpha-blended characters.


I hope this helps!  If not, let me know where the confusion lies and I'll see if I can help some more!  Let me know how this turns out and good luck!

SMF spam blocked by CleanTalk