top of page

Ray Tracing

 

-by XCode

         This is a class I took in semester Fall 2015 in University of Utah. The main objective of this course is to introduce the fundamental concepts of image syntesis in computer graphics. By learning in this class, we are able to implement ray tracing for image syntesis and lighting simulation, indentify aliasing and sampling related problems in graphics, and obtain the necessary background knowledge for following the state-of-the-art advancements in rendering related research in computer graphcis.  During this semester, we did many projects with new feature to our ray tracers. The images above are the scene I create for final project by using the knowledge I learn this semester.Here is my work in each projects (from old to new):

Project 1 - Ray Casting    
     

        For this project, we set a basic ray tracers to cast ray. For each pixel, if the ray is hitting the objects in the scene and the object closest object is not too far away. we render white color for this pixel. If the ray doesn't hit anything, the color will be black.

 

(Click the image to see the fullsize image)
       
Project 2 - Shading    
     

        For this project, we add light source to show the objects' color and the effect brought by the light sources. The light we have in this scene is ambient light, direct light and spot light. These object will show Blinn–Phong shading, which combine ambient, diffuse, and specular color.

 

(Click the image to see the fullsize image)
Project 3 - Shadow    
     

        For this project, we add shadow in our ray tracer. If the scene have point light or direct light, the closest object from the light will cause the shadow on the object behind it.

 

(Click the image to see the fullsize image)
 
Project 4 - 
Reflection and Refraction   
     

        For this project, we add reflections and refractions to our ray tracer. The material for each object will have the value in reflection, refraction, and absorption. 

 

(Click the image to see the fullsize image)
     
Project 5 -
Triangular Meshes   
     

        In the last projects, we only have sphere object and it's intersection. However, the scene usually have other objects are not sphere, especally meshes. So we need to add two object type: plane and triangle to our ray tracer. (All the meshes are made in several triangle, that's why we need triangle intersection)

 

 (Click the image to see the fullsize image)
 
 
Project 6 - Space Partitioning   

     

        Since we have triangles object, it takes more time to render a scene because ray need to trace every single objects (includes each triangles). So in this project, we add bounding volume hierarchy (BVH). It's a little like bounding box for game. For the object which combined by triangles, we set the box around it, and separate them in to two, and go on. If the ray is hitting the first box, then we need to tracing the two boxes in it and so on. Since that we don't exactly have new stuffs to add, I change the values in the scene to see how different values work.

 

 (Click the image to see the fullsize image)
 
Project 7 - Textures   
     

        The other important elements for rendering is texture. That's what we need to add for this assignment. We add two kind of texture in our ray tracer: one is the checkboard and the other is from an image we load. We also add background image and environment image for reflection/refraction.

 

 (Click the image to see the fullsize image)
       (Click the image to see the fullsize image)
 
Project 8 - Antialiasing   
     

        As you can see, the rendering image from previews projects have rough edge, especially the texture image with checkboard. That's why we add antialiasing to ray tracer. Previewsly, we only have one ray hitting the center of pixel. Now we use Halton sequence to get the sample point on each pixels. The sample number is from 8 to 32. We also get the image to show how many samples we use for each pixels. 

       (Click the image to see the fullsize image)
 
Project 9 - Depth of Field  
     

        To all the real cameras, they all have depth of field, so we add focal distance and dof value for it. For this scene, the focal distance set the pocus position at the teapot. We used to have one position for camera. Now we will get the samples from the camera with radius based on dof value. Because the area  out of the focus is very fuzzy with low samples, so I set the samples range from 16 to 128 so it will be more smoother.

       (Click the image to see the fullsize image)
 
Project 10 - Soft Shadows and Glossy Surfaces
     
        The shadow, reflection and refraction we did are the sample version. However, not all the objects have the surface like mirrow, and not all the light is strong enough to make shadow with strong line. That's why we will add soft shadows and Glossy surfaces. The soft shadow depends on the size of point light, and the glossy surface is based on the angle that reflection direction and refraction direction can rotate.
       (Click the image to see the fullsize image)
 
Project 11 - Monte Carlo GI   
     
        In the real world, even thought there is no exact light in the room, some times we still can see things clearly with their shape and a little bit color. This is because there still have environment source. For this project, we are adding global illumination by using Monte Carlo. When the ray is hitting something, the ray will bounce to random direction as another ray and do the intersect check again.  
 
 
 
 
 
bottom of page