Graalians

Graalians (https://www.graalians.com/forums/index.php)
-   Creative Corner (https://www.graalians.com/forums/forumdisplay.php?f=17)
-   -   Tutorial: Anti-Aliasing (https://www.graalians.com/forums/showthread.php?t=1188)

MercedesBenzy 10-03-2011 09:17 PM

3 Attachment(s)
How to Anti-Alias

To render a solid line, you cannot simply place pixels (picture elements) in the target color, as you might when drawing with a pen on paper, because the granularity of them on the screen is so big that you can see the breaks between the rows. The result of drawing a solid black line on a white background, without antialiasing, will look like this:

Attachment 971

This is how much smoother the line looks if you anti-alias it:

Attachment 972

To Anti-Alias, take the black line and make each little line go darker to lighter with transparency like so:

Attachment 976

I made the background color blue to show what it would look like with the background blue instead of white.

Anti-aliasing copes with this by doing what any digital camera would do, in trying to decide what color a target pixel would be. Imagine the target pixel as a rectangular area of different colors that you have to represent by a single color. Imagine doing the same thing to a photograph. How would you go about this? By taking an average, that's how. If you were doing this to a photograph of the empty sky, you might pick a light blue color. When you are dealing with a line, you are dealing with a geometric object with width. You're not really drawing a line, you're drawing a solid rectangle. It's only in math that lines exist with no width - the lines you draw exist to pretend they are the "edges", the infinitely small exact points at which one thing starts and another ends.

Covering it all the way gives a full 1/1, and it goes all the way to the line's color. Covering 1/2 of the way moves it half of the way to the color - if we have a black line on a white background, halfway between those two colors is a medium gray. Covering just a tiny corner of the pixel with the line will mix in just a little bit of the line's color into the pixel - for the example we've been using this whole time, it'd end up a very light grey.

Hope this helped all you future GFXers! Have fun Anti-Aliasing.

Chaotic 10-03-2011 10:16 PM

Thanks for not telling us how to actually anti alias, you just say to cover the line, but don't tell us how to/or with what

callimuc 10-03-2011 10:20 PM

Quote:

Posted by Chaotic (Post 18395)
Thanks for not telling us how to actually anti alias, you just say to cover the line, but don't tell us how to/or with what

Jea. I checked his post twice cause I was like Uhm is it just me or...

Well you should actually really add thishow to / or with what

MercedesBenzy 10-04-2011 01:35 AM

Sorry, I forgot to mention. :0 Missed the most important part, so I'll fix it up. Check it now.

Dusty 10-23-2011 07:21 PM

Something I drew up a little while ago:
http://i.imgur.com/9PKET.png

Easiest thing to do is to work with 'clean' lines:
http://i.imgur.com/bHBw0.png


All times are GMT. The time now is 06:10 PM.

Powered by vBulletin/Copyright ©2000 - 2026, vBulletin Solutions Inc.