answersLogoWhite

0


Best Answer

A z-buffer is a raster buffer that stores color and depth information at each pixel. The "z" in the title refers to the "z" plane in 3D space, which is traditionally thought of as the "depth" dimension.

The buffer initializes each pixel to the default color and an infinite depth. During the rendering process, when a color is written to a pixel, it first compares the current depth of the color in the pixel. If the new color is closer than the current color but closer than the clip plane (which is typically zero), the color is written and the depth updated.

In that sense, it's similar to the painter's algorithm, where the closer object covers the further object.

Here's the basic algorithm:

WritePixel(int x, int y, float z, color c)

if ( z < zbuffer[x][y] && z > 0 ) then

zbuffer[x][y] = z;

frameBuffer[x][y] = color;

end

The a-buffer uses the same algorithm for handling depth, but adds anti-aliasing. Each pixel contains a set of sub-pixels. During the write operation, the values are accumulated at the sub-pixel level. For the final pixel read, the final color is the sum of all the sub-pixels.

The algorithm was originally developed by Loren Carpenter (or Pixar) for the RenderMan renderer. The position of the sub-pixels in each pixel are randomly selected in space and time, which allows smooth blurring of moving objects. RenderMan dices geometry down to micropolygons (polygons approximately the size of a pixel), and then performs a coverage test to determine if a sub-pixel is covered by a micro-polygon.

However, this approach doesn't work with a more "typical" renderer, since they typically deal with points, which unlike micropolygons, have no surface area.

A common adaption of this algorithm is the accumulationtechnique, which renders an image multiple times, randomly jittering (moving) the position of the eyepoint by some small amount. The result of each rendering is accumulated and averaged into single buffer. This approach is made practical with a hardware accelerated renderer such as OpenGL. However, this approach is probably better thought of as supersampling rather than an a-buffer.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is difference between A buffer algorithm Z buffer algorithm?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Explain the Z-Buffer algorithm for removing hidden surfaces?

Depend on the memory availability


Difference between laplace transform and z transform?

the difference is the "S" and "Z" parameters. S used for analog computation while Z for digital processing. basically Z is the digital approximation of the analog frequency domain signal. Z=exp(sT) where T is the sampling time.


What is programming flowchart?

#include&lt;stdio.h&gt; #include&lt;conio.h&gt; main() { int z[10]; int love; for(int y=0;y&lt;=9;y++) { printf("Input %d:",y+1); scanf("%d", &amp;z[y]); } for(int a=0;a&lt;=9;a++) for(int b=0;b&lt;a;b++) for(int d=a;d&gt;b;d--) if(z[b]&gt;z[d]){ love=z[b]; z[b]=z[d]; z[d]=love; } printf("\nResult: "); for(int c=0;c&lt;=9;c++){ printf("%d\t",z[c]); } getch(); }


What is the meaning of statement p z in c-language?

The statement p z in c code is a syntax error. The p is an identifier, and so is the z. They cannot be typed tyogether like that unless an operator is placed between them, such as p + z.


How do you lowercase to uppercase in c plus plus and viceversa?

To convert to uppercase, subtract 32 from all characters in the range 'a' to 'z'. To convert to lower-case, add 32 to all characters in the range 'A' to 'Z'. Note that each character is mapped to a value in the ASCII character table and the difference between character 'A' (#65) and character 'a' (#97) is 32. Using binary notation, characters in the range 65 to 91 ('A' to 'Z') have most significant bits 010 while characters in the range 92 to 122 ('a' to 'z') have most significant bits 011. Therefore switching bit 5 automatically flips a character between uppercase and lower-case, providing the character is an alphabetic character to begin with.

Related questions

Explain the Z-Buffer algorithm for removing hidden surfaces?

Depend on the memory availability


What happens when two polygons have the same z value and the z-buffer algorithm is used?

the pixel intensity in final image will be of the surface last scanned if the z value is same.


What is the Difference between frame buffer and z buffer?

The z-buffer holds information about the depth of a 3D scene. Specifically, it holds information about the coordinates of each object in the scene, so that the CPU/GPU knows the order in which objects should be drawn.The frame buffer is a more physical thing. Your computer monitor stores information for the next image it's going to draw in the frame buffer.


What is depth buffer method?

The Z-buffer algorithm is a convenient algorithm for rendering images properly according to depth. To begin with, a buffer containing the closest depth at each pixel location is created parallel to the image buffer. Each location in this depth buffer is initialized to negative infinity. Now, the zIntersect and dzPerScanline fields are added to each edge record in the polyfill algorithm. For each point that is to be rendered, the depth of the point against the depth of the point at the desired pixel location. If the point depth is greater than the depth at the current pixel, the pixel is colored with the new color and the depth buffer is updated. Otherwise, the point is not rendered because it is behind another object.


What is a z-buffer?

A z-buffer is a buffer for the purpose of tracking the relative depths of different objects in a scene, when creating computer graphics.


What is the difference between z value and z score?

They refer to the same thing as do z-transformations.


What is the difference between the s twist and z twist?

the s has a curve to it and the z dosen't! do you get it now?


Is there a qualitative difference between a Z train and a T train in China?

AnswerThe difference between Z train and T train is Z train normally won't stop between your station and the destination for more passengers. As to the comfort of seats, facilities and speed, they are almost the same.


What is the difference between principal argument and argument of a complex number?

PRINCIPAL ARGUMENT = ARGUMENT + 2nPI arg(Z) = Arg (Z) + 2nPI


What is the difference between Mackie swa 1801 z and the swa 1801?

Z-model has bi-amp feature in it


How do you convert 40X gel buffer into 1X buffer?

I think you mean electrphoresis buffer ( anyway the principle is the same for all sloutions,, simply it is chemistry ) if so , you'll need to take about 25 ml from your 40X buffer and complete them till 1000 ml with distilled water. The calculation can be done as the following N * V = N' * V' so 40X * Z = 1X * 1000 Z is the amount of 40X buffer needed to be diluted to give us 1L of 1X buffer so Z = 1000/40=25 ml


What is the key difference between incremental development and prototyping?

cz z zzsvdfszsDezrhzebd