Building a Basic Ray Tracer
Throughout the semester we'll be building a basic Ray Tracing framework in Java and posting the results of our checkpoints here.
Jump to a completed checkpoint:
Checkpoint 4 - Procedural Textures? Check.
In this checkpoint, we attempted to generate a procedural checkerboard on our floor. You can click on an image to view it full-size.
Here is our initial output, rendered with 100 samples per pixel:
We also implemented the Mandelbrot set as a procedural texture:
We also played around with Ken Perlin's improved noise implementation from SIGGRAPH 2002.
Using his implementation we bump-mapped our floor and also attempted to add color-based noise.
Here is the image generated using noise for a bump map:
Note that it's darker than the others because the radiosity equation we're using requires that we scale colors to the maximum light value at a pixel.
Since the bump map is resulting in more extreme highlights than were previously in the image, everything else gets scaled to a lower value.
When we tried using perlin noise on our colors, however, we got some more...odd results:
Once we stopped fiddling with gradient values and just averaged in the noise - (color*noise + color)/2 - we got a more reasonable image: