Photoshop - Anti Alias

Community Forums/Developer Stations/Photoshop - Anti Alias

Matt Vinyl(Posted 2007) [#1]
Hi all, and a merry Christmas! :)

I use PS (CS2.0) for the majority of my GFX creation. However, I often find that things I put together , when saved out to be used in a game, tend to have the cruddy 'pixel-tears' around the edge. I then have to resort to 'Paint' (heh-heh!) to tidy these up manually. Is there anyway to ensure that this doesn't happen?

I obviously don't use the shadow effects and things in PS on objects that I know will need dynamic shadows, but even the edges of a simple box have this 'effect'.

Any ideas?

Thanks,
M.


stayne(Posted 2007) [#2]
Using MS Paint to correct Photoshop issues = operator error. Are you talking about sprites, textures, or what?


Matt Vinyl(Posted 2007) [#3]
Heh - I thought so. Mainly gfx that I'd use as sprites. Say I design a nice mouse pointer, it'll look 'pap' in my game. I realise that the MSPaint route is a bit stupid, but I've not been able to find another way around it as yet...


BigH(Posted 2007) [#4]
I've a feeling that one way is to draw your sprite several times bigger than you need using a transparent background and then shrink it down to the size you want.
Regards.


stayne(Posted 2007) [#5]
Are you saving as png? Sometimes you need to zoom in there and make sure things are clean. Also if you use flood fill you'll get some feathering on the edges. Mess with the tolerance to fix that.


jhocking(Posted 2007) [#6]
If you were wanting to do alpha transparency without the halo that happens often to beginners then I could explain that, but given that you fix your images in Paint I'm guessing you are just doing simple mask transparency. In which case, in Photoshop use the Pencil tool, not the Brush.

Can we get this moved to Content Creation?


Matt Vinyl(Posted 2007) [#7]
Hmm, interesting thoughts. (Good idea to move to content creation - more focused arena... ;))

An example would be, I've just used the shape tool to draw a diamond shape. Plain black, to be simple. If I now zoom in, there's a good three-pixel wide 'cludge' of various shades of grey pixels.

Hmmm... ;)


GfK(Posted 2007) [#8]
If you're drawing with the brush (which creates soft edges even if you set the brush hardness to 100%), you'll get semi-transparent pixels at the edge. When you load these images into Blitz (which may not be able to handle alpha, depending on which version you're using), it'll have a raggy white edge where the transparency should be.

Draw with the pencil tool instead of the brush, if you want 'hard' edges.


AdrianT(Posted 2007) [#9]
go to Image/Mode/Index color

that will let you choose something like 4 colors and the AA will go away. Once your happy with your shape you can always go to RGB and work inside with AA on your shape.

Like someone said before, use the pencil not the brush if you want to do clean pixel work. Don't know another way to draw shapes without AA edges.


Matt Vinyl(Posted 2007) [#10]
Ah, that's not a bad idea. I'll have to ensure I get that pencil well-sharpened and use that from now on. Not the best for complex shapes though, surely?


stayne(Posted 2007) [#11]
A quick hack is to select your shape, contract the selection a few pixels, invert your selection and hit delete.


Raz(Posted 2007) [#12]
always draw things on their own layers and then when it comes to exporting, hide everything except what you are after, then save as PNG. This means you can have antialiased edges that blend well with whatever background there is in game.

(well thats what I do anyway)


Matt Vinyl(Posted 2007) [#13]
Raz - That's a good idea, but a tad annoying if the image will move over different backgrounds, and such... :(


Raz(Posted 2007) [#14]
nah not really, because the the pixels round the edge of the sprite will store alpha information and will be properly 'antialiased' regardless of whats behind it


Torrente(Posted 2007) [#15]
Raz: Only if he's using BlitzMax or B3d with sprites. Otherwise, the alpha information will be ignored.

Matt: Sorry if I missed you mentioning this earlier, but what Blitz package are you using? Max, 3d, plus?


Matt Vinyl(Posted 2007) [#16]
Hiya, no probs. I've both 3D and Max, but am mainly concerntrating on Max now (a lot more suitable to what I'm trying to achieve... ;)


jhocking(Posted 2007) [#17]
If you are using BlitzMax then use images with alpha transparency. That gives a much better look than simple masked transparency.


Torrente(Posted 2007) [#18]
Yeah, jhocking is right. Just save the image with the transparency and make sure to use
SetBlend AlphaBlend

before you draw the image. To achieve this, make the background transparent and draw on a different, empty layer.

Unless I'm misunderstanding you, this should work. Are you saving the images with transparency, and they still have odd edges?