Sunday, May 15, 2011

CG2: Final Project

Okay so VolTex is finished. This is my final post on it. Just submitting some info.

Report

Visualizing MRI Data through Volumetric Ray-marching

Download (includes two datasets)

Sunday, May 1, 2011

Renderman Assignment

Had to product two images, one modifying the given RIB file to give the 3 supplied shaders new instance variables:



 

Another modifying three downloaded shaders of our choosing:



 

I chose to gave my sphere hair, use a cinder block shader that I butchered into looking like some sort of bad programmer-art, and tweaked a marble shader until it looked like oil.

Monday, April 25, 2011

CG2: Assignment 6

Refraction:





Total Internal Reflection kind of looks bad in this shot since my background is black. But it's there, and that's been my basic scene so I thought I wouldn't change it.

Here's a spruced up scene so you can see the TIR more clearly:





I'll update when I finish the extra.



UPDATE:

Extra...



I missed class and don't know if how to do this was discussed, but essentially what I did was start with a light transparency of 100% for a shadow ray. Each time an object was hit on it's way from a point on an object to a light source, the light transparency factor was multiplied by the transparency of the object in between. After accumulating all of these, I multiply the final shading for that point by it to get the effect of being in some form of shadow.

Wednesday, April 13, 2011

CG2: Assignment 5

This one was easy. I'd already set up my ray tracer to deal with recursion, but hadn't had a use for it so it did nothing. I'd also already written a function CalculateReflection(Vec3D toSource, Vec3D surfaceNormal) that does exactly what is necessary to reflect a ray off of a surface with a given normal. With this at hand and my framework already set up for recursive tracing, this literally amounted to little more than the addition of an if statement.



Note that this was done with 4x supersampling (16 samples per pixel).



The only real interesting snag I hit was when I briefly didn't realize that using the previous ray's point of intersection as the origin for the reflection ray wouldn't work. For obvious reasons, the reflection ray will sometimes decide that the closest intersecting object is the object that it's reflecting off of because of that. Adding to the reflecting ray's origin an extremely small EPSILON value of 0.00001 in the direction of the outgoing ray solved this problem.


Extra #1


I got sick of the boring backdrop, so I added to the scene a bit now that there's a use for it with reflections:

This one has super sampling





Here's one without, you can see the randomness of the rays picked per cone much clearer but the picture isn't as nice.



These were taken with a +/- 5 degree spread for each cone.