## Saturday, November 7, 2009

### Assignment 5.1

Notice how Frank is darker where he is thicker? Notice how more red light makes it through the thicker parts as opposed the the green and blue components? Pretty nice effect. The depth of Frank is calculated at each frame with respect to the light source and the amount of light that makes it through to the other side is calculated using e^(rho * distance). Rho is a 3 component vector with different values for red, green and blue.

Here's an example where the algorithm falls down. The depth is calculated very niavely and only works for convex objects. Frank is a concave object. How the depth calculation works is to determine the farthest depth and the nearest depth, then subtract the two to find the total depth. Since Frank has some holes as some angles, the wrong depth is calculated.

If depth peeling was used, the depths sorted and the holes subtracted out from the total depth, this would work. But it would be really slow.

The next step in this assignment was to make Frank shadow himself. Hard shadows are simple, but in real life flesh lets some of the light through. Instead of doing a binary shadow compare, the distance the light travels through Frank is taken into account and a probability that the light makes it through him is calculated and used as the shadow color. As before, a rho with different values for red, blue and green was used.

Here's the initial probability shadowmap:

Here it is being used to blend with Frank's color:

Download and build:

wget http://riskybacon.com/classes/cs513/assign5.1/assign5.1.tar.bz2

tar jxf assign5.1.tar.bz2

cd assign5.1/assign5.1

make

./assign5.1

Press q to quit and click and drag the mouse to change your viewpoint.

Subscribe to:
Post Comments (Atom)

## No comments:

## Post a Comment