1 2

Tone mapping:

These images, I would like to present the different between 3 spheres without tone mapping (left) and with tone mapping (right). Also, I applied lambert light in these images.

3 4

Ambient property:

These images have been set for different ambient property. Left and right images are set ambient = 0.2 and 0.8, respectively. I like the one on the left better.

 

5 6

Changing shininess (specular):

These images have been set for different specular property in red sphere. Left and right images are set specular = 32 and 128, respectively. We can notice from the two shiny spots on the top of the red sphere.

7 8

Lambertain:

Both images present the lambertain. Lambertain is set in the red sphere on the left. Also, it is set in the red sphere and the two triangles on the right. These images are set with the light radius, as well.

 

9 10

Sphere with stripe and texture :

I have applied the formula to create stripe and use texture which is mapped into sphere.

11 12

Spheres with reflection and shadow (1):

These images, I applied just one round reflection. The sphere got reflection from triangle texture in the left image. In the right image, spheres got reflection from each other.

13 14

Spheres with reflection and shadow (2):

These images have been applied in the different number of light. Left image is applied with one lighting and right image is applied with two lighting.

15 16

Spheres and triangles with recursive reflection :

I have applied recursive reflection in these images. Left image presents recursive reflection between spheres. Right image presents recursive reflection between spheres and triangles.

17 18

Sphere with instance :

These images have been applied with instance with scale 2.0.Left is the original image and right is the instance.

19 20

Dilectric (1) :

These images are presented the dilectric. Left image is the back of the image. Right image is the front of the image with dilectric.

21 22

Dilectric (2) :

These images are also presented the dilectric in the different direction. Left and right images are on the left direction and right direction, respectively.

23 24

Area light:

These two images present area light with 25 sample from light posiiton.

25 26

Bounding box hierarchy :

These images are applied with bouding box hierarchy. The bounding box hierarchy really reduces time computation.

Algorithm:

  • Sort all objects in the scene
  • Create the tree from sorted objects
  • Create the bounding boxes to bound the objects in the same leave
  • Find the intersection between ray and bounding volume
27 28

Grid :

Thse images are applied with Grid to reduce time computation.

Alglrithm :

  • Create grid from the scene
  • Create bounding box in every object in scene
  • Create the list of the object in the grid by comparing minimum and maximum points of bounded objects and grid
  • If ray pass through the grid
    Check if the ray also pass the objects
  • Some case is better than Bounding Volume Hierarchy but some case not.
29 30

Hashing function (Project):

Both images are created from hashing Grid function to implement ray tracing. This tecnique is simple and no comparison.

Algorithm :

  • Create grid
  • Give the index to grid by using spatial hash function
  • Create the bounding box to bound every object in scene
  • Create hash table by using the same hash function
  • If ray pass through the grid, look at grid index and go to the hash table in the grid index. Then, check the intersection of ray and object in the list
  • Some case is better than Bounding Volume Hierarchy and grid but some case not. I will discuss about that next.

download : Apply Hashing fuction to ray tracing.ppt

 

# of objects
Without any technique
Bounding Volume Hierarchy (5)
Grid (3)
Spatial Hash Function with (3, 1001 bz)
30 spheres
5544 ms.
3654 ms.
5264 ms.
6420 ms.
50 spheres
8649 ms.
8560 ms.
6908 ms.
7770 ms.
100 spheres
25093 ms.
21314 ms.
21014 ms.
18966 ms.
1000 spheres
84297 ms.
51403 ms.
41155 ms.
35863 ms.
10000 spheres
3597051 ms.
3404671 ms.
1571266 ms.
912032 ms.

Experments :

The experiments show that bounding volume hierarchy works very good in small environment, 30 spheres in the scene. When I created more spheres in the scene, for example, 50 spheres, grid works better than bounding volume hierarchy. However, when I created more spheres such as 100, 1000, and 10000 spheres, the best time computation is spatial hash function as shown in the table. Thus, spatial hash function works very well in large environment.

Bucket size
1000 spheres
10000 spheres
101
42152 ms.
1191214 ms.
1001
35863 ms.
912032 ms.
10001
36582 ms.
1205683 ms.
 

Bucket size :

Bucket size can affect the result of the experiment. For this table, I would like to present that we can increase bucket size to improve the algorithm performance. However, at the bucket size 10001, it doesn’t improve time computation. Therefore, the performance can be improved by increasing the bucket size but at one point it also can reduce the algorithm performance.

 

Image from using applied hash function to ray tracing:

31 32 33

34 35 36

 

 

Question: jmesit@cs.ucf.edu

Last modification : April 25, 2005

Jaruwan Mesit