Ray Andrade's Basic Ray Tracer
Since my renderer only has the basic capabilities, there will be several
comparing pictures to be able to tell what the difference is.
All images were rendered on an Apple G4 PowerBook.
What my renderer implements:
Phong Shading Model
Reflection
Refraction
Glossy Reflection
Jitter Sampling
SoftShadows
Mipmapping
Spherical 2D Texture Mapping (attempted)
BSP Tree acceleration structure
Final Scene -- Perlin Noise and Soft Shadows
The image below is using 3 versions of perlin noise from the website
http://www.noisemachine.com/talk1/
.
The sample below casts 64 rays per pixel, 16 random shadow rays at an area source light.
So that is a total of 64 * (16 + 10) * 512 * 512 rays per pixel. WOW!
No data structures were used to save rays so my processor was working overtime.
The front two represent marble and wood. The back three are from the site mentioned above.
Perlin spheres with jitter sampling and soft shadows.
The image below has one point light source and is tested using only one shadow ray.
Perlin spheres, no sampling, no soft shadows.
2D Texture Mapping and Mipmapping
The Mipmapping on this plane was taken from a single 256 x 256 pixel image and uses bilinear and trilinear interpolation.
The sphere is there just for good measures.
I did it to show that my mipmapped surface can be treated like any other surface.
Mipmapping and sphere with jitter sampling and soft shadows.
The sphere below shows 2D texture mapping using bilinear interpolation.
The problem I had was at the poles. The texture seemed to gather there.
I did some research and found that you could take a rectangular picture and
turn it into polar coordinates using photoshop, but I don't own that software.
Mirror and Glossy Reflection
The picture below shows an example of reflection off a mirror and a diffuse reflective surface.
The scattering on the floor reflection is due to not taking enough samples.
The computation of the glossy reflection was much like computing soft shadows.
The only difference is that you randomize the reflective ray and paint the pixel at that hit point.
The extra rays were casted from the reflected surface, gathered and averaged.
Reflection with no sampling.
Reflection with jittered sampling, glossy reflection.
Refraction
This basic refaraction with the center sphere mimicking glass. Say cheese!!!