The shadowmap rendered in texture space but blurred using the baked position map for the weights:
The background image that can be seen through Frank and rendered in texture space and blurred:
And here those two images are composited on Frank:
I have to say, that image really sucks. Things aren't being composited together correctly and the seams are just awful. Biggest piece of crap image I've produced yet. Seriously. I need to step up my game. The only reason I'm turning in such a POS image is because I've spent waaay too much time on this class and I'm going to burn out. I need to save something for the remaining assignments. Normally I'd just keep cranking until I got something that looked halfway decent.
Here's one clue as to some of the problems I'm having:
This uses the dot product of the normal and light direction to shade the unshadowed parts. Note the difference in the shadow boundary between the part that is shadowed via the shadow map and the die off of the cosine term for the unshadowed part.
Definitely something that I need to fix.
However, I'll be working on seams for the rest of the day and hope that ways to make Frank look better magically pop into my head while working on something else. It's amazing how often tricks like that work.
The blurring was done using a weighted blur that was based on position in space. 9 texels are used in the blur and the distance from the center is calculated. That distance is fed into an exponential, the weights are summed and the center texel is weighted with the remaining weight. This way everything sums to 1 and light energy is conserved.
Download, build and run:
wget http://riskybacon.com/classes/cs513/assign5.2/assign5.2.tar.bz2
tar jxf assign5.2.tar.bz2
cd assign5.2/assign5.2
make
./test
Click and drag with the mouse to rotate the camera around Frank.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment