YARP: Yet Another Raytracing Post

A quick survey of the past month’s posts would give one the impression that ultra-fast raytracing algorithms well be dominating digital media in a few short years. While raytracing can produce a beautiful render, however, it does have it’s disadvantages in comparison to present day rasterisation techniques as well, and as raster graphics most certainly will remain the standard in real time rendering for at least a few years to come, it might be useful to understand the differences between the two methods.

As opposed to raytracing, in which lines are drawn out from the ‘camera’ to intersect some object in your scene, rasterizers take the vertex information from a set of polygons, and perform a number of matrix transformations to calculate the corresponding position on the monitor. The 3D polygons have now been converted into a set of 2D triangles on your screen. After this has been completed for every point, the graphics engine fills in alls these triangles while making allowances for hidden surface detection.

Rasterization does have a number of disadvantages when compared to raytracing. Firstly, special methods are needed to render shading, reflection, and other lighting effects. The underlying rasterization method calculates the position of every triangle on the screen, only taking occlusion into account when filling in triangles, whereas with raytracing such effects are a natural consequence of following the ray reflections to other surfaces and light sources. To make up for this, rastorization engines must precalculate reflections and apply the result as a texture; essentially this means that for every level of reflection, we will have to rerender the scene that many times. Furthermore, rasterization might simply be said to be inefficient because it must calculated the position of every polygon in an image, while raytracers need only locate the first intersection (or series of intesections, depending on how accurate you want your lighting effects).

Raytracing has problems of its own, however. The most notable of these being performance, as ray tracing can becomes increasingly complex with every level of ‘realist’ reflection, shading, and anti-aliasing. Where rastorization can give a reasonable approximation of a complex scenes in a instant, even the most efficient raytracing algorithm might require hundreds of rays to determine the value of a single pixel.

The relative simplicity of rastoring techniques can be seen in a basic 3D engine implemented in nothing other than Microsoft Excel. Excel provides an idea platform for matrix operations, while the spreadsheet cells themselves are equivalent to screen pixels. Of course from a practical perspective one might be skeptical as to the usefulness of programming 3D capabilities into Microsoft Excel, the ease with which it can be done provides a stark contrast to the difficulties of creating even a basic raytracing engine in matlab.

Want to learn more about raster graphics?

http://en.wikipedia.org/wiki/Rasterization

Wondering about the advantages over rasterisation over raytracing? Why not ask an NVIDIA employee!

http://www.pcper.com/article.php?aid=530

Posted in Topics: Uncategorized

Jump down to leave a comment.

Leave a Comment

You must be logged in to post a comment.



* You can follow any responses to this entry through the RSS 2.0 feed.