Wednesday, November 7, 2012

Raterization_2

I fixed one problem, I wrongly derived the inverse matrix of eye perspective matrix. Looks much more normal now.

Add another mouse movement.
Alt + Middle for translation.



Tuesday, November 6, 2012

Rasterization


Graphics Pipeline stages included. 
1. Vertex Shading
2.  Primitives Assembly
3. Perspective Transformation
4. Scanline Raterization
5. Fragment Shading
6. Depth Buffer
7. Lambert Shading
8. Scissor Test
9. Blending

Finally, the Maya Style interactive camera.

Alt + Left Click to rotate the camera. 
Alt + Middle to translate the camera.
Press s for scissor test effects. after press s then click drag mouse to select scissor area.  
Press b for blending effects.  




-

Friday, October 12, 2012

PathTracer

I spent a lot of time trying to add direct light. But the result is not good. Frustrated.



Features now

 For the required features, I didn't have time to finish that by the deadline, although I just written the needed functions, and didn't debug them.
Optional features:
1. motion blur. I move the object according to time, and then blend those images together. The speed is changing with time.
2. Depth of field. Find the focus point, jitter the camera and then generate a new ray. The middle sphere is the focus. The near and further one become blur.

3. refraction. I use fresnel to calculate the reflection and refraction coefficient.

Limitations:The convergence speed is very slow.



Path tracing 1

Problem now, slow convergence speed. I am not sure whether I should divide the rendering equation into two parts, direct illumination and indirect illumination.  when I add direct illumination, the picture becomes very bright  eventually, without the direct illumination, the convergence progress seems very slow. The picture with direct illumination is warmer.



Wednesday, October 3, 2012

Corrected GPU Raytracing

I today found that my horizontal direction seems inverse from the others....I reverse the direction.Besides, i misunderstood the speculation formula, which leaded me to believe that only when material was reflective, it would have specular effects. I also correct this. Here are new pictures. Little change, looks much better now!hoho. I also change some parameters. Next time, I will definitely start make my demo earlier.My demo is really ugly and hasty for this time..T T









I started to know that path-tracer is so powerful today. A lot of features could be down freely. Amazing
path tracing. HAHA. Looking forward to finishing the path tracer!!!

Sunday, September 30, 2012

First Post on GPU Ray Tracing project

GPU Ray Tracing

GPU Ray Tracing is much more complicated than CPU. Annoying debug is one important reason. Another important factor is that I am not fully understand the underlying theories, especially that about refraction, BSDF. I am still trying to figure about how to blend the refraction ray and reflection ray together. Randomly choose one to follow? The result is not good, the image has many dark points and it is not as shinny as it deserves to be. Sign. If without a great framework, I cannot imagine how many years it would take me to finish such a project.

Now I am only add few features, camera interaction, normal map, texture map, specular and a half refraction..Admittedly, there still some little bugs in this part. But I am still working hard on it now.


Tuesday, April 3, 2012

photon mapping

I research more details about the photon mapping.
First pass:
Photon Map
Use the basic steps for ray tracing. The difference is using Russian roulette to determine the possibility of absorbing, reflecting and refracting. For the reflecting, using BRFD model.and refraction with Snell's law. Global map: Trace from light. Use projection maps to generate photons. Different light has different strategy for generating photons.
Caustic map: This map need a large amount of photons.
Second Pass:
Rendering Image
1 Direct Illumination: a ray is traced from the point of intersection to each light source. As long as a ray does not intersect another object, the light source is used to calculate the direct illumination2. Indirect Illumination: Use global photon map to estimate.3. Caustic Illumination: Use the caustic map4. Specular Reflection: Do as the ray tracing. 

Use Photon Map to estimate radiance
 


From what I have got, 
Targets are as follows:
1.  Russian roulette function
2.BRDF model
3. Snell's law
4. Tracing the photon map
5. Gathering 

However, the biggest problem is still that I have no computer to do it!!!!!! Frustrating..