Evaluating the performance of optical flow algorithms has been difficult because of the lack of ground-truth data sets for complex scenes. We describe a simple modification to a ray tracer that allows us to generate ground-truth motion fields for scenes of arbitrary complexity. The resulting flow maps are used to assist in the comparison of eight optical flow algorithms using three complex, synthetic scenes. Our study found that a modified version of Lucas and Kanade's algorithm has superior performance but produces sparse flow maps. Proesmans et al.'s algorithm performs slightly worse, on average, but produces a very dense depth map.