CSC 473 Final Project

By Kevin Schapansky

Ray Marching is an optimization of ray tracing for shapes that do not have simple intersection point formulas. Mandlebulbs are one such shape. I implemented a fractal ray marcher in CUDA.

Renderings



Ray Marching Technology

Ray marching involves marching the testing point along a ray using a disntance estimator function. Distance estimators calculate the distance from a given point to the closest portion of the fractal. Calculating the distance to the closest point is much simpler than a true intersection point test.

Once The ray has been marched close enough that the distance estimator returns a small enough value, the point on the ray is assumed to be the intersection.

The surface normal can be computed for lighting by sampling the distance equation along the major axes. The direction in which the distance increases the most is theoretically the normal direction.

Coloring can be calculated in many ways. My renderer just assigns a color to the distance from the intersection point to the origin of world space.

This blog post has excellent explanations of how to implement this and was an awesome reference.

Conclusion

I had a good time with this. Making pretty pictures is fun. I still dont quite understand the fractal math though.