Showing posts with label raytracer. Show all posts
Showing posts with label raytracer. Show all posts

Thursday, February 12, 2009

Ckpt7- Reinhard & Ward Tone Reproduction


Reinhard Lmax =1


Ward Lmax=1

Reinhard Lmax=1000


Ward Lmax = 1000


Reinhard Lmax = 10000


Ward Lmax = 10000

Extras:

Reinhard Constant value key = 100


Reinhard key at a pixel value, pixel(x,y) = pixel(300,1)

Monday, January 26, 2009

Checkpoint 5 - Reflection


kr = .5


Kr = 1.0



kr = 1.0
All the image is with max_depth of 5.

-MT

Tuesday, January 13, 2009

CheckPoint 4- Procedural Shading



Checker Board Floor.
Extra- another procedural shading...
-MT

Wednesday, January 7, 2009

Checkpoint 3 - Basic Shading using Phong Shading Model

One light Source- the color of the floor changed from green to red because
I'm in the middle of working on the procedural shading for the plane.
It was not complete at the time I render these images. This image used Phong Illumination Model.
3 light sources -- you can see 3 different specs clearly on the blue orbs. Still use the Phong Model.

Phong-Blinn Model -It turn out that the halfway vector is much easy to calculate that the reflectant vector. You does see the different in the spec clearly. This image is render with only one light source.
Problem solves! Morals: 1- Don't normalized camera position before calculation. 2 - Check to make sure the angle between light and the surface normal are between 0 -1. 3- Never calculated the intersect of the shadow ray on the primitive of the POI itself.


One light source using basic Phong Shading Algorithm. -

- When there is only one object in the scence, the shading work correctly, but when there is more than one object in the scene, take into account the hidden surfaces and calculated the color of those. I check my vector calculation, it calculated correct, Sphere and Plane Intersect function does return the correct t (least positive root). But I don't know why/what cause the effects.



This is 3 different light sources .. you can see 3 shades with light and dark and color in the shadow because of the color of the light.


This is one light source using PhongBlinn model. You can see the specular on the sphere much clear and nicer.. (even though the position is wrong)..
Here is the partial result that illustrate the problem:
Individual sphere: Each sphere shaded correctly individually.



When I put the two sphere together, the light some how lit the hidden surface instead. I check the logics and vector calculation, everything return correctly.
-MT

Saturday, December 20, 2008

Checkpoint 2 + Supersampling + Cylinder Primitive


Checkpoint 2 with Supersample OFF and Cylinder OFF







Checkpoint 2 with Supersample OFF and Cylinder ON

Checkpoint 2 with Supersample ON and Cylinder ON

Tuesday, December 9, 2008

RayTracer - Checkpoint 1 - Setting up the scene

Platform: Windows
Language: VS C++
API: OpenGL

Here is the scene that we set up to use for your raytracer:


















I used spotlight to luminated the scence, however, I couldn't get the shininess and the flare on the spheres. So I decided to add the material properties to the spheres. I added shininess, ambient, and specular to both of the sphere.
Here is the configuration for the scene:

Each sphere has a radius of 0.3
glutSolidSphere(0.30, 50.0, 50.0);
The pink sphere (larger one) is offset from origin by 0.05x, 0.74y, and -1.1z.
The purple sphere (smaller one) is offset from origin by -0.4x, 0.44y, and -1.6z.
The camera positions:
Near plane: 75
Far plane: 800
Eye: 0.0, 0.9, 0.2
Center: 0.05, 0.8, -1.0
Up: 0.0, 1.0, 0.0
gluPerspective(75, 1, 1, 800);
gluLookAt(0.0, 0.9, 0.2, 0.05, 0.8, -1.0, 0.0, 1.0, 0.0);


Size of the floor:

glVertex3f(-1.40, 0.0, -5.0);
glVertex3f(-1.40, 0.0, 5.0);
glVertex3f(1.40, 0.0, 5.0);
glVertex3f(1.40, 0.0, -5.0);
and offset -0.4 in x dir from the origin



The light source is a spot light:
Position: 0.15, 1.4, 0.6
Direction: -0.03, -0.35, -1.0
Spot exponent: 50
Spot cutoff: 95
Constant attenuation: 1
Linear Attenuation: 0
Quadratic attenuation: 0
I also added the shininess of 100
and spec of: 1.0, 1.0, 1.0, 0.0


OUR GOAL: Toreproduce the classic ray traced image from Turner Whitted's 1980 paper




-MT