Image Order Algorithms vs. Object Order Algorithms

Both image order algorithms and object order algorithms are used for rendering. But what’s the difference?

First of all, lets talk about image order algorithms. These algorithms iterate over the pixels in an image and computes the colors of said pixels. The first example that comes to mind is any of the ray tracing algorithms out there. In addition, these algorithms are pretty well suited for OpenCL.

Now lets look at object order algorithms. They iterate over the objects in the scene and attempts to find out what pixels they occupy in the final image, if any. Once they are known to occupy at least one pixel in the image, the color is computed. One algorithm that does this is a scanline rasterizer. These algorithms are the ones primarily used in DirectX and OpenGL.

So, now that we know the main differences, are there any advantages and disadvantages to either? Yes, there are. Because an image tends to have a lot of pixels, usually more so than there are objects in a scene, a lot of time is wasted iterating over all pixels. Not to mention all intersection tests that are required by ray tracing algorithms. So for realtime graphics, object order algorithms are the preferred way. But, object order algorithms tend to complicate things a lot when it comes to photo-realistic rendering. This is where ray tracing algorithms really shine. For instance, do you want to add reflection, refraction or global illumination? Then, essentially, just send more rays and that will solve the problem.

Leave a Reply