Tuesday, December 8, 2009

Assignment 5.3

Here's assignment 5.3. I've incorporated translucency, softer shadows, light entering the model and returning to the surface (diffuse), reflection (specular).

The results of this assignment don't look much different than my result from my last post almost 5 days ago. What the heck was I doing?

Well, I wasn't slacking :)

The last post was using a very hacked up light model that provided similar results but did not allow lights to be repositioned. It was a great way to start understanding the problem but ultimately held me back on understanding how to calculate how much light was transmitted through the model.

The biggest learning experience of this assignment was understanding the difference between light that is transmitted through the model and to the eye and light that was transmitted through the material and away from the eye.

Depending on the situation, the light may or may not have contributed to the final color. This was very hard to wrap my head around but ultimately it was just a test of the sign of the dot product between the normal and the light direction. If negative, no contribution. If positive, add it in.

Other additions were conservation of energy, high dynamic range and tone mapping. The returned and transmitted light are run through a 3x3 Gaussian blur before being composited into the final image.

Here is an example of no blur of returned and transmitted light:

With blur of returned and transmitted light:

The difference is very subtle.

To compile and build:

wget http://riskybacon.com/classes/cs513/assign5.3.tar.bz2
tar jxf assign5.3.tar.bz2
cd assign5.3/assign5.3

Usage: click and drag the mouse to rotate the model.
I : reset rotation
B : toggle between baked textures and showing the final model

Show baked textures, with blur:
0 : returned
1: transmitted

No blur
2: returned
3: transmitted
4 : reflected
5: positions

Images of the baked textures:

Returned with blur:

Returned without blur:

Transmitted with blur:

Transmitted without blur:



No comments:

Post a Comment