![]() |
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. |
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
|
Quote:
Well you should actually really add thishow to / or with what |
Sorry, I forgot to mention. :0 Missed the most important part, so I'll fix it up. Check it now.
|
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.