CS593- Ray Tracing Algorithms(Fall 2011) |
||
|
Week 3 Sept 16, 2011Corrected phong shading in my ray tracer. There are mean different reasons for tearing to happen in a rendered image. Poor sampling, and sparse projection are two common causes for tearing in my experience. This last week, I discovered another reason for tearing. The tearing problem occured strangly when I moved the position of my camera and it's look at points in such a way that it pointed the camera in a direction that was isolated in one axis ( e.g. { 100, 100 , 0 } would cause problems but not { 100,0,0 }. I discovered this problem occured when rays intersected with themselves. This was certainly a floating point error. At certain angles rays could intersect with the object that it just hit, all because of the trunction that happens with floating point numbers. There were two solutions. The first was to create a parametric t min for my intersection. This would ignore intersections that are smaller than some alpha. The other way is to prevent intersection checks with objects that were just intersected. This works, but only with primatives.
Simple Texturing Mapping for Spheres - This week I experimented with simple texutring mapping. I was able to implement texture mapping on a sphere3d. Currently, it assumes that the texture normal is 0,0,1 but in furture renditions, that will be able to be modified. Currently,the using of the texture map is as follows:
Creation of a Render Class. In my cpp ray tracer, is created a new class for my ray tracer, the Render Class. This class is responsible for containing the element nessicary to render an image. Fundamentally this have 3 sets of parameters.
example: asdf.json
Perspective This week I experemented with perspective. This was done by allowing the rays from the camera be projected at different angles. By using a concave array, I was able to make a diminishing plane of existence. Objects further away would become smaller than objects that are nearer to the front.
|
|