Monday, July 16, 2012

Ray Tracing Update 2

Except sphere and plane, triangle is supported now. After rely on OpenCL doing transformations like MVP and VP so long, I did it myself this time. When wrote the obj loader, I met strange problem with ftell/fseek, fgetpos/fsetpos pairs, still don't know why it failed to restore last file indicator position. The obj loader should be more flexible.
Ambient Occlusion pass.
512 rays were used but still noise. I also tried to load the model into Maya and did rendering using mental ray. The result is much much better. OK, my ray tracer is still in its baby age.
Refraction.
RI is 1.33 ( 20 °C Water ).
Refraction.
RI is 1.50( 20 °C Benzene ).
To be frankly,the result is not pleasing. There is no absorbing, no subsurface scattering and refraction rays should result a lighten shadow, etc. The good thing is I know where I need improvement once more. 

No comments:

Post a Comment