Painter’s Algorithm – Interactive 3D Graphics

Painter’s Algorithm – Interactive 3D Graphics


With our simplified pipeline, the application sends down triangles to be transformed to, to screen locations and then filled in. What happens if two triangles overlap on the screen? How is it decided which one is visible? One way to render it is what is called the painter’s algorithm. The idea is to draw each object one on top of the other. To make this work, you sort objects based on their distance from the camera back to front. You then render the most distant object first. Render the next closest object. Render the next closest object than that and so on. The closest object is drawn last so it covers up the objects behind it. This isn’t really how most painters actually paint but it could work in theory for, say, oil paints. I guess it makes some sense for computers to use it since it’s a somewhat mindless way to paint a painting.

3 thoughts to “Painter’s Algorithm – Interactive 3D Graphics”

  1. can u please tell me, which technology you are using for making your videos? I mean the combination of pen and slate.

Leave a Reply

Your email address will not be published. Required fields are marked *