more beethoven

STILL STOKED.

jade bunny

yup.

beethoven

WAY STOKED.

even more single scattering + diffusion

VERY STOKED.

more single scattering + diffusion

STOKED.

single scattering + diffusion

This is single scattering and diffusion together, at last. My sampling methods desperately need some help,
but overall I'm happy with the way these are turning out. The left image has a light source on the left, the
the middle image is lit from the right, and the right image shows the bunny being illuminated from behind.

single scattering

Looks as if the single scattering portion of Henrik's subsurface scattering algorithm is kinda sorta maybe working now.

second buddha in the box


512x512, 50W light, 100K photons, 100 samples per pixel, 4 shadow ray, 4 gathering rays

buddha in the box


There are some green artifacts, but overall I'm happy with the way the image came out
512x512, 50W light, 100K photons, 25 samples per pixel, 4 shadow ray, 4 gathering rays

first offline rendering


Removed all OpenGL dependencies and am now rendering directly to an image file. This means I can now
render on any machine with gcc installed. That means pretty much, umm, everywhere.
512x512, 50W light, 100K photons, 25 samples per pixel, 4 shadow ray, 4 gathering rays

tail-between-legs opus


512x512, 50W light, 100K photons, 4 samples per pixel, 4 shadow ray, 4 gathering rays

caustics, take one

Subsurface scattering isn't going well at all, so I've decided to stop spinning my wheels and implement
some of the features that I had wanted from the beginning. So far I've added mirror reflactions and refraction.
I've also created a seperate caustics map for specular-only photons. These images show a caustic underneath the.
glass ball computed by using various radiuses (radii?) and number of photons when querying the caustics photon map.
256x256, 50W light, 100K photons, 4 samples per pixel, 4 shadow ray, 4 gathering rays

fresnel blend brdf

These images use a fresnel-blending brdf that still probably contains a bug or four. The left image
has a fresnel exponent of 4 while the middle and right images use an exponent of twenty.
256x256, 70W light, 16 samples per pixel, 0 shadow ray, 0 gathering rays, 16 subsurface rays (left)
256x256, 70W light, 64 samples per pixel, 0 shadow ray, 0 gathering rays, 16 subsurface rays (middle)
256x256, 70W light, 64 samples per pixel, 0 shadow ray, 0 gathering rays, 16 subsurface rays (right)

more subsurface scattering

The right image is using an "improved" method to sample the neighborhood around the point hit
by the camera ray. Bear in mind though that my original sampling method falls into the I-don't-know-what-
the-fuck-I'm-doing category, so any improvement on that is sketchy at best.
256x256, 70W light, 16 samples per pixel, 1 shadow ray, 0 gathering rays, 16 subsurface rays (left)
256x256, 70W light, 4 samples per pixel, 0 shadow ray, 0 gathering rays, 64 subsurface rays (right)

subsurface scattering, first attempt

OK, here's my first measly attempt at subsurface scattering. The image on the left shows direct illumination
only. The middle image contains illumination scattered below the surface only. Notice how the sections of the
bunny which were previous unlit by direct illumination begin to show. Putting these together, the rightmost
screenshot contains both direct and subsurface illumination. Oddly enough, the middle image looks the best to
me. It is, IMHO, the "softest" of the three. I'm hoping that by cranking up the number of samples to upwards
of a hundred or so that the bunny will appear smooth overall. These images were rendered using a very small
number of samples. If anything, I've learned that green is a very poor choice of color to illustrate subsurface
scattering with. Better switch to white.

bunny in box


256x256, 70W light, 100K photons, 4 samples per pixel, 4 shadow ray, 4 gathering rays, 0 subsurface rays.

bssrdf


Added in support for BSSRDFs (bidirectional surface scattering distribution fuctions) to describe
light interaction beneath the surface of semi-translucent materials. I'm using Henrik's dipole method
as it is described in his 2001 paper, A Practical Model For Subsurface Light Transport. In this image
the sphere has been given a marble bssrdf. It looks as if it is working, though I really don't know for
sure. The colors on the sphere appear softer and more marble-like than the spheres in the images below.
It kinda resembles marble. Yeah. Kinda. Maybe.
256x256, 70W light, 100K photons, 16 samples per pixel, 1 shadow ray, 4 gathering rays, 4 subsurface rays.

current opus


512x512, 100W light, 100K photons, 9 samples per pixel, 4 shadow rays, 9 gathering rays.

sampling for photons

Added stratified sampling for choosing initial photon direction too. I also removed the one-
bounce restriction I had placed on photons. Since I'm allowing direct hits to be stored in the
photon map now, more direct light is used when calculating indirect illumination. This results in
a brighter, more realistic overall image.
256x256, 70W light, 100K photons, 4 samples per pixel, 4 shadow rays, 4 gathering rays. (left)
256x256, 100W light, 100K photons, 4 samples per pixel, 4 shadow rays, 4 gathering rays. (right)

current opus


512x512, 100K photons, 4 samples per pixel, 4 shadow rays, 4 gathering rays.

stratified sampling


Finally added a stratified sampler to make sure that a reasonable sample distribution is chosen.
Both BRDFs and light sources take advantage of this to pick better gathering rays and shadow rays,
respectably. The difference in quality is noticeable, especially considering the relatively few
samples per pixel taken as well as the small number of shadow and gathering rays used to generate
this image. The splotchiness also seems to be gone. I am very stoked :)
256x256, 100K photons, 4 samples per pixel, 4 shadow rays, 4 gathering rays.

color bleeding again


I changed the left wall from red to white in order to show the ball's subtle green color
bleeding, as well as the white wall brightening up the balls shadow on the floor. You can
also see how the white wall brightens up the left side of the ball. I'm not quite sure how
to handle the splotchiness around the room, though it's my hope that improved samplig and/or
filtering will do something about it.
256x256, 32 samples per pixel, 1 shadow ray, 4 gathering rays.

more color bleeding

These results are looking more promising, despite the splotchiness along the creases of the
rear wall. I think the splotchiness might be fairly normal, based on images I've seen of other
people's photon map implementations.
256x256, 225 samples per pixel, 1 shadow ray, 1 gathering ray (left).
256x256, 32 samples per pixel, 1 shadow ray, 4 gathering rays (right).

color bleeding redux


OK, I think I'm using the photon map to compute indirect illumination somewhat correctly now.
Not only is the image significantly less crazy looking then the previous discolicious rendition,
but the color bleeding is soft yet noticeable. This is the way I've seen the color bleeding in
most other photon mapping implementations. I'm a happy camper right now.
256x256, 4 samples per pixel, 1 shadow ray, 4 gathering rays.

color bleeding

Hey, don't you think this scene would make a pretty cool disco? So, I discovered that I was
actually barely using the photon map at all, despite the appearance of global illumination.
I was also passing the wrong direction to the brdf when computing each gathering ray's
contribution to the total indirect illumination. Yeah, the illumination in this picture is
pretty extreme, but the color bleeding makes me feel as if I'm on the right path. I need to
find a way to smooth it all out though. I'm going to try some of the filters that Henrik
mentions in his book, as well as implement stratified sampling for light sources and hemispheres.

normals issues, redux


Don't you hate it when you screw up your cartesian to spherical coordinate
conversions? Actually, I'm going to plead innocence on this one because the standard
conversion formula doesn't tell you that if x < 0 you have to add pi to the resulting
azimuthal angle. Yeah, I had to figure that one all by myself. Thanks a lot, MathWorld.
Maybe if Wolfram didn't spend all his time writing junk science tomes he could update the
information on his website :-P
256x256, 25 samples per pixel, 1 shadow ray, 1 gathering ray.

normals issues


Woohoo, I found and squashed one more issue! When computing the indirect lighting
the gathering directions had not been rotated relative to the surface normal at the point of
intersection with the eye ray. Fixing that spread the lighting out a lot more evenly. Notice
there is light spread over the entire ceiling now. However, this seemed to produce some strange
shading artifacts on the sphere, so spheres are using the old gather direction method, while
everything else is using the new.
Note: I muted all the colors in this scene. The walls are 50% red and blue, and the ball is 75% green.
Turned off compiler optimization. The images are just plain incorrect with optimization turned on.
256x256, 225 samples per pixel, 1 shadow ray, 1 gathering ray.

compiler optimizations


I tried switching from doubles to floats, but that didn't seem to do anything.
Then I tried turning on some g++ compiler optimation flags (-02). With floats the optimizations
produced some noticable error in the image, but with doubles the image seems to be altered in a
somewhat pleasing manner. For example, the lighting seems to be more "natural", but there is some
noticable banding on the rear wall. I'm jonesing to render this at 512x512 with 1024 samples/pixel
to see if the banding disappears.

current opus


512x512, 1024 samples per pixel, 1 shadow ray, 1 gathering ray


first global illumination (gi) results


256x256, 16 samples per pixel, 16 shadow rays, 16 gathering rays


256x256, 16 samples per pixel, 16 shadow rays, 16 gathering rays
(added a blue highlight on the green ball.)


256x256, 16 samples per pixel, 16 shadow rays, 0 gathering rays
(shows direct illumination only.)


256x256, 225 samples per pixel, 1 shadow ray, 1 gathering ray


512x512, 16 samples per pixel, 16 shadow rays, 16 gathering rays
The sphere has blue specular highlight (kd=0.6, ks=0.4, exp=4)
(notice how the dark side of the sphere is somewhat illuminated by light bouncing off the wall.
Also shows some nice soft shadows on the wall and anti-aliasing on the sphere -- no jaggies!)


older (pre-gi) stuff


Stanford Buddha model with 100,000 triangles.


Stanford bunny model with 10,000 triangles.