Advanced Ray Tracer

Description
This ray trace supports the following items:

  • boxes
  • polygons
  • ellipsoids
  • inverse spherical mapping
  • convex quadrilateral inverse mapping
  • bump mapping
  • reflections and refractions
  • multiple light sources
  • external scene file
  • soft shadows
  • adaptive antialiasing
  • Source Code
    The source code consits of the following files:

    • rayTracer_03.C
    • vector.H
    • vector.C
    • color.H
    • color.C
    • materials.H
    • materials.C
    • ray.H
    • ray.C
    • matrix.H
    • matrix.C
    • objects.H
    • objects.C
    • myMath.H
    • myMath.C
    There is a Make file that compiles the program

    Final Rendered Image

    This images uses adaptive antialiasing, reflections, refractions, soft shadows and convex quadrilateral inverse mapping. The image quality is off due to the conversion from a ppm to a jpg. I'll have to reconvert the image.

    Here we can see that the hit test for the ellipsoid is working, but the shading is off. This leads us to believe that there is a normal issue

    The problem with the normal was that I was dividing by 2 instead of 2A.

    The above image shows inverse spherical mapping working

    The above image shows both inverse spherical mapping and convex quadrilateral inverse mapping working.

    The above two images show some of the problems that I had with the bump mapping. On examining the images you can see that there are spots that are bumping correctly and other spots that are inverted. To get Bump Mapping working in the image to the left I ended up using matrix multiplication to rotate the surface normal.

    This image was rendered without adaptive antialiasing.

    This image was rendered with adaptive antialiasing.