Sunday, July 18, 2010

Stanford bunny released.




I was cleaning up my hard disk at home and I found the 'packet ray tracing project that was supposed to become the base of a photon mapper' I posted about in the past:

Since I will have no time to take this anywhere anytime soon, I thought it might be a good idea to simply release the source code instead of backing it up into the dark corners of the web and a backup DVD.

The last version I am releasing dropped support for all primitives (e.g: spheres, quadrics) except for triangles and concentrated on triangles with SSE Packet tracing, BVH, and multi-core using OpenMP.

OpenMP is disabled in the delivered executable because my Visual Studio at home is the Express Edition and it does not include OpenMP.
SSE Packet tracing is also disabled because it does not support Lambert shading (I do not remember why though ... it's been a long time).
This means you will not see the 1 millions rays per sec I claim in one of the posts.

There is a number of build configurations and preprocessor options to play around with to enable / disable these options and other features.

In the executable, you can use numeric pad keys to rotate the camera and arrow keys to move the camera, when you do this, the program enters a low detail rendering mode until you release the keys. It is not great, but at least some kind of camera control is there.

The code depends on the 'WitchEngine' library (namespace 'WE' in code) which is the engine I had written for 'World of Football', but that is a LOT of code, so I spent 10 minutes only copying the code needed. It should therefore build with no problems, all you need is to point it to a DX9 SDK.