Friday, September 28, 2012

Reflection and Refraction

Progress so far:
  • Was able to achieve reflection as well as refraction in the scene.
  • Refraction is based on Snell's law and have also written code for internal reflection if the incident angle is greater than the critical angle while calculating refraction.
  • I am calling kernel function based on the number of rays in the next iteration. So number of threads keep on decreasing (unless there are too many reflecting surfaces) after each trace level. But I am going to the CPU to compact the rays. My goal, maybe later, will be to implement stream compaction so that the data can be reduced in the GPU itself without moving to the CPU.
Refection and Refraction.
Refractive Index = 2.2

Refection and Refraction.
Refractive Index = 1.3
 
Notes:
I haven't yet handled shadows for transparent objects. As ssen in the above image, the shadows for transparant objects are same as those of solid objects. Will handle that soon.

Next Steps:
  • Try out anti-aliasing to smoothen out the image
  • Area lights
  • Depth of field
  • Obj Loader, if time permits
  • Stream Compaction (before changing it to a Path Tracer)

No comments:

Post a Comment