Ray Tracing Test Pictures

These are test pictures for 15-463 assignment A3 (ray tracing). They demonstrate tests of spatial antialiasing, reflection, transmission, and also some extra credit features: soft shadows and fog.

We comment on the quality of the pictures by rating them as BAD, OK, or GOOD.

SOURCE CODE:

The pictures were generated using our ray tracer when compiled with the main programs in ../../src/a3/raymain.

Note that these source files are setting a few options in main() with dlSetOption() that you may not have defined in your implementation of the ray tracer.


SPATIAL ANTIALIASING

generated with aliasing.cc


alias.jpg -- BAD
one eye ray (ray from eye) per pixel


alias-adaptive.jpg -- GOOD
1 or 16 eye rays per pixel adaptive jittered supersampling on a 4x4 grid.


REFLECTION AND TRANSMISSION

generated with glass.cc.

This scene was specially designed to be a visual test of reflection and transmission with refraction. The far left half of space is embedded in a solid glass parallelepiped. The checkerboard floor is yellow on the near side of the cube's front face, and white beyond. That way you can tell from the color of the checks whether you're seeing reflection or transmission. The orange cube and blue cube are in mirror-image positions relative to the front face of the glass cube; if they don't line up at the middle of the picture in the rendered image, then your reflected ray direction is wrong. If the white (refracted) checks on the left side of the picture don't bend down, your refracted ray direction is wrong. If the refraction in the glass balls doesn't look like our good solutions below, then probably you're computing the ratio of indices of refraction incorrectly (where rays enter or exit glass) and that's leading to incorrect refracted ray directions.

These pictures use spatial antialiasing but no fog or soft shadows.


glass.jpg - GOOD
ray traced to a depth of 5


glassview.jpg - GOOD
This is meant to help you make sense of the scene depicted in glass.jpg. The camera of glass.jpg is located at the red sphere.


glass.bad.jpg - BAD
What you get if your ratio of indices of refraction is upside-down for spheres, but not for polygons (i.e. the sense of entering/exiting is backwards for ray-sphere intersections). Refracted rays are going the wrong direction in the glass balls.


glass.depth1.jpg - BAD
Bad because it's ray traced to a depth of 1 only, so recursive rays for reflection and transmission are not traced.


glass.depth3.jpg - OK
Depth 3 is much better, and shows the most dominant reflection and transmission effects.


BASIC STUFF


tester.jpg - test triangles


sphtri2.jpg - test phong shading


tex4.jpg - test texture mapping


COMPLEX SCENES


cow2.jpg - two "megacows", one made of glass. ray traced to a depth of 5, without antialiasing, in 1 minute. (Liu Ren's impl. of k-d trees)

Sierpinski tetrahedron. 262,000 triangles, 87,000 spheres. Took 22 hours because spheres not included in BSP tree, but a linear list. Without the spheres, picture took only 8 minutes. Conclusion: linear lists are slow! (by Adrian Perez)


The following are extra credit features of 463 asst 3.

SOFT SHADOWS

generated with soft.cc

Re filenames:

For example 'soft-adaptive+1-0.01.jpg' indicates the file was created with adaptive supersampling on a 4 by 4 jittered grid with threshold set to 0.01 and the number of shadow rays shot per call to shade() is 1.

soft shadows on a checkered floor:


csoft+1.jpg -- BAD
1 eye ray / pixel * 1 shadow ray / eye ray = 1 shadow ray / pixel


csoft-adaptive+4-0.01.jpg -- OK
up to 16 eye ray / pixel * 4 shadow rays / eye ray = 64 shadow rays / pixel


csoft-adaptive+16-0.005.jpg -- GOOD, but it takes a long time.
up to 16 eye ray / pixel * 16 shadow rays / eye ray = 256 shadow rays / pixel soft shadows on a plain floor:


soft+1.jpg -- BAD


soft-adaptive+1-0.01.jpg -- OK


soft-adaptive+1-0.1.jpg -- OK


soft-adaptive+16-0.1.jpg -- OK


soft-adaptive+16-0.0.jpg -- GOOD, but it takes a long time.
This one not actually adaptive at all since 0.0 threshold is always exceeded -- it supersampled each pixel on a 4 by 4 grid, in addition to shooting 16 rays towards the area light source for each light.


soft-adaptive+4-0.01.jpg -- also GOOD, and it will take much less time

Example invocations of corresponding aliasing.sgi and soft.sgi binaries:

    aliasing.sgi -size 256 256 -pic alias.jpg
    aliasing.sgi -supersample 4 -adaptive 0.01 -size 256 256 -pic alias-adaptive.jpg

    soft.sgi -size 256 256 -pic soft+1.jpg
    soft.sgi -supersample 4 -adaptive 0.01 -area 1 -size 256 256 -pic soft-adaptive+1-0.01.jpg
    etc...

    soft.sgi -checker -size 256 256 -pic csoft+1.jpg
    soft.sgi -checker -supersample 4 -adaptive 0.005 -area 4 -size 256 256 -pic csoft-adaptive+4-0.005.jpg
    

FOG

generated with fog2.cc

ball.NUM.jpg means I set the fog density parameter of the glass balls to NUM for that picture


ball.0.jpg -- transparent balls (no fog)


ball.2.jpg -- medium density


ball.100.jpg -- nearly opaque balls (thick fog)

The program is capable of making the air foggy too, but these pictures don't demonstrate that.


Paul Heckbert and Jovan Popovic
21 Apr 1998, 2 Apr 2001