A tiny ray tracer project…

6
May/10
0


You can download the .zip file including the sourcecode and executable file for windows.

Project page :
http://code.google.com/p/tinyraytracer/



Here is one of the latest personal project I’ve been workin on… Actually I spent about 3 days to finish it up.

It is objective is to create a customizable ray tracer using as much processing power as possible. For now it is multithtreaded but uses only the CPUs, not GPUs.

you can customize the ray tracer parameters from Main.cpp file (hardcoded for now)

  1.  
  2. #define SCREEN_WIDTH    800
  3. #define SCREEN_HEIGHT   600
  4. #define AMBIENT_COLOUR  COLOUR_BLACK
  5. #define NUM_OF_MAX_REFLECTIONS  8
  6. #define SQRT_OF_RAYS_PER_PIXEL  1
  7. #define NUM_OF_THREADS_PER_CPU  1
  8. #define NUM_OF_PIXELS_TO_BE_RENDERED_BY_A_THREAD_AT_A_TIME      100
  9.  

here is the objective which you can also find at http://code.google.com/p/tinyraytracer/

a primitive ray tracer which for the beginning renders only spheres no texturing only reflection only point light sources static super sampling (but hard shadows) multithreaded static scene

in the future renders triangles 2d texturing might be kd-tree (not sure of it) reflection and refraction point and plane light sources dynamic super sampling CUDA or OpenCL dynamic scene (moving objects and camera)