AS5


Make a raycaster with scene heirarchy.

Yoshi Scene

yoshi.scd


Three Yoshi's look upon a large egg, placed admidst their stash of (slightly smaller) eggs. (Rendered at 32 rays per pixel.)

Default Scenes

Ellipsoids: ellipsoids.scd


Rendered at 4 rays per pixel.

Three Spheres: threespheres.scd


Rendered at 4 rays per pixel.

Extra Credit

Spot Light: yoshispot.scd

I implemented a spot light by using the point light. The direction is 0,0,-1 by default, and is affected by transforms, along with the source point. This makes rotations useful for spot lights. (Rendered at 4rpp.)

Discrete Area Light Source/Penumbra: yoshidiscretepenumbralight.scd

(Light sources changed to make the penumbra effect clearer). This implementation of area light source involves dividing the light into 4 lights, with 1/4 of the strength each. This achieves slightly better shadows. (Rendered at 4rpp.)

Infinite/Continuous Area Light Source/Penumbra: yoshirandompenumbra.scd

Here, I implement continuous area light sources. The area of a light required a modification to the scene hierarchy format. The Light command contains a new directive, (lightsize x y z), specifying the light's volume. The soft shadow effect shown here is achieved by taking a random ray in the volume of the light as the source of the light. The rationalization of this is that the probability a ray hits the light source is linearly proportional to the area of the light source that is unobstructed. This results in grainy outputs (especially at low rpp), but will become smoother if a blur effect is used, or if the rpp is simply increased. The graininess is exemplified in this scene because the area light is decently large (larger than the rest of the objects). A larger resolution version at higher rpp (less grainy) is available at the bottom of the page. (Rendered at 30rpp.)

Depth of Field: yoshidof.scd

I admit this one was sort of a hack - I did a quick hack-y implementation of DoF for lack of time. This utilizes yet another directive. Inside Camera, using (depthoffield zplane blurfactor maxdist) will set a focal plane at the specified z-coordinate. The degree to blur is determined by blurfactor (linearly increasing as distance increases), and maxdist will be the distance to not blur any further. This moves the "eye" ray as a function of the distance between the zplane and the intersection of the object's z-coordinate. Again, using a random distribution function means that the picture is grainy at lower rpp. I didn't get to sort out the graininess (for... lack of time!), but I thought I'd put this up. If given more time, I would modify my implementation to shoot a small group of rays at each point, with difference in direction determined by distance from focal plane, and take the average. Or, I would modify the "blur" to assume a gaussian distribution rather than a uniform distribution. A larger resolution version is available at the bottom of the page. (Rendered at 32rpp.)

Wallpaper

Infinite/Continous Area Light Source/Penumbra

Download

I decided to make a wallpaper-sized version of my continuous area light source Yoshi scene. Above is the link to the 1680x1050 version, rendered at 128rpp (it took about 2 hours on my AS5 raytracer - I hope to optimize it in AS6).

Depth of Field

Download

Here's a wallpaper sized version with DoF and soft shadows. (Rendered at 256rpp.)