My experiments in raytracing optimisation using kd trees. At the moment I achieve 6fps on a dual 2Ghz G5, rendering the Stanford bunny with three lights. There are still algorithmic improvements that can be made to the kd tree generation and the ray tracing. With SIMD I hope to achieve close to 20fps.
Archive
| Date: | 2 December 2005 |
| Processor: | 2 x 799 Mhz G4 (1280 MB) |
| Resolution: | 640 x 480 |
| Triangles: | 1 |
| Render Time: | 0s (0.20s) |
| Rays: | 307200 |
| Details: | The first render, using Barycentric ray collision on one triangle. No optimisations. |
| Date: | 3 December 2005 |
| Processor: | 2 x 799 Mhz G4 (1280 MB) |
| Resolution: | 640 x 480 |
| Triangles: | 948 |
| Render Time: | 1m 1s (61.36s) |
| Rays: | 307200 |
| Details: | A simple bunny loader and a single diffuse light. |
| Date: | 4 December 2005 |
| Processor: | 2 x 799 Mhz G4 (1280 MB) |
| Resolution: | 640 x 480 |
| Triangles: | 69451 |
| Render Time: | 71m 22s (4282.54s) |
| Rays: | 307200 |
| Details: | The same but prettier bunny. A non-decimated mesh, three diffuse lights (orange, blue and white), and interpolated triangle normals. Pretty much a linear scaling of time with respect to triangles.
69451 triangles 71m 22s (4282.54s) = 16.27 triangles/secs
16301 triangles 14m 35s (875.17s) = 18.62 triangles/secs
948 triangles 0m 52s (52.25s) = 18.14 triangles/secs
|
| kdTree Generate Time: | 0m 6s (6.65s) |
| Date: | 8 December 2005 |
| Processor: | 2 x 2000 Mhz G5 (1536MB) |
| Resolution: | 640 x 480 |
| Triangles: | 69451 |
| Triangles Tested: | 762909 |
| Rays Tested: | 68553 |
| Triangles/Ray: | 11.128747 |
| Render Time: | 0m 0s (0.75s) |
| Rays: | 307200 |
| Details: | First run of an unoptimised kdTree and an unoptimised tree traversal algorithm. |
| kdTree Generate Time: | 0m 11s (11.55s) |
| Date: | 8 December 2005 |
| Processor: | 2 x 2000 Mhz G5 (1536MB) |
| Resolution: | 640 x 480 |
| Triangles: | 69451 |
| Triangles Tested: | 254754 |
| Rays Tested: | 157028 |
| Triangles/Ray: | 1.622348 |
| Render Time: | 0m 0s (0.59s) |
| Rays: | 307200 |
| Details: | |
| Date: | 9 December 2005 |
| Processor: | 2 x 2000 Mhz G5 (1536MB) |
| Resolution: | 640 x 480 |
| Triangles: | 871414 |
| kd tree Generate Time: | 1m 18s (78.59s) |
| Triangles Tested: | 40401702 |
| Rays Tested: | 1413038 |
| Triangles/Ray: | 28.592087 |
| Render Time: | 0m 8s (8.96s) |
| Rays: | 307200 |
| Details: | |
| Date: | 9 December 2005 |
| Processor: | 2 x 2000 Mhz G5 (1536MB) |
| Resolution: | 640 x 480 |
| Triangles: | 1087716 |
| kd tree Generate Time: | 1m 42s (102.36s) |
| Triangles Tested: | 8028306 |
| Rays Tested: | 321541 |
| Triangles/Ray: | 24.968218 |
| Render Time: | 0m 1s (1.41s) |
| Rays: | 307200 |
| Details: | |
| Date: | 21 December 2005 |
| Processor: | 2 x 799 Mhz G4 (1280MB) |
| Resolution: | 640 x 480 |
| Triangles: | 69451 |
| kd tree Generate Time: | 0m 11s (11.29s) |
| Triangles Tested: | 3615672 |
| Rays Tested: | 984916 |
| Triangles/Ray: | 3.177286 |
| Render Time: | 0m 2s (2.10s) |
| Rays: | 307200 |
| Details: | Lighting with shadows and a single reflective plane. |
| Date: | 21 December 2005 |
| Processor: | 2 x 799 Mhz G4 (1280MB) |
| Resolution: | 640 x 480 |
| Triangles: | 69451 |
| kd tree Generate Time: | 0m 11s (11.35s) |
| Triangles Tested: | 41125319 |
| Rays Tested: | 13496854 |
| Triangles/Ray: | 3.236847 |
| Render Time: | 0m 37s (37.09s) |
| Rays: | 307200 |
| Details: | Ambient occlusion from lots of point lights to give a quick and nice image. |
| Date: | 23 December 2005 |
| Processor: | 2 x 799 Mhz G4 (1280MB) |
| Resolution: | 640 x 480 |
| Triangles: | 284 |
| Triangles Tested: | 15340699 |
| Rays Tested: | 3880798 |
| Triangles/Ray: | 2.847289 |
| Render Time: | 0m 32s (32.81s) |
| Rays: | 307200 |
| Details: | Image based lighting. Median-cut 128 lights. HDR render. |