Not logged in, Join Here! or Log In Below:

 Submitted by Giulio Mainardi, posted on September 24, 2003

 Image Description, by Giulio Mainardi This picture shows four frames of an animation made with a ray tracer I am developing for my personal education. The shadows on the ground slide as an animated light source follows a circular path above the terrain. The height field is not converted into a polygonal mesh, but is ray traced directly, with a technique similar to the Grid Tracing(GT) algorithm ["Grid Tracing: Fast Ray Tracing for Height Fields", F. Kenton Musgrave, 1989]. The main differences are in the 2d grid traversal and in the ray-surface interections calculations. Infact, like GT, to reduce the number of the ray-triangle intersection tests, the algorithm finds the height field cells intersecated by the orthogonal projection of the ray on the ground plane, but while GT uses a modified version of the Bresenham line drawing algorithm to scan these cells, I perform a 2d traversal of the grid like in ["A Fast Voxel Traversal Algorithm for Ray Tracing", J. Amanatides, A. Woo, 1987]. About the second difference: GT first finds the intersection point of the ray with the plane of a triangle and then, if this intersection occours, checks, with a fast test derived from the "regular structure" of a height field, if this point is in the triangle. A big disavantage of this approach is the need of the plane equation for each triangle of the height field. So I simply used the ray-triangle intersection routine described in ["Fast, Minimum Storage Ray-Triangle Intersection", T. Möller, B. Trumbore, 1997]. The vertex normals are computed with finite differences. For the curious: the alien landscape of the video is rendered from a "unusual " height map...see the bottom link for more details. The video can be downloaded from http://risapi.sourceforge.net/index.html#d100903. Please forgive (and forget) my poor English;)

 [prev] Image of the Day Gallery www.flipcode.com [next]

Archive Notice: This content is archived, and commenting is no longer active. It is here for reference purposes. This content was added on an older version of flipcode, before the site closed in 2005.