anti aliasing techniques alliased vs antialiased
play

Anti-Aliasing Techniques Alliased vs. Antialiased 1 Polygon Edges - PDF document

Anti-Aliasing Techniques Alliased vs. Antialiased 1 Polygon Edges Area Sampling 2 Catmull, 1978 Carpenter, 1984 A-Buffer 3 The A-Buffer Idea: approximate continuous filtering by subpixel sampling Summing areas now becomes


  1. Anti-Aliasing Techniques Alliased vs. Antialiased 1

  2. Polygon Edges Area Sampling 2

  3. Catmull, 1978 Carpenter, 1984 – A-Buffer 3

  4. The A-Buffer • Idea: approximate continuous filtering by subpixel sampling • Summing areas now becomes simple 4

  5. � � � � � � � � � � � � � � � � � Abram & Westover, 1983 � � ����� � � ����� � � ����� Abram & Westover, 1983 � ������������� � ������������� � ������������� � ������� 5

  6. Abram & Westover, 1983 SuperSampling Sample at 4x4 subpixels and color the pixel according to the portion of the coverage. 6

  7. Andreas Schilling � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � Andreas Schilling 7

  8. Andreas Schilling 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ���������� ����� Catmull ������������������� � ��������� � � s i j ( , ) I i ( x j , y dxdy ) � � � �� A i j ( , ) ������������������ s ( i , j ) ������������������������� ( i , j ) ��������������������� A ( i , j ) ����� � Carpenter � � � � n 1 n 1 � � � s i j ( , ) I i ( a n j , b n ) F a n b n ( , ) � � � � � � a 0 b 0 ��������� ��������������������������������������� n ����� ������������� Abram & Westover ������������������ � s i j ( , ) c ( , ) i j F � � � p p p P  ������������������������� F p � �� P ����� ����������� � �������������������������������������� ������������� p ����� c p ( i , j )=0 ���������� ( i , j ) �������� p ������������������������ c p ( i , j ) ���� p ����� ����� c p ( i , j )=0 ���� c p 2 ( i , j )=-1 �� c p 1 ( i , j )=1 � �� 0- �������� p ������ c p ( i , j )=1 ���� ����� ��� �������������� � ���������������������������������������� p � p 1 , p 2 ������� �� ���������������������� � � � � ������������������ Schilling ������������� n 1 n 1 � � � s i j ( , ) O ( , ) i j F a n b n ( , ) � � � � a b , a 0 b 0 ������� ( i , j ) �������� ( a , b ) ��������������������� O a , b ( i , j ) ����� 8

  9. ���������� � � Schilling � Abram & Westover � Carpenter � Catmull � � ( x , y ) ����� F ( x , y ) = 1 ������� � ������� � � ������ � ������� � � ������ ���������� 0 ������������� ����������� ����������� ������� ������� � �������� � � ������� ������ ����������� � Texture Aliasing • A single screen space pixel might correspond to many texels (texture elements): 9

  10. ��������������� Two special cases: • Magnification: No real need in prefiltering. The main decision is what kind of reconstruction (interpolation) to use. • Minification: No real need in reconstruction. The main problem is proper prefiltering. 10

  11. Nearest neighbor sampling Filtered Texture: 11

  12. Texture Pre-Filtering • Problem: filtering the texture during rendering is too slow for interactive performance. • Solution: pre-filter the texture in advance – Summed area tables - gives the average value of each axis-aligned rectangle in texture space – Mip-maps (tri-linear interpolation) - supported by most of today’s texture mapping hardware �������� 12

  13. MIP-Maps • Precompute a set of prefiltered textures (essentially an image pyramid). • Based on the area of the pre-image of the pixel: – Select two “best” resolution levels – Use bilinear interpolation inside each level – Linearly interpolate the results • Referred to as trilinear interpolation Summed Area Tables • A 2D table the size of the texture. At each entry (i,j), store the sum of all texels in the rectangle defined by (0,0) and (i,j). • Given any axis aligned rectangle, the sum of all texels is easily obtained from the summed area table: D B D B area area A A B B C C D D � � � � � � � � C A C A 13

  14. �������������� ��������������������������� 14

  15. Linear interpolation of texture coordinates Perspective-correct texture coordinate interpolation 15

  16. Resampling a signal • Given a sampled (discrete) signal: – Reconstruct a continuous signal – Warp (apply mapping) – Prefilter warped signal – Sample • In practice, some of the above stages are collapsed into a single convolution 16

Recommend


More recommend