Ray Tracing Samples
Math 155B - Winter 2000
For Math 155B, I have written up a set of software routines for rendering ray-traced scenes. The software source code is now available on insci14. Shown here are several sample screenshots of items used for debugging the software during its development. The first two were generated by the code as currently available in RayTrace.cpp and RayTraceData.h, RayTraceData.cpp on insci14.
|Here is a view of a large red sphere, a small blue sphere, three small yellow triangles floating above, and two large triangles behind everything else. There is a Small JPEG and a Large JPEG of the same scene. The scene is raytraced to a depth of 8 bounces, and took approximately 12 seconds to render in full-screen mode. Note, especially, the interreflections of the blue and red spheres as shown in the Close-Up View.|
|Secondly, there are views of the same scene, but with the large red sphere rendered largely transparent. (Tranparency is about 80% per transmission interface.) Again, there is a Small JPEG and a Large JPEG. The index of refraction for the sphere is 1.33. This image is also raytraced to a depth of 8 bounces and took 45 seconds to render in full-screen mode. The reason it took so much longer is that the combination of reflection and transmission spawns many more rays, since rays that intersect the sphere can spawn two new rays (one reflected ray and one transmitted ray).|
|Thirdly, is a view a scene with two transparent, reflective glass balls, and eight small refective balls with a checker pattern. The floor and back wall are also covered with a checkered texture map. The side triangular walls are a plain material. You can view either the Small JPEG or the Large JPEG. The render time for the large one was 85 second (one minute, 25 seconds).|
|Fourthly, this is the same scene, with two tori and four cylinders added. One of the tori is transparent (glass) and the other is a solid pattern. The standing ellipsoid is a right, circular cylinder. The triangular arch consists of two flattened cylinders, with a glass-like texture. The common face of these two cylinders at the top of the triangular arch has been made completely transparent with index of refraction 1.0, so that it acts as if no face is present. The cylinder lying down under the arch illustrates a non-circular ellipsoid with a checkered texture pattern. This can be viewed as a Small JPEG or a Large JPEG. The scene was traced to a depth of five bounces and the large image took about 2 minutes and 15 seconds to render.|
|Here is the same scene again, now incorporating ellipsoids. There are three ellipsoids clustered near each other in the front right corner. This includes a tall, thin glass ellipsoid near the right wall. You may view this as either a Small JPEG or a Large JPEG. The scene was traced to a depth of five bounces and the large image took about two and half minutes to render. This is getting somewhat slow as the scene has 23 elements.|
|Next, here is the scene incorporating also cones. There are four cones in the front right corner: an erect, circular, right, yellow cone; a red and black elliptical cone laying sideways in front of the yellow cone; and two glass-like cones leaning towards each other (placed in front of the ellipsoids. The last two cones illustrate that the plane bounding the base of the cone does not need to be perpindicular to the central axis of the cone. The two glass cones have a purplish materal for the inner base surface. The scene is available as a Small JPEG or a Large JPEG. The scene was traced to a depth of five bounces and the large image took about two and forty-five minutes to render. The scene has 27 elements.|
|Finally, here is the scene incorporating also parallelepipeds. There is a yellow cube suspended in the air on the left side. And there is a vertical, non-right parallelpiped floating up next to the left wall -- this one textured with the usual red and black checked texture. The scene is available as a Small JPEG or a Large JPEG.|
Render times: The quoted render times are all for the jpeg rendered in full-screen mode (1024 by 768 screen, with a window menu bar slightly reducing the field of view). The calculations were performed on a 400 MHz Pentium III, in C++ code. The Visual C++ compiler was used in "Release" mode. The rendering traced a single ray from the view position to the center of each pixel. It did *not* use any speedups such as BSPs or adaptive trace depth.
Last updated: March 7, 2000.