It makes a huge difference in start-up time for complex meshes: Kd-tree construction for a 10 million triangle mesh takes quite some time (Ok, my construction routine may not be the fastest…) but once cached, rendering can start nearly instantaneously.

I’ve also noticed that kd-trees my renderer generate lend themselves to compression fairly well. E.g., the tree generated for the Stanford repository’s Asian Dragon weights around 124 MB, but a standard zip slims it down to 53 MB.

Hence, I’ll certainly add compression support to the cache.

That brings up the question: What does a high compression ratio say about a tree’s quality?

I’ve finally finished implementing multithreaded ray tracing in order to take full advantage of my iMac’s Core 2 Duo.

The implementation currently uses pthreads, which are simple enough to use and integrate. Of course, now with Snow Leopard a good move would be to go the Grand Central Dispatch route.

One issue of multithreaded ray tracing is synchronised access to the frame buffer in order to insure consistent reconstruction filtering.

A solution is to restrict access to the frame buffer to a single thread. This implies buffering the samples produced by the worker threads and have this dedicated thread splatter them on the frame buffer.

Another solution, which I have implemented, is to have the worker threads work on non-contiguous parts of the frame buffer at any given time: That way worker threads may have access to the frame buffer and no buffering is required.

I would be curious to have performance figures in order to compare these two approaches.

One of the main new features of this version is its 64-bit kernel. However, there are a couple of catches: First, even if you have a shiny Intel Core 2 Duo Mac you must have a 64-bit EFI in order to boot the 64-bit kernel.

ioreg -l -p IODeviceTree | grep firmware-abi

If you get EFI64 you’re in luck, otherwise tough… I got lucky: I do have a 64-bit EFI. Nice.

Second, even then all Macs (except Xserve) boot the 32-bit kernel by default. To use the 64-bit kernel you can either press ‘6′ and ‘4′ everytime you boot your Mac, or you can edit com.apple.Boot.plist as follows:

1. Open /Library/Preferences/SystemConfiguration/com.apple.Boot.plist

2. Find the string:

<key>Kernel Flags</key><string></string>

3. Change it to:

<key>Kernel Flags</key><string>arch=x86_64</string>

That’s it, you’re set. (if you ever need to boot in 32-bit mode, just press ‘3′ and ‘2′ during boot).

_

Update (31st August):

After having made the modification above, I wanted to insure that the kernel used was indeed the 64-bit one. To do that: