Friday, October 12, 2012

Path Tracer--Got basic features right

  • Anti-aliasing:
Added a random offset when each ray is generated.

I don't know why there are white lines on the white sphere.

  • Depth of Field:
 Get the focused plane and shake the camera certain random amount in X and Y direction.

  • Short Demo: 

Path tracer--Got the color right

I made mistakes in the Accumulate function for color accumulation.
Here is the corrected one rendered scene I got:

Tuesday, October 9, 2012

Path Tracer -- Always get flat shading

I implemented:
  • calculateBSDF
  • calculateFresnel
  • calculateTransmissionDirection.
  • stream compaction
But the rendered picture I got is always flat shading. And the color doesn't looks right.

The problem is that in remove_if function I accidentally remove all the rays that need to continue tracing. For the colors, that is because I used plus instead of multiply.

Correctted that I got this:

Error : expected an identifier

 error : expected an identifier    C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\include\thrust\device_ptr.h    286

the problem turned out to be with the inclusion of the thrust headers themselves. Even just including thrust/device_ptr.h threw up errors. For some reason, the thrust headers have to be included before all the other 'C' headers in this project.