Ray Tracing Samples

Math 155B - Winter2000/Spring 2001

    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.  See below for more information on what the rendering times mean. 

RayTrace1_Small.jpg (35177 bytes) 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.
RayTrace2_Small.jpg (38628 bytes) 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).
RayTrace3_Small.jpg (62949 bytes) 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).
RayTrace4_Small.jpg (39525 bytes) 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.
RayTrace5_Small.jpg (39579 bytes) 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.
RayTrace6_Small.jpg (41457 bytes) 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.
RayTrace7_Small.jpg (40573 bytes) 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.
RayTrace8_Small.jpg (33942 bytes) One year later:  I have added Bézier patch capability to the ray tracer.  New items in the figure include: (a) hour-glass shaped object made of two rational Bézier curves.  The outside is the yellowish green-ish highly reflective material.  The inside is the magenta/black checker pattern.  (b) a curved mirror in the right back corner on the wall -- this is a single rational Bézier patch. (c) a disk made of the yellow-green material setting up in air above the glass spheres.   This is made of two Bézier patches, one with three points equal to each other in the center and one with two colinear patch borders (the purpose of this last one is to test some difficult cases in handling Bézier patches.  Running time is 3 minutes and 15 seconds on a 733 MHz Pentium -- the Bézier patches are significantly slower than the simpler geometries.  Scene is available as a Small JPEG or a Large JPEG.

Render times:  The quoted render times for all but the last image are for jpegs 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, octtrees, adaptive trace depth or Russian roulette.    Again, note that the B patches are much slower: adding five patches to the 29 other geometric shapes more than doubles the run time needed.

Sam Buss
Last updated: May 18, 2001..