homepage   gallery    guestbook  

                                                           Ray Trace Renderer

                                                                                      by   Celambarasan Ramasamy

 

 

                           

 

The Ray Trace renderer is my implementation of a  ray tracer in c++. I have used win32 programming to implement the application's frontend. The raytracer does not depend on any third party libraries. The source code and the executable is available at the bottom of this page.

 

Supported Features

                       

                                                                     Soft Shadows

            In this image the area light source was sampled using 16 X 16 rays!, this has resulted in a very smooth shadow.

                       

 

                                                                       Reflection

               Here are some of the images rendered during the earlier stages of the development, notice the level of detail in the reflections. In this image I have set the reflection level to 5.

                          

 

   In these two test images I have increased the level of reflection from 1 in the first image, to 4 in the second image, notice the difference in the detail of the reflections.

                           

 

 

                                                                         Refraction

  Notice the effect of  fresnel term on the transparency of this sphere,the sphere has a slight reflectivity due to the fresnel incidence effect. I have implemented the Schlick's approximation of the fresnel term.

                                       

 

                                                                         Bilinear Filtering

In the following two images,the texture is unfiltered in the first image. Unfiltered texture pixilates on the object surface on close range. In the second image the texture is bilinearly filtered. The filering process has removed the jaggies and there is a visible improvement in the quality of the texture.

                  

                                                                 Texture without filtering

                               

                  

                                Bilinearly Filtered Textures

 

                                    Supersampling

My ray tracer supports both adaptive and non-adaptive super sampling. Even though adaptive super sampling is noticeably quicker than non-adaptive super sampling, the quality of anti-aliasing is slightly compromised in the case of adaptive super sampling. I have tried to minimizing the difference as much as possible. My implementation of the adaptive super sampling anti-aliases even the shadow edges and the object reflections. But still there's a lot of scope for improvement and I'm trying out various techniques : )

Below is a sample scene without super sampling..

 

 

 

the same scene with non-adaptive super sampling at 25 samples per pixel...

 

 

 

Below is the same scene with adaptive super sampling at 25 samples per pixel, notice that the rendering time drops to 1/4th of the above image.

 

 

And finally heres the same scene with an area light and soft shadows,the shadows are sampled at 16x16 samples per pixel ant the whole scene is adaptivley super sampled at 4 samples per pixel...notice the jump in the rendering time!

 

 

Here is the source code along with visual c++ project files:

source.zip

Heres a sample executable that renders a very simple scene, the whole scene is adaptively super sampled at 4 samples per pixel and the area light is sampled at 16 samples per pixel for the soft shadows:

raytracer.exe

 

For a more extensive explanation on raytracing, pls refer to these following gr8 resources :

> http://www.acm.org/crossroads/xrds3-4/raytracing.html#internet

> http://www.siggraph.org/education/materials/HyperGraph/raytrace/rtrace0.htm

> An Introduction To Raytracing" by Andrew.S.Glassneer.Morgan Kaufmann Publishers:

  http://www.amazon.com/gp/product/0122861604/102-5209661-6034558?v=glance&n=283155

 

>" Physically Based Rendering: From Theory to Implementation"by Matt Pharr, Greg Humphreys.Morgan Kaufmann Publishers:

http://www.amazon.com/Physically-Based-Rendering-Implementation-Interactive/dp/012553180X

 

                   © 2004-6 Celambarasan Ramasamy. All rights reserved.