Monday, June 16, 2008

Anti-Aliasing




Your image contains a lot of pixels, this pixels carries the RGB color.
Look closely to the edge of the square, you will see it sharp because of the square's edges go strait with pixels.
*with zoom
But when you draw a line is not strait the line will pixellate.




so if we need the edge go sharp so we need to add more pixels to decrease this pixelation



3D World
in the 3d world we have the anti-aliasing,this is the process which we decide for how much pixels will be added.

we have 2 deferent ways in AA (anti-aliasing)
  • Fiixed samples
  • Adaptive samples
Fixed samples..
you are tilling maya that i want you to raise the pixels in all over the image whether there is a curve needs pixels or there is not ..!! and thats tooooo much money.

Adaptive sampling..
you are tilling maya that i want you to raise the pixel at the places that needs more pixels



as shown the pixelated edge for the low samples.

with adaptive samples you determine the min. and max. values for the samples ....
min = at least add pixels with this rate.
max = add pixels but dont go high than this rate.


*the black grid this is the pixels

there is an under sampling and over sampling

Oversampling means that the pixels subdivide in X and Y axis.
one division = 0 , two divisions =1 , three divisions=2 , .... and so on

Undersampling means that combine more than one pixel in one sample
combine 4 pixels = -1 , combine 8 pixels = -2 , .... and so on

so there must be a minimum and maximum value for sampling like
-2,0 -1,1 0,2 1,3


So the adaptive sampling we add more pixels at places that needs more pixels .. and the places that doesn't need more pixels we never add pixels.
So..
there is very important thing in maya and there is very very few people that use it ... Samples Diagnose
Samples diagnose shows you the way that the samples spread in the image


(to activate the sample diagnose .. go to render global > diagnostic > check samples)

as you can see in samples -2,0 the samples (white dots) has been spread in a wide range and by raising the sample more pixels will be added and this will give a smooth curves

With contrast ... the less value you give the more samples will be pushed into the edges.
and if you see the render you will find the edges go sharp because the edges has more more pixels to smooth
but in -2,0 the samples was too low in the image so the edge is pixelated.



2 comments:

Adwait said...

Hello sir,My name is Adwait.I am from india.I have rade your article
about anti-aliasing.it was great & vey helpful. i am learning vfx in india & i need your help about render passes.can you please E-mail me??

Anonymous said...

Hi,
Very nice info there. Thanks a lot.
Lots of nice stuff on ur blog. Will keep visiting. Cheers :)