General Category > General Anim8or Forum

Anti-Aliasing with Jagged external edge

(1/2) > >>

wild_qwerty:
Is it possible to render a model with anti-aliasing turned on and still maintain a jagged outside edge?

The reason I am asking is that I am using anim8or to model some new sprites up for a game mod I work on. Since we are modding Fallout 2 which is a sprite based game the image need to have a 'hard' or 'jagged' outside edge some that they blend into the game correctly. Normally with anti-aliasing on you get that blurred edge.

Sure the sprites work fine with anti-aliasing turned off, but they dont look quite as good. So it would be nice if I could just anti-alias the inside pixels but keep the edges hard.

Any suggestions?

Does the AA Filter effect this at all?

Raxx:
The AA filter does not affect this kind of request. It's recommended you use bicubic as your AA filter to get the sharpest results, but it performs AA on the entire render regardless of the filter you choose.

Something you can try:
1. Render your image(s) antialiased (preferrably against a black background), save them to file.
2. Render the same images again except only the alpha channel with AA disabled.
3. Use a 2D app to apply the alpha channels to your antialiased renders. Use any color background you need as well. Now you have your jaggies on the outside but AA on the inside.

I'm guessing the engine converts a single color to the transparency, similar to how gifs work (no semi-transparent pixels--bright pink is usually used). If the engine does use semi-transparent pixels (usually the png format), I'd recommend using the same steps, except rendering both channels as antialiased.

wild_qwerty:
I've already tried that but it doesnt really seem to work:

Raxx:
That's why I said to use a black background, so that there won't be any ugly blue artifacts when cutting the render out using the alpha channel (black blends better in most cases). Not to mention that Fallout itself is a pretty dark game, so it blends even better. Ideally, use any background that blends with the outline of the character/object the best, when rendering. After you applied the alpha channel, you add the blue background to it and you won't have those artifacts anymore.

Don't be afraid to touch up your alpha channel also before you apply it. Higher res images aren't much of a problem, but you're asking a machine to handle some pretty delicate stuff here. You can easily add one black pixel to the character's arm, and take out one or two from the neck and leg. It's still easier than hand-erasing everything around the silhouette from scratch...

Sirren:
Hello there folks, and hallo there Wild_Qwerty.
Well, let's go with some order...
One thing you didn't point out: Fo2 creatures need to cast a shadow, so you need a floor to cast it upon... That floor is rendered with the creature and this means that the alpha cahnnel trick does not work (no, shadows are not rendered when cast on a completely clear foor).
We discussed this topic for a while on the BGE forum. I think a similar trick could work:
Render your animations to BMP with a higer resolution than you need
Batch convert them to a format which supports transparency
Select your background by colour and cut it off
Invert your selection and resize your image.
I only did it a bunch of times to put new trees for my mod and it worked.
Personally I firmly refused to do it for a 600+ animation frames creature (which is roughly the minimum). A sprite usable by the player is some 4,5 K frames, so please evaluate you odds.
By the way, you showed an interesting silohuette here... What kind of character is it?
See you

Navigation

[0] Message Index

[#] Next page

Go to full version