Lecture 6: Graphics Pipeline (9)
sethzhao506

The painter’s algorithm creates images by sorting the polygons within the image by their depth and placing each polygon in order from the farthest to the closest object. This algorithm is basically used to paint the polygons in the view plane by considering their distance from the viewer. The polygons which are at more distance from the viewer are painted first. After that the nearer polygons are started painted on or over more distant polygons according to the requirement. Source:Wikipedia, GeeksforGeeks

DuplexBeGreat

Doesn't the painter's algorithm risk wasted calculation, if multiple objects in front end up largely overlapping and rendering the objects further in the back unseeable

bbbizzarro

@DuplexBeGreat. Depending on the complexity of the environment and shading, I would guess that the painter's algorithm alone might be wasting a lot of time. For example, if we put a textureless plane in front the camera in this example, I wonder if it would still be making unnecessary writes to the frame buffer for the entire scene behind it. With the z-buffer, I guess you save a lot of the calculations for a bit a more memory.

You must be enrolled in the course to comment